analysis: remove 'else', replace by dedicated Block
It isn't possible to make Blocks at root scope. the parser does not allow such constructions, however, it is still a Node, and it should be handled accordingly.
This commit is contained in:
parent
5348e2b5c4
commit
192baf0725
1 changed files with 3 additions and 3 deletions
|
@ -550,9 +550,9 @@ pub const Analyzer = struct {
|
|||
}
|
||||
},
|
||||
|
||||
else => {
|
||||
std.debug.warn("TODO type analysis of {}\n", node.*);
|
||||
return CompileError.TypeError;
|
||||
.Block => {
|
||||
self.doError("Block can't be found at root");
|
||||
return CompileError.Invalid;
|
||||
},
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue