forked from qt-creator/qt-creator
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:
committed by
Joerg Bornemann
parent
362aef67e0
commit
b729d4b973
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user