aboutsummaryrefslogtreecommitdiffstats
path: root/Scanner.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Scanner.cpp')
-rw-r--r--Scanner.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Scanner.cpp b/Scanner.cpp
index 90a3b454..124c88d9 100644
--- a/Scanner.cpp
+++ b/Scanner.cpp
@@ -212,7 +212,7 @@ bool Scanner::skipWhitespace()
bool Scanner::skipWhitespaceExceptLF()
{
int const startPosition = getSourcePos();
- while (m_char == ' ' || m_char == '\t')
+ while (isWhiteSpace(m_char) && !isLineTerminator(m_char))
advance();
// Return whether or not we skipped any characters.
return getSourcePos() != startPosition;
@@ -305,7 +305,7 @@ Token::Value Scanner::scanMultiLineDocComment()
endFound = true;
break;
}
- else
+ else if (charsAdded)
addCommentLiteralChar('\n');
}