ast_instantiate(ast_label, ctx, ast_label_delete);
ast_expression_init((ast_expression*)self, (ast_expression_codegen*)&ast_label_codegen);
+ self->expression.vtype = TYPE_NOEXPR;
+
self->name = util_strdup(name);
self->irblock = NULL;
self->gotos = NULL;
TYPE_ARRAY ,
TYPE_NIL , /* it's its own type / untyped */
+ TYPE_NOEXPR , /* simply invalid in expressions */
TYPE_COUNT
};
"union",
"array",
- "nil"
+ "nil",
+ "<no-expression>"
};
size_t type_sizeof_[TYPE_COUNT] = {
0, /* TYPE_UNION */
0, /* TYPE_ARRAY */
0, /* TYPE_NIL */
+ 0, /* TYPE_NOESPR */
};
uint16_t type_store_instr[TYPE_COUNT] = {
AINSTR_END, /* union */
AINSTR_END, /* array */
AINSTR_END, /* nil */
+ AINSTR_END, /* noexpr */
};
uint16_t field_store_instr[TYPE_COUNT] = {
AINSTR_END, /* union */
AINSTR_END, /* array */
AINSTR_END, /* nil */
+ AINSTR_END, /* noexpr */
};
uint16_t type_storep_instr[TYPE_COUNT] = {
AINSTR_END, /* union */
AINSTR_END, /* array */
AINSTR_END, /* nil */
+ AINSTR_END, /* noexpr */
};
uint16_t type_eq_instr[TYPE_COUNT] = {
AINSTR_END, /* union */
AINSTR_END, /* array */
AINSTR_END, /* nil */
+ AINSTR_END, /* noexpr */
};
uint16_t type_ne_instr[TYPE_COUNT] = {
AINSTR_END, /* union */
AINSTR_END, /* array */
AINSTR_END, /* nil */
+ AINSTR_END, /* noexpr */
};
uint16_t type_not_instr[TYPE_COUNT] = {
AINSTR_END, /* union */
AINSTR_END, /* array */
AINSTR_END, /* nil */
+ AINSTR_END, /* noexpr */
};
/* protos */