Working proof of concept of multiple left associative operators

This commit is contained in:
Bartłomiej Pluta
2019-07-10 15:02:17 +02:00
parent 823c5cb18f
commit 0a7d29d4a1
15 changed files with 138 additions and 58 deletions

View File

@@ -1,14 +1,14 @@
import sys
from smnp.ast.node.bool import BoolLiteralNode
from smnp.error.base import SmnpException
from smnp.library.loader import loadStandardLibrary
from smnp.program.interpreter import Interpreter
from smnp.token.tokenizer import tokenize
def main():
try:
stdLibraryEnv = loadStandardLibrary()
Interpreter.interpretFile(sys.argv[1], printTokens=False, printAst=True, baseEnvironment=stdLibraryEnv)
tokens = tokenize([ "true == true == false.not.not" ])
BoolLiteralNode.parse(tokens).node.print()
#stdLibraryEnv = loadStandardLibrary()
#Interpreter.interpretFile(sys.argv[1], printTokens=False, printAst=True, baseEnvironment=None)
except SmnpException as e:
print(e.message())