Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Man fix another bug in file position tracking.

  • Loading branch information...
commit 321eedbf773a942bbbda7bc30707076058da7b13 1 parent 26a266c
@kr authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 slex.py
View
4 slex.py
@@ -59,9 +59,9 @@ def update_line_count(lexeme):
nlc = lexeme.count('\n')
self.line += nlc
if nlc == 0:
- self.col += len(lexeme) - lexeme.rfind('\n')
+ self.col += len(lexeme)
else:
- self.col = 1
+ self.col = len(lexeme) - lexeme.rfind('\n')
def decorate(toks, p):
return [(n,l,p) for n,l in toks]
Please sign in to comment.
Something went wrong with that request. Please try again.