/* Builtin Types
*****************************************************************************/
static void builtins(Parser* p) {
-#if 0
- sym_add(&(p->syms), "void", VoidType());
- sym_add(&(p->syms), "bool", UIntType(1u));
- sym_add(&(p->syms), "byte", UIntType(8u));
- sym_add(&(p->syms), "uint", UIntType(64u));
- sym_add(&(p->syms), "u8", UIntType(8u));
- sym_add(&(p->syms), "u16", UIntType(16u));
- sym_add(&(p->syms), "u32", UIntType(32u));
- sym_add(&(p->syms), "u64", UIntType(64u));
- sym_add(&(p->syms), "int", IntType(64u));
- sym_add(&(p->syms), "i8", IntType(8u));
- sym_add(&(p->syms), "i16", IntType(16u));
- sym_add(&(p->syms), "i32", IntType(32u));
- sym_add(&(p->syms), "i64", IntType(64u));
- sym_add(&(p->syms), "string", ArrayType(sym_get(&(p->syms), "byte")));
-#endif
+ sym_addtype(&(p->syms), "void", VoidType());
+ sym_addtype(&(p->syms), "bool", UIntType(1u));
+ sym_addtype(&(p->syms), "byte", UIntType(8u));
+ sym_addtype(&(p->syms), "uint", UIntType(64u));
+ sym_addtype(&(p->syms), "u8", UIntType(8u));
+ sym_addtype(&(p->syms), "u16", UIntType(16u));
+ sym_addtype(&(p->syms), "u32", UIntType(32u));
+ sym_addtype(&(p->syms), "u64", UIntType(64u));
+ sym_addtype(&(p->syms), "int", IntType(64u));
+ sym_addtype(&(p->syms), "i8", IntType(8u));
+ sym_addtype(&(p->syms), "i16", IntType(16u));
+ sym_addtype(&(p->syms), "i32", IntType(32u));
+ sym_addtype(&(p->syms), "i64", IntType(64u));
+ sym_addtype(&(p->syms), "string", ArrayOf(sym_get(&(p->syms), "byte"), -1));
}
/* Driver Modes