update parsers to new noasync syntax

This commit is contained in:
Vexu
2020-03-09 11:02:16 +02:00
parent e2fd289a33
commit 6f8d732599
6 changed files with 108 additions and 43 deletions

View File

@@ -220,6 +220,8 @@ static const char *node_type_str(NodeType node_type) {
return "SwitchRange";
case NodeTypeCompTime:
return "CompTime";
case NodeTypeNoAsync:
return "NoAsync";
case NodeTypeBreak:
return "Break";
case NodeTypeContinue:
@@ -1091,6 +1093,12 @@ static void render_node_extra(AstRender *ar, AstNode *node, bool grouped) {
render_node_grouped(ar, node->data.comptime_expr.expr);
break;
}
case NodeTypeNoAsync:
{
fprintf(ar->f, "noasync ");
render_node_grouped(ar, node->data.noasync_expr.expr);
break;
}
case NodeTypeForExpr:
{
if (node->data.for_expr.name != nullptr) {