From 0c148f6e0c27a195a3ababebb8e4d294c8a91eda Mon Sep 17 00:00:00 2001 From: Curle Date: Sun, 17 Jan 2021 06:36:11 +0000 Subject: [PATCH] Add overrides for aliasing int types to their bit width (int->i32) --- src/Lexer.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/Lexer.c b/src/Lexer.c index 62e823a..f1af0ea 100644 --- a/src/Lexer.c +++ b/src/Lexer.c @@ -179,6 +179,14 @@ static int ReadKeyword(char* Str) { break; case 'i': + // alias char, int and long types + + if(!strcmp(Str, "i8")) + return TY_CHAR; + if(!strcmp(Str, "i32")) + return TY_INT; + if(!strcmp(Str, "i64")) + return TY_LONG; if(!strcmp(Str, "int")) return TY_INT;