Skip to content

Commit

Permalink
fixed the return keyword not being usable alone
Browse files Browse the repository at this point in the history
  • Loading branch information
Maiori44 committed Jul 16, 2022
1 parent a736ec5 commit 73ca6a8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1407,7 +1407,7 @@ pub fn ParseTokens(tokens: Vec<Token>, filename: String) -> Result<Expression, S
i.advanceIf(SEMICOLON);
}
RETURN => {
let expr = if i.advanceIf(SEMICOLON) {
let expr = if i.ended() || i.advanceIf(SEMICOLON) {
None
} else {
Some(i.findExpressions(COMMA, None)?)
Expand Down

0 comments on commit 73ca6a8

Please sign in to comment.