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

@@ -463,7 +463,7 @@ void CodeFormatter::recalculateStateAfter(const QTextBlock &block)
leave();
continue;
} else if (m_tokenIndex == m_tokens.size() - 1
&& lexerState == Scanner::Normal) {
&& (lexerState & Scanner::MultiLineMask) == Scanner::Normal) {
leave();
} else if (m_tokenIndex == 0) {
// to allow enter/leave to update the indentDepth
@@ -488,7 +488,7 @@ void CodeFormatter::recalculateStateAfter(const QTextBlock &block)
}
if (topState != multiline_comment_start
&& topState != multiline_comment_cont
&& lexerState == Scanner::MultiLineComment) {
&& (lexerState & Scanner::MultiLineMask) == Scanner::MultiLineComment) {
enter(multiline_comment_start);
}