From 4d7835e21a28fbfeca5202332c52cb47340941d5 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Sun, 10 Jan 2016 17:27:58 -0700 Subject: delete unused enumfield and enumdecl node types --- src/parser.cpp | 22 ---------------------- 1 file changed, 22 deletions(-) (limited to 'src/parser.cpp') diff --git a/src/parser.cpp b/src/parser.cpp index 0448837dc1..b9c55ef319 100644 --- a/src/parser.cpp +++ b/src/parser.cpp @@ -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); -- cgit v1.2.3