diff options
Diffstat (limited to 'repl.py')
| -rw-r--r-- | repl.py | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -1,4 +1,5 @@ from lexer import lex +from parser import parse def _get_debug(): return True @@ -13,10 +14,13 @@ def main(): continue try: lexed = lex(inp) - #lexed = lex(inp, []) if _get_debug(): acc = " ".join([f"{l}" for l in lexed]) print(f" - LEX: {acc}") + parsed = parse(lexed) + if _get_debug(): + acc = " ".join([f"{p}" for p in parsed]) + print(f" - PARSE: {acc}") idx += 1 except Exception as e: print(f"panic! {e}") |
