diff --git a/parso/python/diff.py b/parso/python/diff.py index b2e83fc..1bbfe34 100644 --- a/parso/python/diff.py +++ b/parso/python/diff.py @@ -255,8 +255,7 @@ class DiffParser(object): last_until_line = 0 while until_line > self._nodes_stack.parsed_until_line: node = self._try_parse_part(until_line) - nodes = self._get_children_nodes(node) - #self._insert_nodes(nodes) + nodes = node.children self._nodes_stack.add_parsed_nodes(nodes) logging.debug( @@ -271,16 +270,6 @@ class DiffParser(object): assert last_until_line != self._nodes_stack.parsed_until_line, last_until_line last_until_line = self._nodes_stack.parsed_until_line - def _get_children_nodes(self, node): - nodes = node.children - first_element = nodes[0] - # TODO this looks very strange... - if first_element.type == 'error_leaf' and \ - first_element.original_type == 'indent': - assert False, str(nodes) - - return nodes - def _try_parse_part(self, until_line): """ Sets up a normal parser that uses a spezialized tokenizer to only parse