Skip to content

Commit

Permalink
Update mod.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
DaviRain-Su committed May 31, 2024
1 parent 6916cd5 commit 47ef497
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/parser/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ impl<'a> Parser<'a> {
self.next_token()?;

// add equal expression
*stmt.return_value_mut() = self.parse_expression(LOWEST)?.try_into()?;
*stmt.return_value_mut() = self.parse_expression(LOWEST)?.into();

while !self.cur_token_is(TokenType::SEMICOLON) {
self.next_token()?;
Expand Down

0 comments on commit 47ef497

Please sign in to comment.