core: lexer: Return -1 on bad ident
Signed-off-by: Chloe M. <chloe@mirocom.org>
This commit is contained in:
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user