summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorChloe M. <chloe@mirocom.org>2026-05-23 08:13:25 -0400
committerChloe M. <chloe@mirocom.org>2026-05-23 08:13:45 -0400
commit82e68e92a92e8973dcca8d94f175c9d16be94c80 (patch)
tree6966132b85b7a89dec9d795b088fb45cc219b34f /core
parentf6e7360fd5aa5e8870579f0f6ef9a55c73de6c74 (diff)
core: lexer: Return -1 on bad ident
Signed-off-by: Chloe M. <chloe@mirocom.org>
Diffstat (limited to 'core')
-rw-r--r--core/lexer.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/core/lexer.c b/core/lexer.c
index a9ffac1..1a62e71 100644
--- a/core/lexer.c
+++ b/core/lexer.c
@@ -112,6 +112,7 @@ lexer_scan_ident(struct cescal_state *state, char lc, struct token *res)
if (lc != '_' && !isalpha(lc)) {
cc_error("bad identifier\n");
+ return -1;
}
buf[bufsz++] = lc;