summaryrefslogtreecommitdiff
path: root/core/lexer.c
diff options
context:
space:
mode:
authorChloe M. <chloe@mirocom.org>2026-05-23 08:10:57 -0400
committerChloe M. <chloe@mirocom.org>2026-05-23 08:13:45 -0400
commit86645eb137a6d793ea095510ee08b8313c9d0cbe (patch)
tree21d00a9414edad9d86d25fd64132501489295d16 /core/lexer.c
parent3e3ccae003ad0990555d17590588672aedc428c4 (diff)
core: lexer: Add arrow token
Signed-off-by: Chloe M. <chloe@mirocom.org>
Diffstat (limited to 'core/lexer.c')
-rw-r--r--core/lexer.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/core/lexer.c b/core/lexer.c
index 26ab451..bc40542 100644
--- a/core/lexer.c
+++ b/core/lexer.c
@@ -240,6 +240,13 @@ lexer_nom(struct cescal_state *state, struct token *res)
}
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) {
lexer_check_kw(state, res);