Browse Source

Fix wrong line numbers after optimization

Yentl Van Tendeloo 8 years ago
parent
commit
0fad20a163
1 changed files with 1 additions and 1 deletions
  1. 1 1
      interface/HUTN/hutn_compiler/hutnparser.py

+ 1 - 1
interface/HUTN/hutn_compiler/hutnparser.py

@@ -350,7 +350,7 @@ class Parser(object):
         global line_cache
         self.generate_line_cache()
 
-        if pos > len(line_cache[self]):
+        if pos < len(line_cache[self]):
             return {'line': line_cache[self][pos][0], 'column': line_cache[self][pos][1]}
         else:
             return {'line': line_cache[self][-1][0], 'column': line_cache[self][-1][1] + 1}