QmlJS: Merge new parser from Qt 5.

Change-Id: I986df52b7ddb31e3bae1148eda881acc1829b102
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
This commit is contained in:
Christian Kamm
2011-12-07 11:16:26 +01:00
parent 72c06cb6fd
commit 67dd062a31
19 changed files with 1469 additions and 1416 deletions

View File

@@ -136,6 +136,8 @@ public:
public:
Lexer(Engine *engine);
bool qmlMode() const;
QString code() const;
void setCode(const QString &code, int lineno, bool qmlMode = true);
@@ -174,12 +176,13 @@ public:
BalancedParentheses
};
protected:
int classify(const QChar *s, int n, bool qmlMode);
private:
inline void scanChar();
int scanToken();
int classify(const QChar *s, int n, bool qmlMode);
bool isLineTerminator() const;
static bool isIdentLetter(QChar c);
static bool isDecimalDigit(ushort c);