QmlJS: Update to latest QmlJS parser from Qt 5.

Using qtdeclarative revision c9b7582a2e7ad9fcd03dd999c3b7a16b72803238

Change-Id: I9c942fa04c3fab5ef57b38e13471d0a4e2e8a2bf
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
This commit is contained in:
Christian Kamm
2012-07-31 10:12:26 +02:00
parent 26bd1860d1
commit a14ed0793c
20 changed files with 422 additions and 360 deletions

View File

@@ -44,7 +44,7 @@
#include "qmljsglobal_p.h"
#include "qmljsgrammar_p.h"
#include <QString>
#include <QtCore/QString>
QT_QML_BEGIN_NAMESPACE
@@ -147,18 +147,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;
@@ -180,6 +180,7 @@ protected:
private:
inline void scanChar();
int scanToken();
int scanNumber(QChar ch);
bool isLineTerminator() const;
static bool isIdentLetter(QChar c);