Lexer Class
(QmlJS::Lexer)Inherits: | QmlJSGrammar |
Public Types
enum | Error { NoError, IllegalCharacter, IllegalHexNumber, UnclosedStringLiteral, ..., IllegalHexadecimalEscapeSequence } |
enum | ParenthesesState { IgnoreParentheses, CountParentheses, BalancedParentheses } |
enum | RegExpBodyPrefix { NoPrefix, EqualPrefix } |
enum | RegExpFlag { RegExp_Global, RegExp_IgnoreCase, RegExp_Multiline } |
enum | anonymous { T_ABSTRACT, T_BOOLEAN, T_BYTE, T_CHAR, ..., T_VOLATILE } |
Public Functions
Lexer(QmlJS::Engine *engine) | |
bool | canInsertAutomaticSemicolon(int token) const |
QString | code() const |
QmlJS::Lexer::Error | errorCode() const |
QString | errorMessage() const |
bool | followsClosingBrace() const |
int | lex() |
bool | prevTerminator() const |
bool | qmlMode() const |
int | regExpFlags() const |
QString | regExpPattern() const |
bool | scanDirectives(QmlJS::Directives *directives, QmlJS::DiagnosticMessage *error) |
bool | scanRegExp(QmlJS::Lexer::RegExpBodyPrefix prefix = NoPrefix) |
void | setCode(const QString &code, int lineno, bool qmlMode = true) |
int | tokenEndColumn() const |
int | tokenEndLine() const |
int | tokenKind() const |
int | tokenLength() const |
int | tokenOffset() const |
QStringRef | tokenSpell() const |
int | tokenStartColumn() const |
int | tokenStartLine() const |
QString | tokenText() const |
double | tokenValue() const |
Protected Functions
int | classify(const QChar *s, int n, bool qmlMode) |
Additional Inherited Members
- 2 static public members inherited from QmlJSGrammar
Member Type Documentation
enum Lexer::Error
enum Lexer::ParenthesesState
enum Lexer::RegExpBodyPrefix
enum Lexer::RegExpFlag
enum Lexer::anonymous
Member Function Documentation
Lexer::Lexer(QmlJS::Engine *engine)
Default constructs an instance of Lexer.
bool Lexer::canInsertAutomaticSemicolon(int token) const
[protected]
int Lexer::classify(const QChar *s, int n, bool qmlMode)
QString Lexer::code() const
See also setCode().
QmlJS::Lexer::Error Lexer::errorCode() const
QString Lexer::errorMessage() const
bool Lexer::followsClosingBrace() const
int Lexer::lex()
bool Lexer::prevTerminator() const
bool Lexer::qmlMode() const
int Lexer::regExpFlags() const
QString Lexer::regExpPattern() const
bool Lexer::scanDirectives(QmlJS::Directives *directives, QmlJS::DiagnosticMessage *error)
bool Lexer::scanRegExp(QmlJS::Lexer::RegExpBodyPrefix prefix = NoPrefix)
void Lexer::setCode(const QString &code, int lineno, bool qmlMode = true)
See also code().