Skip to content

Commit

Permalink
Change "too early" to "unexpectedly".
Browse files Browse the repository at this point in the history
  • Loading branch information
Ivorforce committed Apr 26, 2024
1 parent afed513 commit 0dc66f7
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 @@ -30,7 +30,7 @@ pub fn parse_program(content: &str) -> RResult<(ast::Block, Vec<ErrorRecovery<us
RuntimeError::error("Invalid token.").in_range(location..location)
},
ParseError::UnrecognizedEof { location, expected } => {
RuntimeError::error("File ended too early.").in_range(location..location)
RuntimeError::error("File ended unexpectedly.").in_range(location..location)
.with_note(RuntimeError::note(format!("Expected one of: {}", expected.iter().map(|s| rem_first_and_last(s)).join(" ")).as_str()))
}
ParseError::UnrecognizedToken { token: (start, token, end), expected } => {
Expand Down

0 comments on commit 0dc66f7

Please sign in to comment.