- added tests to test empty comment

- fixed skipSingleLineComment
- some style fixes
This commit is contained in:
LianaHus
2015-09-10 14:26:34 +02:00
parent 3fc2561223
commit 845bcf8db0
5 changed files with 43 additions and 4 deletions
+3 -1
View File
@@ -224,7 +224,9 @@ Token::Value Scanner::skipSingleLineComment()
// to be part of the single-line comment; it is recognized
// separately by the lexical grammar and becomes part of the
// stream of input elements for the syntactic grammar
while (advance() && !isLineTerminator(m_char)) { };
while (!isLineTerminator(m_char))
if (!advance()) break;
return Token::Whitespace;
}