ability to set tag values of enums

also remove support for enums with 0 values

closes #305
This commit is contained in:
Andrew Kelley
2017-12-02 22:31:42 -05:00
parent 98237f7c0b
commit 137c8f5e8a
13 changed files with 452 additions and 147 deletions

View File

@@ -677,6 +677,10 @@ static void render_node_extra(AstRender *ar, AstNode *node, bool grouped) {
fprintf(ar->f, ": ");
render_node_grouped(ar, field_node->data.struct_field.type);
}
if (field_node->data.struct_field.value != nullptr) {
fprintf(ar->f, "= ");
render_node_grouped(ar, field_node->data.struct_field.value);
}
fprintf(ar->f, ",\n");
}