diff options
author | Thomas Voss <mail@thomasvoss.com> | 2024-06-14 21:12:28 +0200 |
---|---|---|
committer | Thomas Voss <mail@thomasvoss.com> | 2024-06-14 21:12:28 +0200 |
commit | 69f9bed7bf1773f6dec07606abd4105ca4b90b4a (patch) | |
tree | 5a6d45eac7b33983ef30f5e830e330836a7b6200 /src/parser.c | |
parent | 5671e8e4cdc3551b87a516d6130afb2243701ebd (diff) |
Allow identifiers in expressions
Diffstat (limited to 'src/parser.c')
-rw-r--r-- | src/parser.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/parser.c b/src/parser.c index b79d1f0..6e6838a 100644 --- a/src/parser.c +++ b/src/parser.c @@ -114,6 +114,10 @@ parseexpr(struct ast *ast, struct lexemes toks) toksidx++; ast->kinds[i] = ASTNUMLIT; break; + case LEXIDENT: + toksidx++; + ast->kinds[i] = ASTIDENT; + break; case LEXLPAR: ast->kinds[i] = ASTFN; idx_t_ lhs = parseproto(ast, toks); |