introduce the enum literal type

see #683
This commit is contained in:
Andrew Kelley
2019-03-24 00:44:18 -04:00
parent 64dddd7afe
commit d0551db5cd
16 changed files with 195 additions and 3 deletions

View File

@@ -259,6 +259,8 @@ static const char *node_type_str(NodeType node_type) {
return "PromiseType";
case NodeTypePointerType:
return "PointerType";
case NodeTypeEnumLiteral:
return "EnumLiteral";
}
zig_unreachable();
}
@@ -1154,6 +1156,11 @@ static void render_node_extra(AstRender *ar, AstNode *node, bool grouped) {
}
break;
}
case NodeTypeEnumLiteral:
{
fprintf(ar->f, ".%s", buf_ptr(&node->data.enum_literal.identifier->data.str_lit.str));
break;
}
case NodeTypeParamDecl:
case NodeTypeTestDecl:
case NodeTypeStructField: