![]() |
Qt 6.x
The Qt SDK
|
#include <qqmljslexer_p.h>
Inheritance diagram for QQmlJS::Lexer:
Collaboration diagram for QQmlJS::Lexer:Classes | |
| struct | State |
Static Protected Member Functions | |
| static int | classify (const QChar *s, int n, int parseModeFlags) |
Friends | |
| QML_PARSER_EXPORT QDebug | operator<< (QDebug dbg, const Lexer &l) |
Definition at line 34 of file qqmljslexer_p.h.
| anonymous enum |
Definition at line 37 of file qqmljslexer_p.h.
|
strong |
| Enumerator | |
|---|---|
| Reset | |
| Continue | |
Definition at line 100 of file qqmljslexer_p.h.
|
strong |
| Enumerator | |
|---|---|
| NoComment | |
| HadComment | |
| InMultilineComment | |
Definition at line 157 of file qqmljslexer_p.h.
| enum QQmlJS::Lexer::Error |
Definition at line 61 of file qqmljslexer_p.h.
|
strong |
| Enumerator | |
|---|---|
| SawImport | |
| NoQmlImport | |
Definition at line 93 of file qqmljslexer_p.h.
|
strong |
| Enumerator | |
|---|---|
| WholeCode | |
| LineByLine | |
Definition at line 98 of file qqmljslexer_p.h.
| Enumerator | |
|---|---|
| IgnoreParentheses | |
| CountParentheses | |
| BalancedParentheses | |
Definition at line 151 of file qqmljslexer_p.h.
| Enumerator | |
|---|---|
| QmlMode | |
| YieldIsKeyword | |
| StaticIsKeyword | |
Definition at line 87 of file qqmljslexer_p.h.
| Enumerator | |
|---|---|
| NoPrefix | |
| EqualPrefix | |
Definition at line 74 of file qqmljslexer_p.h.
| Enumerator | |
|---|---|
| RegExp_Global | |
| RegExp_IgnoreCase | |
| RegExp_Multiline | |
| RegExp_Unicode | |
| RegExp_Sticky | |
Definition at line 79 of file qqmljslexer_p.h.
| Lexer::Lexer | ( | Engine * | engine, |
| LexMode | lexMode = LexMode::WholeCode |
||
| ) |
Definition at line 50 of file qqmljslexer.cpp.
References engine.
| bool Lexer::canInsertAutomaticSemicolon | ( | int | token | ) | const |
Definition at line 1582 of file qqmljslexer.cpp.
References QQmlJS::Lexer::State::followsClosingBrace, QQmlJS::Lexer::State::terminator, and token.
|
staticprotected |
Definition at line 898 of file qqmljskeywords_p.h.
References QQmlJS::classify10(), QQmlJS::classify12(), QQmlJS::classify2(), QQmlJS::classify3(), QQmlJS::classify4(), QQmlJS::classify5(), QQmlJS::classify6(), QQmlJS::classify7(), QQmlJS::classify8(), QQmlJS::classify9(), and parseModeFlags().
Here is the call graph for this function:| QString Lexer::code | ( | ) | const |
Definition at line 62 of file qqmljslexer.cpp.
Referenced by addLexToken(), and setCode().
Here is the caller graph for this function:
|
inline |
Definition at line 159 of file qqmljslexer_p.h.
| Lexer::Error Lexer::errorCode | ( | ) | const |
Definition at line 1549 of file qqmljslexer.cpp.
References QQmlJS::Lexer::State::errorCode.
Referenced by addLexToken().
Here is the caller graph for this function:| QString Lexer::errorMessage | ( | ) | const |
Definition at line 1554 of file qqmljslexer.cpp.
Referenced by addLexToken().
Here is the caller graph for this function:| bool Lexer::followsClosingBrace | ( | ) | const |
Definition at line 1577 of file qqmljslexer.cpp.
References QQmlJS::Lexer::State::followsClosingBrace.
|
inline |
Definition at line 160 of file qqmljslexer_p.h.
| int Lexer::lex | ( | ) |
Definition at line 196 of file qqmljslexer.cpp.
References QQmlJS::Engine::addComment(), BalancedParentheses, QQmlJS::Lexer::State::bracesCount, QQmlJS::Lexer::State::comments, CountParentheses, QQmlJS::Lexer::State::currentChar, QQmlJS::Lexer::State::delimited, QQmlJS::Lexer::State::followsClosingBrace, HadComment, QQmlJS::Lexer::State::handlingDirectives, IgnoreParentheses, QQmlJS::Lexer::State::importState, InMultilineComment, QString::isEmpty(), LineByLine, NoComment, NoQmlImport, QQmlJS::Lexer::State::parenthesesCount, QQmlJS::Lexer::State::parenthesesState, Q_FALLTHROUGH, qmlMode(), QQmlJS::Lexer::State::restrictedKeyword, SawImport, QQmlJS::Lexer::State::stackToken, tokenKind(), QQmlJS::Lexer::State::tokenKind, tokenOffset(), tokenStartColumn(), and tokenStartLine().
Referenced by addLexToken(), QQmlJS::Dom::Scanner::operator()(), and scanDirectives().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Definition at line 105 of file qqmljslexer_p.h.
Referenced by classify().
Here is the caller graph for this function:| bool Lexer::prevTerminator | ( | ) | const |
Definition at line 1572 of file qqmljslexer.cpp.
References QQmlJS::Lexer::State::terminator.
| bool Lexer::qmlMode | ( | ) | const |
Definition at line 57 of file qqmljslexer.cpp.
Referenced by lex(), and setCode().
Here is the caller graph for this function:
|
inline |
Definition at line 140 of file qqmljslexer_p.h.
|
inline |
Definition at line 129 of file qqmljslexer_p.h.
|
inline |
Definition at line 130 of file qqmljslexer_p.h.
| bool Lexer::scanDirectives | ( | Directives * | directives, |
| DiagnosticMessage * | error | ||
| ) |
Definition at line 1641 of file qqmljslexer.cpp.
References QString::append(), QString::at(), QString::endsWith(), error, QQmlJS::Lexer::State::handlingDirectives, QQmlJS::Directives::importFile(), QQmlJS::Directives::importModule(), QChar::isUpper(), isUriToken(), lex(), QQmlJS::Directives::pragmaLibrary(), Q_ASSERT, setError(), QQmlJS::Lexer::State::tokenKind, tokenStartColumn(), tokenStartLine(), tokenText(), and QCoreApplication::translate().
Here is the call graph for this function:| bool Lexer::scanRegExp | ( | RegExpBodyPrefix | prefix = NoPrefix | ) |
Definition at line 1384 of file qqmljslexer.cpp.
References QString::arg(), QQmlJS::Lexer::State::currentChar, EqualPrefix, QQmlJS::Lexer::State::patternFlags, regExpFlagFromChar(), QString::resize(), QCoreApplication::translate(), QChar::unicode(), and QQmlJS::Lexer::State::validTokenText.
Referenced by addLexToken().
Here is the call graph for this function:
Here is the caller graph for this function:| void Lexer::setCode | ( | const QString & | code, |
| int | lineno, | ||
| bool | qmlMode = true, |
||
| Lexer::CodeContinuation | codeContinuation = CodeContinuation::Reset |
||
| ) |
Definition at line 67 of file qqmljslexer.cpp.
References QString::clear(), code(), Continue, qmlMode(), QString::reserve(), Reset, QQmlJS::Engine::setCode(), QString::size(), and QString::unicode().
Referenced by QQmlJS::Dom::QmlFile::QmlFile(), QQmlJSLinter::applyFixes(), QV4::Compiler::Codegen::compileModule(), QmlIR::IRBuilder::generateFromQml(), QQmlJSLinter::lintFile(), QQmlJSTypeReader::operator()(), QQmlJSTypeDescriptionReader::operator()(), QQmlJS::Dom::Scanner::operator()(), QV4::Script::parse(), QV4::FunctionCtor::parse(), QV4::Script::precompile(), and qCompileJSFile().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 1800 of file qqmljslexer.cpp.
References state().
Referenced by QQmlJS::Dom::Scanner::operator()().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Definition at line 118 of file qqmljslexer_p.h.
| const Lexer::State & Lexer::state | ( | ) | const |
Definition at line 1796 of file qqmljslexer.cpp.
Referenced by addLexToken(), QQmlJS::Dom::Scanner::operator()(), and setState().
Here is the caller graph for this function:
|
inline |
Definition at line 132 of file qqmljslexer_p.h.
Referenced by lex().
Here is the caller graph for this function:
|
inline |
Definition at line 134 of file qqmljslexer_p.h.
Referenced by addLexToken().
Here is the caller graph for this function:
|
inline |
Definition at line 133 of file qqmljslexer_p.h.
Referenced by lex().
Here is the caller graph for this function:
|
inline |
Definition at line 139 of file qqmljslexer_p.h.
|
inline |
Definition at line 137 of file qqmljslexer_p.h.
Referenced by addLexToken(), lex(), and scanDirectives().
Here is the caller graph for this function:
|
inline |
Definition at line 136 of file qqmljslexer_p.h.
Referenced by lex(), and scanDirectives().
Here is the caller graph for this function:| QString Lexer::tokenText | ( | ) | const |
Definition at line 1538 of file qqmljslexer.cpp.
References QQmlJS::Lexer::State::tokenKind, and QQmlJS::Lexer::State::validTokenText.
Referenced by addLexToken(), and scanDirectives().
Here is the caller graph for this function:
|
inline |
Definition at line 141 of file qqmljslexer_p.h.
|
inline |
Definition at line 117 of file qqmljslexer_p.h.
|
friend |
Definition at line 442 of file qqmljslexer.cpp.