aboutsummaryrefslogtreecommitdiff
path: root/repl.py
diff options
context:
space:
mode:
Diffstat (limited to 'repl.py')
-rw-r--r--repl.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/repl.py b/repl.py
index 9310ffc..d22c8b8 100644
--- a/repl.py
+++ b/repl.py
@@ -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}")