Merge the PgenParser and our own parser

This commit is contained in:
Dave Halter
2018-06-27 23:45:04 +02:00
parent edce279dee
commit f7d3d4e82f
4 changed files with 142 additions and 212 deletions

View File

@@ -287,7 +287,7 @@ class DiffParser(object):
omitted_first_indent = False
indents = []
tokens = self._tokenizer(lines, (1, 0))
stack = self._active_parser.pgen_parser.stack
stack = self._active_parser.stack
for typ, string, start_pos, prefix in tokens:
start_pos = start_pos[0] + line_offset, start_pos[1]
if typ == PythonTokenTypes.INDENT: