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:
Luna 2019-10-05 10:40:36 -03:00
parent 5348e2b5c4
commit 192baf0725
1 changed files with 3 additions and 3 deletions

View File

@ -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;
}, },
} }
} }