Create standard library proof of concept

This commit is contained in:
Bartłomiej Pluta
2019-07-10 13:23:40 +02:00
parent 83ea3aaf0f
commit 739610c663
6 changed files with 24 additions and 11 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:
Interpreter.interpretFile(sys.argv[1], printAst=True)
stdLibraryEnv = loadStandardLibrary()
Interpreter.interpretFile(sys.argv[1], printAst=True, baseEnvironment=stdLibraryEnv)
except SmnpException as e:
print(e.message())