From 9df84745152bcbb82f977a97ef11d7dd05456885 Mon Sep 17 00:00:00 2001 From: Max Wash Date: Wed, 27 Nov 2024 22:30:42 +0000 Subject: [PATCH] frontend: always print lex tokens when compiling file or repl input --- frontend/cmd/compile.c | 3 ++- frontend/cmd/repl.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/frontend/cmd/compile.c b/frontend/cmd/compile.c index 54fe67c..6563bd6 100644 --- a/frontend/cmd/compile.c +++ b/frontend/cmd/compile.c @@ -61,8 +61,9 @@ static int compile_file(const char *path, const b_arglist *args) break; } + print_lex_token(tok); + if (lex_only) { - print_lex_token(tok); ivy_token_destroy(tok); continue; } diff --git a/frontend/cmd/repl.c b/frontend/cmd/repl.c index b2cbc48..29c80d7 100644 --- a/frontend/cmd/repl.c +++ b/frontend/cmd/repl.c @@ -66,8 +66,9 @@ int repl(const b_command *cmd, const b_arglist *args, const b_array *_) continue; } + print_lex_token(tok); + if (lex_only) { - print_lex_token(tok); ivy_token_destroy(tok); continue; }