Merge pull request #313 from GreasySlug/main

Fix syntax is ignore after multi-line comment
This commit is contained in:
Slug 2022-12-26 21:03:15 +09:00 committed by GitHub
commit 68e0622efb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 20 additions and 4 deletions

View file

@ -323,6 +323,8 @@ impl Lexer /*<'a>*/ {
(']', '#') => {
nest_level -= 1;
if nest_level == 0 {
self.consume(); // ]
self.consume(); // #
return Ok(());
}
}
@ -448,8 +450,7 @@ impl Lexer /*<'a>*/ {
if let Err(e) = self.lex_multi_line_comment() {
return Some(Err(e));
}
}
if let Err(e) = self.lex_comment() {
} else if let Err(e) = self.lex_comment() {
return Some(Err(e));
}
}
@ -1059,8 +1060,7 @@ impl Iterator for Lexer /*<'a>*/ {
if let Err(e) = self.lex_multi_line_comment() {
return Some(Err(e));
}
}
if let Err(e) = self.lex_comment() {
} else if let Err(e) = self.lex_comment() {
return Some(Err(e));
}
}