Create simple calc as test draft

This commit is contained in:
Bartłomiej Pluta
2019-07-10 20:14:05 +02:00
parent 76eabbff0e
commit aefa8e8f3c
5 changed files with 111 additions and 9 deletions

View File

@@ -1,14 +1,12 @@
import sys
from smnp.calc import draft
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=False, baseEnvironment=stdLibraryEnv)
#stdLibraryEnv = loadStandardLibrary()
#Interpreter.interpretFile(sys.argv[1], printTokens=False, printAst=True, execute=False, baseEnvironment=stdLibraryEnv)
draft()
except SmnpException as e:
print(e.message())