Commit a83523d5 authored by Toon Verwaest's avatar Toon Verwaest Committed by Commit Bot

[scanner] Reuse SkipSingleLineComment in SkipSourceURLComment

Change-Id: Ie8109300ce134f3f9d0c1619f1375c29af2c8fa6
Reviewed-on: https://chromium-review.googlesource.com/c/1494758Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59967}
parent 70a7287c
...@@ -277,11 +277,10 @@ Token::Value Scanner::SkipSingleLineComment() { ...@@ -277,11 +277,10 @@ Token::Value Scanner::SkipSingleLineComment() {
Token::Value Scanner::SkipSourceURLComment() { Token::Value Scanner::SkipSourceURLComment() {
TryToParseSourceURLComment(); TryToParseSourceURLComment();
while (c0_ != kEndOfInput && !unibrow::IsLineTerminator(c0_)) { if (unibrow::IsLineTerminator(c0_) || c0_ == kEndOfInput) {
Advance(); return Token::WHITESPACE;
} }
return SkipSingleLineComment();
return Token::WHITESPACE;
} }
void Scanner::TryToParseSourceURLComment() { void Scanner::TryToParseSourceURLComment() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment