Reduce size of Token.

This commit is contained in:
Stephen Chung
2022-02-26 23:18:47 +08:00
parent 61e6403ac6
commit b17e891b63
4 changed files with 34 additions and 24 deletions

View File

@@ -267,7 +267,12 @@ impl From<LexError> for ParseErrorType {
/// Error when parsing a script.
#[derive(Debug, Eq, PartialEq, Clone, Hash)]
pub struct ParseError(pub Box<ParseErrorType>, pub Position);
pub struct ParseError(
/// Parse error type.
pub Box<ParseErrorType>,
/// [Position] of the parse error.
pub Position,
);
impl Error for ParseError {}