Allow string literals for [N]byte

This commit is contained in:
gingerBill
2020-11-20 16:01:59 +00:00
parent 87956676f5
commit 6416a6f39c
6 changed files with 34 additions and 7 deletions

View File

@@ -1221,6 +1221,13 @@ bool is_type_u8_slice(Type *t) {
}
return false;
}
bool is_type_u8_array(Type *t) {
t = base_type(t);
if (t->kind == Type_Array) {
return is_type_u8(t->Array.elem);
}
return false;
}
bool is_type_u8_ptr(Type *t) {
t = base_type(t);
if (t->kind == Type_Pointer) {