mirror of
https://github.com/davidhalter/parso.git
synced 2026-05-18 06:20:03 +08:00
Remove more unused code.
This commit is contained in:
+1
-12
@@ -255,8 +255,7 @@ class DiffParser(object):
|
|||||||
last_until_line = 0
|
last_until_line = 0
|
||||||
while until_line > self._nodes_stack.parsed_until_line:
|
while until_line > self._nodes_stack.parsed_until_line:
|
||||||
node = self._try_parse_part(until_line)
|
node = self._try_parse_part(until_line)
|
||||||
nodes = self._get_children_nodes(node)
|
nodes = node.children
|
||||||
#self._insert_nodes(nodes)
|
|
||||||
|
|
||||||
self._nodes_stack.add_parsed_nodes(nodes)
|
self._nodes_stack.add_parsed_nodes(nodes)
|
||||||
logging.debug(
|
logging.debug(
|
||||||
@@ -271,16 +270,6 @@ class DiffParser(object):
|
|||||||
assert last_until_line != self._nodes_stack.parsed_until_line, last_until_line
|
assert last_until_line != self._nodes_stack.parsed_until_line, last_until_line
|
||||||
last_until_line = self._nodes_stack.parsed_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):
|
def _try_parse_part(self, until_line):
|
||||||
"""
|
"""
|
||||||
Sets up a normal parser that uses a spezialized tokenizer to only parse
|
Sets up a normal parser that uses a spezialized tokenizer to only parse
|
||||||
|
|||||||
Reference in New Issue
Block a user