Skip to content

Commit

Permalink
fix returns symbol parser
Browse files Browse the repository at this point in the history
  • Loading branch information
sezna committed Nov 11, 2024
1 parent e4b9cd0 commit d14bdf5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion petr-parse/src/parse_to_ast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ impl Parse for FunctionDeclaration {
p.token(Token::CloseParen)?;
seq
};
p.token(Token::ReturnsKeyword)?;
p.one_of([Token::ReturnsKeyword, Token::ReturnsSymbol])?;
let return_type = p.parse()?;
let body = p.parse()?;
Some(Self {
Expand Down

0 comments on commit d14bdf5

Please sign in to comment.