diff options
| author | LemonBoy <thatlemon@gmail.com> | 2019-12-02 21:07:44 +0100 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2019-12-02 19:53:06 -0500 |
| commit | 26c8930b9594ab320b0e3add682e99063491142e (patch) | |
| tree | 7c7162c26e30f92598cdcbf4a2309512bcdfd373 /src/ast_render.cpp | |
| parent | b7be57766b8c6d7fee27fd7c23e8c999a134bb27 (diff) | |
| download | zig-26c8930b9594ab320b0e3add682e99063491142e.tar.gz zig-26c8930b9594ab320b0e3add682e99063491142e.zip | |
Accept comptime-known expression for asm
Diffstat (limited to 'src/ast_render.cpp')
| -rw-r--r-- | src/ast_render.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/ast_render.cpp b/src/ast_render.cpp index 531fcf1852..a8fb899ec3 100644 --- a/src/ast_render.cpp +++ b/src/ast_render.cpp @@ -884,7 +884,9 @@ static void render_node_extra(AstRender *ar, AstNode *node, bool grouped) { { AstNodeAsmExpr *asm_expr = &node->data.asm_expr; const char *volatile_str = (asm_expr->volatile_token != nullptr) ? " volatile" : ""; - fprintf(ar->f, "asm%s (\"%s\"\n", volatile_str, buf_ptr(&asm_expr->asm_template->data.str_lit.str)); + fprintf(ar->f, "asm%s (", volatile_str); + render_node_ungrouped(ar, asm_expr->asm_template); + fprintf(ar->f, ")"); print_indent(ar); fprintf(ar->f, ": "); for (size_t i = 0; i < asm_expr->output_list.length; i += 1) { |
