summaryrefslogtreecommitdiff
path: root/core/lexer.c
diff options
context:
space:
mode:
authorIan M. <ian@aptel.org>2026-10-04 22:00:53 +0000
committerIan M. <ian@aptel.org>2026-10-04 22:00:53 +0000
commitf6c0a27feedb8258afbf10d64c7040e327377250 (patch)
tree8c9b99be92b77c76818b500c5c708c94ac010ff6 /core/lexer.c
parent5af35efce67446c47c4816013cd06474631decad (diff)
lexer: Bail if the token is invalid
Signed-off-by: Ian M. <ian@aptel.org>
Diffstat (limited to 'core/lexer.c')
-rw-r--r--core/lexer.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/core/lexer.c b/core/lexer.c
index 53a418d..163e2f5 100644
--- a/core/lexer.c
+++ b/core/lexer.c
@@ -4,6 +4,7 @@
*/
#include <atas/lexer.h>
+#include <atas/trace.h>
#include <stdio.h>
#include <stdbool.h>
@@ -79,5 +80,7 @@ atas_lexer_scan(struct atas_state *state, struct atas_token *token)
return 0;
}
+ trace_fatal("unexpected token '%c' while scanning\n", c);
+ atas_fatal(state);
return -1;
}