aboutsummaryrefslogtreecommitdiff
path: root/src/ast_render.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ast_render.cpp')
-rw-r--r--src/ast_render.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/ast_render.cpp b/src/ast_render.cpp
index 655570716e..20fcf955cf 100644
--- a/src/ast_render.cpp
+++ b/src/ast_render.cpp
@@ -197,6 +197,8 @@ static const char *node_type_str(NodeType node_type) {
return "Label";
case NodeTypeGoto:
return "Goto";
+ case NodeTypeCompTime:
+ return "CompTime";
case NodeTypeBreak:
return "Break";
case NodeTypeContinue:
@@ -810,8 +812,13 @@ static void render_node_extra(AstRender *ar, AstNode *node, bool grouped) {
}
case NodeTypeGoto:
{
- const char *inline_str = node->data.goto_expr.is_inline ? "inline " : "";
- fprintf(ar->f, "%sgoto %s", inline_str, buf_ptr(node->data.goto_expr.name));
+ fprintf(ar->f, "goto %s", buf_ptr(node->data.goto_expr.name));
+ break;
+ }
+ case NodeTypeCompTime:
+ {
+ fprintf(ar->f, "comptime ");
+ render_node_grouped(ar, node->data.comptime_expr.expr);
break;
}
case NodeTypeForExpr: