Skip to content

Commit

Permalink
Change "Extra token" error message (no idea what that is).
Browse files Browse the repository at this point in the history
  • Loading branch information
Ivorforce committed Apr 26, 2024
1 parent 0dc66f7 commit c15adca
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 @@ -38,7 +38,7 @@ pub fn parse_program(content: &str) -> RResult<(ast::Block, Vec<ErrorRecovery<us
.with_note(RuntimeError::note(format!("Expected one of: {}", expected.iter().map(|s| rem_first_and_last(s)).join(" ")).as_str()))
}
ParseError::ExtraToken { token: (start, token, end) } => {
RuntimeError::error("Unrecognized token.").in_range(start..end)
RuntimeError::error("Extra token.").in_range(start..end)
}
ParseError::User { error } => {
panic!()
Expand Down

0 comments on commit c15adca

Please sign in to comment.