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

@@ -5,7 +5,5 @@ from smnp.program.interpreter import Interpreter
def loadStandardLibrary():
mainSource = resource_string('smnp.library.code', 'main.mus').decode("utf-8")
boolSource = resource_string('smnp.library.code', 'bool.mus').decode("utf-8")
env = Interpreter.interpretString(mainSource)
return Interpreter.interpretString(boolSource, baseEnvironment=env)
return env