Add support for creating custom functions

This commit is contained in:
Bartłomiej Pluta
2019-07-01 10:55:54 +02:00
parent 611317c890
commit ebd3d1f275
6 changed files with 238 additions and 80 deletions

View File

@@ -22,6 +22,8 @@ class Environment():
def __init__(self, scopes, functions):
self.scopes = scopes
self.functions = functions
self.customFunctions = {}
self.callStack = []
def findVariable(self, name, type=None):
for scope in reversed(self.scopes):