summaryrefslogtreecommitdiff
path: root/error.py
diff options
context:
space:
mode:
Diffstat (limited to 'error.py')
-rw-r--r--error.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/error.py b/error.py
index 5015828..9055746 100644
--- a/error.py
+++ b/error.py
@@ -60,8 +60,10 @@ class StringMark(StreamMark):
end -= 5
break
snippet = utf8(self.buffer[start:end])
+ caret = '^'
+ caret = '^ (line: {})'.format(self.line+1)
return ' '*indent + head + snippet + tail + '\n' \
- + ' '*(indent+self.pointer-start+len(head)) + '^'
+ + ' '*(indent+self.pointer-start+len(head)) + caret
def __str__(self):
snippet = self.get_snippet()