From 2ae50e907a7042aecb00bcff7643859d3f657895 Mon Sep 17 00:00:00 2001 From: Quinn Stephens Date: Sat, 2 Nov 2024 08:28:59 -0400 Subject: More type parsing Signed-off-by: Quinn Stephens --- compiler/parser/parser.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'compiler/parser/parser.c') diff --git a/compiler/parser/parser.c b/compiler/parser/parser.c index aeec48b..261385b 100644 --- a/compiler/parser/parser.c +++ b/compiler/parser/parser.c @@ -79,6 +79,10 @@ parser_init(struct parser *ctx, char *source) debug("Initializing parser...\n"); lexer_init(&ctx->lexer, source); - add_builtin(ctx->types, "uint32", 4, 0); add_builtin(ctx->types, "any", 0, 0); + add_builtin(ctx->types, "uint", sizeof(void*), 0); + add_builtin(ctx->types, "uint64", 8, 0); + add_builtin(ctx->types, "uint32", 4, 0); + add_builtin(ctx->types, "uint16", 2, 0); + add_builtin(ctx->types, "uint8", 1, 0); } -- cgit v1.2.3