fix(sema, ir): Potential elvate bugs
This commit is contained in:
@@ -59,6 +59,10 @@ impl Parser {
|
||||
}
|
||||
|
||||
fn parse_stmt(&mut self) -> Result<Statement, ParseProcessError> {
|
||||
if self.peek().value == TokenValue::Semicolon {
|
||||
self.advance(1);
|
||||
return Ok(Statement::Block(BlockStmt { statements: vec![] }));
|
||||
}
|
||||
match self.parse_var_decl_stmt(ParseType::TryParse) {
|
||||
Ok(var_decl) => return Ok(Statement::VarDecl(var_decl)),
|
||||
Err(ParseProcessError::ErrorInMatch) => return Err(ParseProcessError::ErrorInMatch),
|
||||
|
||||
Reference in New Issue
Block a user