Create import statement evaluator and update standard library

This commit is contained in:
Bartłomiej Pluta
2019-07-12 22:08:37 +02:00
parent b31e17d176
commit cc569b5f19
4 changed files with 7 additions and 13 deletions

View File

@@ -1,13 +1,14 @@
import sys
from smnp.error.base import SmnpException
from smnp.library.loader import loadStandardLibrary
from smnp.program.interpreter import Interpreter
def main():
try:
#stdLibraryEnv = loadStandardLibrary()
Interpreter.interpretFile(sys.argv[1], printTokens=False, printAst=True, execute=True, baseEnvironment=None)
stdLibraryEnv = loadStandardLibrary()
Interpreter.interpretFile(sys.argv[1], printTokens=False, printAst=True, execute=True, baseEnvironment=stdLibraryEnv)
#draft()
#tokens = tokenize(['function a(b...) { x+y}'])
#FunctionDefinitionParser(tokens).node.print()