fix(es/lexer): Fix parsing of interpreter (#2589)

This commit is contained in:
Antonio Musolino 2021-10-30 14:10:45 +02:00 committed by GitHub
parent b197eb65af
commit 52318a4a8e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -461,14 +461,13 @@ impl<'a, I: Input> Lexer<'a, I> {
self.input.bump();
let c = self.input.cur();
if c == Some('!') {
loop {
while let Some(c) = self.input.cur() {
if c != '\n' && c != '\r' && c != '\u{8232}' && c != '\u{8233}' {
self.input.bump();
continue;
}
while let Some(c) = self.input.cur() {
self.input.bump();
if c == '\n' || c == '\r' || c == '\u{8232}' || c == '\u{8233}' {
return Ok(true);
}
}
Ok(false)
} else {
self.input.reset_to(start);
Ok(false)