summaryrefslogtreecommitdiff
path: root/src/parser/parser_utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/parser/parser_utils.c')
-rw-r--r--src/parser/parser_utils.c48
1 files changed, 48 insertions, 0 deletions
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)
{