Fixed, working unions. Had to move the is_union member to the end. I'm not sure if this is a C bug or an effect of me doing something weird somewhere

This commit is contained in:
Nathan Braswell
2016-06-16 23:06:38 -07:00
parent 59f5c6f667
commit 4a33a94b15
4 changed files with 23 additions and 25 deletions

View File

@@ -104,9 +104,9 @@ obj ast_transformation (Object) {
return template
} else {
// pass in whether or not this is a union
/*var type_def_node = ast_type_def_ptr(name, concat_symbol_tree(get_node("obj_nonterm", child)) == "uni")*/
var type_def_node = ast_type_def_ptr(name, concat_symbol_tree(get_node("obj_nonterm", child)) == "uni")
/*var type_def_node = ast_type_def_ptr(name, false)*/
var type_def_node = ast_type_def_ptr(name)
/*var type_def_node = ast_type_def_ptr(name)*/
type_def_node->type_def.self_type = type_ptr(type_def_node, transform_traits(get_node("traits", child)))
ast_to_syntax.set(type_def_node, child)
add_to_scope("~enclosing_scope", scope, type_def_node)