forked from qt-creator/qt-creator
Updated the QML/JS front-end.
This commit is contained in:
4
src/libs/qmljs/parser/cmd.sed
Normal file
4
src/libs/qmljs/parser/cmd.sed
Normal file
@@ -0,0 +1,4 @@
|
||||
s/qdeclarativejs/qmljs/g
|
||||
s/QDECLARATIVEJS/QMLJS/g
|
||||
s/QDeclarativeJS/QmlJS/g
|
||||
s/QDeclarativeParser/QmlParser/g
|
9
src/libs/qmljs/parser/gen-parser.sh
Normal file
9
src/libs/qmljs/parser/gen-parser.sh
Normal file
@@ -0,0 +1,9 @@
|
||||
#!/bin/sh
|
||||
|
||||
me=$(dirname $0)
|
||||
|
||||
for i in $QTDIR/src/declarative/qml/parser/*.{h,cpp,pri}; do
|
||||
sed -f $me/cmd.sed $i > $me/$(echo $(basename $i) | sed s/qdeclarativejs/qmljs/)
|
||||
done
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
||||
** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
|
||||
** All rights reserved.
|
||||
** Contact: Nokia Corporation (qt-info@nokia.com)
|
||||
**
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
||||
** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
|
||||
** All rights reserved.
|
||||
** Contact: Nokia Corporation (qt-info@nokia.com)
|
||||
**
|
||||
@@ -2599,11 +2599,17 @@ public:
|
||||
UiObjectInitializer *initializer)
|
||||
: qualifiedId(qualifiedId),
|
||||
qualifiedTypeNameId(qualifiedTypeNameId),
|
||||
initializer(initializer)
|
||||
initializer(initializer),
|
||||
hasOnToken(false)
|
||||
{ kind = K; }
|
||||
|
||||
virtual SourceLocation firstSourceLocation() const
|
||||
{ return qualifiedId->identifierToken; }
|
||||
{
|
||||
if (hasOnToken && qualifiedTypeNameId)
|
||||
return qualifiedTypeNameId->identifierToken;
|
||||
|
||||
return qualifiedId->identifierToken;
|
||||
}
|
||||
|
||||
virtual SourceLocation lastSourceLocation() const
|
||||
{ return initializer->rbraceToken; }
|
||||
@@ -2615,6 +2621,7 @@ public:
|
||||
UiQualifiedId *qualifiedTypeNameId;
|
||||
UiObjectInitializer *initializer;
|
||||
SourceLocation colonToken;
|
||||
bool hasOnToken;
|
||||
};
|
||||
|
||||
class QML_PARSER_EXPORT UiScriptBinding: public UiObjectMember
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
||||
** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
|
||||
** All rights reserved.
|
||||
** Contact: Nokia Corporation (qt-info@nokia.com)
|
||||
**
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
||||
** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
|
||||
** All rights reserved.
|
||||
** Contact: Nokia Corporation (qt-info@nokia.com)
|
||||
**
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
||||
** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
|
||||
** All rights reserved.
|
||||
** Contact: Nokia Corporation (qt-info@nokia.com)
|
||||
**
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
||||
** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
|
||||
** All rights reserved.
|
||||
** Contact: Nokia Corporation (qt-info@nokia.com)
|
||||
**
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
||||
** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
|
||||
** All rights reserved.
|
||||
** Contact: Nokia Corporation (qt-info@nokia.com)
|
||||
**
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
||||
** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
|
||||
** All rights reserved.
|
||||
** Contact: Nokia Corporation (qt-info@nokia.com)
|
||||
**
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
||||
** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
|
||||
** All rights reserved.
|
||||
** Contact: Nokia Corporation (qt-info@nokia.com)
|
||||
**
|
||||
@@ -61,10 +61,10 @@ QT_BEGIN_NAMESPACE
|
||||
class QmlJSGrammar
|
||||
{
|
||||
public:
|
||||
enum VariousConstants {
|
||||
enum {
|
||||
EOF_SYMBOL = 0,
|
||||
REDUCE_HERE = 99,
|
||||
SHIFT_THERE = 98,
|
||||
REDUCE_HERE = 100,
|
||||
SHIFT_THERE = 99,
|
||||
T_AND = 1,
|
||||
T_AND_AND = 2,
|
||||
T_AND_EQ = 3,
|
||||
@@ -90,12 +90,12 @@ public:
|
||||
T_EQ_EQ = 18,
|
||||
T_EQ_EQ_EQ = 19,
|
||||
T_FALSE = 83,
|
||||
T_FEED_JS_EXPRESSION = 95,
|
||||
T_FEED_JS_PROGRAM = 97,
|
||||
T_FEED_JS_SOURCE_ELEMENT = 96,
|
||||
T_FEED_JS_STATEMENT = 94,
|
||||
T_FEED_UI_OBJECT_MEMBER = 93,
|
||||
T_FEED_UI_PROGRAM = 92,
|
||||
T_FEED_JS_EXPRESSION = 96,
|
||||
T_FEED_JS_PROGRAM = 98,
|
||||
T_FEED_JS_SOURCE_ELEMENT = 97,
|
||||
T_FEED_JS_STATEMENT = 95,
|
||||
T_FEED_UI_OBJECT_MEMBER = 94,
|
||||
T_FEED_UI_PROGRAM = 93,
|
||||
T_FINALLY = 20,
|
||||
T_FOR = 21,
|
||||
T_FUNCTION = 22,
|
||||
@@ -127,6 +127,7 @@ public:
|
||||
T_NOT_EQ_EQ = 46,
|
||||
T_NULL = 81,
|
||||
T_NUMERIC_LITERAL = 47,
|
||||
T_ON = 92,
|
||||
T_OR = 48,
|
||||
T_OR_EQ = 49,
|
||||
T_OR_OR = 50,
|
||||
@@ -163,15 +164,15 @@ public:
|
||||
T_XOR = 79,
|
||||
T_XOR_EQ = 80,
|
||||
|
||||
ACCEPT_STATE = 635,
|
||||
RULE_COUNT = 343,
|
||||
STATE_COUNT = 636,
|
||||
TERMINAL_COUNT = 100,
|
||||
ACCEPT_STATE = 639,
|
||||
RULE_COUNT = 345,
|
||||
STATE_COUNT = 640,
|
||||
TERMINAL_COUNT = 101,
|
||||
NON_TERMINAL_COUNT = 106,
|
||||
|
||||
GOTO_INDEX_OFFSET = 636,
|
||||
GOTO_INFO_OFFSET = 2520,
|
||||
GOTO_CHECK_OFFSET = 2520
|
||||
GOTO_INDEX_OFFSET = 640,
|
||||
GOTO_INFO_OFFSET = 2699,
|
||||
GOTO_CHECK_OFFSET = 2699
|
||||
};
|
||||
|
||||
static const char *const spell [];
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
||||
** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
|
||||
** All rights reserved.
|
||||
** Contact: Nokia Corporation (qt-info@nokia.com)
|
||||
**
|
||||
@@ -56,12 +56,10 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
extern double qstrtod(const char *s00, char const **se, bool *ok);
|
||||
QT_END_NAMESPACE
|
||||
|
||||
QT_QML_BEGIN_NAMESPACE
|
||||
|
||||
extern double qstrtod(const char *s00, char const **se, bool *ok);
|
||||
|
||||
#define shiftWindowsLineBreak() \
|
||||
do { \
|
||||
if (((current == '\r') && (next1 == '\n')) \
|
||||
@@ -168,6 +166,8 @@ int Lexer::findReservedWord(const QChar *c, int size) const
|
||||
return QmlJSGrammar::T_IN;
|
||||
else if (c[0] == QLatin1Char('a') && c[1] == QLatin1Char('s'))
|
||||
return QmlJSGrammar::T_AS;
|
||||
else if (c[0] == QLatin1Char('o') && c[1] == QLatin1Char('n'))
|
||||
return QmlJSGrammar::T_ON;
|
||||
} break;
|
||||
|
||||
case 3: {
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
||||
** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
|
||||
** All rights reserved.
|
||||
** Contact: Nokia Corporation (qt-info@nokia.com)
|
||||
**
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
||||
** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
|
||||
** All rights reserved.
|
||||
** Contact: Nokia Corporation (qt-info@nokia.com)
|
||||
**
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
||||
** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
|
||||
** All rights reserved.
|
||||
** Contact: Nokia Corporation (qt-info@nokia.com)
|
||||
**
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -235,9 +235,9 @@ protected:
|
||||
|
||||
|
||||
|
||||
#define J_SCRIPT_REGEXPLITERAL_RULE1 74
|
||||
#define J_SCRIPT_REGEXPLITERAL_RULE1 76
|
||||
|
||||
#define J_SCRIPT_REGEXPLITERAL_RULE2 75
|
||||
#define J_SCRIPT_REGEXPLITERAL_RULE2 77
|
||||
|
||||
QT_QML_END_NAMESPACE
|
||||
|
||||
|
Reference in New Issue
Block a user