-
Notifications
You must be signed in to change notification settings - Fork 663
Closed
Description
The expected()
function will format the message in accordance with format!("Expected: {expected}, found: {found}")
. However, when expected()
is called by parse_prefix()
at line 1254 in mod.rs, the parameter is "an expression:". Consequently, the formatted message is "Expected: an expression:, found: EOF". The ":," appears redundant.
Related code:
/// Report `found` was encountered instead of `expected`
pub fn expected<T>(&self, expected: &str, found: TokenWithLocation) -> Result<T, ParserError> {
parser_err!(
format!("Expected: {expected}, found: {found}"),
found.location
)
}
// in parse_prefix()
_ => self.expected("an expression:", next_token),
Metadata
Metadata
Assignees
Labels
No labels