core: lexer: Add arrow token
Signed-off-by: Chloe M. <chloe@mirocom.org>
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user