diff options
| author | Chloe M. <chloe@aptel.org> | 2026-08-23 09:12:47 +0000 |
|---|---|---|
| committer | Chloe M. <chloe@aptel.org> | 2026-08-23 09:12:47 +0000 |
| commit | f3df011c18821ee6b09f9c2ee8fd48163ed92096 (patch) | |
| tree | 733c63e7689d6a81a3bf029509b009e1d7a7bedc /core/parser.c | |
| parent | be90a06efa50496ce4a7fd3f79970efda30498cf (diff) | |
core: lexer+parser: Handle integer literals
Signed-off-by: Chloe M. <chloe@aptel.org>
Diffstat (limited to 'core/parser.c')
| -rw-r--r-- | core/parser.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/core/parser.c b/core/parser.c index 698691e..79fda93 100644 --- a/core/parser.c +++ b/core/parser.c @@ -50,6 +50,10 @@ token_to_data(struct token *tok, struct data_value *result) result->v = 0; result->type = DATA_TYPE_INT; return 0; + case TT_INTLIT: + result->v = tok->v; + result->type = DATA_TYPE_INT; + return 0; default: return -1; } |
