diff options
Diffstat (limited to 'src/declarative/qml/parser')
-rw-r--r-- | src/declarative/qml/parser/parser.pri | 32 | ||||
-rw-r--r-- | src/declarative/qml/parser/qdeclarativejs.g (renamed from src/declarative/qml/parser/qmljs.g) | 54 | ||||
-rw-r--r-- | src/declarative/qml/parser/qdeclarativejsast.cpp (renamed from src/declarative/qml/parser/qmljsast.cpp) | 8 | ||||
-rw-r--r-- | src/declarative/qml/parser/qdeclarativejsast_p.h (renamed from src/declarative/qml/parser/qmljsast_p.h) | 198 | ||||
-rw-r--r-- | src/declarative/qml/parser/qdeclarativejsastfwd_p.h (renamed from src/declarative/qml/parser/qmljsastfwd_p.h) | 8 | ||||
-rw-r--r-- | src/declarative/qml/parser/qdeclarativejsastvisitor.cpp (renamed from src/declarative/qml/parser/qmljsastvisitor.cpp) | 6 | ||||
-rw-r--r-- | src/declarative/qml/parser/qdeclarativejsastvisitor_p.h (renamed from src/declarative/qml/parser/qmljsastvisitor_p.h) | 14 | ||||
-rw-r--r-- | src/declarative/qml/parser/qdeclarativejsengine_p.cpp (renamed from src/declarative/qml/parser/qmljsengine_p.cpp) | 16 | ||||
-rw-r--r-- | src/declarative/qml/parser/qdeclarativejsengine_p.h (renamed from src/declarative/qml/parser/qmljsengine_p.h) | 28 | ||||
-rw-r--r-- | src/declarative/qml/parser/qdeclarativejsglobal_p.h (renamed from src/declarative/qml/parser/qmljsglobal_p.h) | 10 | ||||
-rw-r--r-- | src/declarative/qml/parser/qdeclarativejsgrammar.cpp (renamed from src/declarative/qml/parser/qmljsgrammar.cpp) | 18 | ||||
-rw-r--r-- | src/declarative/qml/parser/qdeclarativejsgrammar_p.h (renamed from src/declarative/qml/parser/qmljsgrammar_p.h) | 8 | ||||
-rw-r--r-- | src/declarative/qml/parser/qdeclarativejslexer.cpp (renamed from src/declarative/qml/parser/qmljslexer.cpp) | 288 | ||||
-rw-r--r-- | src/declarative/qml/parser/qdeclarativejslexer_p.h (renamed from src/declarative/qml/parser/qmljslexer_p.h) | 10 | ||||
-rw-r--r-- | src/declarative/qml/parser/qdeclarativejsmemorypool_p.h (renamed from src/declarative/qml/parser/qmljsmemorypool_p.h) | 10 | ||||
-rw-r--r-- | src/declarative/qml/parser/qdeclarativejsnodepool_p.h (renamed from src/declarative/qml/parser/qmljsnodepool_p.h) | 12 | ||||
-rw-r--r-- | src/declarative/qml/parser/qdeclarativejsparser.cpp (renamed from src/declarative/qml/parser/qmljsparser.cpp) | 32 | ||||
-rw-r--r-- | src/declarative/qml/parser/qdeclarativejsparser_p.h (renamed from src/declarative/qml/parser/qmljsparser_p.h) | 20 |
18 files changed, 386 insertions, 386 deletions
diff --git a/src/declarative/qml/parser/parser.pri b/src/declarative/qml/parser/parser.pri index 4530479..fd4361c 100644 --- a/src/declarative/qml/parser/parser.pri +++ b/src/declarative/qml/parser/parser.pri @@ -1,21 +1,21 @@ INCLUDEPATH += $$PWD HEADERS += \ - $$PWD/qmljsast_p.h \ - $$PWD/qmljsastfwd_p.h \ - $$PWD/qmljsastvisitor_p.h \ - $$PWD/qmljsengine_p.h \ - $$PWD/qmljsgrammar_p.h \ - $$PWD/qmljslexer_p.h \ - $$PWD/qmljsmemorypool_p.h \ - $$PWD/qmljsnodepool_p.h \ - $$PWD/qmljsparser_p.h \ - $$PWD/qmljsglobal_p.h + $$PWD/qdeclarativejsast_p.h \ + $$PWD/qdeclarativejsastfwd_p.h \ + $$PWD/qdeclarativejsastvisitor_p.h \ + $$PWD/qdeclarativejsengine_p.h \ + $$PWD/qdeclarativejsgrammar_p.h \ + $$PWD/qdeclarativejslexer_p.h \ + $$PWD/qdeclarativejsmemorypool_p.h \ + $$PWD/qdeclarativejsnodepool_p.h \ + $$PWD/qdeclarativejsparser_p.h \ + $$PWD/qdeclarativejsglobal_p.h SOURCES += \ - $$PWD/qmljsast.cpp \ - $$PWD/qmljsastvisitor.cpp \ - $$PWD/qmljsengine_p.cpp \ - $$PWD/qmljsgrammar.cpp \ - $$PWD/qmljslexer.cpp \ - $$PWD/qmljsparser.cpp + $$PWD/qdeclarativejsast.cpp \ + $$PWD/qdeclarativejsastvisitor.cpp \ + $$PWD/qdeclarativejsengine_p.cpp \ + $$PWD/qdeclarativejsgrammar.cpp \ + $$PWD/qdeclarativejslexer.cpp \ + $$PWD/qdeclarativejsparser.cpp diff --git a/src/declarative/qml/parser/qmljs.g b/src/declarative/qml/parser/qdeclarativejs.g index 90949d5..e1cb5a5 100644 --- a/src/declarative/qml/parser/qmljs.g +++ b/src/declarative/qml/parser/qdeclarativejs.g @@ -21,9 +21,9 @@ -- ---------------------------------------------------------------------------- -%parser QmlJSGrammar -%decl qmljsparser_p.h -%impl qmljsparser.cpp +%parser QDeclarativeJSGrammar +%decl qdeclarativejsparser_p.h +%impl qdeclarativejsparser.cpp %expect 2 %expect-rr 2 @@ -126,10 +126,10 @@ #include <string.h> -#include "qmljsengine_p.h" -#include "qmljslexer_p.h" -#include "qmljsast_p.h" -#include "qmljsnodepool_p.h" +#include "qdeclarativejsengine_p.h" +#include "qdeclarativejslexer_p.h" +#include "qdeclarativejsast_p.h" +#include "qdeclarativejsnodepool_p.h" ./ @@ -191,20 +191,20 @@ // Changes will be lost. // -#ifndef QMLJSPARSER_P_H -#define QMLJSPARSER_P_H +#ifndef QDECLARATIVEJSPARSER_P_H +#define QDECLARATIVEJSPARSER_P_H -#include "qmljsglobal_p.h" -#include "qmljsgrammar_p.h" -#include "qmljsast_p.h" -#include "qmljsengine_p.h" +#include "qdeclarativejsglobal_p.h" +#include "qdeclarativejsgrammar_p.h" +#include "qdeclarativejsast_p.h" +#include "qdeclarativejsengine_p.h" #include <QtCore/QList> #include <QtCore/QString> QT_QML_BEGIN_NAMESPACE -namespace QmlJS { +namespace QDeclarativeJS { class Engine; class NameId; @@ -366,7 +366,7 @@ protected: QList<DiagnosticMessage> diagnostic_messages; }; -} // end of namespace QmlJS +} // end of namespace QDeclarativeJS :/ @@ -374,7 +374,7 @@ protected: /. -#include "qmljsparser_p.h" +#include "qdeclarativejsparser_p.h" #include <QVarLengthArray> // @@ -382,7 +382,7 @@ protected: // Changes will be lost. // -using namespace QmlJS; +using namespace QDeclarativeJS; QT_QML_BEGIN_NAMESPACE @@ -981,7 +981,7 @@ JsIdentifier: T_IDENTIFIER; JsIdentifier: T_PROPERTY ; /. case $rule_number: { - QString s = QLatin1String(QmlJSGrammar::spell[T_PROPERTY]); + QString s = QLatin1String(QDeclarativeJSGrammar::spell[T_PROPERTY]); sym(1).sval = driver->intern(s.constData(), s.length()); break; } @@ -990,7 +990,7 @@ case $rule_number: { JsIdentifier: T_SIGNAL ; /. case $rule_number: { - QString s = QLatin1String(QmlJSGrammar::spell[T_SIGNAL]); + QString s = QLatin1String(QDeclarativeJSGrammar::spell[T_SIGNAL]); sym(1).sval = driver->intern(s.constData(), s.length()); break; } @@ -999,7 +999,7 @@ case $rule_number: { JsIdentifier: T_READONLY ; /. case $rule_number: { - QString s = QLatin1String(QmlJSGrammar::spell[T_READONLY]); + QString s = QLatin1String(QDeclarativeJSGrammar::spell[T_READONLY]); sym(1).sval = driver->intern(s.constData(), s.length()); break; } @@ -2960,7 +2960,7 @@ PropertyNameAndValueListOpt: PropertyNameAndValueList ; yylloc.startColumn += yylloc.length; yylloc.length = 0; - //const QString msg = qApp->translate("QmlParser", "Missing `;'"); + //const QString msg = qApp->translate("QDeclarativeParser", "Missing `;'"); //diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Warning, yylloc, msg)); first_token = &token_buffer[0]; @@ -2988,9 +2988,9 @@ PropertyNameAndValueListOpt: PropertyNameAndValueList ; QString msg; int token = token_buffer[0].token; if (token < 0 || token >= TERMINAL_COUNT) - msg = qApp->translate("QmlParser", "Syntax error"); + msg = qApp->translate("QDeclarativeParser", "Syntax error"); else - msg = qApp->translate("QmlParser", "Unexpected token `%1'").arg(QLatin1String(spell[token])); + msg = qApp->translate("QDeclarativeParser", "Unexpected token `%1'").arg(QLatin1String(spell[token])); diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, token_buffer[0].loc, msg)); action = errorState; @@ -3018,7 +3018,7 @@ PropertyNameAndValueListOpt: PropertyNameAndValueList ; for (int *tk = tokens; *tk != EOF_SYMBOL; ++tk) { int a = t_action(errorState, *tk); if (a > 0 && t_action(a, yytoken)) { - const QString msg = qApp->translate("QmlParser", "Expected token `%1'").arg(QLatin1String(spell[*tk])); + const QString msg = qApp->translate("QDeclarativeParser", "Expected token `%1'").arg(QLatin1String(spell[*tk])); diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, token_buffer[0].loc, msg)); yytoken = *tk; @@ -3042,7 +3042,7 @@ PropertyNameAndValueListOpt: PropertyNameAndValueList ; int a = t_action(errorState, tk); if (a > 0 && t_action(a, yytoken)) { - const QString msg = qApp->translate("QmlParser", "Expected token `%1'").arg(QLatin1String(spell[tk])); + const QString msg = qApp->translate("QDeclarativeParser", "Expected token `%1'").arg(QLatin1String(spell[tk])); diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, token_buffer[0].loc, msg)); yytoken = tk; @@ -3055,7 +3055,7 @@ PropertyNameAndValueListOpt: PropertyNameAndValueList ; } } - const QString msg = qApp->translate("QmlParser", "Syntax error"); + const QString msg = qApp->translate("QDeclarativeParser", "Syntax error"); diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, token_buffer[0].loc, msg)); } @@ -3071,5 +3071,5 @@ QT_QML_END_NAMESPACE -#endif // QMLJSPARSER_P_H +#endif // QDECLARATIVEJSPARSER_P_H :/ diff --git a/src/declarative/qml/parser/qmljsast.cpp b/src/declarative/qml/parser/qdeclarativejsast.cpp index d3ceba6..3b569a7 100644 --- a/src/declarative/qml/parser/qmljsast.cpp +++ b/src/declarative/qml/parser/qdeclarativejsast.cpp @@ -39,13 +39,13 @@ ** ****************************************************************************/ -#include "qmljsast_p.h" +#include "qdeclarativejsast_p.h" -#include "qmljsastvisitor_p.h" +#include "qdeclarativejsastvisitor_p.h" QT_QML_BEGIN_NAMESPACE -namespace QmlJS { namespace AST { +namespace QDeclarativeJS { namespace AST { void Node::accept(Visitor *visitor) { @@ -948,7 +948,7 @@ void UiSourceElement::accept0(Visitor *visitor) visitor->endVisit(this); } -} } // namespace QmlJS::AST +} } // namespace QDeclarativeJS::AST QT_QML_END_NAMESPACE diff --git a/src/declarative/qml/parser/qmljsast_p.h b/src/declarative/qml/parser/qdeclarativejsast_p.h index 9de733c..0a83fe2 100644 --- a/src/declarative/qml/parser/qmljsast_p.h +++ b/src/declarative/qml/parser/qdeclarativejsast_p.h @@ -39,8 +39,8 @@ ** ****************************************************************************/ -#ifndef QMLJSAST_P_H -#define QMLJSAST_P_H +#ifndef QDECLARATIVEJSAST_P_H +#define QDECLARATIVEJSAST_P_H // // W A R N I N G @@ -53,14 +53,14 @@ // We mean it. // -#include "qmljsastvisitor_p.h" -#include "qmljsglobal_p.h" +#include "qdeclarativejsastvisitor_p.h" +#include "qdeclarativejsglobal_p.h" #include <QtCore/QString> QT_QML_BEGIN_NAMESPACE -#define QMLJS_DECLARE_AST_NODE(name) \ +#define QDECLARATIVEJS_DECLARE_AST_NODE(name) \ enum { K = Kind_##name }; namespace QSOperator // ### rename @@ -106,7 +106,7 @@ enum Op { } // namespace QSOperator -namespace QmlJS { +namespace QDeclarativeJS { class NameId; namespace AST { @@ -270,7 +270,7 @@ public: class QML_PARSER_EXPORT UiFormal: public Node { public: - QMLJS_DECLARE_AST_NODE(UiFormal) + QDECLARATIVEJS_DECLARE_AST_NODE(UiFormal) UiFormal(NameId *name, NameId *alias = 0) : name(name), alias(alias) @@ -295,7 +295,7 @@ public: class QML_PARSER_EXPORT UiFormalList: public Node { public: - QMLJS_DECLARE_AST_NODE(UiFormalList) + QDECLARATIVEJS_DECLARE_AST_NODE(UiFormalList) UiFormalList(UiFormal *formal) : formal(formal), next(this) {} @@ -330,7 +330,7 @@ public: class QML_PARSER_EXPORT UiSignature: public Node { public: - QMLJS_DECLARE_AST_NODE(UiSignature) + QDECLARATIVEJS_DECLARE_AST_NODE(UiSignature) UiSignature(UiFormalList *formals = 0) : formals(formals) @@ -353,7 +353,7 @@ public: class QML_PARSER_EXPORT NestedExpression: public ExpressionNode { public: - QMLJS_DECLARE_AST_NODE(NestedExpression) + QDECLARATIVEJS_DECLARE_AST_NODE(NestedExpression) NestedExpression(ExpressionNode *expression) : expression(expression) @@ -376,7 +376,7 @@ public: class QML_PARSER_EXPORT ThisExpression: public ExpressionNode { public: - QMLJS_DECLARE_AST_NODE(ThisExpression) + QDECLARATIVEJS_DECLARE_AST_NODE(ThisExpression) ThisExpression() { kind = K; } virtual ~ThisExpression() {} @@ -396,7 +396,7 @@ public: class QML_PARSER_EXPORT IdentifierExpression: public ExpressionNode { public: - QMLJS_DECLARE_AST_NODE(IdentifierExpression) + QDECLARATIVEJS_DECLARE_AST_NODE(IdentifierExpression) IdentifierExpression(NameId *n): name (n) { kind = K; } @@ -419,7 +419,7 @@ public: class QML_PARSER_EXPORT NullExpression: public ExpressionNode { public: - QMLJS_DECLARE_AST_NODE(NullExpression) + QDECLARATIVEJS_DECLARE_AST_NODE(NullExpression) NullExpression() { kind = K; } virtual ~NullExpression() {} @@ -439,7 +439,7 @@ public: class QML_PARSER_EXPORT TrueLiteral: public ExpressionNode { public: - QMLJS_DECLARE_AST_NODE(TrueLiteral) + QDECLARATIVEJS_DECLARE_AST_NODE(TrueLiteral) TrueLiteral() { kind = K; } virtual ~TrueLiteral() {} @@ -459,7 +459,7 @@ public: class QML_PARSER_EXPORT FalseLiteral: public ExpressionNode { public: - QMLJS_DECLARE_AST_NODE(FalseLiteral) + QDECLARATIVEJS_DECLARE_AST_NODE(FalseLiteral) FalseLiteral() { kind = K; } virtual ~FalseLiteral() {} @@ -479,7 +479,7 @@ public: class QML_PARSER_EXPORT NumericLiteral: public ExpressionNode { public: - QMLJS_DECLARE_AST_NODE(NumericLiteral) + QDECLARATIVEJS_DECLARE_AST_NODE(NumericLiteral) NumericLiteral(double v): value(v) { kind = K; } @@ -501,7 +501,7 @@ public: class QML_PARSER_EXPORT StringLiteral: public ExpressionNode { public: - QMLJS_DECLARE_AST_NODE(StringLiteral) + QDECLARATIVEJS_DECLARE_AST_NODE(StringLiteral) StringLiteral(NameId *v): value (v) { kind = K; } @@ -524,7 +524,7 @@ public: class QML_PARSER_EXPORT RegExpLiteral: public ExpressionNode { public: - QMLJS_DECLARE_AST_NODE(RegExpLiteral) + QDECLARATIVEJS_DECLARE_AST_NODE(RegExpLiteral) RegExpLiteral(NameId *p, int f): pattern (p), flags (f) { kind = K; } @@ -548,7 +548,7 @@ public: class QML_PARSER_EXPORT ArrayLiteral: public ExpressionNode { public: - QMLJS_DECLARE_AST_NODE(ArrayLiteral) + QDECLARATIVEJS_DECLARE_AST_NODE(ArrayLiteral) ArrayLiteral(Elision *e): elements (0), elision (e) @@ -583,7 +583,7 @@ public: class QML_PARSER_EXPORT ObjectLiteral: public ExpressionNode { public: - QMLJS_DECLARE_AST_NODE(ObjectLiteral) + QDECLARATIVEJS_DECLARE_AST_NODE(ObjectLiteral) ObjectLiteral(): properties (0) { kind = K; } @@ -610,7 +610,7 @@ public: class QML_PARSER_EXPORT ElementList: public Node { public: - QMLJS_DECLARE_AST_NODE(ElementList) + QDECLARATIVEJS_DECLARE_AST_NODE(ElementList) ElementList(Elision *e, ExpressionNode *expr): elision (e), expression (expr), next (this) @@ -645,7 +645,7 @@ public: class QML_PARSER_EXPORT Elision: public Node { public: - QMLJS_DECLARE_AST_NODE(Elision) + QDECLARATIVEJS_DECLARE_AST_NODE(Elision) Elision(): next (this) { kind = K; } @@ -676,7 +676,7 @@ public: class QML_PARSER_EXPORT PropertyNameAndValueList: public Node { public: - QMLJS_DECLARE_AST_NODE(PropertyNameAndValueList) + QDECLARATIVEJS_DECLARE_AST_NODE(PropertyNameAndValueList) PropertyNameAndValueList(PropertyName *n, ExpressionNode *v): name (n), value (v), next (this) @@ -712,7 +712,7 @@ public: class QML_PARSER_EXPORT PropertyName: public Node { public: - QMLJS_DECLARE_AST_NODE(PropertyName) + QDECLARATIVEJS_DECLARE_AST_NODE(PropertyName) PropertyName() { kind = K; } virtual ~PropertyName() {} @@ -724,7 +724,7 @@ public: class QML_PARSER_EXPORT IdentifierPropertyName: public PropertyName { public: - QMLJS_DECLARE_AST_NODE(IdentifierPropertyName) + QDECLARATIVEJS_DECLARE_AST_NODE(IdentifierPropertyName) IdentifierPropertyName(NameId *n): id (n) { kind = K; } @@ -740,7 +740,7 @@ public: class QML_PARSER_EXPORT StringLiteralPropertyName: public PropertyName { public: - QMLJS_DECLARE_AST_NODE(StringLiteralPropertyName) + QDECLARATIVEJS_DECLARE_AST_NODE(StringLiteralPropertyName) StringLiteralPropertyName(NameId *n): id (n) { kind = K; } @@ -755,7 +755,7 @@ public: class QML_PARSER_EXPORT NumericLiteralPropertyName: public PropertyName { public: - QMLJS_DECLARE_AST_NODE(NumericLiteralPropertyName) + QDECLARATIVEJS_DECLARE_AST_NODE(NumericLiteralPropertyName) NumericLiteralPropertyName(double n): id (n) { kind = K; } @@ -770,7 +770,7 @@ public: class QML_PARSER_EXPORT ArrayMemberExpression: public ExpressionNode { public: - QMLJS_DECLARE_AST_NODE(ArrayMemberExpression) + QDECLARATIVEJS_DECLARE_AST_NODE(ArrayMemberExpression) ArrayMemberExpression(ExpressionNode *b, ExpressionNode *e): base (b), expression (e) @@ -796,7 +796,7 @@ public: class QML_PARSER_EXPORT FieldMemberExpression: public ExpressionNode { public: - QMLJS_DECLARE_AST_NODE(FieldMemberExpression) + QDECLARATIVEJS_DECLARE_AST_NODE(FieldMemberExpression) FieldMemberExpression(ExpressionNode *b, NameId *n): base (b), name (n) @@ -822,7 +822,7 @@ public: class QML_PARSER_EXPORT NewMemberExpression: public ExpressionNode { public: - QMLJS_DECLARE_AST_NODE(NewMemberExpression) + QDECLARATIVEJS_DECLARE_AST_NODE(NewMemberExpression) NewMemberExpression(ExpressionNode *b, ArgumentList *a): base (b), arguments (a) @@ -849,7 +849,7 @@ public: class QML_PARSER_EXPORT NewExpression: public ExpressionNode { public: - QMLJS_DECLARE_AST_NODE(NewExpression) + QDECLARATIVEJS_DECLARE_AST_NODE(NewExpression) NewExpression(ExpressionNode *e): expression (e) { kind = K; } @@ -872,7 +872,7 @@ public: class QML_PARSER_EXPORT CallExpression: public ExpressionNode { public: - QMLJS_DECLARE_AST_NODE(CallExpression) + QDECLARATIVEJS_DECLARE_AST_NODE(CallExpression) CallExpression(ExpressionNode *b, ArgumentList *a): base (b), arguments (a) @@ -898,7 +898,7 @@ public: class QML_PARSER_EXPORT ArgumentList: public Node { public: - QMLJS_DECLARE_AST_NODE(ArgumentList) + QDECLARATIVEJS_DECLARE_AST_NODE(ArgumentList) ArgumentList(ExpressionNode *e): expression (e), next (this) @@ -932,7 +932,7 @@ public: class QML_PARSER_EXPORT PostIncrementExpression: public ExpressionNode { public: - QMLJS_DECLARE_AST_NODE(PostIncrementExpression) + QDECLARATIVEJS_DECLARE_AST_NODE(PostIncrementExpression) PostIncrementExpression(ExpressionNode *b): base (b) { kind = K; } @@ -955,7 +955,7 @@ public: class QML_PARSER_EXPORT PostDecrementExpression: public ExpressionNode { public: - QMLJS_DECLARE_AST_NODE(PostDecrementExpression) + QDECLARATIVEJS_DECLARE_AST_NODE(PostDecrementExpression) PostDecrementExpression(ExpressionNode *b): base (b) { kind = K; } @@ -978,7 +978,7 @@ public: class QML_PARSER_EXPORT DeleteExpression: public ExpressionNode { public: - QMLJS_DECLARE_AST_NODE(DeleteExpression) + QDECLARATIVEJS_DECLARE_AST_NODE(DeleteExpression) DeleteExpression(ExpressionNode *e): expression (e) { kind = K; } @@ -1000,7 +1000,7 @@ public: class QML_PARSER_EXPORT VoidExpression: public ExpressionNode { public: - QMLJS_DECLARE_AST_NODE(VoidExpression) + QDECLARATIVEJS_DECLARE_AST_NODE(VoidExpression) VoidExpression(ExpressionNode *e): expression (e) { kind = K; } @@ -1023,7 +1023,7 @@ public: class QML_PARSER_EXPORT TypeOfExpression: public ExpressionNode { public: - QMLJS_DECLARE_AST_NODE(TypeOfExpression) + QDECLARATIVEJS_DECLARE_AST_NODE(TypeOfExpression) TypeOfExpression(ExpressionNode *e): expression (e) { kind = K; } @@ -1046,7 +1046,7 @@ public: class QML_PARSER_EXPORT PreIncrementExpression: public ExpressionNode { public: - QMLJS_DECLARE_AST_NODE(PreIncrementExpression) + QDECLARATIVEJS_DECLARE_AST_NODE(PreIncrementExpression) PreIncrementExpression(ExpressionNode *e): expression (e) { kind = K; } @@ -1069,7 +1069,7 @@ public: class QML_PARSER_EXPORT PreDecrementExpression: public ExpressionNode { public: - QMLJS_DECLARE_AST_NODE(PreDecrementExpression) + QDECLARATIVEJS_DECLARE_AST_NODE(PreDecrementExpression) PreDecrementExpression(ExpressionNode *e): expression (e) { kind = K; } @@ -1092,7 +1092,7 @@ public: class QML_PARSER_EXPORT UnaryPlusExpression: public ExpressionNode { public: - QMLJS_DECLARE_AST_NODE(UnaryPlusExpression) + QDECLARATIVEJS_DECLARE_AST_NODE(UnaryPlusExpression) UnaryPlusExpression(ExpressionNode *e): expression (e) { kind = K; } @@ -1115,7 +1115,7 @@ public: class QML_PARSER_EXPORT UnaryMinusExpression: public ExpressionNode { public: - QMLJS_DECLARE_AST_NODE(UnaryMinusExpression) + QDECLARATIVEJS_DECLARE_AST_NODE(UnaryMinusExpression) UnaryMinusExpression(ExpressionNode *e): expression (e) { kind = K; } @@ -1138,7 +1138,7 @@ public: class QML_PARSER_EXPORT TildeExpression: public ExpressionNode { public: - QMLJS_DECLARE_AST_NODE(TildeExpression) + QDECLARATIVEJS_DECLARE_AST_NODE(TildeExpression) TildeExpression(ExpressionNode *e): expression (e) { kind = K; } @@ -1161,7 +1161,7 @@ public: class QML_PARSER_EXPORT NotExpression: public ExpressionNode { public: - QMLJS_DECLARE_AST_NODE(NotExpression) + QDECLARATIVEJS_DECLARE_AST_NODE(NotExpression) NotExpression(ExpressionNode *e): expression (e) { kind = K; } @@ -1184,7 +1184,7 @@ public: class QML_PARSER_EXPORT BinaryExpression: public ExpressionNode { public: - QMLJS_DECLARE_AST_NODE(BinaryExpression) + QDECLARATIVEJS_DECLARE_AST_NODE(BinaryExpression) BinaryExpression(ExpressionNode *l, int o, ExpressionNode *r): left (l), op (o), right (r) @@ -1212,7 +1212,7 @@ public: class QML_PARSER_EXPORT ConditionalExpression: public ExpressionNode { public: - QMLJS_DECLARE_AST_NODE(ConditionalExpression) + QDECLARATIVEJS_DECLARE_AST_NODE(ConditionalExpression) ConditionalExpression(ExpressionNode *e, ExpressionNode *t, ExpressionNode *f): expression (e), ok (t), ko (f) @@ -1239,7 +1239,7 @@ public: class QML_PARSER_EXPORT Expression: public ExpressionNode // ### rename { public: - QMLJS_DECLARE_AST_NODE(Expression) + QDECLARATIVEJS_DECLARE_AST_NODE(Expression) Expression(ExpressionNode *l, ExpressionNode *r): left (l), right (r) { kind = K; } @@ -1263,7 +1263,7 @@ public: class QML_PARSER_EXPORT Block: public Statement { public: - QMLJS_DECLARE_AST_NODE(Block) + QDECLARATIVEJS_DECLARE_AST_NODE(Block) Block(StatementList *slist): statements (slist) { kind = K; } @@ -1287,7 +1287,7 @@ public: class QML_PARSER_EXPORT StatementList: public Node { public: - QMLJS_DECLARE_AST_NODE(StatementList) + QDECLARATIVEJS_DECLARE_AST_NODE(StatementList) StatementList(Statement *stmt): statement (stmt), next (this) @@ -1320,7 +1320,7 @@ public: class QML_PARSER_EXPORT VariableStatement: public Statement { public: - QMLJS_DECLARE_AST_NODE(VariableStatement) + QDECLARATIVEJS_DECLARE_AST_NODE(VariableStatement) VariableStatement(VariableDeclarationList *vlist): declarations (vlist) @@ -1345,7 +1345,7 @@ public: class QML_PARSER_EXPORT VariableDeclaration: public Node { public: - QMLJS_DECLARE_AST_NODE(VariableDeclaration) + QDECLARATIVEJS_DECLARE_AST_NODE(VariableDeclaration) VariableDeclaration(NameId *n, ExpressionNode *e): name (n), expression (e), readOnly(false) @@ -1365,7 +1365,7 @@ public: class QML_PARSER_EXPORT VariableDeclarationList: public Node { public: - QMLJS_DECLARE_AST_NODE(VariableDeclarationList) + QDECLARATIVEJS_DECLARE_AST_NODE(VariableDeclarationList) VariableDeclarationList(VariableDeclaration *decl): declaration (decl), next (this) @@ -1404,7 +1404,7 @@ public: class QML_PARSER_EXPORT EmptyStatement: public Statement { public: - QMLJS_DECLARE_AST_NODE(EmptyStatement) + QDECLARATIVEJS_DECLARE_AST_NODE(EmptyStatement) EmptyStatement() { kind = K; } virtual ~EmptyStatement() {} @@ -1424,7 +1424,7 @@ public: class QML_PARSER_EXPORT ExpressionStatement: public Statement { public: - QMLJS_DECLARE_AST_NODE(ExpressionStatement) + QDECLARATIVEJS_DECLARE_AST_NODE(ExpressionStatement) ExpressionStatement(ExpressionNode *e): expression (e) { kind = K; } @@ -1447,7 +1447,7 @@ public: class QML_PARSER_EXPORT IfStatement: public Statement { public: - QMLJS_DECLARE_AST_NODE(IfStatement) + QDECLARATIVEJS_DECLARE_AST_NODE(IfStatement) IfStatement(ExpressionNode *e, Statement *t, Statement *f = 0): expression (e), ok (t), ko (f) @@ -1481,7 +1481,7 @@ public: class QML_PARSER_EXPORT DoWhileStatement: public Statement { public: - QMLJS_DECLARE_AST_NODE(DoWhileStatement) + QDECLARATIVEJS_DECLARE_AST_NODE(DoWhileStatement) DoWhileStatement(Statement *stmt, ExpressionNode *e): statement (stmt), expression (e) @@ -1510,7 +1510,7 @@ public: class QML_PARSER_EXPORT WhileStatement: public Statement { public: - QMLJS_DECLARE_AST_NODE(WhileStatement) + QDECLARATIVEJS_DECLARE_AST_NODE(WhileStatement) WhileStatement(ExpressionNode *e, Statement *stmt): expression (e), statement (stmt) @@ -1537,7 +1537,7 @@ public: class QML_PARSER_EXPORT ForStatement: public Statement { public: - QMLJS_DECLARE_AST_NODE(ForStatement) + QDECLARATIVEJS_DECLARE_AST_NODE(ForStatement) ForStatement(ExpressionNode *i, ExpressionNode *c, ExpressionNode *e, Statement *stmt): initialiser (i), condition (c), expression (e), statement (stmt) @@ -1568,7 +1568,7 @@ public: class QML_PARSER_EXPORT LocalForStatement: public Statement { public: - QMLJS_DECLARE_AST_NODE(LocalForStatement) + QDECLARATIVEJS_DECLARE_AST_NODE(LocalForStatement) LocalForStatement(VariableDeclarationList *vlist, ExpressionNode *c, ExpressionNode *e, Statement *stmt): declarations (vlist), condition (c), expression (e), statement (stmt) @@ -1600,7 +1600,7 @@ public: class QML_PARSER_EXPORT ForEachStatement: public Statement { public: - QMLJS_DECLARE_AST_NODE(ForEachStatement) + QDECLARATIVEJS_DECLARE_AST_NODE(ForEachStatement) ForEachStatement(ExpressionNode *i, ExpressionNode *e, Statement *stmt): initialiser (i), expression (e), statement (stmt) @@ -1629,7 +1629,7 @@ public: class QML_PARSER_EXPORT LocalForEachStatement: public Statement { public: - QMLJS_DECLARE_AST_NODE(LocalForEachStatement) + QDECLARATIVEJS_DECLARE_AST_NODE(LocalForEachStatement) LocalForEachStatement(VariableDeclaration *v, ExpressionNode *e, Statement *stmt): declaration (v), expression (e), statement (stmt) @@ -1659,7 +1659,7 @@ public: class QML_PARSER_EXPORT ContinueStatement: public Statement { public: - QMLJS_DECLARE_AST_NODE(ContinueStatement) + QDECLARATIVEJS_DECLARE_AST_NODE(ContinueStatement) ContinueStatement(NameId *l = 0): label (l) { kind = K; } @@ -1684,7 +1684,7 @@ public: class QML_PARSER_EXPORT BreakStatement: public Statement { public: - QMLJS_DECLARE_AST_NODE(BreakStatement) + QDECLARATIVEJS_DECLARE_AST_NODE(BreakStatement) BreakStatement(NameId *l = 0): label (l) { kind = K; } @@ -1709,7 +1709,7 @@ public: class QML_PARSER_EXPORT ReturnStatement: public Statement { public: - QMLJS_DECLARE_AST_NODE(ReturnStatement) + QDECLARATIVEJS_DECLARE_AST_NODE(ReturnStatement) ReturnStatement(ExpressionNode *e): expression (e) { kind = K; } @@ -1733,7 +1733,7 @@ public: class QML_PARSER_EXPORT WithStatement: public Statement { public: - QMLJS_DECLARE_AST_NODE(WithStatement) + QDECLARATIVEJS_DECLARE_AST_NODE(WithStatement) WithStatement(ExpressionNode *e, Statement *stmt): expression (e), statement (stmt) @@ -1760,7 +1760,7 @@ public: class QML_PARSER_EXPORT CaseBlock: public Node { public: - QMLJS_DECLARE_AST_NODE(CaseBlock) + QDECLARATIVEJS_DECLARE_AST_NODE(CaseBlock) CaseBlock(CaseClauses *c, DefaultClause *d = 0, CaseClauses *r = 0): clauses (c), defaultClause (d), moreClauses (r) @@ -1781,7 +1781,7 @@ public: class QML_PARSER_EXPORT SwitchStatement: public Statement { public: - QMLJS_DECLARE_AST_NODE(SwitchStatement) + QDECLARATIVEJS_DECLARE_AST_NODE(SwitchStatement) SwitchStatement(ExpressionNode *e, CaseBlock *b): expression (e), block (b) @@ -1808,7 +1808,7 @@ public: class QML_PARSER_EXPORT CaseClauses: public Node { public: - QMLJS_DECLARE_AST_NODE(CaseClauses) + QDECLARATIVEJS_DECLARE_AST_NODE(CaseClauses) CaseClauses(CaseClause *c): clause (c), next (this) @@ -1841,7 +1841,7 @@ public: class QML_PARSER_EXPORT CaseClause: public Node { public: - QMLJS_DECLARE_AST_NODE(CaseClause) + QDECLARATIVEJS_DECLARE_AST_NODE(CaseClause) CaseClause(ExpressionNode *e, StatementList *slist): expression (e), statements (slist) @@ -1861,7 +1861,7 @@ public: class QML_PARSER_EXPORT DefaultClause: public Node { public: - QMLJS_DECLARE_AST_NODE(DefaultClause) + QDECLARATIVEJS_DECLARE_AST_NODE(DefaultClause) DefaultClause(StatementList *slist): statements (slist) @@ -1880,7 +1880,7 @@ public: class QML_PARSER_EXPORT LabelledStatement: public Statement { public: - QMLJS_DECLARE_AST_NODE(LabelledStatement) + QDECLARATIVEJS_DECLARE_AST_NODE(LabelledStatement) LabelledStatement(NameId *l, Statement *stmt): label (l), statement (stmt) @@ -1906,7 +1906,7 @@ public: class QML_PARSER_EXPORT ThrowStatement: public Statement { public: - QMLJS_DECLARE_AST_NODE(ThrowStatement) + QDECLARATIVEJS_DECLARE_AST_NODE(ThrowStatement) ThrowStatement(ExpressionNode *e): expression (e) { kind = K; } @@ -1930,7 +1930,7 @@ public: class QML_PARSER_EXPORT Catch: public Node { public: - QMLJS_DECLARE_AST_NODE(Catch) + QDECLARATIVEJS_DECLARE_AST_NODE(Catch) Catch(NameId *n, Block *stmt): name (n), statement (stmt) @@ -1952,7 +1952,7 @@ public: class QML_PARSER_EXPORT Finally: public Node { public: - QMLJS_DECLARE_AST_NODE(Finally) + QDECLARATIVEJS_DECLARE_AST_NODE(Finally) Finally(Block *stmt): statement (stmt) @@ -1970,7 +1970,7 @@ public: class QML_PARSER_EXPORT TryStatement: public Statement { public: - QMLJS_DECLARE_AST_NODE(TryStatement) + QDECLARATIVEJS_DECLARE_AST_NODE(TryStatement) TryStatement(Statement *stmt, Catch *c, Finally *f): statement (stmt), catchExpression (c), finallyExpression (f) @@ -2011,7 +2011,7 @@ public: class QML_PARSER_EXPORT FunctionExpression: public ExpressionNode { public: - QMLJS_DECLARE_AST_NODE(FunctionExpression) + QDECLARATIVEJS_DECLARE_AST_NODE(FunctionExpression) FunctionExpression(NameId *n, FormalParameterList *f, FunctionBody *b): name (n), formals (f), body (b) @@ -2042,7 +2042,7 @@ public: class QML_PARSER_EXPORT FunctionDeclaration: public FunctionExpression { public: - QMLJS_DECLARE_AST_NODE(FunctionDeclaration) + QDECLARATIVEJS_DECLARE_AST_NODE(FunctionDeclaration) FunctionDeclaration(NameId *n, FormalParameterList *f, FunctionBody *b): FunctionExpression(n, f, b) @@ -2056,7 +2056,7 @@ public: class QML_PARSER_EXPORT FormalParameterList: public Node { public: - QMLJS_DECLARE_AST_NODE(FormalParameterList) + QDECLARATIVEJS_DECLARE_AST_NODE(FormalParameterList) FormalParameterList(NameId *n): name (n), next (this) @@ -2091,7 +2091,7 @@ public: class QML_PARSER_EXPORT FunctionBody: public Node { public: - QMLJS_DECLARE_AST_NODE(FunctionBody) + QDECLARATIVEJS_DECLARE_AST_NODE(FunctionBody) FunctionBody(SourceElements *elts): elements (elts) @@ -2108,7 +2108,7 @@ public: class QML_PARSER_EXPORT Program: public Node { public: - QMLJS_DECLARE_AST_NODE(Program) + QDECLARATIVEJS_DECLARE_AST_NODE(Program) Program(SourceElements *elts): elements (elts) @@ -2125,7 +2125,7 @@ public: class QML_PARSER_EXPORT SourceElements: public Node { public: - QMLJS_DECLARE_AST_NODE(SourceElements) + QDECLARATIVEJS_DECLARE_AST_NODE(SourceElements) SourceElements(SourceElement *elt): element (elt), next (this) @@ -2158,7 +2158,7 @@ public: class QML_PARSER_EXPORT SourceElement: public Node { public: - QMLJS_DECLARE_AST_NODE(SourceElement) + QDECLARATIVEJS_DECLARE_AST_NODE(SourceElement) inline SourceElement() { kind = K; } @@ -2169,7 +2169,7 @@ public: class QML_PARSER_EXPORT FunctionSourceElement: public SourceElement { public: - QMLJS_DECLARE_AST_NODE(FunctionSourceElement) + QDECLARATIVEJS_DECLARE_AST_NODE(FunctionSourceElement) FunctionSourceElement(FunctionDeclaration *f): declaration (f) @@ -2186,7 +2186,7 @@ public: class QML_PARSER_EXPORT StatementSourceElement: public SourceElement { public: - QMLJS_DECLARE_AST_NODE(StatementSourceElement) + QDECLARATIVEJS_DECLARE_AST_NODE(StatementSourceElement) StatementSourceElement(Statement *stmt): statement (stmt) @@ -2203,7 +2203,7 @@ public: class QML_PARSER_EXPORT DebuggerStatement: public Statement { public: - QMLJS_DECLARE_AST_NODE(DebuggerStatement) + QDECLARATIVEJS_DECLARE_AST_NODE(DebuggerStatement) DebuggerStatement() { kind = K; } @@ -2226,7 +2226,7 @@ public: class QML_PARSER_EXPORT UiProgram: public Node { public: - QMLJS_DECLARE_AST_NODE(UiProgram) + QDECLARATIVEJS_DECLARE_AST_NODE(UiProgram) UiProgram(UiImportList *imports, UiObjectMemberList *members) : imports(imports), members(members) @@ -2242,7 +2242,7 @@ public: class QML_PARSER_EXPORT UiQualifiedId: public Node { public: - QMLJS_DECLARE_AST_NODE(UiQualifiedId) + QDECLARATIVEJS_DECLARE_AST_NODE(UiQualifiedId) UiQualifiedId(NameId *name) : next(this), name(name) @@ -2276,7 +2276,7 @@ public: class QML_PARSER_EXPORT UiImport: public Node { public: - QMLJS_DECLARE_AST_NODE(UiImport) + QDECLARATIVEJS_DECLARE_AST_NODE(UiImport) UiImport(NameId *fileName) : fileName(fileName), importUri(0), importId(0) @@ -2309,7 +2309,7 @@ public: class QML_PARSER_EXPORT UiImportList: public Node { public: - QMLJS_DECLARE_AST_NODE(UiImportList) + QDECLARATIVEJS_DECLARE_AST_NODE(UiImportList) UiImportList(UiImport *import) : import(import), @@ -2365,7 +2365,7 @@ public: class QML_PARSER_EXPORT UiObjectMemberList: public Node { public: - QMLJS_DECLARE_AST_NODE(UiObjectMemberList) + QDECLARATIVEJS_DECLARE_AST_NODE(UiObjectMemberList) UiObjectMemberList(UiObjectMember *member) : next(this), member(member) @@ -2396,7 +2396,7 @@ public: class QML_PARSER_EXPORT UiArrayMemberList: public Node { public: - QMLJS_DECLARE_AST_NODE(UiArrayMemberList) + QDECLARATIVEJS_DECLARE_AST_NODE(UiArrayMemberList) UiArrayMemberList(UiObjectMember *member) : next(this), member(member) @@ -2428,7 +2428,7 @@ public: class QML_PARSER_EXPORT UiObjectInitializer: public Node { public: - QMLJS_DECLARE_AST_NODE(UiObjectInitializer) + QDECLARATIVEJS_DECLARE_AST_NODE(UiObjectInitializer) UiObjectInitializer(UiObjectMemberList *members) : members(members) @@ -2445,7 +2445,7 @@ public: class QML_PARSER_EXPORT UiParameterList: public Node { public: - QMLJS_DECLARE_AST_NODE(UiParameterList) + QDECLARATIVEJS_DECLARE_AST_NODE(UiParameterList) UiParameterList(NameId *t, NameId *n): type (t), name (n), next (this) @@ -2481,7 +2481,7 @@ public: class QML_PARSER_EXPORT UiPublicMember: public UiObjectMember { public: - QMLJS_DECLARE_AST_NODE(UiPublicMember) + QDECLARATIVEJS_DECLARE_AST_NODE(UiPublicMember) UiPublicMember(NameId *memberType, NameId *name) @@ -2533,7 +2533,7 @@ public: class QML_PARSER_EXPORT UiObjectDefinition: public UiObjectMember { public: - QMLJS_DECLARE_AST_NODE(UiObjectDefinition) + QDECLARATIVEJS_DECLARE_AST_NODE(UiObjectDefinition) UiObjectDefinition(UiQualifiedId *qualifiedTypeNameId, UiObjectInitializer *initializer) @@ -2556,7 +2556,7 @@ public: class QML_PARSER_EXPORT UiSourceElement: public UiObjectMember { public: - QMLJS_DECLARE_AST_NODE(UiSourceElement) + QDECLARATIVEJS_DECLARE_AST_NODE(UiSourceElement) UiSourceElement(Node *sourceElement) : sourceElement(sourceElement) @@ -2592,7 +2592,7 @@ public: class QML_PARSER_EXPORT UiObjectBinding: public UiObjectMember { public: - QMLJS_DECLARE_AST_NODE(UiObjectBinding) + QDECLARATIVEJS_DECLARE_AST_NODE(UiObjectBinding) UiObjectBinding(UiQualifiedId *qualifiedId, UiQualifiedId *qualifiedTypeNameId, @@ -2620,7 +2620,7 @@ public: class QML_PARSER_EXPORT UiScriptBinding: public UiObjectMember { public: - QMLJS_DECLARE_AST_NODE(UiScriptBinding) + QDECLARATIVEJS_DECLARE_AST_NODE(UiScriptBinding) UiScriptBinding(UiQualifiedId *qualifiedId, Statement *statement) @@ -2645,7 +2645,7 @@ public: class QML_PARSER_EXPORT UiArrayBinding: public UiObjectMember { public: - QMLJS_DECLARE_AST_NODE(UiArrayBinding) + QDECLARATIVEJS_DECLARE_AST_NODE(UiArrayBinding) UiArrayBinding(UiQualifiedId *qualifiedId, UiArrayMemberList *members) diff --git a/src/declarative/qml/parser/qmljsastfwd_p.h b/src/declarative/qml/parser/qdeclarativejsastfwd_p.h index 2c42fd9..5a444b7 100644 --- a/src/declarative/qml/parser/qmljsastfwd_p.h +++ b/src/declarative/qml/parser/qdeclarativejsastfwd_p.h @@ -39,10 +39,10 @@ ** ****************************************************************************/ -#ifndef QMLJSAST_FWD_P_H -#define QMLJSAST_FWD_P_H +#ifndef QDECLARATIVEJSAST_FWD_P_H +#define QDECLARATIVEJSAST_FWD_P_H -#include "qmljsglobal_p.h" +#include "qdeclarativejsglobal_p.h" #include <QtCore/qglobal.h> @@ -59,7 +59,7 @@ QT_QML_BEGIN_NAMESPACE -namespace QmlJS { namespace AST { +namespace QDeclarativeJS { namespace AST { class SourceLocation { diff --git a/src/declarative/qml/parser/qmljsastvisitor.cpp b/src/declarative/qml/parser/qdeclarativejsastvisitor.cpp index bd7439c..d8002cf 100644 --- a/src/declarative/qml/parser/qmljsastvisitor.cpp +++ b/src/declarative/qml/parser/qdeclarativejsastvisitor.cpp @@ -39,11 +39,11 @@ ** ****************************************************************************/ -#include "qmljsastvisitor_p.h" +#include "qdeclarativejsastvisitor_p.h" QT_QML_BEGIN_NAMESPACE -namespace QmlJS { namespace AST { +namespace QDeclarativeJS { namespace AST { Visitor::Visitor() { @@ -53,6 +53,6 @@ Visitor::~Visitor() { } -} } // namespace QmlJS::AST +} } // namespace QDeclarativeJS::AST QT_QML_END_NAMESPACE diff --git a/src/declarative/qml/parser/qmljsastvisitor_p.h b/src/declarative/qml/parser/qdeclarativejsastvisitor_p.h index 9007a2c..82abbcf 100644 --- a/src/declarative/qml/parser/qmljsastvisitor_p.h +++ b/src/declarative/qml/parser/qdeclarativejsastvisitor_p.h @@ -39,8 +39,8 @@ ** ****************************************************************************/ -#ifndef QMLJSASTVISITOR_P_H -#define QMLJSASTVISITOR_P_H +#ifndef QDECLARATIVEJSASTVISITOR_P_H +#define QDECLARATIVEJSASTVISITOR_P_H // // W A R N I N G @@ -53,12 +53,12 @@ // We mean it. // -#include "qmljsastfwd_p.h" -#include "qmljsglobal_p.h" +#include "qdeclarativejsastfwd_p.h" +#include "qdeclarativejsglobal_p.h" QT_QML_BEGIN_NAMESPACE -namespace QmlJS { namespace AST { +namespace QDeclarativeJS { namespace AST { class QML_PARSER_EXPORT Visitor { @@ -104,7 +104,7 @@ public: virtual void endVisit(UiFormalList *) {} virtual void endVisit(UiFormal *) {} - // QmlJS + // QDeclarativeJS virtual bool visit(ThisExpression *) { return true; } virtual void endVisit(ThisExpression *) {} @@ -332,4 +332,4 @@ public: QT_QML_END_NAMESPACE -#endif // QMLJSASTVISITOR_P_H +#endif // QDECLARATIVEJSASTVISITOR_P_H diff --git a/src/declarative/qml/parser/qmljsengine_p.cpp b/src/declarative/qml/parser/qdeclarativejsengine_p.cpp index 84bb1c5..7d39134 100644 --- a/src/declarative/qml/parser/qmljsengine_p.cpp +++ b/src/declarative/qml/parser/qdeclarativejsengine_p.cpp @@ -39,19 +39,19 @@ ** ****************************************************************************/ -#include "qmljsengine_p.h" +#include "qdeclarativejsengine_p.h" -#include "qmljsglobal_p.h" -#include "qmljsnodepool_p.h" +#include "qdeclarativejsglobal_p.h" +#include "qdeclarativejsnodepool_p.h" #include <qnumeric.h> #include <QHash> QT_QML_BEGIN_NAMESPACE -namespace QmlJS { +namespace QDeclarativeJS { -uint qHash(const QmlJS::NameId &id) +uint qHash(const QDeclarativeJS::NameId &id) { return qHash(id.asString()); } QString numberToString(double value) @@ -182,9 +182,9 @@ QSet<NameId> Engine::literals() const { return _literals; } void Engine::addComment(int pos, int len, int line, int col) -{ if (len > 0) _comments.append(QmlJS::AST::SourceLocation(pos, len, line, col)); } +{ if (len > 0) _comments.append(QDeclarativeJS::AST::SourceLocation(pos, len, line, col)); } -QList<QmlJS::AST::SourceLocation> Engine::comments() const +QList<QDeclarativeJS::AST::SourceLocation> Engine::comments() const { return _comments; } NameId *Engine::intern(const QChar *u, int s) @@ -207,6 +207,6 @@ void Engine::setNodePool(NodePool *nodePool) -} // end of namespace QmlJS +} // end of namespace QDeclarativeJS QT_QML_END_NAMESPACE diff --git a/src/declarative/qml/parser/qmljsengine_p.h b/src/declarative/qml/parser/qdeclarativejsengine_p.h index ebfeb1b..61188f7 100644 --- a/src/declarative/qml/parser/qmljsengine_p.h +++ b/src/declarative/qml/parser/qdeclarativejsengine_p.h @@ -39,8 +39,8 @@ ** ****************************************************************************/ -#ifndef QMLJSENGINE_P_H -#define QMLJSENGINE_P_H +#ifndef QDECLARATIVEJSENGINE_P_H +#define QDECLARATIVEJSENGINE_P_H // // W A R N I N G @@ -53,15 +53,15 @@ // We mean it. // -#include "qmljsglobal_p.h" -#include "qmljsastfwd_p.h" +#include "qdeclarativejsglobal_p.h" +#include "qdeclarativejsastfwd_p.h" #include <QString> #include <QSet> QT_QML_BEGIN_NAMESPACE -namespace QmlJS { +namespace QDeclarativeJS { class QML_PARSER_EXPORT NameId { QString _text; @@ -84,17 +84,17 @@ public: { return _text < other._text; } }; -uint qHash(const QmlJS::NameId &id); +uint qHash(const QDeclarativeJS::NameId &id); -} // end of namespace QmlJS +} // end of namespace QDeclarativeJS #if defined(Q_CC_MSVC) && _MSC_VER <= 1300 -//this ensures that code outside QmlJS can use the hash function +//this ensures that code outside QDeclarativeJS can use the hash function //it also a workaround for some compilers -inline uint qHash(const QmlJS::NameId &nameId) { return QmlJS::qHash(nameId); } +inline uint qHash(const QDeclarativeJS::NameId &nameId) { return QDeclarativeJS::qHash(nameId); } #endif -namespace QmlJS { +namespace QDeclarativeJS { class Lexer; class NodePool; @@ -144,7 +144,7 @@ class QML_PARSER_EXPORT Engine Lexer *_lexer; NodePool *_nodePool; QSet<NameId> _literals; - QList<QmlJS::AST::SourceLocation> _comments; + QList<QDeclarativeJS::AST::SourceLocation> _comments; public: Engine(); @@ -153,7 +153,7 @@ public: QSet<NameId> literals() const; void addComment(int pos, int len, int line, int col); - QList<QmlJS::AST::SourceLocation> comments() const; + QList<QDeclarativeJS::AST::SourceLocation> comments() const; NameId *intern(const QChar *u, int s); @@ -166,8 +166,8 @@ public: void setNodePool(NodePool *nodePool); }; -} // end of namespace QmlJS +} // end of namespace QDeclarativeJS QT_QML_END_NAMESPACE -#endif // QMLJSENGINE_P_H +#endif // QDECLARATIVEJSENGINE_P_H diff --git a/src/declarative/qml/parser/qmljsglobal_p.h b/src/declarative/qml/parser/qdeclarativejsglobal_p.h index 4457450..7c901ae 100644 --- a/src/declarative/qml/parser/qmljsglobal_p.h +++ b/src/declarative/qml/parser/qdeclarativejsglobal_p.h @@ -38,8 +38,8 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ -#ifndef QMLJSGLOBAL_P_H -#define QMLJSGLOBAL_P_H +#ifndef QDECLARATIVEJSGLOBAL_P_H +#define QDECLARATIVEJSGLOBAL_P_H #include <QtCore/qglobal.h> @@ -47,13 +47,13 @@ # define QT_QML_BEGIN_NAMESPACE # define QT_QML_END_NAMESPACE -# ifdef QMLJS_BUILD_DIR +# ifdef QDECLARATIVEJS_BUILD_DIR # define QML_PARSER_EXPORT Q_DECL_EXPORT # elif QML_BUILD_STATIC_LIB # define QML_PARSER_EXPORT # else # define QML_PARSER_EXPORT Q_DECL_IMPORT -# endif // QMLJS_BUILD_DIR +# endif // QDECLARATIVEJS_BUILD_DIR #else // !QT_CREATOR # define QT_QML_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE @@ -61,4 +61,4 @@ # define QML_PARSER_EXPORT #endif // QT_CREATOR -#endif // QMLJSGLOBAL_P_H +#endif // QDECLARATIVEJSGLOBAL_P_H diff --git a/src/declarative/qml/parser/qmljsgrammar.cpp b/src/declarative/qml/parser/qdeclarativejsgrammar.cpp index 12071db..aadb432 100644 --- a/src/declarative/qml/parser/qmljsgrammar.cpp +++ b/src/declarative/qml/parser/qdeclarativejsgrammar.cpp @@ -40,11 +40,11 @@ ****************************************************************************/ // This file was generated by qlalr - DO NOT EDIT! -#include "qmljsgrammar_p.h" +#include "qdeclarativejsgrammar_p.h" QT_BEGIN_NAMESPACE -const char *const QmlJSGrammar::spell [] = { +const char *const QDeclarativeJSGrammar::spell [] = { "end of file", "&", "&&", "&=", "break", "case", "catch", ":", ";", "continue", "default", "delete", "/", "/=", "do", ".", "else", "=", "==", "===", "finally", "for", "function", ">=", ">", ">>", ">>=", ">>>", ">>>=", "identifier", @@ -56,7 +56,7 @@ const char *const QmlJSGrammar::spell [] = { "^=", "null", "true", "false", "const", "debugger", "reserved word", "multiline string literal", "comment", "public", "import", "as", 0, 0, 0, 0, 0, 0, 0, 0}; -const short QmlJSGrammar::lhs [] = { +const short QDeclarativeJSGrammar::lhs [] = { 100, 100, 100, 100, 100, 100, 101, 107, 107, 110, 110, 112, 111, 111, 111, 111, 111, 111, 111, 111, 114, 109, 108, 117, 117, 118, 118, 119, 119, 116, @@ -93,7 +93,7 @@ const short QmlJSGrammar::lhs [] = { 200, 200, 203, 106, 204, 204, 104, 104, 201, 201, 133, 133, 205}; -const short QmlJSGrammar::rhs [] = { +const short QDeclarativeJSGrammar::rhs [] = { 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 2, 1, 2, 2, 3, 3, 5, 5, 4, 4, 2, 0, 1, 1, 2, 1, 3, 2, 3, 2, @@ -130,7 +130,7 @@ const short QmlJSGrammar::rhs [] = { 0, 1, 1, 1, 1, 2, 1, 1, 0, 1, 0, 1, 2}; -const short QmlJSGrammar::action_default [] = { +const short QDeclarativeJSGrammar::action_default [] = { 0, 0, 0, 0, 0, 0, 22, 0, 170, 237, 201, 209, 205, 149, 221, 197, 3, 134, 68, 150, 213, 217, 138, 167, 148, 153, 133, 187, 174, 0, @@ -196,7 +196,7 @@ const short QmlJSGrammar::action_default [] = { 13, 0, 14, 0, 19, 20, 0, 15, 16, 0, 17, 18, 11, 23, 7, 343}; -const short QmlJSGrammar::goto_default [] = { +const short QDeclarativeJSGrammar::goto_default [] = { 7, 616, 206, 195, 204, 506, 494, 615, 634, 610, 614, 612, 617, 22, 613, 18, 505, 607, 598, 560, 507, 190, 194, 196, 200, 523, 549, 548, 199, 231, @@ -209,7 +209,7 @@ const short QmlJSGrammar::goto_default [] = { 463, 322, 418, 422, 425, 421, 420, 440, 441, 184, 198, 180, 183, 197, 205, 0}; -const short QmlJSGrammar::action_index [] = { +const short QDeclarativeJSGrammar::action_index [] = { 439, 1109, 2228, 2228, 2132, 814, -74, 18, 147, -100, 31, -17, -49, 232, -100, 318, 85, -100, -100, 554, 33, 94, 331, 215, -100, -100, -100, 448, 231, 1109, @@ -340,7 +340,7 @@ const short QmlJSGrammar::action_index [] = { -106, -106, -106, -106, -106, -106, 5, -106, -106, -106, -106, -106, -106, -106, -106, -106}; -const short QmlJSGrammar::action_info [] = { +const short QDeclarativeJSGrammar::action_info [] = { -97, -98, 452, 611, -116, 527, 456, -124, 415, -121, 439, 551, -119, -108, 347, -94, 611, 388, 635, 540, 351, 341, 344, 342, 390, 539, -127, 256, 398, 402, @@ -638,7 +638,7 @@ const short QmlJSGrammar::action_info [] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; -const short QmlJSGrammar::action_check [] = { +const short QDeclarativeJSGrammar::action_check [] = { 7, 7, 36, 90, 7, 29, 36, 7, 36, 7, 33, 8, 7, 7, 36, 7, 90, 7, 0, 7, 16, 60, 55, 33, 8, 29, 7, 36, 7, 55, diff --git a/src/declarative/qml/parser/qmljsgrammar_p.h b/src/declarative/qml/parser/qdeclarativejsgrammar_p.h index 21fddba..d6c3d6b 100644 --- a/src/declarative/qml/parser/qmljsgrammar_p.h +++ b/src/declarative/qml/parser/qdeclarativejsgrammar_p.h @@ -51,14 +51,14 @@ // // This file was generated by qlalr - DO NOT EDIT! -#ifndef QMLJSGRAMMAR_P_H -#define QMLJSGRAMMAR_P_H +#ifndef QDECLARATIVEJSGRAMMAR_P_H +#define QDECLARATIVEJSGRAMMAR_P_H #include <QtCore/qglobal.h> QT_BEGIN_NAMESPACE -class QmlJSGrammar +class QDeclarativeJSGrammar { public: enum VariousConstants { @@ -205,5 +205,5 @@ public: QT_END_NAMESPACE -#endif // QMLJSGRAMMAR_P_H +#endif // QDECLARATIVEJSGRAMMAR_P_H diff --git a/src/declarative/qml/parser/qmljslexer.cpp b/src/declarative/qml/parser/qdeclarativejslexer.cpp index 816542f..384d00c 100644 --- a/src/declarative/qml/parser/qmljslexer.cpp +++ b/src/declarative/qml/parser/qdeclarativejslexer.cpp @@ -43,11 +43,11 @@ #include <config.h> #endif -#include "qmljslexer_p.h" +#include "qdeclarativejslexer_p.h" -#include "qmljsglobal_p.h" -#include "qmljsengine_p.h" -#include "qmljsgrammar_p.h" +#include "qdeclarativejsglobal_p.h" +#include "qdeclarativejsengine_p.h" +#include "qdeclarativejsgrammar_p.h" #include <QtCore/qcoreapplication.h> @@ -69,11 +69,11 @@ extern double qstrtod(const char *s00, char const **se, bool *ok); } \ while (0) -namespace QmlJS { +namespace QDeclarativeJS { extern double integerFromString(const char *buf, int size, int radix); } -using namespace QmlJS; +using namespace QDeclarativeJS; Lexer::Lexer(Engine *eng, bool tokenizeComments) : driver(eng), @@ -159,68 +159,68 @@ int Lexer::findReservedWord(const QChar *c, int size) const switch (size) { case 2: { if (c[0] == QLatin1Char('d') && c[1] == QLatin1Char('o')) - return QmlJSGrammar::T_DO; + return QDeclarativeJSGrammar::T_DO; else if (c[0] == QLatin1Char('i') && c[1] == QLatin1Char('f')) - return QmlJSGrammar::T_IF; + return QDeclarativeJSGrammar::T_IF; else if (c[0] == QLatin1Char('i') && c[1] == QLatin1Char('n')) - return QmlJSGrammar::T_IN; + return QDeclarativeJSGrammar::T_IN; else if (c[0] == QLatin1Char('a') && c[1] == QLatin1Char('s')) - return QmlJSGrammar::T_AS; + return QDeclarativeJSGrammar::T_AS; } break; case 3: { if (c[0] == QLatin1Char('f') && c[1] == QLatin1Char('o') && c[2] == QLatin1Char('r')) - return QmlJSGrammar::T_FOR; + return QDeclarativeJSGrammar::T_FOR; else if (c[0] == QLatin1Char('n') && c[1] == QLatin1Char('e') && c[2] == QLatin1Char('w')) - return QmlJSGrammar::T_NEW; + return QDeclarativeJSGrammar::T_NEW; else if (c[0] == QLatin1Char('t') && c[1] == QLatin1Char('r') && c[2] == QLatin1Char('y')) - return QmlJSGrammar::T_TRY; + return QDeclarativeJSGrammar::T_TRY; else if (c[0] == QLatin1Char('v') && c[1] == QLatin1Char('a') && c[2] == QLatin1Char('r')) - return QmlJSGrammar::T_VAR; + return QDeclarativeJSGrammar::T_VAR; else if (check_reserved) { if (c[0] == QLatin1Char('i') && c[1] == QLatin1Char('n') && c[2] == QLatin1Char('t')) - return QmlJSGrammar::T_RESERVED_WORD; + return QDeclarativeJSGrammar::T_RESERVED_WORD; } } break; case 4: { if (c[0] == QLatin1Char('c') && c[1] == QLatin1Char('a') && c[2] == QLatin1Char('s') && c[3] == QLatin1Char('e')) - return QmlJSGrammar::T_CASE; + return QDeclarativeJSGrammar::T_CASE; else if (c[0] == QLatin1Char('e') && c[1] == QLatin1Char('l') && c[2] == QLatin1Char('s') && c[3] == QLatin1Char('e')) - return QmlJSGrammar::T_ELSE; + return QDeclarativeJSGrammar::T_ELSE; else if (c[0] == QLatin1Char('t') && c[1] == QLatin1Char('h') && c[2] == QLatin1Char('i') && c[3] == QLatin1Char('s')) - return QmlJSGrammar::T_THIS; + return QDeclarativeJSGrammar::T_THIS; else if (c[0] == QLatin1Char('v') && c[1] == QLatin1Char('o') && c[2] == QLatin1Char('i') && c[3] == QLatin1Char('d')) - return QmlJSGrammar::T_VOID; + return QDeclarativeJSGrammar::T_VOID; else if (c[0] == QLatin1Char('w') && c[1] == QLatin1Char('i') && c[2] == QLatin1Char('t') && c[3] == QLatin1Char('h')) - return QmlJSGrammar::T_WITH; + return QDeclarativeJSGrammar::T_WITH; else if (c[0] == QLatin1Char('t') && c[1] == QLatin1Char('r') && c[2] == QLatin1Char('u') && c[3] == QLatin1Char('e')) - return QmlJSGrammar::T_TRUE; + return QDeclarativeJSGrammar::T_TRUE; else if (c[0] == QLatin1Char('n') && c[1] == QLatin1Char('u') && c[2] == QLatin1Char('l') && c[3] == QLatin1Char('l')) - return QmlJSGrammar::T_NULL; + return QDeclarativeJSGrammar::T_NULL; else if (check_reserved) { if (c[0] == QLatin1Char('e') && c[1] == QLatin1Char('n') && c[2] == QLatin1Char('u') && c[3] == QLatin1Char('m')) - return QmlJSGrammar::T_RESERVED_WORD; + return QDeclarativeJSGrammar::T_RESERVED_WORD; else if (c[0] == QLatin1Char('b') && c[1] == QLatin1Char('y') && c[2] == QLatin1Char('t') && c[3] == QLatin1Char('e')) - return QmlJSGrammar::T_RESERVED_WORD; + return QDeclarativeJSGrammar::T_RESERVED_WORD; else if (c[0] == QLatin1Char('l') && c[1] == QLatin1Char('o') && c[2] == QLatin1Char('n') && c[3] == QLatin1Char('g')) - return QmlJSGrammar::T_RESERVED_WORD; + return QDeclarativeJSGrammar::T_RESERVED_WORD; else if (c[0] == QLatin1Char('c') && c[1] == QLatin1Char('h') && c[2] == QLatin1Char('a') && c[3] == QLatin1Char('r')) - return QmlJSGrammar::T_RESERVED_WORD; + return QDeclarativeJSGrammar::T_RESERVED_WORD; else if (c[0] == QLatin1Char('g') && c[1] == QLatin1Char('o') && c[2] == QLatin1Char('t') && c[3] == QLatin1Char('o')) - return QmlJSGrammar::T_RESERVED_WORD; + return QDeclarativeJSGrammar::T_RESERVED_WORD; } } break; @@ -228,48 +228,48 @@ int Lexer::findReservedWord(const QChar *c, int size) const if (c[0] == QLatin1Char('b') && c[1] == QLatin1Char('r') && c[2] == QLatin1Char('e') && c[3] == QLatin1Char('a') && c[4] == QLatin1Char('k')) - return QmlJSGrammar::T_BREAK; + return QDeclarativeJSGrammar::T_BREAK; else if (c[0] == QLatin1Char('c') && c[1] == QLatin1Char('a') && c[2] == QLatin1Char('t') && c[3] == QLatin1Char('c') && c[4] == QLatin1Char('h')) - return QmlJSGrammar::T_CATCH; + return QDeclarativeJSGrammar::T_CATCH; else if (c[0] == QLatin1Char('t') && c[1] == QLatin1Char('h') && c[2] == QLatin1Char('r') && c[3] == QLatin1Char('o') && c[4] == QLatin1Char('w')) - return QmlJSGrammar::T_THROW; + return QDeclarativeJSGrammar::T_THROW; else if (c[0] == QLatin1Char('w') && c[1] == QLatin1Char('h') && c[2] == QLatin1Char('i') && c[3] == QLatin1Char('l') && c[4] == QLatin1Char('e')) - return QmlJSGrammar::T_WHILE; + return QDeclarativeJSGrammar::T_WHILE; else if (c[0] == QLatin1Char('c') && c[1] == QLatin1Char('o') && c[2] == QLatin1Char('n') && c[3] == QLatin1Char('s') && c[4] == QLatin1Char('t')) - return QmlJSGrammar::T_CONST; + return QDeclarativeJSGrammar::T_CONST; else if (c[0] == QLatin1Char('f') && c[1] == QLatin1Char('a') && c[2] == QLatin1Char('l') && c[3] == QLatin1Char('s') && c[4] == QLatin1Char('e')) - return QmlJSGrammar::T_FALSE; + return QDeclarativeJSGrammar::T_FALSE; else if (check_reserved) { if (c[0] == QLatin1Char('s') && c[1] == QLatin1Char('h') && c[2] == QLatin1Char('o') && c[3] == QLatin1Char('r') && c[4] == QLatin1Char('t')) - return QmlJSGrammar::T_RESERVED_WORD; + return QDeclarativeJSGrammar::T_RESERVED_WORD; else if (c[0] == QLatin1Char('s') && c[1] == QLatin1Char('u') && c[2] == QLatin1Char('p') && c[3] == QLatin1Char('e') && c[4] == QLatin1Char('r')) - return QmlJSGrammar::T_RESERVED_WORD; + return QDeclarativeJSGrammar::T_RESERVED_WORD; else if (c[0] == QLatin1Char('f') && c[1] == QLatin1Char('i') && c[2] == QLatin1Char('n') && c[3] == QLatin1Char('a') && c[4] == QLatin1Char('l')) - return QmlJSGrammar::T_RESERVED_WORD; + return QDeclarativeJSGrammar::T_RESERVED_WORD; else if (c[0] == QLatin1Char('c') && c[1] == QLatin1Char('l') && c[2] == QLatin1Char('a') && c[3] == QLatin1Char('s') && c[4] == QLatin1Char('s')) - return QmlJSGrammar::T_RESERVED_WORD; + return QDeclarativeJSGrammar::T_RESERVED_WORD; else if (c[0] == QLatin1Char('f') && c[1] == QLatin1Char('l') && c[2] == QLatin1Char('o') && c[3] == QLatin1Char('a') && c[4] == QLatin1Char('t')) - return QmlJSGrammar::T_RESERVED_WORD; + return QDeclarativeJSGrammar::T_RESERVED_WORD; } } break; @@ -277,56 +277,56 @@ int Lexer::findReservedWord(const QChar *c, int size) const if (c[0] == QLatin1Char('d') && c[1] == QLatin1Char('e') && c[2] == QLatin1Char('l') && c[3] == QLatin1Char('e') && c[4] == QLatin1Char('t') && c[5] == QLatin1Char('e')) - return QmlJSGrammar::T_DELETE; + return QDeclarativeJSGrammar::T_DELETE; else if (c[0] == QLatin1Char('r') && c[1] == QLatin1Char('e') && c[2] == QLatin1Char('t') && c[3] == QLatin1Char('u') && c[4] == QLatin1Char('r') && c[5] == QLatin1Char('n')) - return QmlJSGrammar::T_RETURN; + return QDeclarativeJSGrammar::T_RETURN; else if (c[0] == QLatin1Char('s') && c[1] == QLatin1Char('w') && c[2] == QLatin1Char('i') && c[3] == QLatin1Char('t') && c[4] == QLatin1Char('c') && c[5] == QLatin1Char('h')) - return QmlJSGrammar::T_SWITCH; + return QDeclarativeJSGrammar::T_SWITCH; else if (c[0] == QLatin1Char('t') && c[1] == QLatin1Char('y') && c[2] == QLatin1Char('p') && c[3] == QLatin1Char('e') && c[4] == QLatin1Char('o') && c[5] == QLatin1Char('f')) - return QmlJSGrammar::T_TYPEOF; + return QDeclarativeJSGrammar::T_TYPEOF; else if (c[0] == QLatin1Char('i') && c[1] == QLatin1Char('m') && c[2] == QLatin1Char('p') && c[3] == QLatin1Char('o') && c[4] == QLatin1Char('r') && c[5] == QLatin1Char('t')) - return QmlJSGrammar::T_IMPORT; + return QDeclarativeJSGrammar::T_IMPORT; else if (c[0] == QLatin1Char('s') && c[1] == QLatin1Char('i') && c[2] == QLatin1Char('g') && c[3] == QLatin1Char('n') && c[4] == QLatin1Char('a') && c[5] == QLatin1Char('l')) - return QmlJSGrammar::T_SIGNAL; + return QDeclarativeJSGrammar::T_SIGNAL; else if (check_reserved) { if (c[0] == QLatin1Char('e') && c[1] == QLatin1Char('x') && c[2] == QLatin1Char('p') && c[3] == QLatin1Char('o') && c[4] == QLatin1Char('r') && c[5] == QLatin1Char('t')) - return QmlJSGrammar::T_RESERVED_WORD; + return QDeclarativeJSGrammar::T_RESERVED_WORD; else if (c[0] == QLatin1Char('s') && c[1] == QLatin1Char('t') && c[2] == QLatin1Char('a') && c[3] == QLatin1Char('t') && c[4] == QLatin1Char('i') && c[5] == QLatin1Char('c')) - return QmlJSGrammar::T_RESERVED_WORD; + return QDeclarativeJSGrammar::T_RESERVED_WORD; else if (c[0] == QLatin1Char('d') && c[1] == QLatin1Char('o') && c[2] == QLatin1Char('u') && c[3] == QLatin1Char('b') && c[4] == QLatin1Char('l') && c[5] == QLatin1Char('e')) - return QmlJSGrammar::T_RESERVED_WORD; + return QDeclarativeJSGrammar::T_RESERVED_WORD; else if (c[0] == QLatin1Char('i') && c[1] == QLatin1Char('m') && c[2] == QLatin1Char('p') && c[3] == QLatin1Char('o') && c[4] == QLatin1Char('r') && c[5] == QLatin1Char('t')) - return QmlJSGrammar::T_RESERVED_WORD; + return QDeclarativeJSGrammar::T_RESERVED_WORD; else if (c[0] == QLatin1Char('p') && c[1] == QLatin1Char('u') && c[2] == QLatin1Char('b') && c[3] == QLatin1Char('l') && c[4] == QLatin1Char('i') && c[5] == QLatin1Char('c')) - return QmlJSGrammar::T_PUBLIC; + return QDeclarativeJSGrammar::T_PUBLIC; else if (c[0] == QLatin1Char('n') && c[1] == QLatin1Char('a') && c[2] == QLatin1Char('t') && c[3] == QLatin1Char('i') && c[4] == QLatin1Char('v') && c[5] == QLatin1Char('e')) - return QmlJSGrammar::T_RESERVED_WORD; + return QDeclarativeJSGrammar::T_RESERVED_WORD; else if (c[0] == QLatin1Char('t') && c[1] == QLatin1Char('h') && c[2] == QLatin1Char('r') && c[3] == QLatin1Char('o') && c[4] == QLatin1Char('w') && c[5] == QLatin1Char('s')) - return QmlJSGrammar::T_RESERVED_WORD; + return QDeclarativeJSGrammar::T_RESERVED_WORD; } } break; @@ -335,33 +335,33 @@ int Lexer::findReservedWord(const QChar *c, int size) const && c[2] == QLatin1Char('f') && c[3] == QLatin1Char('a') && c[4] == QLatin1Char('u') && c[5] == QLatin1Char('l') && c[6] == QLatin1Char('t')) - return QmlJSGrammar::T_DEFAULT; + return QDeclarativeJSGrammar::T_DEFAULT; else if (c[0] == QLatin1Char('f') && c[1] == QLatin1Char('i') && c[2] == QLatin1Char('n') && c[3] == QLatin1Char('a') && c[4] == QLatin1Char('l') && c[5] == QLatin1Char('l') && c[6] == QLatin1Char('y')) - return QmlJSGrammar::T_FINALLY; + return QDeclarativeJSGrammar::T_FINALLY; else if (check_reserved) { if (c[0] == QLatin1Char('b') && c[1] == QLatin1Char('o') && c[2] == QLatin1Char('o') && c[3] == QLatin1Char('l') && c[4] == QLatin1Char('e') && c[5] == QLatin1Char('a') && c[6] == QLatin1Char('n')) - return QmlJSGrammar::T_RESERVED_WORD; + return QDeclarativeJSGrammar::T_RESERVED_WORD; else if (c[0] == QLatin1Char('e') && c[1] == QLatin1Char('x') && c[2] == QLatin1Char('t') && c[3] == QLatin1Char('e') && c[4] == QLatin1Char('n') && c[5] == QLatin1Char('d') && c[6] == QLatin1Char('s')) - return QmlJSGrammar::T_RESERVED_WORD; + return QDeclarativeJSGrammar::T_RESERVED_WORD; else if (c[0] == QLatin1Char('p') && c[1] == QLatin1Char('a') && c[2] == QLatin1Char('c') && c[3] == QLatin1Char('k') && c[4] == QLatin1Char('a') && c[5] == QLatin1Char('g') && c[6] == QLatin1Char('e')) - return QmlJSGrammar::T_RESERVED_WORD; + return QDeclarativeJSGrammar::T_RESERVED_WORD; else if (c[0] == QLatin1Char('p') && c[1] == QLatin1Char('r') && c[2] == QLatin1Char('i') && c[3] == QLatin1Char('v') && c[4] == QLatin1Char('a') && c[5] == QLatin1Char('t') && c[6] == QLatin1Char('e')) - return QmlJSGrammar::T_RESERVED_WORD; + return QDeclarativeJSGrammar::T_RESERVED_WORD; } } break; @@ -370,38 +370,38 @@ int Lexer::findReservedWord(const QChar *c, int size) const && c[2] == QLatin1Char('n') && c[3] == QLatin1Char('t') && c[4] == QLatin1Char('i') && c[5] == QLatin1Char('n') && c[6] == QLatin1Char('u') && c[7] == QLatin1Char('e')) - return QmlJSGrammar::T_CONTINUE; + return QDeclarativeJSGrammar::T_CONTINUE; else if (c[0] == QLatin1Char('f') && c[1] == QLatin1Char('u') && c[2] == QLatin1Char('n') && c[3] == QLatin1Char('c') && c[4] == QLatin1Char('t') && c[5] == QLatin1Char('i') && c[6] == QLatin1Char('o') && c[7] == QLatin1Char('n')) - return QmlJSGrammar::T_FUNCTION; + return QDeclarativeJSGrammar::T_FUNCTION; else if (c[0] == QLatin1Char('d') && c[1] == QLatin1Char('e') && c[2] == QLatin1Char('b') && c[3] == QLatin1Char('u') && c[4] == QLatin1Char('g') && c[5] == QLatin1Char('g') && c[6] == QLatin1Char('e') && c[7] == QLatin1Char('r')) - return QmlJSGrammar::T_DEBUGGER; + return QDeclarativeJSGrammar::T_DEBUGGER; else if (c[0] == QLatin1Char('p') && c[1] == QLatin1Char('r') && c[2] == QLatin1Char('o') && c[3] == QLatin1Char('p') && c[4] == QLatin1Char('e') && c[5] == QLatin1Char('r') && c[6] == QLatin1Char('t') && c[7] == QLatin1Char('y')) - return QmlJSGrammar::T_PROPERTY; + return QDeclarativeJSGrammar::T_PROPERTY; else if (c[0] == QLatin1Char('r') && c[1] == QLatin1Char('e') && c[2] == QLatin1Char('a') && c[3] == QLatin1Char('d') && c[4] == QLatin1Char('o') && c[5] == QLatin1Char('n') && c[6] == QLatin1Char('l') && c[7] == QLatin1Char('y')) - return QmlJSGrammar::T_READONLY; + return QDeclarativeJSGrammar::T_READONLY; else if (check_reserved) { if (c[0] == QLatin1Char('a') && c[1] == QLatin1Char('b') && c[2] == QLatin1Char('s') && c[3] == QLatin1Char('t') && c[4] == QLatin1Char('r') && c[5] == QLatin1Char('a') && c[6] == QLatin1Char('c') && c[7] == QLatin1Char('t')) - return QmlJSGrammar::T_RESERVED_WORD; + return QDeclarativeJSGrammar::T_RESERVED_WORD; else if (c[0] == QLatin1Char('v') && c[1] == QLatin1Char('o') && c[2] == QLatin1Char('l') && c[3] == QLatin1Char('a') && c[4] == QLatin1Char('t') && c[5] == QLatin1Char('i') && c[6] == QLatin1Char('l') && c[7] == QLatin1Char('e')) - return QmlJSGrammar::T_RESERVED_WORD; + return QDeclarativeJSGrammar::T_RESERVED_WORD; } } break; @@ -412,19 +412,19 @@ int Lexer::findReservedWord(const QChar *c, int size) const && c[4] == QLatin1Char('r') && c[5] == QLatin1Char('f') && c[6] == QLatin1Char('a') && c[7] == QLatin1Char('c') && c[8] == QLatin1Char('e')) - return QmlJSGrammar::T_RESERVED_WORD; + return QDeclarativeJSGrammar::T_RESERVED_WORD; else if (c[0] == QLatin1Char('t') && c[1] == QLatin1Char('r') && c[2] == QLatin1Char('a') && c[3] == QLatin1Char('n') && c[4] == QLatin1Char('s') && c[5] == QLatin1Char('i') && c[6] == QLatin1Char('e') && c[7] == QLatin1Char('n') && c[8] == QLatin1Char('t')) - return QmlJSGrammar::T_RESERVED_WORD; + return QDeclarativeJSGrammar::T_RESERVED_WORD; else if (c[0] == QLatin1Char('p') && c[1] == QLatin1Char('r') && c[2] == QLatin1Char('o') && c[3] == QLatin1Char('t') && c[4] == QLatin1Char('e') && c[5] == QLatin1Char('c') && c[6] == QLatin1Char('t') && c[7] == QLatin1Char('e') && c[8] == QLatin1Char('d')) - return QmlJSGrammar::T_RESERVED_WORD; + return QDeclarativeJSGrammar::T_RESERVED_WORD; } } break; @@ -434,14 +434,14 @@ int Lexer::findReservedWord(const QChar *c, int size) const && c[4] == QLatin1Char('a') && c[5] == QLatin1Char('n') && c[6] == QLatin1Char('c') && c[7] == QLatin1Char('e') && c[8] == QLatin1Char('o') && c[9] == QLatin1Char('f')) - return QmlJSGrammar::T_INSTANCEOF; + return QDeclarativeJSGrammar::T_INSTANCEOF; else if (check_reserved) { if (c[0] == QLatin1Char('i') && c[1] == QLatin1Char('m') && c[2] == QLatin1Char('p') && c[3] == QLatin1Char('l') && c[4] == QLatin1Char('e') && c[5] == QLatin1Char('m') && c[6] == QLatin1Char('e') && c[7] == QLatin1Char('n') && c[8] == QLatin1Char('t') && c[9] == QLatin1Char('s')) - return QmlJSGrammar::T_RESERVED_WORD; + return QDeclarativeJSGrammar::T_RESERVED_WORD; } } break; @@ -453,7 +453,7 @@ int Lexer::findReservedWord(const QChar *c, int size) const && c[6] == QLatin1Char('o') && c[7] == QLatin1Char('n') && c[8] == QLatin1Char('i') && c[9] == QLatin1Char('z') && c[10] == QLatin1Char('e') && c[11] == QLatin1Char('d')) - return QmlJSGrammar::T_RESERVED_WORD; + return QDeclarativeJSGrammar::T_RESERVED_WORD; } } break; @@ -497,7 +497,7 @@ int Lexer::lex() syncProhibitAutomaticSemicolon(); if (!terminator && !delimited && !prohibitAutomaticSemicolon) { // automatic semicolon insertion if program incomplete - token = QmlJSGrammar::T_SEMICOLON; + token = QDeclarativeJSGrammar::T_SEMICOLON; stackToken = 0; setDone(Other); } else { @@ -511,7 +511,7 @@ int Lexer::lex() terminator = true; syncProhibitAutomaticSemicolon(); if (restrKeyword) { - token = QmlJSGrammar::T_SEMICOLON; + token = QDeclarativeJSGrammar::T_SEMICOLON; setDone(Other); } } else if (current == '"' || current == '\'') { @@ -540,18 +540,18 @@ int Lexer::lex() token = matchPunctuator(current, next1, next2, next3); if (token != -1) { if (terminator && !delimited && !prohibitAutomaticSemicolon - && (token == QmlJSGrammar::T_PLUS_PLUS - || token == QmlJSGrammar::T_MINUS_MINUS)) { + && (token == QDeclarativeJSGrammar::T_PLUS_PLUS + || token == QDeclarativeJSGrammar::T_MINUS_MINUS)) { // automatic semicolon insertion stackToken = token; - token = QmlJSGrammar::T_SEMICOLON; + token = QDeclarativeJSGrammar::T_SEMICOLON; } setDone(Other); } else { setDone(Bad); err = IllegalCharacter; - errmsg = QCoreApplication::translate("QmlParser", "Illegal character"); + errmsg = QCoreApplication::translate("QDeclarativeParser", "Illegal character"); } } break; @@ -565,7 +565,7 @@ int Lexer::lex() } else if (current == 0 || isLineTerminator()) { setDone(Bad); err = UnclosedStringLiteral; - errmsg = QCoreApplication::translate("QmlParser", "Unclosed string at end of line"); + errmsg = QCoreApplication::translate("QDeclarativeParser", "Unclosed string at end of line"); } else if (current == '\\') { state = InEscapeSequence; } else { @@ -591,7 +591,7 @@ int Lexer::lex() } else { setDone(Bad); err = IllegalEscapeSequence; - errmsg = QCoreApplication::translate("QmlParser", "Illegal escape squence"); + errmsg = QCoreApplication::translate("QDeclarativeParser", "Illegal escape squence"); } } else if (current == 'x') state = InHexEscape; @@ -637,7 +637,7 @@ int Lexer::lex() } else { setDone(Bad); err = IllegalUnicodeEscapeSequence; - errmsg = QCoreApplication::translate("QmlParser", "Illegal unicode escape sequence"); + errmsg = QCoreApplication::translate("QDeclarativeParser", "Illegal unicode escape sequence"); } break; case InSingleLineComment: @@ -648,7 +648,7 @@ int Lexer::lex() terminator = true; bol = true; if (restrKeyword) { - token = QmlJSGrammar::T_SEMICOLON; + token = QDeclarativeJSGrammar::T_SEMICOLON; setDone(Other); } else state = Start; @@ -663,7 +663,7 @@ int Lexer::lex() if (current == 0) { setDone(Bad); err = UnclosedComment; - errmsg = QCoreApplication::translate("QmlParser", "Unclosed comment at end of file"); + errmsg = QCoreApplication::translate("QDeclarativeParser", "Unclosed comment at end of file"); driver->addComment(startpos, tokenLength(), startlineno, startcolumn); } else if (isLineTerminator()) { shiftWindowsLineBreak(); @@ -750,7 +750,7 @@ int Lexer::lex() } else { setDone(Bad); err = IllegalExponentIndicator; - errmsg = QCoreApplication::translate("QmlParser", "Illegal syntax for exponential number"); + errmsg = QCoreApplication::translate("QDeclarativeParser", "Illegal syntax for exponential number"); } break; case InExponent: @@ -776,7 +776,7 @@ int Lexer::lex() && isIdentLetter(current)) { state = Bad; err = IllegalIdentifier; - errmsg = QCoreApplication::translate("QmlParser", "Identifier cannot start with numeric literal"); + errmsg = QCoreApplication::translate("QDeclarativeParser", "Identifier cannot start with numeric literal"); } // terminate string @@ -800,11 +800,11 @@ int Lexer::lex() case IgnoreParentheses: break; case CountParentheses: - if (token == QmlJSGrammar::T_RPAREN) { + if (token == QDeclarativeJSGrammar::T_RPAREN) { --parenthesesCount; if (parenthesesCount == 0) parenthesesState = BalancedParentheses; - } else if (token == QmlJSGrammar::T_LPAREN) { + } else if (token == QDeclarativeJSGrammar::T_LPAREN) { ++parenthesesCount; } break; @@ -817,7 +817,7 @@ int Lexer::lex() case Eof: return 0; case Other: - if (token == QmlJSGrammar::T_RBRACE || token == QmlJSGrammar::T_SEMICOLON) + if (token == QDeclarativeJSGrammar::T_RBRACE || token == QDeclarativeJSGrammar::T_SEMICOLON) delimited = true; return token; case Identifier: @@ -827,16 +827,16 @@ int Lexer::lex() qsyylval.ustr = driver->intern(buffer16, pos16); else qsyylval.ustr = 0; - return QmlJSGrammar::T_IDENTIFIER; + return QDeclarativeJSGrammar::T_IDENTIFIER; } - if (token == QmlJSGrammar::T_CONTINUE || token == QmlJSGrammar::T_BREAK - || token == QmlJSGrammar::T_RETURN || token == QmlJSGrammar::T_THROW) { + if (token == QDeclarativeJSGrammar::T_CONTINUE || token == QDeclarativeJSGrammar::T_BREAK + || token == QDeclarativeJSGrammar::T_RETURN || token == QDeclarativeJSGrammar::T_THROW) { restrKeyword = true; - } else if (token == QmlJSGrammar::T_IF || token == QmlJSGrammar::T_FOR - || token == QmlJSGrammar::T_WHILE || token == QmlJSGrammar::T_WITH) { + } else if (token == QDeclarativeJSGrammar::T_IF || token == QDeclarativeJSGrammar::T_FOR + || token == QDeclarativeJSGrammar::T_WHILE || token == QDeclarativeJSGrammar::T_WITH) { parenthesesState = CountParentheses; parenthesesCount = 0; - } else if (token == QmlJSGrammar::T_DO) { + } else if (token == QDeclarativeJSGrammar::T_DO) { parenthesesState = BalancedParentheses; } return token; @@ -845,10 +845,10 @@ int Lexer::lex() qsyylval.ustr = driver->intern(buffer16, pos16); else qsyylval.ustr = 0; - return multiLineString?QmlJSGrammar::T_MULTILINE_STRING_LITERAL:QmlJSGrammar::T_STRING_LITERAL; + return multiLineString?QDeclarativeJSGrammar::T_MULTILINE_STRING_LITERAL:QDeclarativeJSGrammar::T_STRING_LITERAL; case Number: qsyylval.dval = dval; - return QmlJSGrammar::T_NUMERIC_LITERAL; + return QDeclarativeJSGrammar::T_NUMERIC_LITERAL; case Bad: return -1; default: @@ -904,103 +904,103 @@ int Lexer::matchPunctuator(ushort c1, ushort c2, { if (c1 == '>' && c2 == '>' && c3 == '>' && c4 == '=') { shift(4); - return QmlJSGrammar::T_GT_GT_GT_EQ; + return QDeclarativeJSGrammar::T_GT_GT_GT_EQ; } else if (c1 == '=' && c2 == '=' && c3 == '=') { shift(3); - return QmlJSGrammar::T_EQ_EQ_EQ; + return QDeclarativeJSGrammar::T_EQ_EQ_EQ; } else if (c1 == '!' && c2 == '=' && c3 == '=') { shift(3); - return QmlJSGrammar::T_NOT_EQ_EQ; + return QDeclarativeJSGrammar::T_NOT_EQ_EQ; } else if (c1 == '>' && c2 == '>' && c3 == '>') { shift(3); - return QmlJSGrammar::T_GT_GT_GT; + return QDeclarativeJSGrammar::T_GT_GT_GT; } else if (c1 == '<' && c2 == '<' && c3 == '=') { shift(3); - return QmlJSGrammar::T_LT_LT_EQ; + return QDeclarativeJSGrammar::T_LT_LT_EQ; } else if (c1 == '>' && c2 == '>' && c3 == '=') { shift(3); - return QmlJSGrammar::T_GT_GT_EQ; + return QDeclarativeJSGrammar::T_GT_GT_EQ; } else if (c1 == '<' && c2 == '=') { shift(2); - return QmlJSGrammar::T_LE; + return QDeclarativeJSGrammar::T_LE; } else if (c1 == '>' && c2 == '=') { shift(2); - return QmlJSGrammar::T_GE; + return QDeclarativeJSGrammar::T_GE; } else if (c1 == '!' && c2 == '=') { shift(2); - return QmlJSGrammar::T_NOT_EQ; + return QDeclarativeJSGrammar::T_NOT_EQ; } else if (c1 == '+' && c2 == '+') { shift(2); - return QmlJSGrammar::T_PLUS_PLUS; + return QDeclarativeJSGrammar::T_PLUS_PLUS; } else if (c1 == '-' && c2 == '-') { shift(2); - return QmlJSGrammar::T_MINUS_MINUS; + return QDeclarativeJSGrammar::T_MINUS_MINUS; } else if (c1 == '=' && c2 == '=') { shift(2); - return QmlJSGrammar::T_EQ_EQ; + return QDeclarativeJSGrammar::T_EQ_EQ; } else if (c1 == '+' && c2 == '=') { shift(2); - return QmlJSGrammar::T_PLUS_EQ; + return QDeclarativeJSGrammar::T_PLUS_EQ; } else if (c1 == '-' && c2 == '=') { shift(2); - return QmlJSGrammar::T_MINUS_EQ; + return QDeclarativeJSGrammar::T_MINUS_EQ; } else if (c1 == '*' && c2 == '=') { shift(2); - return QmlJSGrammar::T_STAR_EQ; + return QDeclarativeJSGrammar::T_STAR_EQ; } else if (c1 == '/' && c2 == '=') { shift(2); - return QmlJSGrammar::T_DIVIDE_EQ; + return QDeclarativeJSGrammar::T_DIVIDE_EQ; } else if (c1 == '&' && c2 == '=') { shift(2); - return QmlJSGrammar::T_AND_EQ; + return QDeclarativeJSGrammar::T_AND_EQ; } else if (c1 == '^' && c2 == '=') { shift(2); - return QmlJSGrammar::T_XOR_EQ; + return QDeclarativeJSGrammar::T_XOR_EQ; } else if (c1 == '%' && c2 == '=') { shift(2); - return QmlJSGrammar::T_REMAINDER_EQ; + return QDeclarativeJSGrammar::T_REMAINDER_EQ; } else if (c1 == '|' && c2 == '=') { shift(2); - return QmlJSGrammar::T_OR_EQ; + return QDeclarativeJSGrammar::T_OR_EQ; } else if (c1 == '<' && c2 == '<') { shift(2); - return QmlJSGrammar::T_LT_LT; + return QDeclarativeJSGrammar::T_LT_LT; } else if (c1 == '>' && c2 == '>') { shift(2); - return QmlJSGrammar::T_GT_GT; + return QDeclarativeJSGrammar::T_GT_GT; } else if (c1 == '&' && c2 == '&') { shift(2); - return QmlJSGrammar::T_AND_AND; + return QDeclarativeJSGrammar::T_AND_AND; } else if (c1 == '|' && c2 == '|') { shift(2); - return QmlJSGrammar::T_OR_OR; + return QDeclarativeJSGrammar::T_OR_OR; } switch(c1) { - case '=': shift(1); return QmlJSGrammar::T_EQ; - case '>': shift(1); return QmlJSGrammar::T_GT; - case '<': shift(1); return QmlJSGrammar::T_LT; - case ',': shift(1); return QmlJSGrammar::T_COMMA; - case '!': shift(1); return QmlJSGrammar::T_NOT; - case '~': shift(1); return QmlJSGrammar::T_TILDE; - case '?': shift(1); return QmlJSGrammar::T_QUESTION; - case ':': shift(1); return QmlJSGrammar::T_COLON; - case '.': shift(1); return QmlJSGrammar::T_DOT; - case '+': shift(1); return QmlJSGrammar::T_PLUS; - case '-': shift(1); return QmlJSGrammar::T_MINUS; - case '*': shift(1); return QmlJSGrammar::T_STAR; - case '/': shift(1); return QmlJSGrammar::T_DIVIDE_; - case '&': shift(1); return QmlJSGrammar::T_AND; - case '|': shift(1); return QmlJSGrammar::T_OR; - case '^': shift(1); return QmlJSGrammar::T_XOR; - case '%': shift(1); return QmlJSGrammar::T_REMAINDER; - case '(': shift(1); return QmlJSGrammar::T_LPAREN; - case ')': shift(1); return QmlJSGrammar::T_RPAREN; - case '{': shift(1); return QmlJSGrammar::T_LBRACE; - case '}': shift(1); return QmlJSGrammar::T_RBRACE; - case '[': shift(1); return QmlJSGrammar::T_LBRACKET; - case ']': shift(1); return QmlJSGrammar::T_RBRACKET; - case ';': shift(1); return QmlJSGrammar::T_SEMICOLON; + case '=': shift(1); return QDeclarativeJSGrammar::T_EQ; + case '>': shift(1); return QDeclarativeJSGrammar::T_GT; + case '<': shift(1); return QDeclarativeJSGrammar::T_LT; + case ',': shift(1); return QDeclarativeJSGrammar::T_COMMA; + case '!': shift(1); return QDeclarativeJSGrammar::T_NOT; + case '~': shift(1); return QDeclarativeJSGrammar::T_TILDE; + case '?': shift(1); return QDeclarativeJSGrammar::T_QUESTION; + case ':': shift(1); return QDeclarativeJSGrammar::T_COLON; + case '.': shift(1); return QDeclarativeJSGrammar::T_DOT; + case '+': shift(1); return QDeclarativeJSGrammar::T_PLUS; + case '-': shift(1); return QDeclarativeJSGrammar::T_MINUS; + case '*': shift(1); return QDeclarativeJSGrammar::T_STAR; + case '/': shift(1); return QDeclarativeJSGrammar::T_DIVIDE_; + case '&': shift(1); return QDeclarativeJSGrammar::T_AND; + case '|': shift(1); return QDeclarativeJSGrammar::T_OR; + case '^': shift(1); return QDeclarativeJSGrammar::T_XOR; + case '%': shift(1); return QDeclarativeJSGrammar::T_REMAINDER; + case '(': shift(1); return QDeclarativeJSGrammar::T_LPAREN; + case ')': shift(1); return QDeclarativeJSGrammar::T_RPAREN; + case '{': shift(1); return QDeclarativeJSGrammar::T_LBRACE; + case '}': shift(1); return QDeclarativeJSGrammar::T_RBRACE; + case '[': shift(1); return QDeclarativeJSGrammar::T_LBRACKET; + case ']': shift(1); return QDeclarativeJSGrammar::T_RBRACKET; + case ';': shift(1); return QDeclarativeJSGrammar::T_SEMICOLON; default: return -1; } @@ -1107,7 +1107,7 @@ bool Lexer::scanRegExp(RegExpBodyPrefix prefix) while (1) { if (isLineTerminator() || current == 0) { - errmsg = QCoreApplication::translate("QmlParser", "Unterminated regular expression literal"); + errmsg = QCoreApplication::translate("QDeclarativeParser", "Unterminated regular expression literal"); return false; } else if (current != '/' || lastWasEscape == true) @@ -1131,7 +1131,7 @@ bool Lexer::scanRegExp(RegExpBodyPrefix prefix) while (isIdentLetter(current)) { int flag = Ecma::RegExp::flagFromChar(current); if (flag == 0) { - errmsg = QCoreApplication::translate("QmlParser", "Invalid regular expression flag '%0'") + errmsg = QCoreApplication::translate("QDeclarativeParser", "Invalid regular expression flag '%0'") .arg(QChar(current)); return false; } diff --git a/src/declarative/qml/parser/qmljslexer_p.h b/src/declarative/qml/parser/qdeclarativejslexer_p.h index 8f95a90..71bd08c 100644 --- a/src/declarative/qml/parser/qmljslexer_p.h +++ b/src/declarative/qml/parser/qdeclarativejslexer_p.h @@ -39,8 +39,8 @@ ** ****************************************************************************/ -#ifndef QMLJSLEXER_P_H -#define QMLJSLEXER_P_H +#ifndef QDECLARATIVEJSLEXER_P_H +#define QDECLARATIVEJSLEXER_P_H // // W A R N I N G @@ -53,13 +53,13 @@ // We mean it. // -#include "qmljsglobal_p.h" +#include "qdeclarativejsglobal_p.h" #include <QtCore/QString> QT_QML_BEGIN_NAMESPACE -namespace QmlJS { +namespace QDeclarativeJS { class Engine; class NameId; @@ -242,7 +242,7 @@ private: bool tokenizeComments; }; -} // namespace QmlJS +} // namespace QDeclarativeJS QT_QML_END_NAMESPACE diff --git a/src/declarative/qml/parser/qmljsmemorypool_p.h b/src/declarative/qml/parser/qdeclarativejsmemorypool_p.h index 5dffdc8..c8d52d0 100644 --- a/src/declarative/qml/parser/qmljsmemorypool_p.h +++ b/src/declarative/qml/parser/qdeclarativejsmemorypool_p.h @@ -39,8 +39,8 @@ ** ****************************************************************************/ -#ifndef QMLJSMEMORYPOOL_P_H -#define QMLJSMEMORYPOOL_P_H +#ifndef QDECLARATIVEJSMEMORYPOOL_P_H +#define QDECLARATIVEJSMEMORYPOOL_P_H // // W A R N I N G @@ -53,7 +53,7 @@ // We mean it. // -#include "qmljsglobal_p.h" +#include "qdeclarativejsglobal_p.h" #include <QtCore/qglobal.h> #include <QtCore/qshareddata.h> @@ -62,7 +62,7 @@ QT_QML_BEGIN_NAMESPACE -namespace QmlJS { +namespace QDeclarativeJS { class QML_PARSER_EXPORT MemoryPool : public QSharedData { @@ -126,7 +126,7 @@ private: Q_DISABLE_COPY(MemoryPool) }; -} // namespace QmlJS +} // namespace QDeclarativeJS QT_QML_END_NAMESPACE diff --git a/src/declarative/qml/parser/qmljsnodepool_p.h b/src/declarative/qml/parser/qdeclarativejsnodepool_p.h index 2055a7e..94637fd 100644 --- a/src/declarative/qml/parser/qmljsnodepool_p.h +++ b/src/declarative/qml/parser/qdeclarativejsnodepool_p.h @@ -39,8 +39,8 @@ ** ****************************************************************************/ -#ifndef QMLJSNODEPOOL_P_H -#define QMLJSNODEPOOL_P_H +#ifndef QDECLARATIVEJSNODEPOOL_P_H +#define QDECLARATIVEJSNODEPOOL_P_H // // W A R N I N G @@ -53,15 +53,15 @@ // We mean it. // -#include "qmljsglobal_p.h" -#include "qmljsmemorypool_p.h" +#include "qdeclarativejsglobal_p.h" +#include "qdeclarativejsmemorypool_p.h" #include <QtCore/QHash> #include <QtCore/QString> QT_QML_BEGIN_NAMESPACE -namespace QmlJS { +namespace QDeclarativeJS { namespace AST { class Node; @@ -132,7 +132,7 @@ private: Q_DISABLE_COPY(NodePool) }; -} // namespace QmlJS +} // namespace QDeclarativeJS QT_QML_END_NAMESPACE diff --git a/src/declarative/qml/parser/qmljsparser.cpp b/src/declarative/qml/parser/qdeclarativejsparser.cpp index 856d06d..4aa4960 100644 --- a/src/declarative/qml/parser/qmljsparser.cpp +++ b/src/declarative/qml/parser/qdeclarativejsparser.cpp @@ -44,14 +44,14 @@ #include <string.h> -#include "qmljsengine_p.h" -#include "qmljslexer_p.h" -#include "qmljsast_p.h" -#include "qmljsnodepool_p.h" +#include "qdeclarativejsengine_p.h" +#include "qdeclarativejslexer_p.h" +#include "qdeclarativejsast_p.h" +#include "qdeclarativejsnodepool_p.h" -#include "qmljsparser_p.h" +#include "qdeclarativejsparser_p.h" #include <QVarLengthArray> // @@ -59,7 +59,7 @@ // Changes will be lost. // -using namespace QmlJS; +using namespace QDeclarativeJS; QT_QML_BEGIN_NAMESPACE @@ -77,7 +77,7 @@ void Parser::reallocateStack() inline static bool automatic(Engine *driver, int token) { - return token == QmlJSGrammar::T_RBRACE + return token == QDeclarativeJSGrammar::T_RBRACE || token == 0 || driver->lexer()->prevTerminator(); } @@ -490,19 +490,19 @@ case 61: { } break; case 63: { - QString s = QLatin1String(QmlJSGrammar::spell[T_PROPERTY]); + QString s = QLatin1String(QDeclarativeJSGrammar::spell[T_PROPERTY]); sym(1).sval = driver->intern(s.constData(), s.length()); break; } case 64: { - QString s = QLatin1String(QmlJSGrammar::spell[T_SIGNAL]); + QString s = QLatin1String(QDeclarativeJSGrammar::spell[T_SIGNAL]); sym(1).sval = driver->intern(s.constData(), s.length()); break; } case 65: { - QString s = QLatin1String(QmlJSGrammar::spell[T_READONLY]); + QString s = QLatin1String(QDeclarativeJSGrammar::spell[T_READONLY]); sym(1).sval = driver->intern(s.constData(), s.length()); break; } @@ -1736,7 +1736,7 @@ case 340: { yylloc.startColumn += yylloc.length; yylloc.length = 0; - //const QString msg = qApp->translate("QmlParser", "Missing `;'"); + //const QString msg = qApp->translate("QDeclarativeParser", "Missing `;'"); //diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Warning, yylloc, msg)); first_token = &token_buffer[0]; @@ -1764,9 +1764,9 @@ case 340: { QString msg; int token = token_buffer[0].token; if (token < 0 || token >= TERMINAL_COUNT) - msg = qApp->translate("QmlParser", "Syntax error"); + msg = qApp->translate("QDeclarativeParser", "Syntax error"); else - msg = qApp->translate("QmlParser", "Unexpected token `%1'").arg(QLatin1String(spell[token])); + msg = qApp->translate("QDeclarativeParser", "Unexpected token `%1'").arg(QLatin1String(spell[token])); diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, token_buffer[0].loc, msg)); action = errorState; @@ -1794,7 +1794,7 @@ case 340: { for (int *tk = tokens; *tk != EOF_SYMBOL; ++tk) { int a = t_action(errorState, *tk); if (a > 0 && t_action(a, yytoken)) { - const QString msg = qApp->translate("QmlParser", "Expected token `%1'").arg(QLatin1String(spell[*tk])); + const QString msg = qApp->translate("QDeclarativeParser", "Expected token `%1'").arg(QLatin1String(spell[*tk])); diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, token_buffer[0].loc, msg)); yytoken = *tk; @@ -1818,7 +1818,7 @@ case 340: { int a = t_action(errorState, tk); if (a > 0 && t_action(a, yytoken)) { - const QString msg = qApp->translate("QmlParser", "Expected token `%1'").arg(QLatin1String(spell[tk])); + const QString msg = qApp->translate("QDeclarativeParser", "Expected token `%1'").arg(QLatin1String(spell[tk])); diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, token_buffer[0].loc, msg)); yytoken = tk; @@ -1831,7 +1831,7 @@ case 340: { } } - const QString msg = qApp->translate("QmlParser", "Syntax error"); + const QString msg = qApp->translate("QDeclarativeParser", "Syntax error"); diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, token_buffer[0].loc, msg)); } diff --git a/src/declarative/qml/parser/qmljsparser_p.h b/src/declarative/qml/parser/qdeclarativejsparser_p.h index 42fb422..c7e097a 100644 --- a/src/declarative/qml/parser/qmljsparser_p.h +++ b/src/declarative/qml/parser/qdeclarativejsparser_p.h @@ -56,25 +56,25 @@ // Changes will be lost. // -#ifndef QMLJSPARSER_P_H -#define QMLJSPARSER_P_H +#ifndef QDECLARATIVEJSPARSER_P_H +#define QDECLARATIVEJSPARSER_P_H -#include "qmljsglobal_p.h" -#include "qmljsgrammar_p.h" -#include "qmljsast_p.h" -#include "qmljsengine_p.h" +#include "qdeclarativejsglobal_p.h" +#include "qdeclarativejsgrammar_p.h" +#include "qdeclarativejsast_p.h" +#include "qdeclarativejsengine_p.h" #include <QtCore/QList> #include <QtCore/QString> QT_QML_BEGIN_NAMESPACE -namespace QmlJS { +namespace QDeclarativeJS { class Engine; class NameId; -class QML_PARSER_EXPORT Parser: protected QmlJSGrammar +class QML_PARSER_EXPORT Parser: protected QDeclarativeJSGrammar { public: union Value { @@ -231,7 +231,7 @@ protected: QList<DiagnosticMessage> diagnostic_messages; }; -} // end of namespace QmlJS +} // end of namespace QDeclarativeJS @@ -243,4 +243,4 @@ QT_QML_END_NAMESPACE -#endif // QMLJSPARSER_P_H +#endif // QDECLARATIVEJSPARSER_P_H |