Skip to content

Commit 52fecfc

Browse files
committed
Revise comments
1 parent f0f1e70 commit 52fecfc

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

src/parser/mod.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14069,7 +14069,6 @@ impl<'a> Parser<'a> {
1406914069
loop {
1407014070
let t = self.peek_nth_token_no_skip_ref(0);
1407114071
match &t.token {
14072-
// ~ only the very first comment
1407314072
Token::Whitespace(ws) => {
1407414073
match ws {
1407514074
Whitespace::SingleLineComment { comment, prefix } => {
@@ -14088,7 +14087,7 @@ impl<'a> Parser<'a> {
1408814087
Whitespace::MultiLineComment(comment) => {
1408914088
return Ok(if supports_multiline && comment.starts_with("+") {
1409014089
let text = comment.split_at(1).1.into();
14091-
self.next_token_no_skip(); // ~ consume the token
14090+
self.next_token_no_skip(); // Consume the comment token
1409214091
Some(OptimizerHint {
1409314092
text,
1409414093
style: OptimizerHintStyle::MultiLine,
@@ -14097,9 +14096,8 @@ impl<'a> Parser<'a> {
1409714096
None
1409814097
});
1409914098
}
14100-
// but skip (pure) whitespace
1410114099
Whitespace::Space | Whitespace::Tab | Whitespace::Newline => {
14102-
// consume the token and try with the next whitespace (if any)
14100+
// Consume the token and try with the next whitespace or comment
1410314101
self.next_token_no_skip();
1410414102
}
1410514103
}

0 commit comments

Comments
 (0)