From 8f7e3d1d2cd43d30ccc16799fcf69058ccc5a717 Mon Sep 17 00:00:00 2001 From: Mel Date: Thu, 3 Mar 2022 01:57:25 +0100 Subject: Re-arrange error locations --- src/parse/macros.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/parse/macros.rs') diff --git a/src/parse/macros.rs b/src/parse/macros.rs index 9cf995c..aad6144 100644 --- a/src/parse/macros.rs +++ b/src/parse/macros.rs @@ -16,13 +16,13 @@ macro_rules! consume { if let Token {kind: $( $kind )|+, ..} = token { Ok(token) } else { - Err(parser_error(ErrorLocation::Specific(token.location), ParserError::UnexpectedToken { + Err(ParserError::new(ParserErrorLocation::Specific(token.location), ParserErrorKind::UnexpectedToken { received: token.kind, expected: merge_token_names!($($kind),+), })) } } else { - Err(parser_error(ErrorLocation::Eof, ParserError::UnexpectedEof { + Err(ParserError::new(ParserErrorLocation::Eof, ParserErrorKind::UnexpectedEof { expected: merge_token_names!($($kind),+), })) } -- cgit 1.4.1