diff options
Diffstat (limited to 'src/qml/parser/qqmljslexer_p.h')
-rw-r--r-- | src/qml/parser/qqmljslexer_p.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/qml/parser/qqmljslexer_p.h b/src/qml/parser/qqmljslexer_p.h index 51152bfd6e..e2ee4ae351 100644 --- a/src/qml/parser/qqmljslexer_p.h +++ b/src/qml/parser/qqmljslexer_p.h @@ -62,7 +62,7 @@ QT_BEGIN_NAMESPACE namespace QQmlJS { class Engine; -class DiagnosticMessage; +struct DiagnosticMessage; class Directives; class QML_PARSER_EXPORT Lexer: public QQmlJSGrammar @@ -124,6 +124,11 @@ public: StaticIsKeyword = 0x4 }; + enum class ImportState { + SawImport, + NoQmlImport + }; + public: Lexer(Engine *engine); @@ -188,6 +193,7 @@ private: inline void scanChar(); int scanToken(); int scanNumber(QChar ch); + int scanVersionNumber(QChar ch); enum ScanStringMode { SingleQuote = '\'', DoubleQuote = '"', @@ -242,6 +248,7 @@ private: int _tokenLength; int _tokenLine; int _tokenColumn; + ImportState _importState = ImportState::NoQmlImport; bool _validTokenText; bool _prohibitAutomaticSemicolon; @@ -253,6 +260,7 @@ private: bool _skipLinefeed = false; int _generatorLevel = 0; bool _staticIsKeyword = false; + bool _handlingDirectives = false; }; } // end of namespace QQmlJS |