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.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/ast_render.cpp b/src/ast_render.cpp
index a302652eb1..118eee8f2c 100644
--- a/src/ast_render.cpp
+++ b/src/ast_render.cpp
@@ -339,6 +339,7 @@ void ast_print(FILE *f, AstNode *node, int indent) {
break;
case NodeTypeDirective:
fprintf(f, "%s\n", node_type_str(node->type));
+ ast_print(f, node->data.directive.expr, indent + 2);
break;
case NodeTypePrefixOpExpr:
fprintf(f, "%s %s\n", node_type_str(node->type),
@@ -631,8 +632,9 @@ static void render_node(AstRender *ar, AstNode *node) {
fprintf(ar->f, "}");
break;
case NodeTypeDirective:
- fprintf(ar->f, "#%s(\"%s\")\n", buf_ptr(&node->data.directive.name),
- buf_ptr(&node->data.directive.param));
+ fprintf(ar->f, "#%s(", buf_ptr(&node->data.directive.name));
+ render_node(ar, node->data.directive.expr);
+ fprintf(ar->f, ")\n");
break;
case NodeTypeReturnExpr:
zig_panic("TODO");