core: lexer: Return -1 on bad ident

Signed-off-by: Chloe M. <chloe@mirocom.org>
This commit is contained in:
2026-05-23 08:13:25 -04:00
parent f6e7360fd5
commit 82e68e92a9
+1
View File
@@ -112,6 +112,7 @@ lexer_scan_ident(struct cescal_state *state, char lc, struct token *res)
if (lc != '_' && !isalpha(lc)) { if (lc != '_' && !isalpha(lc)) {
cc_error("bad identifier\n"); cc_error("bad identifier\n");
return -1;
} }
buf[bufsz++] = lc; buf[bufsz++] = lc;