aboutsummaryrefslogtreecommitdiff
path: root/src/ast_render.cpp
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2017-02-02 13:23:18 -0500
committerAndrew Kelley <superjoe30@gmail.com>2017-02-02 13:23:18 -0500
commitb78c91951a1db34c615a011e0444608285f1a74c (patch)
tree2cae0609ec2670a4a1e1adb7905ae495abc9a238 /src/ast_render.cpp
parentcd08c1f3be278366ee69c3cf4ab1091eb884e264 (diff)
downloadzig-b78c91951a1db34c615a011e0444608285f1a74c.tar.gz
zig-b78c91951a1db34c615a011e0444608285f1a74c.zip
remove ability to mark if and switch as inline
if and switch are implicitly inline if the condition/target expression is known at compile time. instead of: ``` inline if (condition) ... inline switch (target) ... ``` one can use: ``` if (comptime condition) ... switch (comptime target) ... ```
Diffstat (limited to 'src/ast_render.cpp')
-rw-r--r--src/ast_render.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/ast_render.cpp b/src/ast_render.cpp
index 3bba70486a..12642c71e2 100644
--- a/src/ast_render.cpp
+++ b/src/ast_render.cpp
@@ -844,14 +844,12 @@ static void render_node_extra(AstRender *ar, AstNode *node, bool grouped) {
}
case NodeTypeBreak:
{
- const char *inline_str = node->data.break_expr.is_inline ? "inline " : "";
- fprintf(ar->f, "%sbreak", inline_str);
+ fprintf(ar->f, "break");
break;
}
case NodeTypeContinue:
{
- const char *inline_str = node->data.continue_expr.is_inline ? "inline " : "";
- fprintf(ar->f, "%scontinue", inline_str);
+ fprintf(ar->f, "continue");
break;
}
case NodeTypeSliceExpr: