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 => {
|
.Block => {
|
||||||
std.debug.warn("TODO type analysis of {}\n", node.*);
|
self.doError("Block can't be found at root");
|
||||||
return CompileError.TypeError;
|
return CompileError.Invalid;
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue