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() {
Token::Value Scanner::SkipSourceURLComment() {
TryToParseSourceURLComment();
while (c0_ != kEndOfInput && !unibrow::IsLineTerminator(c0_)) {
Advance();
}
if (unibrow::IsLineTerminator(c0_) || c0_ == kEndOfInput) {
return Token::WHITESPACE;
}
return SkipSingleLineComment();
}
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