stage2: add error for comptime control flow in runtime block

This commit is contained in:
Veikka Tuominen
2022-07-26 16:20:38 +03:00
parent b5861193e0
commit 9e0a930ce3
14 changed files with 71 additions and 24 deletions

View File

@@ -2283,6 +2283,8 @@ pub const SrcLoc = struct {
.@"while" => tree.whileFull(node).ast.cond_expr,
.for_simple => tree.forSimple(node).ast.cond_expr,
.@"for" => tree.forFull(node).ast.cond_expr,
.@"orelse" => node,
.@"catch" => node,
else => unreachable,
};
return nodeToSpan(tree, src_node);