core: lexer: Add arrow token

Signed-off-by: Chloe M. <chloe@mirocom.org>
This commit is contained in:
2026-05-23 08:10:57 -04:00
parent 3e3ccae003
commit 86645eb137
3 changed files with 9 additions and 0 deletions
+7
View File
@@ -239,6 +239,13 @@ lexer_nom(struct cescal_state *state, struct token *res)
return 0;
}
return -1;
case '-':
res->c = c;
if (lexer_consume_single(state, true) == '>') {
res->type = TT_ARROW;
return 0;
}
return -1;
default:
if (lexer_scan_ident(state, c, res) == 0) {