diff options
Diffstat (limited to 'repl.py')
| -rw-r--r-- | repl.py | 14 |
1 files changed, 4 insertions, 10 deletions
@@ -1,8 +1,7 @@ from lexer import lex -from parser import parse -from runner import evaluate -from std import _get_debug +def _get_debug(): + return True def main(): print("### neb :)(:") @@ -13,16 +12,11 @@ def main(): if len(inp.strip()) == 0: continue try: - lexed = lex(inp, []) + 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}") - ev = evaluate(parsed, []) - print(f"=> {ev}") idx += 1 except Exception as e: print(f"panic! {e}") |
