Parser - Consume ';' after return statements
This commit is contained in:
parent
3dea0c9a45
commit
12b2855fb1
1 changed files with 1 additions and 0 deletions
|
@ -446,6 +446,7 @@ impl Parser {
|
|||
} else {
|
||||
Some(self.parse_expression()?)
|
||||
};
|
||||
self.consume(&TokenType::Semicolon, "';' expected after return statement")?;
|
||||
Ok(ast::StmtNode::Return {
|
||||
token: ret_token.clone(),
|
||||
value,
|
||||
|
|
Loading…
Reference in a new issue