parent
5a821c055a
commit
31e95ef21e
|
@ -172,7 +172,7 @@ proc peek(self: Compiler, distance: int = 0): ASTNode =
|
|||
## AST node in the tree is returned. A negative
|
||||
## distance may be used to retrieve previously
|
||||
## consumed AST nodes
|
||||
if self.ast.high() == -1 or self.current + distance > self.ast.high() or
|
||||
if self.ast.high() <= -1 or self.current + distance > self.ast.high() or
|
||||
self.current + distance < 0:
|
||||
result = self.ast[^1]
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue