Remove 'move' from the parser tree.
This commit is contained in:
1 parent
dea09b096d
commit
e8b32e358b
4 files changed
+18
-12
No files matched your search
@@ -115,9 +115,6 @@ class Leaf(_NodeOrLeaf):
|
||||
return self.line - self.prefix.count('\n'), 0 # It's the first leaf.
|
||||
return previous_leaf.end_pos
|
||||
|
||||
def move(self, line_offset):
|
||||
self.line += line_offset
|
||||
|
||||
def get_first_leaf(self):
|
||||
return self
|
||||
|
||||
@@ -173,13 +170,6 @@ class BaseNode(_NodeOrLeaf):
|
||||
self.children = children
|
||||
self.parent = None
|
||||
|
||||
def move(self, line_offset):
|
||||
"""
|
||||
Move the Node's start_pos.
|
||||
"""
|
||||
for c in self.children:
|
||||
c.move(line_offset)
|
||||
|
||||
@property
|
||||
def start_pos(self):
|
||||
return self.children[0].start_pos
|
||||
|
||||
Reference in new issue
Block a user