summaryrefslogtreecommitdiff
path: root/parse.c
diff options
context:
space:
mode:
Diffstat (limited to 'parse.c')
-rw-r--r--parse.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/parse.c b/parse.c
index 2d5e3d9..9f7b401 100644
--- a/parse.c
+++ b/parse.c
@@ -277,7 +277,18 @@ static const char *binary_op_to_str(BinaryOp b) {
return "";
}
-static bool type_builtin_is_integer(BuiltinType b) {
+static bool type_builtin_is_uint(BuiltinType b) {
+ switch (b) {
+ case BUILTIN_U8:
+ case BUILTIN_U16:
+ case BUILTIN_U32:
+ case BUILTIN_U64:
+ return true;
+ default: return false;
+ }
+}
+
+static bool type_builtin_is_int(BuiltinType b) {
switch (b) {
case BUILTIN_I8:
case BUILTIN_I16:
@@ -292,7 +303,7 @@ static bool type_builtin_is_integer(BuiltinType b) {
}
}
-static bool type_builtin_is_floating(BuiltinType b) {
+static bool type_builtin_is_float(BuiltinType b) {
switch (b) {
case BUILTIN_F32:
case BUILTIN_F64:
@@ -302,7 +313,7 @@ static bool type_builtin_is_floating(BuiltinType b) {
}
static bool type_builtin_is_numerical(BuiltinType b) {
- return type_builtin_is_integer(b) || type_builtin_is_floating(b);
+ return type_builtin_is_int(b) || type_builtin_is_float(b);
}