From 5e119f776780c05ca2002ef692d7458801585bdc Mon Sep 17 00:00:00 2001 From: Zuhaitz Méndez Fernández de Aránguiz Date: Mon, 12 Jan 2026 21:17:36 +0000 Subject: lowercase types support. --- src/parser/parser_utils.c | 48 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) (limited to 'src/parser/parser_utils.c') diff --git a/src/parser/parser_utils.c b/src/parser/parser_utils.c index ef66104..7733ef7 100644 --- a/src/parser/parser_utils.c +++ b/src/parser/parser_utils.c @@ -1057,10 +1057,18 @@ Type *replace_type_formal(Type *t, const char *p, const char *c, const char *os, { return type_new(TYPE_F32); } + if (strcmp(c, "f32") == 0) + { + return type_new(TYPE_F32); + } if (strcmp(c, "F64") == 0) { return type_new(TYPE_F64); } + if (strcmp(c, "f64") == 0) + { + return type_new(TYPE_F64); + } if (strcmp(c, "usize") == 0) { @@ -1082,6 +1090,46 @@ Type *replace_type_formal(Type *t, const char *p, const char *c, const char *os, { return type_new(TYPE_U128); } + if (strcmp(c, "i8") == 0) + { + return type_new(TYPE_I8); + } + if (strcmp(c, "u8") == 0) + { + return type_new(TYPE_U8); + } + if (strcmp(c, "i16") == 0) + { + return type_new(TYPE_I16); + } + if (strcmp(c, "u16") == 0) + { + return type_new(TYPE_U16); + } + if (strcmp(c, "i32") == 0) + { + return type_new(TYPE_I32); + } + if (strcmp(c, "u32") == 0) + { + return type_new(TYPE_U32); + } + if (strcmp(c, "i64") == 0) + { + return type_new(TYPE_I64); + } + if (strcmp(c, "u64") == 0) + { + return type_new(TYPE_U64); + } + if (strcmp(c, "i128") == 0) + { + return type_new(TYPE_I128); + } + if (strcmp(c, "u128") == 0) + { + return type_new(TYPE_U128); + } if (strcmp(c, "rune") == 0) { -- cgit v1.2.3