simplifying scanDocumentationComment()

This commit is contained in:
Lefteris Karapetsas 2014-11-21 09:09:39 +01:00
parent cda2532de6
commit 3b16ffa8ab

View File

@ -184,9 +184,8 @@ Token::Value Scanner::scanDocumentationComment()
advance(); //consume the last '/' advance(); //consume the last '/'
while (!isSourcePastEndOfInput() && !IsLineTerminator(m_char)) while (!isSourcePastEndOfInput() && !IsLineTerminator(m_char))
{ {
char c = m_char; addCommentLiteralChar(m_char);
advance(); advance();
addCommentLiteralChar(c);
} }
literal.Complete(); literal.Complete();
return Token::COMMENT_LITERAL; return Token::COMMENT_LITERAL;