QmlJS: Fix uses of Scanner::state().

Change-Id: I5195fc43e8a6653bf52c0eaa6cddb8dfd25b6217
Reviewed-on: http://codereview.qt.nokia.com/319
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
This commit is contained in:
Christian Kamm
2011-06-03 08:49:40 +02:00
committed by Joerg Bornemann
parent 362aef67e0
commit b729d4b973
5 changed files with 12 additions and 12 deletions

View File

@@ -108,7 +108,7 @@ void Highlighter::highlightBlock(const QString &text)
onClosingParenthesis('-', token.end() - 1, index == tokens.size()-1);
m_inMultilineComment = false;
} else if (!m_inMultilineComment
&& m_scanner.state() == Scanner::MultiLineComment
&& (m_scanner.state() & Scanner::MultiLineMask) == Scanner::MultiLineComment
&& index == tokens.size() - 1) {
onOpeningParenthesis('+', token.offset, index == 0);
m_inMultilineComment = true;
@@ -337,7 +337,7 @@ int Highlighter::onBlockStart()
if (previousState != -1) {
state = previousState & 0xff;
m_braceDepth = (previousState >> 8);
m_inMultilineComment = (state == Scanner::MultiLineComment);
m_inMultilineComment = ((state & Scanner::MultiLineMask) == Scanner::MultiLineComment);
}
m_foldingIndent = m_braceDepth;