This commit is contained in:
NikolajDanger
2022-06-08 16:34:50 +02:00
parent 05072e5a0a
commit 1aff3b4486
4 changed files with 15 additions and 11 deletions

View File

@@ -1,8 +1,9 @@
from centvrion.lexer import Lexer
from centvrion.parser import Parser
from centvrion.ast_nodes import Program
text_input = """
VOCA FORS
CVM FORS
DESIGNA correct VT FORTIS_NVMERVS I C
DESIGNA gvess VT NVLLVS
@@ -30,4 +31,7 @@ tokens = lexer.lex(text_input)
program = parser.parse(tokens)
#print(x)
program.eval()
if isinstance(program, Program):
program.eval()
else:
raise Exception("Output not of type 'Program'", type(program))