From a6f776e1f2bd634395db0ddbbdf40575ad5bca23 Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Sat, 23 May 2026 08:52:56 -0400 Subject: core: lexer: Add unsigned type tokens Signed-off-by: Ian Moffett --- core/lexer.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'core/lexer.c') 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; } } -- cgit v1.2.3