diff options
-rw-r--r-- | src/qml/parser/qqmljslexer.cpp | 11 | ||||
-rw-r--r-- | src/qml/parser/qqmljslexer_p.h | 16 |
2 files changed, 14 insertions, 13 deletions
diff --git a/src/qml/parser/qqmljslexer.cpp b/src/qml/parser/qqmljslexer.cpp index e0a20b00d2..28f4684649 100644 --- a/src/qml/parser/qqmljslexer.cpp +++ b/src/qml/parser/qqmljslexer.cpp @@ -1802,6 +1802,17 @@ void Lexer::setState(const Lexer::State &state) _state = state; } +int Lexer::parseModeFlags() const { + int flags = 0; + if (qmlMode()) + flags |= QmlMode|StaticIsKeyword; + if (yieldIsKeyWord()) + flags |= YieldIsKeyword; + if (_staticIsKeyword) + flags |= StaticIsKeyword; + return flags; +} + namespace QQmlJS { QDebug operator<<(QDebug dbg, const Lexer::State &s) { diff --git a/src/qml/parser/qqmljslexer_p.h b/src/qml/parser/qqmljslexer_p.h index 242a6ec095..b6144e8894 100644 --- a/src/qml/parser/qqmljslexer_p.h +++ b/src/qml/parser/qqmljslexer_p.h @@ -102,17 +102,6 @@ public: public: Lexer(Engine *engine, LexMode lexMode = LexMode::WholeCode); - int parseModeFlags() const { - int flags = 0; - if (qmlMode()) - flags |= QmlMode|StaticIsKeyword; - if (yieldIsKeyWord()) - flags |= YieldIsKeyword; - if (_staticIsKeyword) - flags |= StaticIsKeyword; - return flags; - } - bool qmlMode() const; bool yieldIsKeyWord() const { return _state.generatorLevel != 0; } void setStaticIsKeyword(bool b) { _staticIsKeyword = b; } @@ -144,8 +133,6 @@ public: Error errorCode() const; QString errorMessage() const; - bool prevTerminator() const; - bool followsClosingBrace() const; bool canInsertAutomaticSemicolon(int token) const; enum ParenthesesState { @@ -245,6 +232,9 @@ protected: static int classify(const QChar *s, int n, int parseModeFlags); private: + int parseModeFlags() const; + bool prevTerminator() const; + bool followsClosingBrace() const; inline void scanChar(); inline QChar peekChar(); int scanToken(); |