[scanner] Advance rather than setting c0_ to ' ' after skipping multiline comments
Change-Id: I62ddddf64d4de79765469e883295e246a18d7f84 Reviewed-on: https://chromium-review.googlesource.com/1177749 Reviewed-by: Leszek Swirski <leszeks@chromium.org> Commit-Queue: Toon Verwaest <verwaest@chromium.org> Cr-Commit-Position: refs/heads/master@{#55172}
This commit is contained in:
parent
53c3c6a9e5
commit
49f7687575
@ -508,11 +508,8 @@ Token::Value Scanner::SkipMultiLineComment() {
|
||||
|
||||
while (V8_UNLIKELY(c0_ == '*')) {
|
||||
Advance();
|
||||
// If we have reached the end of the multi-line comment, we
|
||||
// consume the '/' and insert a whitespace. This way all
|
||||
// multi-line comments are treated as whitespace.
|
||||
if (c0_ == '/') {
|
||||
c0_ = ' ';
|
||||
Advance();
|
||||
return Token::WHITESPACE;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user