delete unused enumfield and enumdecl node types

This commit is contained in:
Andrew Kelley
2016-01-10 17:27:58 -07:00
parent fc748e2ccd
commit 4d7835e21a
5 changed files with 44 additions and 80 deletions

View File

@@ -144,10 +144,6 @@ const char *node_type_str(NodeType node_type) {
return "StructDecl";
case NodeTypeStructField:
return "StructField";
case NodeTypeEnumDecl:
return "EnumDecl";
case NodeTypeEnumField:
return "EnumField";
case NodeTypeStructValueExpr:
return "StructValueExpr";
case NodeTypeStructValueField:
@@ -435,24 +431,6 @@ void ast_print(AstNode *node, int indent) {
ast_print(node->data.struct_field.type, indent + 2);
}
break;
case NodeTypeEnumDecl:
fprintf(stderr, "%s '%s'\n",
node_type_str(node->type), buf_ptr(&node->data.enum_decl.name));
for (int i = 0; i < node->data.enum_decl.fields.length; i += 1) {
AstNode *child = node->data.enum_decl.fields.at(i);
ast_print(child, indent + 2);
}
break;
case NodeTypeEnumField:
fprintf(stderr, "%s '%s'\n", node_type_str(node->type), buf_ptr(&node->data.enum_field.name));
if (node->data.enum_field.val_expr) {
ast_print(node->data.enum_field.val_expr, indent + 2);
}
for (int i = 0; i < node->data.enum_field.fields.length; i += 1) {
AstNode *child = node->data.enum_field.fields.at(i);
ast_print(child, indent + 2);
}
break;
case NodeTypeStructValueExpr:
fprintf(stderr, "%s\n", node_type_str(node->type));
ast_print(node->data.struct_val_expr.type, indent + 2);