Move lexer comment (#536)

This commit is contained in:
Casey Rodarmor 2019-11-13 19:53:14 -08:00 committed by GitHub
parent 598f1c3200
commit f8693d6fe0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -159,6 +159,7 @@ impl<'src> Lexer<'src> {
/// Create an internal error with `message`
fn internal_error(&self, message: impl Into<String>) -> 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(),