diff options
Diffstat (limited to 'src/qml/qml/parser/qqmljslexer_p.h')
-rw-r--r-- | src/qml/qml/parser/qqmljslexer_p.h | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/qml/qml/parser/qqmljslexer_p.h b/src/qml/qml/parser/qqmljslexer_p.h index 6b51852f5f..65adf0a8b0 100644 --- a/src/qml/qml/parser/qqmljslexer_p.h +++ b/src/qml/qml/parser/qqmljslexer_p.h @@ -158,18 +158,18 @@ public: int regExpFlags() const { return _patternFlags; } QString regExpPattern() const { return _tokenText; } - int tokenKind() const; - int tokenOffset() const; - int tokenLength() const; + int tokenKind() const { return _tokenKind; } + int tokenOffset() const { return _tokenStartPtr - _code.unicode(); } + int tokenLength() const { return _tokenLength; } - int tokenStartLine() const; - int tokenStartColumn() const; + int tokenStartLine() const { return _tokenLine; } + int tokenStartColumn() const { return _tokenStartPtr - _tokenLinePtr + 1; } int tokenEndLine() const; int tokenEndColumn() const; - QStringRef tokenSpell() const; - double tokenValue() const; + inline QStringRef tokenSpell() const { return _tokenSpell; } + double tokenValue() const { return _tokenValue; } QString tokenText() const; Error errorCode() const; @@ -191,6 +191,7 @@ protected: private: inline void scanChar(); int scanToken(); + int scanNumber(QChar ch); bool isLineTerminator() const; static bool isIdentLetter(QChar c); |