✨
This commit is contained in:
8
main.py
8
main.py
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user