Fix leaking scope of function to outer scope

This commit is contained in:
Bartłomiej Pluta
2019-07-16 10:18:00 +02:00
parent 6e9e252b86
commit ea28ab6235
5 changed files with 18 additions and 115 deletions

View File

@@ -5,12 +5,12 @@ class BlockEvaluator(Evaluator):
@classmethod
def evaluator(cls, node, environment):
environment.scopes.append({})
environment.appendScope()
for child in node.children:
evaluate(child, environment)
environment.scopes.pop(-1)
environment.popScope()
#
# def evaluateBlock(block, environment):