Move lexer comment (#536)
This commit is contained in:
parent
598f1c3200
commit
f8693d6fe0
@ -159,6 +159,7 @@ impl<'src> Lexer<'src> {
|
|||||||
|
|
||||||
/// Create an internal error with `message`
|
/// Create an internal error with `message`
|
||||||
fn internal_error(&self, message: impl Into<String>) -> CompilationError<'src> {
|
fn internal_error(&self, message: impl Into<String>) -> CompilationError<'src> {
|
||||||
|
// Use `self.token_end` as the location of the error
|
||||||
let token = Token {
|
let token = Token {
|
||||||
src: self.src,
|
src: self.src,
|
||||||
offset: self.token_end.offset,
|
offset: self.token_end.offset,
|
||||||
@ -167,8 +168,6 @@ impl<'src> Lexer<'src> {
|
|||||||
length: 0,
|
length: 0,
|
||||||
kind: Unspecified,
|
kind: Unspecified,
|
||||||
};
|
};
|
||||||
|
|
||||||
// Use `self.token_end` as the location of the error
|
|
||||||
CompilationError {
|
CompilationError {
|
||||||
kind: CompilationErrorKind::Internal {
|
kind: CompilationErrorKind::Internal {
|
||||||
message: message.into(),
|
message: message.into(),
|
||||||
|
Loading…
Reference in New Issue
Block a user