diff options
| author | Ian Moffett <ian@mirocom.org> | 2026-05-23 08:52:56 -0400 |
|---|---|---|
| committer | Ian Moffett <ian@mirocom.org> | 2026-05-23 08:52:56 -0400 |
| commit | a6f776e1f2bd634395db0ddbbdf40575ad5bca23 (patch) | |
| tree | 6071899cd8ff872fb9f3ee629d2d87e7dec64e7d /core/lexer.c | |
| parent | 62451acdd4dd4cf369a801b0603e2e0841bfb627 (diff) | |
core: lexer: Add unsigned type tokens
Signed-off-by: Ian Moffett <ian@mirocom.org>
Diffstat (limited to 'core/lexer.c')
| -rw-r--r-- | core/lexer.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/core/lexer.c b/core/lexer.c index 6c7a4c9..9705eb7 100644 --- a/core/lexer.c +++ b/core/lexer.c @@ -186,6 +186,30 @@ lexer_check_kw(struct cescal_state *state, struct token *res) res->type = TT_RETURN; return; } + + break; + case 'u': + if (strcmp(res->s, "u8") == 0) { + res->type = TT_U8; + return; + } + + if (strcmp(res->s, "u16") == 0) { + res->type = TT_U16; + return; + } + + if (strcmp(res->s, "u32") == 0) { + res->type = TT_U32; + return; + } + + if (strcmp(res->s, "u64") == 0) { + res->type = TT_U64; + return; + } + + break; } } |
