From f8693d6fe03e3fa94e330adf1c38294379f58baf Mon Sep 17 00:00:00 2001 From: Casey Rodarmor Date: Wed, 13 Nov 2019 19:53:14 -0800 Subject: [PATCH] Move lexer comment (#536) --- src/lexer.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/lexer.rs b/src/lexer.rs index 564fc68..cf02394 100644 --- a/src/lexer.rs +++ b/src/lexer.rs @@ -159,6 +159,7 @@ impl<'src> Lexer<'src> { /// Create an internal error with `message` fn internal_error(&self, message: impl Into) -> CompilationError<'src> { + // Use `self.token_end` as the location of the error let token = Token { src: self.src, offset: self.token_end.offset, @@ -167,8 +168,6 @@ impl<'src> Lexer<'src> { length: 0, kind: Unspecified, }; - - // Use `self.token_end` as the location of the error CompilationError { kind: CompilationErrorKind::Internal { message: message.into(),