diff options
| author | Vexu <15308111+Vexu@users.noreply.github.com> | 2019-07-17 01:20:59 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-07-17 01:20:59 +0300 |
| commit | f8e753e19c013cc605a951e5038b4a26099aa135 (patch) | |
| tree | 3cbb2ce1b8815bc565344e23a39e3d39505cfd31 /src/ast_render.cpp | |
| parent | 0063953d1634ce770ce88519c66e3956832ceb7e (diff) | |
| parent | 158e2312ea5f680b7c8598ef578aefb6cbdd3372 (diff) | |
| download | zig-f8e753e19c013cc605a951e5038b4a26099aa135.tar.gz zig-f8e753e19c013cc605a951e5038b4a26099aa135.zip | |
Merge branch 'master' into comment-in-array
Diffstat (limited to 'src/ast_render.cpp')
| -rw-r--r-- | src/ast_render.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/ast_render.cpp b/src/ast_render.cpp index d93efe2193..154803f884 100644 --- a/src/ast_render.cpp +++ b/src/ast_render.cpp @@ -165,8 +165,8 @@ static const char *node_type_str(NodeType node_type) { return "Parens"; case NodeTypeBinOpExpr: return "BinOpExpr"; - case NodeTypeUnwrapErrorExpr: - return "UnwrapErrorExpr"; + case NodeTypeCatchExpr: + return "CatchExpr"; case NodeTypeFnCallExpr: return "FnCallExpr"; case NodeTypeArrayAccessExpr: @@ -444,9 +444,8 @@ static void render_node_extra(AstRender *ar, AstNode *node, bool grouped) { const char *extern_str = extern_string(node->data.fn_proto.is_extern); const char *export_str = export_string(node->data.fn_proto.is_export); const char *inline_str = inline_string(node->data.fn_proto.is_inline); - fprintf(ar->f, "%s%s%s%sfn", pub_str, inline_str, export_str, extern_str); + fprintf(ar->f, "%s%s%s%sfn ", pub_str, inline_str, export_str, extern_str); if (node->data.fn_proto.name != nullptr) { - fprintf(ar->f, " "); print_symbol(ar, node->data.fn_proto.name); } fprintf(ar->f, "("); @@ -1108,7 +1107,7 @@ static void render_node_extra(AstRender *ar, AstNode *node, bool grouped) { fprintf(ar->f, "]"); break; } - case NodeTypeUnwrapErrorExpr: + case NodeTypeCatchExpr: { render_node_ungrouped(ar, node->data.unwrap_err_expr.op1); fprintf(ar->f, " catch "); |
