forked from qt-creator/qt-creator
Update QML front-end from qt/kinetic-declarativeui (rev bcae9d84fb5dd2bdc5a5298c8841702505a02867)
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
----------------------------------------------------------------------------
|
||||
--
|
||||
-- Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
||||
-- Contact: Nokia Corporation (qt-info@nokia.com)
|
||||
-- Contact: Qt Software Information (qt-info@nokia.com)
|
||||
--
|
||||
-- This file is part of the QtScript module of the Qt Toolkit.
|
||||
-- This file is part of the QtDeclarative module of the Qt Toolkit.
|
||||
--
|
||||
-- $QT_BEGIN_LICENSE:LGPL$
|
||||
-- No Commercial Usage
|
||||
@@ -34,7 +34,7 @@
|
||||
-- met: http://www.gnu.org/copyleft/gpl.html.
|
||||
--
|
||||
-- If you are unsure which license is appropriate for your use, please
|
||||
-- contact the sales department at http://www.qtsoftware.com/contact.
|
||||
-- contact the sales department at qt-sales@nokia.com.
|
||||
-- $QT_END_LICENSE$
|
||||
--
|
||||
-- This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
@@ -84,18 +84,24 @@
|
||||
--- context keywords.
|
||||
%token T_PUBLIC "public"
|
||||
%token T_IMPORT "import"
|
||||
%token T_AS "as"
|
||||
|
||||
--- feed tokens
|
||||
%token T_FEED_UI_PROGRAM
|
||||
%token T_FEED_JS_STATEMENT
|
||||
%token T_FEED_JS_EXPRESSION
|
||||
|
||||
%nonassoc SHIFT_THERE
|
||||
%nonassoc T_IDENTIFIER T_COLON T_SIGNAL T_PROPERTY
|
||||
%nonassoc REDUCE_HERE
|
||||
|
||||
%start UiProgram
|
||||
%start TopLevel
|
||||
|
||||
/.
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
||||
** Contact: Nokia Corporation (qt-info@nokia.com)
|
||||
** Contact: Qt Software Information (qt-info@nokia.com)
|
||||
**
|
||||
** This file is part of the QtScript module of the Qt Toolkit.
|
||||
**
|
||||
@@ -128,7 +134,7 @@
|
||||
** met: http://www.gnu.org/copyleft/gpl.html.
|
||||
**
|
||||
** If you are unsure which license is appropriate for your use, please
|
||||
** contact the sales department at http://www.qtsoftware.com/contact.
|
||||
** contact the sales department at qt-sales@nokia.com.
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
@@ -148,7 +154,7 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
||||
** Contact: Nokia Corporation (qt-info@nokia.com)
|
||||
** Contact: Qt Software Information (qt-info@nokia.com)
|
||||
**
|
||||
** This file is part of the QtScript module of the Qt Toolkit.
|
||||
**
|
||||
@@ -181,7 +187,7 @@
|
||||
** met: http://www.gnu.org/copyleft/gpl.html.
|
||||
**
|
||||
** If you are unsure which license is appropriate for your use, please
|
||||
** contact the sales department at http://www.qtsoftware.com/contact.
|
||||
** contact the sales department at qt-sales@nokia.com.
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
@@ -254,6 +260,7 @@ public:
|
||||
AST::UiProgram *UiProgram;
|
||||
AST::UiImportList *UiImportList;
|
||||
AST::UiImport *UiImport;
|
||||
AST::UiParameterList *UiParameterList;
|
||||
AST::UiPublicMember *UiPublicMember;
|
||||
AST::UiObjectDefinition *UiObjectDefinition;
|
||||
AST::UiObjectInitializer *UiObjectInitializer;
|
||||
@@ -270,10 +277,29 @@ public:
|
||||
Parser(Engine *engine);
|
||||
~Parser();
|
||||
|
||||
bool parse();
|
||||
// parse a UI program
|
||||
bool parse() { return parse(T_FEED_UI_PROGRAM); }
|
||||
bool parseStatement() { return parse(T_FEED_JS_STATEMENT); }
|
||||
bool parseExpression() { return parse(T_FEED_JS_EXPRESSION); }
|
||||
|
||||
AST::UiProgram *ast()
|
||||
{ return program; }
|
||||
AST::UiProgram *ast() const
|
||||
{ return AST::cast<AST::UiProgram *>(program); }
|
||||
|
||||
AST::Statement *statement() const
|
||||
{
|
||||
if (! program)
|
||||
return 0;
|
||||
|
||||
return program->statementCast();
|
||||
}
|
||||
|
||||
AST::ExpressionNode *expression() const
|
||||
{
|
||||
if (! program)
|
||||
return 0;
|
||||
|
||||
return program->expressionCast();
|
||||
}
|
||||
|
||||
QList<DiagnosticMessage> diagnosticMessages() const
|
||||
{ return diagnostic_messages; }
|
||||
@@ -298,6 +324,8 @@ public:
|
||||
{ return diagnosticMessage().loc.startColumn; }
|
||||
|
||||
protected:
|
||||
bool parse(int startToken);
|
||||
|
||||
void reallocateStack();
|
||||
|
||||
inline Value &sym(int index)
|
||||
@@ -316,7 +344,7 @@ protected:
|
||||
int *state_stack;
|
||||
AST::SourceLocation *location_stack;
|
||||
|
||||
AST::UiProgram *program;
|
||||
AST::Node *program;
|
||||
|
||||
// error recovery
|
||||
enum { TOKEN_BUFFER_SIZE = 3 };
|
||||
@@ -437,14 +465,16 @@ AST::UiQualifiedId *Parser::reparseAsQualifiedId(AST::ExpressionNode *expr)
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool Parser::parse()
|
||||
bool Parser::parse(int startToken)
|
||||
{
|
||||
Lexer *lexer = driver->lexer();
|
||||
bool hadErrors = false;
|
||||
int yytoken = -1;
|
||||
int action = 0;
|
||||
|
||||
first_token = last_token = 0;
|
||||
token_buffer[0].token = startToken;
|
||||
first_token = &token_buffer[0];
|
||||
last_token = &token_buffer[1];
|
||||
|
||||
tos = -1;
|
||||
program = 0;
|
||||
@@ -492,12 +522,35 @@ bool Parser::parse()
|
||||
-- Declarative UI
|
||||
--------------------------------------------------------------------------------------------------------
|
||||
|
||||
TopLevel: T_FEED_UI_PROGRAM UiProgram ;
|
||||
/.
|
||||
case $rule_number: {
|
||||
sym(1).Node = sym(2).Node;
|
||||
program = sym(1).Node;
|
||||
} break;
|
||||
./
|
||||
|
||||
TopLevel: T_FEED_JS_STATEMENT Statement ;
|
||||
/.
|
||||
case $rule_number: {
|
||||
sym(1).Node = sym(2).Node;
|
||||
program = sym(1).Node;
|
||||
} break;
|
||||
./
|
||||
|
||||
TopLevel: T_FEED_JS_EXPRESSION Expression ;
|
||||
/.
|
||||
case $rule_number: {
|
||||
sym(1).Node = sym(2).Node;
|
||||
program = sym(1).Node;
|
||||
} break;
|
||||
./
|
||||
|
||||
UiProgram: UiImportListOpt UiRootMember ;
|
||||
/.
|
||||
case $rule_number: {
|
||||
program = makeAstNode<AST::UiProgram> (driver->nodePool(), sym(1).UiImportList,
|
||||
sym(1).UiProgram = makeAstNode<AST::UiProgram> (driver->nodePool(), sym(1).UiImportList,
|
||||
sym(2).UiObjectMemberList->finish());
|
||||
sym(1).UiProgram = program;
|
||||
} break;
|
||||
./
|
||||
|
||||
@@ -536,6 +589,77 @@ case $rule_number: {
|
||||
} break;
|
||||
./
|
||||
|
||||
UiImport: T_IMPORT T_STRING_LITERAL T_AS JsIdentifier T_AUTOMATIC_SEMICOLON;
|
||||
UiImport: T_IMPORT T_STRING_LITERAL T_AS JsIdentifier T_SEMICOLON;
|
||||
/.
|
||||
case $rule_number: {
|
||||
AST::UiImport *node = makeAstNode<AST::UiImport>(driver->nodePool(), sym(2).sval);
|
||||
node->importId = sym(4).sval;
|
||||
node->importToken = loc(1);
|
||||
node->fileNameToken = loc(2);
|
||||
node->asToken = loc(3);
|
||||
node->importIdToken = loc(4);
|
||||
node->semicolonToken = loc(5);
|
||||
sym(1).Node = node;
|
||||
} break;
|
||||
./
|
||||
|
||||
UiImport: T_IMPORT UiQualifiedId T_AUTOMATIC_SEMICOLON;
|
||||
UiImport: T_IMPORT UiQualifiedId T_SEMICOLON;
|
||||
/.
|
||||
case $rule_number: {
|
||||
AST::UiImport *node = makeAstNode<AST::UiImport>(driver->nodePool(), sym(2).UiQualifiedId->finish());
|
||||
node->importToken = loc(1);
|
||||
node->fileNameToken = loc(2);
|
||||
node->semicolonToken = loc(3);
|
||||
sym(1).Node = node;
|
||||
} break;
|
||||
./
|
||||
|
||||
UiImport: T_IMPORT UiQualifiedId T_NUMERIC_LITERAL T_AUTOMATIC_SEMICOLON;
|
||||
UiImport: T_IMPORT UiQualifiedId T_NUMERIC_LITERAL T_SEMICOLON;
|
||||
/.
|
||||
case $rule_number: {
|
||||
AST::UiImport *node = makeAstNode<AST::UiImport>(driver->nodePool(), sym(2).UiQualifiedId->finish());
|
||||
node->importToken = loc(1);
|
||||
node->fileNameToken = loc(2);
|
||||
node->versionToken = loc(3);
|
||||
node->semicolonToken = loc(4);
|
||||
sym(1).Node = node;
|
||||
} break;
|
||||
./
|
||||
|
||||
UiImport: T_IMPORT UiQualifiedId T_NUMERIC_LITERAL T_AS JsIdentifier T_AUTOMATIC_SEMICOLON;
|
||||
UiImport: T_IMPORT UiQualifiedId T_NUMERIC_LITERAL T_AS JsIdentifier T_SEMICOLON;
|
||||
/.
|
||||
case $rule_number: {
|
||||
AST::UiImport *node = makeAstNode<AST::UiImport>(driver->nodePool(), sym(2).UiQualifiedId->finish());
|
||||
node->importId = sym(5).sval;
|
||||
node->importToken = loc(1);
|
||||
node->fileNameToken = loc(2);
|
||||
node->versionToken = loc(3);
|
||||
node->asToken = loc(4);
|
||||
node->importIdToken = loc(5);
|
||||
node->semicolonToken = loc(6);
|
||||
sym(1).Node = node;
|
||||
} break;
|
||||
./
|
||||
|
||||
UiImport: T_IMPORT UiQualifiedId T_AS JsIdentifier T_AUTOMATIC_SEMICOLON;
|
||||
UiImport: T_IMPORT UiQualifiedId T_AS JsIdentifier T_SEMICOLON;
|
||||
/.
|
||||
case $rule_number: {
|
||||
AST::UiImport *node = makeAstNode<AST::UiImport>(driver->nodePool(), sym(2).UiQualifiedId->finish());
|
||||
node->importId = sym(4).sval;
|
||||
node->importToken = loc(1);
|
||||
node->fileNameToken = loc(2);
|
||||
node->asToken = loc(3);
|
||||
node->importIdToken = loc(4);
|
||||
node->semicolonToken = loc(5);
|
||||
sym(1).Node = node;
|
||||
} break;
|
||||
./
|
||||
|
||||
Empty: ;
|
||||
/.
|
||||
case $rule_number: {
|
||||
@@ -706,6 +830,52 @@ case $rule_number: {
|
||||
|
||||
UiPropertyType: T_IDENTIFIER ;
|
||||
|
||||
UiParameterListOpt: ;
|
||||
/.
|
||||
case $rule_number: {
|
||||
sym(1).Node = 0;
|
||||
} break;
|
||||
./
|
||||
|
||||
UiParameterListOpt: UiParameterList ;
|
||||
/.
|
||||
case $rule_number: {
|
||||
sym(1).Node = sym(1).UiParameterList->finish ();
|
||||
} break;
|
||||
./
|
||||
|
||||
UiParameterList: UiPropertyType JsIdentifier ;
|
||||
/.
|
||||
case $rule_number: {
|
||||
AST::UiParameterList *node = makeAstNode<AST::UiParameterList> (driver->nodePool(), sym(1).sval, sym(2).sval);
|
||||
node->identifierToken = loc(2);
|
||||
sym(1).Node = node;
|
||||
} break;
|
||||
./
|
||||
|
||||
UiParameterList: UiParameterList T_COMMA UiPropertyType JsIdentifier ;
|
||||
/.
|
||||
case $rule_number: {
|
||||
AST::UiParameterList *node = makeAstNode<AST::UiParameterList> (driver->nodePool(), sym(1).UiParameterList, sym(3).sval, sym(4).sval);
|
||||
node->commaToken = loc(2);
|
||||
node->identifierToken = loc(4);
|
||||
sym(1).Node = node;
|
||||
} break;
|
||||
./
|
||||
|
||||
UiObjectMember: T_SIGNAL T_IDENTIFIER T_LPAREN UiParameterListOpt T_RPAREN ;
|
||||
/.
|
||||
case $rule_number: {
|
||||
AST::UiPublicMember *node = makeAstNode<AST::UiPublicMember> (driver->nodePool(), (NameId *)0, sym(2).sval);
|
||||
node->type = AST::UiPublicMember::Signal;
|
||||
node->propertyToken = loc(1);
|
||||
node->typeToken = loc(2);
|
||||
node->identifierToken = loc(3);
|
||||
node->parameters = sym(4).UiParameterList;
|
||||
sym(1).Node = node;
|
||||
} break;
|
||||
./
|
||||
|
||||
UiObjectMember: T_SIGNAL T_IDENTIFIER ;
|
||||
/.
|
||||
case $rule_number: {
|
||||
@@ -2843,7 +3013,8 @@ PropertyNameAndValueListOpt: PropertyNameAndValueList ;
|
||||
}
|
||||
|
||||
for (int tk = 1; tk < TERMINAL_COUNT; ++tk) {
|
||||
if (tk == T_AUTOMATIC_SEMICOLON)
|
||||
if (tk == T_AUTOMATIC_SEMICOLON || tk == T_FEED_UI_PROGRAM ||
|
||||
tk == T_FEED_JS_STATEMENT || tk == T_FEED_JS_EXPRESSION)
|
||||
continue;
|
||||
|
||||
int a = t_action(errorState, tk);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
||||
** Contact: Nokia Corporation (qt-info@nokia.com)
|
||||
** Contact: Qt Software Information (qt-info@nokia.com)
|
||||
**
|
||||
** This file is part of the QtScript module of the Qt Toolkit.
|
||||
**
|
||||
@@ -34,7 +34,7 @@
|
||||
** met: http://www.gnu.org/copyleft/gpl.html.
|
||||
**
|
||||
** If you are unsure which license is appropriate for your use, please
|
||||
** contact the sales department at http://www.qtsoftware.com/contact.
|
||||
** contact the sales department at qt-sales@nokia.com.
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
||||
** Contact: Nokia Corporation (qt-info@nokia.com)
|
||||
** Contact: Qt Software Information (qt-info@nokia.com)
|
||||
**
|
||||
** This file is part of the QtScript module of the Qt Toolkit.
|
||||
** This file is part of the QtDeclarative module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** No Commercial Usage
|
||||
@@ -34,7 +34,7 @@
|
||||
** met: http://www.gnu.org/copyleft/gpl.html.
|
||||
**
|
||||
** If you are unsure which license is appropriate for your use, please
|
||||
** contact the sales department at http://www.qtsoftware.com/contact.
|
||||
** contact the sales department at qt-sales@nokia.com.
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
@@ -209,6 +209,7 @@ public:
|
||||
Kind_UiObjectMemberList,
|
||||
Kind_UiArrayMemberList,
|
||||
Kind_UiProgram,
|
||||
Kind_UiParameterList,
|
||||
Kind_UiPublicMember,
|
||||
Kind_UiQualifiedId,
|
||||
Kind_UiScriptBinding,
|
||||
@@ -2220,15 +2221,24 @@ public:
|
||||
QMLJS_DECLARE_AST_NODE(UiImport)
|
||||
|
||||
UiImport(NameId *fileName)
|
||||
: fileName(fileName)
|
||||
: fileName(fileName), importUri(0), importId(0)
|
||||
{ kind = K; }
|
||||
|
||||
UiImport(UiQualifiedId *uri)
|
||||
: fileName(0), importUri(uri), importId(0)
|
||||
{ kind = K; }
|
||||
|
||||
virtual void accept0(Visitor *visitor);
|
||||
|
||||
// attributes
|
||||
NameId *fileName;
|
||||
UiQualifiedId *importUri;
|
||||
NameId *importId;
|
||||
SourceLocation importToken;
|
||||
SourceLocation fileNameToken;
|
||||
SourceLocation versionToken;
|
||||
SourceLocation asToken;
|
||||
SourceLocation importIdToken;
|
||||
SourceLocation semicolonToken;
|
||||
};
|
||||
|
||||
@@ -2351,6 +2361,42 @@ public:
|
||||
SourceLocation rbraceToken;
|
||||
};
|
||||
|
||||
class UiParameterList: public Node
|
||||
{
|
||||
public:
|
||||
QMLJS_DECLARE_AST_NODE(UiParameterList)
|
||||
|
||||
UiParameterList(NameId *t, NameId *n):
|
||||
type (t), name (n), next (this)
|
||||
{ kind = K; }
|
||||
|
||||
UiParameterList(UiParameterList *previous, NameId *t, NameId *n):
|
||||
type (t), name (n)
|
||||
{
|
||||
kind = K;
|
||||
next = previous->next;
|
||||
previous->next = this;
|
||||
}
|
||||
|
||||
virtual ~UiParameterList() {}
|
||||
|
||||
virtual void accept0(Visitor *) {}
|
||||
|
||||
inline UiParameterList *finish ()
|
||||
{
|
||||
UiParameterList *front = next;
|
||||
next = 0;
|
||||
return front;
|
||||
}
|
||||
|
||||
// attributes
|
||||
NameId *type;
|
||||
NameId *name;
|
||||
UiParameterList *next;
|
||||
SourceLocation commaToken;
|
||||
SourceLocation identifierToken;
|
||||
};
|
||||
|
||||
class UiPublicMember: public UiObjectMember
|
||||
{
|
||||
public:
|
||||
@@ -2358,13 +2404,13 @@ public:
|
||||
|
||||
UiPublicMember(NameId *memberType,
|
||||
NameId *name)
|
||||
: type(Property), memberType(memberType), name(name), expression(0), isDefaultMember(false)
|
||||
: type(Property), memberType(memberType), name(name), expression(0), isDefaultMember(false), parameters(0)
|
||||
{ kind = K; }
|
||||
|
||||
UiPublicMember(NameId *memberType,
|
||||
NameId *name,
|
||||
ExpressionNode *expression)
|
||||
: type(Property), memberType(memberType), name(name), expression(expression), isDefaultMember(false)
|
||||
: type(Property), memberType(memberType), name(name), expression(expression), isDefaultMember(false), parameters(0)
|
||||
{ kind = K; }
|
||||
|
||||
virtual SourceLocation firstSourceLocation() const
|
||||
@@ -2388,6 +2434,7 @@ public:
|
||||
NameId *name;
|
||||
ExpressionNode *expression;
|
||||
bool isDefaultMember;
|
||||
UiParameterList *parameters;
|
||||
SourceLocation defaultToken;
|
||||
SourceLocation propertyToken;
|
||||
SourceLocation typeToken;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
||||
** Contact: Nokia Corporation (qt-info@nokia.com)
|
||||
** Contact: Qt Software Information (qt-info@nokia.com)
|
||||
**
|
||||
** This file is part of the QtScript module of the Qt Toolkit.
|
||||
**
|
||||
@@ -34,7 +34,7 @@
|
||||
** met: http://www.gnu.org/copyleft/gpl.html.
|
||||
**
|
||||
** If you are unsure which license is appropriate for your use, please
|
||||
** contact the sales department at http://www.qtsoftware.com/contact.
|
||||
** contact the sales department at qt-sales@nokia.com.
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
||||
** Contact: Nokia Corporation (qt-info@nokia.com)
|
||||
** Contact: Qt Software Information (qt-info@nokia.com)
|
||||
**
|
||||
** This file is part of the QtScript module of the Qt Toolkit.
|
||||
**
|
||||
@@ -34,7 +34,7 @@
|
||||
** met: http://www.gnu.org/copyleft/gpl.html.
|
||||
**
|
||||
** If you are unsure which license is appropriate for your use, please
|
||||
** contact the sales department at http://www.qtsoftware.com/contact.
|
||||
** contact the sales department at qt-sales@nokia.com.
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
||||
** Contact: Nokia Corporation (qt-info@nokia.com)
|
||||
** Contact: Qt Software Information (qt-info@nokia.com)
|
||||
**
|
||||
** This file is part of the QtScript module of the Qt Toolkit.
|
||||
**
|
||||
@@ -34,7 +34,7 @@
|
||||
** met: http://www.gnu.org/copyleft/gpl.html.
|
||||
**
|
||||
** If you are unsure which license is appropriate for your use, please
|
||||
** contact the sales department at http://www.qtsoftware.com/contact.
|
||||
** contact the sales department at qt-sales@nokia.com.
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
@@ -1,20 +1,18 @@
|
||||
/**************************************************************************
|
||||
/****************************************************************************
|
||||
**
|
||||
** This file is part of Qt Creator
|
||||
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
||||
** Contact: Qt Software Information (qt-info@nokia.com)
|
||||
**
|
||||
** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
||||
** This file is part of the QtDeclarative module of the Qt Toolkit.
|
||||
**
|
||||
** Contact: Nokia Corporation (qt-info@nokia.com)
|
||||
**
|
||||
** Commercial Usage
|
||||
**
|
||||
** Licensees holding valid Qt Commercial licenses may use this file in
|
||||
** accordance with the Qt Commercial License Agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and Nokia.
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** No Commercial Usage
|
||||
** This file contains pre-release code and may not be distributed.
|
||||
** You may use this file in accordance with the terms and conditions
|
||||
** contained in the either Technology Preview License Agreement or the
|
||||
** Beta Release License Agreement.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
**
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 2.1 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL included in the
|
||||
@@ -22,10 +20,24 @@
|
||||
** ensure the GNU Lesser General Public License version 2.1 requirements
|
||||
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
||||
**
|
||||
** If you are unsure which license is appropriate for your use, please
|
||||
** contact the sales department at http://www.qtsoftware.com/contact.
|
||||
** In addition, as a special exception, Nokia gives you certain
|
||||
** additional rights. These rights are described in the Nokia Qt LGPL
|
||||
** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
|
||||
** package.
|
||||
**
|
||||
**************************************************************************/
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 3.0 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU General Public License version 3.0 requirements will be
|
||||
** met: http://www.gnu.org/copyleft/gpl.html.
|
||||
**
|
||||
** If you are unsure which license is appropriate for your use, please
|
||||
** contact the sales department at qt-sales@nokia.com.
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#include "qmljsengine_p.h"
|
||||
#include "qmljsnodepool_p.h"
|
||||
|
||||
@@ -1,20 +1,18 @@
|
||||
/**************************************************************************
|
||||
/****************************************************************************
|
||||
**
|
||||
** This file is part of Qt Creator
|
||||
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
||||
** Contact: Qt Software Information (qt-info@nokia.com)
|
||||
**
|
||||
** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
||||
** This file is part of the QtDeclarative module of the Qt Toolkit.
|
||||
**
|
||||
** Contact: Nokia Corporation (qt-info@nokia.com)
|
||||
**
|
||||
** Commercial Usage
|
||||
**
|
||||
** Licensees holding valid Qt Commercial licenses may use this file in
|
||||
** accordance with the Qt Commercial License Agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and Nokia.
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** No Commercial Usage
|
||||
** This file contains pre-release code and may not be distributed.
|
||||
** You may use this file in accordance with the terms and conditions
|
||||
** contained in the either Technology Preview License Agreement or the
|
||||
** Beta Release License Agreement.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
**
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 2.1 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL included in the
|
||||
@@ -22,14 +20,39 @@
|
||||
** ensure the GNU Lesser General Public License version 2.1 requirements
|
||||
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
||||
**
|
||||
** If you are unsure which license is appropriate for your use, please
|
||||
** contact the sales department at http://www.qtsoftware.com/contact.
|
||||
** In addition, as a special exception, Nokia gives you certain
|
||||
** additional rights. These rights are described in the Nokia Qt LGPL
|
||||
** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
|
||||
** package.
|
||||
**
|
||||
**************************************************************************/
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 3.0 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU General Public License version 3.0 requirements will be
|
||||
** met: http://www.gnu.org/copyleft/gpl.html.
|
||||
**
|
||||
** If you are unsure which license is appropriate for your use, please
|
||||
** contact the sales department at qt-sales@nokia.com.
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef QMLJSENGINE_P_H
|
||||
#define QMLJSENGINE_P_H
|
||||
|
||||
//
|
||||
// W A R N I N G
|
||||
// -------------
|
||||
//
|
||||
// This file is not part of the Qt API. It exists purely as an
|
||||
// implementation detail. This header file may change from version to
|
||||
// version without notice, or even be removed.
|
||||
//
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
#include <QString>
|
||||
#include <QSet>
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -2,7 +2,7 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
||||
** Contact: Nokia Corporation (qt-info@nokia.com)
|
||||
** Contact: Qt Software Information (qt-info@nokia.com)
|
||||
**
|
||||
** This file is part of the QtCore module of the Qt Toolkit.
|
||||
**
|
||||
@@ -35,7 +35,7 @@
|
||||
** met: http://www.gnu.org/copyleft/gpl.html.
|
||||
**
|
||||
** If you are unsure which license is appropriate for your use, please
|
||||
** contact the sales department at http://www.qtsoftware.com/contact.
|
||||
** contact the sales department at qt-sales@nokia.com.
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
@@ -59,11 +59,12 @@ class QmlJSGrammar
|
||||
public:
|
||||
enum {
|
||||
EOF_SYMBOL = 0,
|
||||
REDUCE_HERE = 90,
|
||||
SHIFT_THERE = 89,
|
||||
REDUCE_HERE = 94,
|
||||
SHIFT_THERE = 93,
|
||||
T_AND = 1,
|
||||
T_AND_AND = 2,
|
||||
T_AND_EQ = 3,
|
||||
T_AS = 89,
|
||||
T_AUTOMATIC_SEMICOLON = 62,
|
||||
T_BREAK = 4,
|
||||
T_CASE = 5,
|
||||
@@ -84,6 +85,9 @@ public:
|
||||
T_EQ_EQ = 18,
|
||||
T_EQ_EQ_EQ = 19,
|
||||
T_FALSE = 82,
|
||||
T_FEED_JS_EXPRESSION = 92,
|
||||
T_FEED_JS_STATEMENT = 91,
|
||||
T_FEED_UI_PROGRAM = 90,
|
||||
T_FINALLY = 20,
|
||||
T_FOR = 21,
|
||||
T_FUNCTION = 22,
|
||||
@@ -150,15 +154,15 @@ public:
|
||||
T_XOR = 78,
|
||||
T_XOR_EQ = 79,
|
||||
|
||||
ACCEPT_STATE = 588,
|
||||
RULE_COUNT = 323,
|
||||
STATE_COUNT = 589,
|
||||
TERMINAL_COUNT = 91,
|
||||
NON_TERMINAL_COUNT = 102,
|
||||
ACCEPT_STATE = 621,
|
||||
RULE_COUNT = 341,
|
||||
STATE_COUNT = 622,
|
||||
TERMINAL_COUNT = 95,
|
||||
NON_TERMINAL_COUNT = 105,
|
||||
|
||||
GOTO_INDEX_OFFSET = 589,
|
||||
GOTO_INFO_OFFSET = 2092,
|
||||
GOTO_CHECK_OFFSET = 2092
|
||||
GOTO_INDEX_OFFSET = 622,
|
||||
GOTO_INFO_OFFSET = 2247,
|
||||
GOTO_CHECK_OFFSET = 2247
|
||||
};
|
||||
|
||||
static const char *const spell [];
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
||||
** Contact: Nokia Corporation (qt-info@nokia.com)
|
||||
** Contact: Qt Software Information (qt-info@nokia.com)
|
||||
**
|
||||
** This file is part of the QtScript module of the Qt Toolkit.
|
||||
** This file is part of the QtDeclarative module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** No Commercial Usage
|
||||
@@ -34,7 +34,7 @@
|
||||
** met: http://www.gnu.org/copyleft/gpl.html.
|
||||
**
|
||||
** If you are unsure which license is appropriate for your use, please
|
||||
** contact the sales department at http://www.qtsoftware.com/contact.
|
||||
** contact the sales department at qt-sales@nokia.com.
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
@@ -159,6 +159,8 @@ int Lexer::findReservedWord(const QChar *c, int size) const
|
||||
return QmlJSGrammar::T_IF;
|
||||
else if (c[0] == QLatin1Char('i') && c[1] == QLatin1Char('n'))
|
||||
return QmlJSGrammar::T_IN;
|
||||
else if (c[0] == QLatin1Char('a') && c[1] == QLatin1Char('s'))
|
||||
return QmlJSGrammar::T_AS;
|
||||
} break;
|
||||
|
||||
case 3: {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
||||
** Contact: Nokia Corporation (qt-info@nokia.com)
|
||||
** Contact: Qt Software Information (qt-info@nokia.com)
|
||||
**
|
||||
** This file is part of the QtScript module of the Qt Toolkit.
|
||||
**
|
||||
@@ -34,7 +34,7 @@
|
||||
** met: http://www.gnu.org/copyleft/gpl.html.
|
||||
**
|
||||
** If you are unsure which license is appropriate for your use, please
|
||||
** contact the sales department at http://www.qtsoftware.com/contact.
|
||||
** contact the sales department at qt-sales@nokia.com.
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
||||
** Contact: Nokia Corporation (qt-info@nokia.com)
|
||||
** Contact: Qt Software Information (qt-info@nokia.com)
|
||||
**
|
||||
** This file is part of the QtScript module of the Qt Toolkit.
|
||||
** This file is part of the QtDeclarative module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** No Commercial Usage
|
||||
@@ -34,7 +34,7 @@
|
||||
** met: http://www.gnu.org/copyleft/gpl.html.
|
||||
**
|
||||
** If you are unsure which license is appropriate for your use, please
|
||||
** contact the sales department at http://www.qtsoftware.com/contact.
|
||||
** contact the sales department at qt-sales@nokia.com.
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
||||
** Contact: Nokia Corporation (qt-info@nokia.com)
|
||||
** Contact: Qt Software Information (qt-info@nokia.com)
|
||||
**
|
||||
** This file is part of the QtScript module of the Qt Toolkit.
|
||||
** This file is part of the QtDeclarative module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** No Commercial Usage
|
||||
@@ -34,7 +34,7 @@
|
||||
** met: http://www.gnu.org/copyleft/gpl.html.
|
||||
**
|
||||
** If you are unsure which license is appropriate for your use, please
|
||||
** contact the sales department at http://www.qtsoftware.com/contact.
|
||||
** contact the sales department at qt-sales@nokia.com.
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -3,7 +3,7 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
||||
** Contact: Nokia Corporation (qt-info@nokia.com)
|
||||
** Contact: Qt Software Information (qt-info@nokia.com)
|
||||
**
|
||||
** This file is part of the QtScript module of the Qt Toolkit.
|
||||
**
|
||||
@@ -36,7 +36,7 @@
|
||||
** met: http://www.gnu.org/copyleft/gpl.html.
|
||||
**
|
||||
** If you are unsure which license is appropriate for your use, please
|
||||
** contact the sales department at http://www.qtsoftware.com/contact.
|
||||
** contact the sales department at qt-sales@nokia.com.
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
@@ -109,6 +109,7 @@ public:
|
||||
AST::UiProgram *UiProgram;
|
||||
AST::UiImportList *UiImportList;
|
||||
AST::UiImport *UiImport;
|
||||
AST::UiParameterList *UiParameterList;
|
||||
AST::UiPublicMember *UiPublicMember;
|
||||
AST::UiObjectDefinition *UiObjectDefinition;
|
||||
AST::UiObjectInitializer *UiObjectInitializer;
|
||||
@@ -125,10 +126,29 @@ public:
|
||||
Parser(Engine *engine);
|
||||
~Parser();
|
||||
|
||||
bool parse();
|
||||
// parse a UI program
|
||||
bool parse() { return parse(T_FEED_UI_PROGRAM); }
|
||||
bool parseStatement() { return parse(T_FEED_JS_STATEMENT); }
|
||||
bool parseExpression() { return parse(T_FEED_JS_EXPRESSION); }
|
||||
|
||||
AST::UiProgram *ast()
|
||||
{ return program; }
|
||||
AST::UiProgram *ast() const
|
||||
{ return AST::cast<AST::UiProgram *>(program); }
|
||||
|
||||
AST::Statement *statement() const
|
||||
{
|
||||
if (! program)
|
||||
return 0;
|
||||
|
||||
return program->statementCast();
|
||||
}
|
||||
|
||||
AST::ExpressionNode *expression() const
|
||||
{
|
||||
if (! program)
|
||||
return 0;
|
||||
|
||||
return program->expressionCast();
|
||||
}
|
||||
|
||||
QList<DiagnosticMessage> diagnosticMessages() const
|
||||
{ return diagnostic_messages; }
|
||||
@@ -153,6 +173,8 @@ public:
|
||||
{ return diagnosticMessage().loc.startColumn; }
|
||||
|
||||
protected:
|
||||
bool parse(int startToken);
|
||||
|
||||
void reallocateStack();
|
||||
|
||||
inline Value &sym(int index)
|
||||
@@ -171,7 +193,7 @@ protected:
|
||||
int *state_stack;
|
||||
AST::SourceLocation *location_stack;
|
||||
|
||||
AST::UiProgram *program;
|
||||
AST::Node *program;
|
||||
|
||||
// error recovery
|
||||
enum { TOKEN_BUFFER_SIZE = 3 };
|
||||
@@ -197,9 +219,9 @@ protected:
|
||||
|
||||
|
||||
|
||||
#define J_SCRIPT_REGEXPLITERAL_RULE1 54
|
||||
#define J_SCRIPT_REGEXPLITERAL_RULE1 72
|
||||
|
||||
#define J_SCRIPT_REGEXPLITERAL_RULE2 55
|
||||
#define J_SCRIPT_REGEXPLITERAL_RULE2 73
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
||||
** Contact: Nokia Corporation (qt-info@nokia.com)
|
||||
** Contact: Qt Software Information (qt-info@nokia.com)
|
||||
**
|
||||
** This file is part of the QtScript module of the Qt Toolkit.
|
||||
** This file is part of the QtDeclarative module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** No Commercial Usage
|
||||
@@ -34,7 +34,7 @@
|
||||
** met: http://www.gnu.org/copyleft/gpl.html.
|
||||
**
|
||||
** If you are unsure which license is appropriate for your use, please
|
||||
** contact the sales department at http://www.qtsoftware.com/contact.
|
||||
** contact the sales department at qt-sales@nokia.com.
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
@@ -170,14 +170,14 @@ void PrettyPretty::accept(AST::Node *node)
|
||||
|
||||
bool PrettyPretty::visit(AST::ThisExpression *node)
|
||||
{
|
||||
Q_UNUSED(node)
|
||||
Q_UNUSED(node);
|
||||
out << "this";
|
||||
return true;
|
||||
}
|
||||
|
||||
void PrettyPretty::endVisit(AST::ThisExpression *node)
|
||||
{
|
||||
Q_UNUSED(node)
|
||||
Q_UNUSED(node);
|
||||
}
|
||||
|
||||
bool PrettyPretty::visit(AST::IdentifierExpression *node)
|
||||
@@ -188,43 +188,43 @@ bool PrettyPretty::visit(AST::IdentifierExpression *node)
|
||||
|
||||
void PrettyPretty::endVisit(AST::IdentifierExpression *node)
|
||||
{
|
||||
Q_UNUSED(node)
|
||||
Q_UNUSED(node);
|
||||
}
|
||||
|
||||
bool PrettyPretty::visit(AST::NullExpression *node)
|
||||
{
|
||||
Q_UNUSED(node)
|
||||
Q_UNUSED(node);
|
||||
out << "null";
|
||||
return false;
|
||||
}
|
||||
|
||||
void PrettyPretty::endVisit(AST::NullExpression *node)
|
||||
{
|
||||
Q_UNUSED(node)
|
||||
Q_UNUSED(node);
|
||||
}
|
||||
|
||||
bool PrettyPretty::visit(AST::TrueLiteral *node)
|
||||
{
|
||||
Q_UNUSED(node)
|
||||
Q_UNUSED(node);
|
||||
out << "true";
|
||||
return false;
|
||||
}
|
||||
|
||||
void PrettyPretty::endVisit(AST::TrueLiteral *node)
|
||||
{
|
||||
Q_UNUSED(node)
|
||||
Q_UNUSED(node);
|
||||
}
|
||||
|
||||
bool PrettyPretty::visit(AST::FalseLiteral *node)
|
||||
{
|
||||
Q_UNUSED(node)
|
||||
Q_UNUSED(node);
|
||||
out << "false";
|
||||
return false;
|
||||
}
|
||||
|
||||
void PrettyPretty::endVisit(AST::FalseLiteral *node)
|
||||
{
|
||||
Q_UNUSED(node)
|
||||
Q_UNUSED(node);
|
||||
}
|
||||
|
||||
bool PrettyPretty::visit(AST::StringLiteral *node)
|
||||
@@ -237,7 +237,7 @@ bool PrettyPretty::visit(AST::StringLiteral *node)
|
||||
|
||||
void PrettyPretty::endVisit(AST::StringLiteral *node)
|
||||
{
|
||||
Q_UNUSED(node)
|
||||
Q_UNUSED(node);
|
||||
}
|
||||
|
||||
bool PrettyPretty::visit(AST::NumericLiteral *node)
|
||||
@@ -248,7 +248,7 @@ bool PrettyPretty::visit(AST::NumericLiteral *node)
|
||||
|
||||
void PrettyPretty::endVisit(AST::NumericLiteral *node)
|
||||
{
|
||||
Q_UNUSED(node)
|
||||
Q_UNUSED(node);
|
||||
}
|
||||
|
||||
bool PrettyPretty::visit(AST::RegExpLiteral *node)
|
||||
@@ -262,7 +262,7 @@ bool PrettyPretty::visit(AST::RegExpLiteral *node)
|
||||
|
||||
void PrettyPretty::endVisit(AST::RegExpLiteral *node)
|
||||
{
|
||||
Q_UNUSED(node)
|
||||
Q_UNUSED(node);
|
||||
}
|
||||
|
||||
bool PrettyPretty::visit(AST::ArrayLiteral *node)
|
||||
@@ -276,7 +276,7 @@ bool PrettyPretty::visit(AST::ArrayLiteral *node)
|
||||
|
||||
void PrettyPretty::endVisit(AST::ArrayLiteral *node)
|
||||
{
|
||||
Q_UNUSED(node)
|
||||
Q_UNUSED(node);
|
||||
}
|
||||
|
||||
bool PrettyPretty::visit(AST::ObjectLiteral *node)
|
||||
@@ -300,7 +300,7 @@ bool PrettyPretty::visit(AST::ObjectLiteral *node)
|
||||
|
||||
void PrettyPretty::endVisit(AST::ObjectLiteral *node)
|
||||
{
|
||||
Q_UNUSED(node)
|
||||
Q_UNUSED(node);
|
||||
}
|
||||
|
||||
bool PrettyPretty::visit(AST::ElementList *node)
|
||||
@@ -317,7 +317,7 @@ bool PrettyPretty::visit(AST::ElementList *node)
|
||||
|
||||
void PrettyPretty::endVisit(AST::ElementList *node)
|
||||
{
|
||||
Q_UNUSED(node)
|
||||
Q_UNUSED(node);
|
||||
}
|
||||
|
||||
bool PrettyPretty::visit(AST::Elision *node)
|
||||
@@ -330,7 +330,7 @@ bool PrettyPretty::visit(AST::Elision *node)
|
||||
|
||||
void PrettyPretty::endVisit(AST::Elision *node)
|
||||
{
|
||||
Q_UNUSED(node)
|
||||
Q_UNUSED(node);
|
||||
}
|
||||
|
||||
bool PrettyPretty::visit(AST::PropertyNameAndValueList *node)
|
||||
@@ -343,7 +343,7 @@ bool PrettyPretty::visit(AST::PropertyNameAndValueList *node)
|
||||
|
||||
void PrettyPretty::endVisit(AST::PropertyNameAndValueList *node)
|
||||
{
|
||||
Q_UNUSED(node)
|
||||
Q_UNUSED(node);
|
||||
}
|
||||
|
||||
bool PrettyPretty::visit(AST::IdentifierPropertyName *node)
|
||||
@@ -354,7 +354,7 @@ bool PrettyPretty::visit(AST::IdentifierPropertyName *node)
|
||||
|
||||
void PrettyPretty::endVisit(AST::IdentifierPropertyName *node)
|
||||
{
|
||||
Q_UNUSED(node)
|
||||
Q_UNUSED(node);
|
||||
}
|
||||
|
||||
bool PrettyPretty::visit(AST::StringLiteralPropertyName *node)
|
||||
@@ -367,7 +367,7 @@ bool PrettyPretty::visit(AST::StringLiteralPropertyName *node)
|
||||
|
||||
void PrettyPretty::endVisit(AST::StringLiteralPropertyName *node)
|
||||
{
|
||||
Q_UNUSED(node)
|
||||
Q_UNUSED(node);
|
||||
}
|
||||
|
||||
bool PrettyPretty::visit(AST::NumericLiteralPropertyName *node)
|
||||
@@ -378,7 +378,7 @@ bool PrettyPretty::visit(AST::NumericLiteralPropertyName *node)
|
||||
|
||||
void PrettyPretty::endVisit(AST::NumericLiteralPropertyName *node)
|
||||
{
|
||||
Q_UNUSED(node)
|
||||
Q_UNUSED(node);
|
||||
}
|
||||
|
||||
bool PrettyPretty::visit(AST::ArrayMemberExpression *node)
|
||||
@@ -392,7 +392,7 @@ bool PrettyPretty::visit(AST::ArrayMemberExpression *node)
|
||||
|
||||
void PrettyPretty::endVisit(AST::ArrayMemberExpression *node)
|
||||
{
|
||||
Q_UNUSED(node)
|
||||
Q_UNUSED(node);
|
||||
}
|
||||
|
||||
bool PrettyPretty::visit(AST::FieldMemberExpression *node)
|
||||
@@ -404,7 +404,7 @@ bool PrettyPretty::visit(AST::FieldMemberExpression *node)
|
||||
|
||||
void PrettyPretty::endVisit(AST::FieldMemberExpression *node)
|
||||
{
|
||||
Q_UNUSED(node)
|
||||
Q_UNUSED(node);
|
||||
}
|
||||
|
||||
bool PrettyPretty::visit(AST::NewMemberExpression *node)
|
||||
@@ -419,19 +419,19 @@ bool PrettyPretty::visit(AST::NewMemberExpression *node)
|
||||
|
||||
void PrettyPretty::endVisit(AST::NewMemberExpression *node)
|
||||
{
|
||||
Q_UNUSED(node)
|
||||
Q_UNUSED(node);
|
||||
}
|
||||
|
||||
bool PrettyPretty::visit(AST::NewExpression *node)
|
||||
{
|
||||
Q_UNUSED(node)
|
||||
Q_UNUSED(node);
|
||||
out << "new ";
|
||||
return true;
|
||||
}
|
||||
|
||||
void PrettyPretty::endVisit(AST::NewExpression *node)
|
||||
{
|
||||
Q_UNUSED(node)
|
||||
Q_UNUSED(node);
|
||||
}
|
||||
|
||||
bool PrettyPretty::visit(AST::CallExpression *node)
|
||||
@@ -445,7 +445,7 @@ bool PrettyPretty::visit(AST::CallExpression *node)
|
||||
|
||||
void PrettyPretty::endVisit(AST::CallExpression *node)
|
||||
{
|
||||
Q_UNUSED(node)
|
||||
Q_UNUSED(node);
|
||||
}
|
||||
|
||||
bool PrettyPretty::visit(AST::ArgumentList *node)
|
||||
@@ -460,91 +460,91 @@ bool PrettyPretty::visit(AST::ArgumentList *node)
|
||||
|
||||
void PrettyPretty::endVisit(AST::ArgumentList *node)
|
||||
{
|
||||
Q_UNUSED(node)
|
||||
Q_UNUSED(node);
|
||||
}
|
||||
|
||||
bool PrettyPretty::visit(AST::PostIncrementExpression *node)
|
||||
{
|
||||
Q_UNUSED(node)
|
||||
Q_UNUSED(node);
|
||||
return true;
|
||||
}
|
||||
|
||||
void PrettyPretty::endVisit(AST::PostIncrementExpression *node)
|
||||
{
|
||||
Q_UNUSED(node)
|
||||
Q_UNUSED(node);
|
||||
out << "++";
|
||||
}
|
||||
|
||||
bool PrettyPretty::visit(AST::PostDecrementExpression *node)
|
||||
{
|
||||
Q_UNUSED(node)
|
||||
Q_UNUSED(node);
|
||||
return true;
|
||||
}
|
||||
|
||||
void PrettyPretty::endVisit(AST::PostDecrementExpression *node)
|
||||
{
|
||||
Q_UNUSED(node)
|
||||
Q_UNUSED(node);
|
||||
out << "--";
|
||||
}
|
||||
|
||||
bool PrettyPretty::visit(AST::DeleteExpression *node)
|
||||
{
|
||||
Q_UNUSED(node)
|
||||
Q_UNUSED(node);
|
||||
out << "delete ";
|
||||
return true;
|
||||
}
|
||||
|
||||
void PrettyPretty::endVisit(AST::DeleteExpression *node)
|
||||
{
|
||||
Q_UNUSED(node)
|
||||
Q_UNUSED(node);
|
||||
}
|
||||
|
||||
bool PrettyPretty::visit(AST::VoidExpression *node)
|
||||
{
|
||||
Q_UNUSED(node)
|
||||
Q_UNUSED(node);
|
||||
out << "void ";
|
||||
return true;
|
||||
}
|
||||
|
||||
void PrettyPretty::endVisit(AST::VoidExpression *node)
|
||||
{
|
||||
Q_UNUSED(node)
|
||||
Q_UNUSED(node);
|
||||
}
|
||||
|
||||
bool PrettyPretty::visit(AST::TypeOfExpression *node)
|
||||
{
|
||||
Q_UNUSED(node)
|
||||
Q_UNUSED(node);
|
||||
out << "typeof ";
|
||||
return true;
|
||||
}
|
||||
|
||||
void PrettyPretty::endVisit(AST::TypeOfExpression *node)
|
||||
{
|
||||
Q_UNUSED(node)
|
||||
Q_UNUSED(node);
|
||||
}
|
||||
|
||||
bool PrettyPretty::visit(AST::PreIncrementExpression *node)
|
||||
{
|
||||
Q_UNUSED(node)
|
||||
Q_UNUSED(node);
|
||||
out << "++";
|
||||
return true;
|
||||
}
|
||||
|
||||
void PrettyPretty::endVisit(AST::PreIncrementExpression *node)
|
||||
{
|
||||
Q_UNUSED(node)
|
||||
Q_UNUSED(node);
|
||||
}
|
||||
|
||||
bool PrettyPretty::visit(AST::PreDecrementExpression *node)
|
||||
{
|
||||
Q_UNUSED(node)
|
||||
Q_UNUSED(node);
|
||||
out << "--";
|
||||
return true;
|
||||
}
|
||||
|
||||
void PrettyPretty::endVisit(AST::PreDecrementExpression *node)
|
||||
{
|
||||
Q_UNUSED(node)
|
||||
Q_UNUSED(node);
|
||||
}
|
||||
|
||||
bool PrettyPretty::visit(AST::UnaryPlusExpression *node)
|
||||
@@ -561,7 +561,7 @@ bool PrettyPretty::visit(AST::UnaryPlusExpression *node)
|
||||
|
||||
void PrettyPretty::endVisit(AST::UnaryPlusExpression *node)
|
||||
{
|
||||
Q_UNUSED(node)
|
||||
Q_UNUSED(node);
|
||||
}
|
||||
|
||||
bool PrettyPretty::visit(AST::UnaryMinusExpression *node)
|
||||
@@ -578,7 +578,7 @@ bool PrettyPretty::visit(AST::UnaryMinusExpression *node)
|
||||
|
||||
void PrettyPretty::endVisit(AST::UnaryMinusExpression *node)
|
||||
{
|
||||
Q_UNUSED(node)
|
||||
Q_UNUSED(node);
|
||||
}
|
||||
|
||||
bool PrettyPretty::visit(AST::TildeExpression *node)
|
||||
@@ -595,7 +595,7 @@ bool PrettyPretty::visit(AST::TildeExpression *node)
|
||||
|
||||
void PrettyPretty::endVisit(AST::TildeExpression *node)
|
||||
{
|
||||
Q_UNUSED(node)
|
||||
Q_UNUSED(node);
|
||||
}
|
||||
|
||||
bool PrettyPretty::visit(AST::NotExpression *node)
|
||||
@@ -612,7 +612,7 @@ bool PrettyPretty::visit(AST::NotExpression *node)
|
||||
|
||||
void PrettyPretty::endVisit(AST::NotExpression *node)
|
||||
{
|
||||
Q_UNUSED(node)
|
||||
Q_UNUSED(node);
|
||||
}
|
||||
|
||||
bool PrettyPretty::visit(AST::BinaryExpression *node)
|
||||
@@ -712,7 +712,7 @@ bool PrettyPretty::visit(AST::BinaryExpression *node)
|
||||
|
||||
void PrettyPretty::endVisit(AST::BinaryExpression *node)
|
||||
{
|
||||
Q_UNUSED(node)
|
||||
Q_UNUSED(node);
|
||||
}
|
||||
|
||||
bool PrettyPretty::visit(AST::ConditionalExpression *node)
|
||||
@@ -727,7 +727,7 @@ bool PrettyPretty::visit(AST::ConditionalExpression *node)
|
||||
|
||||
void PrettyPretty::endVisit(AST::ConditionalExpression *node)
|
||||
{
|
||||
Q_UNUSED(node)
|
||||
Q_UNUSED(node);
|
||||
}
|
||||
|
||||
bool PrettyPretty::visit(AST::Expression *node)
|
||||
@@ -740,18 +740,18 @@ bool PrettyPretty::visit(AST::Expression *node)
|
||||
|
||||
void PrettyPretty::endVisit(AST::Expression *node)
|
||||
{
|
||||
Q_UNUSED(node)
|
||||
Q_UNUSED(node);
|
||||
}
|
||||
|
||||
bool PrettyPretty::visit(AST::Block *node)
|
||||
{
|
||||
Q_UNUSED(node)
|
||||
Q_UNUSED(node);
|
||||
return true;
|
||||
}
|
||||
|
||||
void PrettyPretty::endVisit(AST::Block *node)
|
||||
{
|
||||
Q_UNUSED(node)
|
||||
Q_UNUSED(node);
|
||||
}
|
||||
|
||||
bool PrettyPretty::visit(AST::StatementList *node)
|
||||
@@ -766,7 +766,7 @@ bool PrettyPretty::visit(AST::StatementList *node)
|
||||
|
||||
void PrettyPretty::endVisit(AST::StatementList *node)
|
||||
{
|
||||
Q_UNUSED(node)
|
||||
Q_UNUSED(node);
|
||||
}
|
||||
|
||||
bool PrettyPretty::visit(AST::VariableDeclarationList *node)
|
||||
@@ -785,19 +785,19 @@ bool PrettyPretty::visit(AST::VariableDeclarationList *node)
|
||||
|
||||
void PrettyPretty::endVisit(AST::VariableDeclarationList *node)
|
||||
{
|
||||
Q_UNUSED(node)
|
||||
Q_UNUSED(node);
|
||||
}
|
||||
|
||||
bool PrettyPretty::visit(AST::VariableStatement *node)
|
||||
{
|
||||
out << "var ";
|
||||
Q_UNUSED(node)
|
||||
Q_UNUSED(node);
|
||||
return true;
|
||||
}
|
||||
|
||||
void PrettyPretty::endVisit(AST::VariableStatement *node)
|
||||
{
|
||||
Q_UNUSED(node)
|
||||
Q_UNUSED(node);
|
||||
out << ";";
|
||||
}
|
||||
|
||||
@@ -813,19 +813,19 @@ bool PrettyPretty::visit(AST::VariableDeclaration *node)
|
||||
|
||||
void PrettyPretty::endVisit(AST::VariableDeclaration *node)
|
||||
{
|
||||
Q_UNUSED(node)
|
||||
Q_UNUSED(node);
|
||||
}
|
||||
|
||||
bool PrettyPretty::visit(AST::EmptyStatement *node)
|
||||
{
|
||||
Q_UNUSED(node)
|
||||
Q_UNUSED(node);
|
||||
out << ";";
|
||||
return true;
|
||||
}
|
||||
|
||||
void PrettyPretty::endVisit(AST::EmptyStatement *node)
|
||||
{
|
||||
Q_UNUSED(node)
|
||||
Q_UNUSED(node);
|
||||
}
|
||||
|
||||
bool PrettyPretty::visit(AST::ExpressionStatement *node)
|
||||
@@ -837,7 +837,7 @@ bool PrettyPretty::visit(AST::ExpressionStatement *node)
|
||||
|
||||
void PrettyPretty::endVisit(AST::ExpressionStatement *node)
|
||||
{
|
||||
Q_UNUSED(node)
|
||||
Q_UNUSED(node);
|
||||
}
|
||||
|
||||
bool PrettyPretty::visit(AST::IfStatement *node)
|
||||
@@ -855,7 +855,7 @@ bool PrettyPretty::visit(AST::IfStatement *node)
|
||||
|
||||
void PrettyPretty::endVisit(AST::IfStatement *node)
|
||||
{
|
||||
Q_UNUSED(node)
|
||||
Q_UNUSED(node);
|
||||
}
|
||||
|
||||
bool PrettyPretty::visit(AST::DoWhileStatement *node)
|
||||
@@ -870,7 +870,7 @@ bool PrettyPretty::visit(AST::DoWhileStatement *node)
|
||||
|
||||
void PrettyPretty::endVisit(AST::DoWhileStatement *node)
|
||||
{
|
||||
Q_UNUSED(node)
|
||||
Q_UNUSED(node);
|
||||
}
|
||||
|
||||
bool PrettyPretty::visit(AST::WhileStatement *node)
|
||||
@@ -884,7 +884,7 @@ bool PrettyPretty::visit(AST::WhileStatement *node)
|
||||
|
||||
void PrettyPretty::endVisit(AST::WhileStatement *node)
|
||||
{
|
||||
Q_UNUSED(node)
|
||||
Q_UNUSED(node);
|
||||
}
|
||||
|
||||
bool PrettyPretty::visit(AST::ForStatement *node)
|
||||
@@ -902,7 +902,7 @@ bool PrettyPretty::visit(AST::ForStatement *node)
|
||||
|
||||
void PrettyPretty::endVisit(AST::ForStatement *node)
|
||||
{
|
||||
Q_UNUSED(node)
|
||||
Q_UNUSED(node);
|
||||
}
|
||||
|
||||
bool PrettyPretty::visit(AST::LocalForStatement *node)
|
||||
@@ -920,7 +920,7 @@ bool PrettyPretty::visit(AST::LocalForStatement *node)
|
||||
|
||||
void PrettyPretty::endVisit(AST::LocalForStatement *node)
|
||||
{
|
||||
Q_UNUSED(node)
|
||||
Q_UNUSED(node);
|
||||
}
|
||||
|
||||
bool PrettyPretty::visit(AST::ForEachStatement *node)
|
||||
@@ -936,7 +936,7 @@ bool PrettyPretty::visit(AST::ForEachStatement *node)
|
||||
|
||||
void PrettyPretty::endVisit(AST::ForEachStatement *node)
|
||||
{
|
||||
Q_UNUSED(node)
|
||||
Q_UNUSED(node);
|
||||
}
|
||||
|
||||
bool PrettyPretty::visit(AST::LocalForEachStatement *node)
|
||||
@@ -952,7 +952,7 @@ bool PrettyPretty::visit(AST::LocalForEachStatement *node)
|
||||
|
||||
void PrettyPretty::endVisit(AST::LocalForEachStatement *node)
|
||||
{
|
||||
Q_UNUSED(node)
|
||||
Q_UNUSED(node);
|
||||
}
|
||||
|
||||
bool PrettyPretty::visit(AST::ContinueStatement *node)
|
||||
@@ -967,7 +967,7 @@ bool PrettyPretty::visit(AST::ContinueStatement *node)
|
||||
|
||||
void PrettyPretty::endVisit(AST::ContinueStatement *node)
|
||||
{
|
||||
Q_UNUSED(node)
|
||||
Q_UNUSED(node);
|
||||
}
|
||||
|
||||
bool PrettyPretty::visit(AST::BreakStatement *node)
|
||||
@@ -982,7 +982,7 @@ bool PrettyPretty::visit(AST::BreakStatement *node)
|
||||
|
||||
void PrettyPretty::endVisit(AST::BreakStatement *node)
|
||||
{
|
||||
Q_UNUSED(node)
|
||||
Q_UNUSED(node);
|
||||
}
|
||||
|
||||
bool PrettyPretty::visit(AST::ReturnStatement *node)
|
||||
@@ -998,7 +998,7 @@ bool PrettyPretty::visit(AST::ReturnStatement *node)
|
||||
|
||||
void PrettyPretty::endVisit(AST::ReturnStatement *node)
|
||||
{
|
||||
Q_UNUSED(node)
|
||||
Q_UNUSED(node);
|
||||
}
|
||||
|
||||
bool PrettyPretty::visit(AST::WithStatement *node)
|
||||
@@ -1012,7 +1012,7 @@ bool PrettyPretty::visit(AST::WithStatement *node)
|
||||
|
||||
void PrettyPretty::endVisit(AST::WithStatement *node)
|
||||
{
|
||||
Q_UNUSED(node)
|
||||
Q_UNUSED(node);
|
||||
}
|
||||
|
||||
bool PrettyPretty::visit(AST::SwitchStatement *node)
|
||||
@@ -1026,7 +1026,7 @@ bool PrettyPretty::visit(AST::SwitchStatement *node)
|
||||
|
||||
void PrettyPretty::endVisit(AST::SwitchStatement *node)
|
||||
{
|
||||
Q_UNUSED(node)
|
||||
Q_UNUSED(node);
|
||||
}
|
||||
|
||||
bool PrettyPretty::visit(AST::CaseBlock *node)
|
||||
@@ -1045,7 +1045,7 @@ bool PrettyPretty::visit(AST::CaseBlock *node)
|
||||
|
||||
void PrettyPretty::endVisit(AST::CaseBlock *node)
|
||||
{
|
||||
Q_UNUSED(node)
|
||||
Q_UNUSED(node);
|
||||
}
|
||||
|
||||
bool PrettyPretty::visit(AST::CaseClauses *node)
|
||||
@@ -1060,7 +1060,7 @@ bool PrettyPretty::visit(AST::CaseClauses *node)
|
||||
|
||||
void PrettyPretty::endVisit(AST::CaseClauses *node)
|
||||
{
|
||||
Q_UNUSED(node)
|
||||
Q_UNUSED(node);
|
||||
}
|
||||
|
||||
bool PrettyPretty::visit(AST::CaseClause *node)
|
||||
@@ -1077,12 +1077,12 @@ bool PrettyPretty::visit(AST::CaseClause *node)
|
||||
|
||||
void PrettyPretty::endVisit(AST::CaseClause *node)
|
||||
{
|
||||
Q_UNUSED(node)
|
||||
Q_UNUSED(node);
|
||||
}
|
||||
|
||||
bool PrettyPretty::visit(AST::DefaultClause *node)
|
||||
{
|
||||
Q_UNUSED(node)
|
||||
Q_UNUSED(node);
|
||||
out << "default:";
|
||||
newlineAndIndent();
|
||||
return true;
|
||||
@@ -1090,7 +1090,7 @@ bool PrettyPretty::visit(AST::DefaultClause *node)
|
||||
|
||||
void PrettyPretty::endVisit(AST::DefaultClause *node)
|
||||
{
|
||||
Q_UNUSED(node)
|
||||
Q_UNUSED(node);
|
||||
}
|
||||
|
||||
bool PrettyPretty::visit(AST::LabelledStatement *node)
|
||||
@@ -1101,12 +1101,12 @@ bool PrettyPretty::visit(AST::LabelledStatement *node)
|
||||
|
||||
void PrettyPretty::endVisit(AST::LabelledStatement *node)
|
||||
{
|
||||
Q_UNUSED(node)
|
||||
Q_UNUSED(node);
|
||||
}
|
||||
|
||||
bool PrettyPretty::visit(AST::ThrowStatement *node)
|
||||
{
|
||||
Q_UNUSED(node)
|
||||
Q_UNUSED(node);
|
||||
out << "throw ";
|
||||
accept(node->expression);
|
||||
out << ";";
|
||||
@@ -1115,7 +1115,7 @@ bool PrettyPretty::visit(AST::ThrowStatement *node)
|
||||
|
||||
void PrettyPretty::endVisit(AST::ThrowStatement *node)
|
||||
{
|
||||
Q_UNUSED(node)
|
||||
Q_UNUSED(node);
|
||||
}
|
||||
|
||||
bool PrettyPretty::visit(AST::TryStatement *node)
|
||||
@@ -1135,30 +1135,30 @@ bool PrettyPretty::visit(AST::TryStatement *node)
|
||||
|
||||
void PrettyPretty::endVisit(AST::TryStatement *node)
|
||||
{
|
||||
Q_UNUSED(node)
|
||||
Q_UNUSED(node);
|
||||
}
|
||||
|
||||
bool PrettyPretty::visit(AST::Catch *node)
|
||||
{
|
||||
Q_UNUSED(node)
|
||||
Q_UNUSED(node);
|
||||
return true;
|
||||
}
|
||||
|
||||
void PrettyPretty::endVisit(AST::Catch *node)
|
||||
{
|
||||
Q_UNUSED(node)
|
||||
Q_UNUSED(node);
|
||||
}
|
||||
|
||||
bool PrettyPretty::visit(AST::Finally *node)
|
||||
{
|
||||
Q_UNUSED(node)
|
||||
Q_UNUSED(node);
|
||||
out << "finally ";
|
||||
return true;
|
||||
}
|
||||
|
||||
void PrettyPretty::endVisit(AST::Finally *node)
|
||||
{
|
||||
Q_UNUSED(node)
|
||||
Q_UNUSED(node);
|
||||
}
|
||||
|
||||
bool PrettyPretty::visit(AST::FunctionDeclaration *node)
|
||||
@@ -1197,7 +1197,7 @@ bool PrettyPretty::visit(AST::FunctionDeclaration *node)
|
||||
|
||||
void PrettyPretty::endVisit(AST::FunctionDeclaration *node)
|
||||
{
|
||||
Q_UNUSED(node)
|
||||
Q_UNUSED(node);
|
||||
}
|
||||
|
||||
bool PrettyPretty::visit(AST::FunctionExpression *node)
|
||||
@@ -1236,45 +1236,45 @@ bool PrettyPretty::visit(AST::FunctionExpression *node)
|
||||
|
||||
void PrettyPretty::endVisit(AST::FunctionExpression *node)
|
||||
{
|
||||
Q_UNUSED(node)
|
||||
Q_UNUSED(node);
|
||||
}
|
||||
|
||||
bool PrettyPretty::visit(AST::FormalParameterList *node)
|
||||
{
|
||||
Q_UNUSED(node)
|
||||
Q_UNUSED(node);
|
||||
return true;
|
||||
}
|
||||
|
||||
void PrettyPretty::endVisit(AST::FormalParameterList *node)
|
||||
{
|
||||
Q_UNUSED(node)
|
||||
Q_UNUSED(node);
|
||||
}
|
||||
|
||||
bool PrettyPretty::visit(AST::FunctionBody *node)
|
||||
{
|
||||
Q_UNUSED(node)
|
||||
Q_UNUSED(node);
|
||||
return true;
|
||||
}
|
||||
|
||||
void PrettyPretty::endVisit(AST::FunctionBody *node)
|
||||
{
|
||||
Q_UNUSED(node)
|
||||
Q_UNUSED(node);
|
||||
}
|
||||
|
||||
bool PrettyPretty::visit(AST::Program *node)
|
||||
{
|
||||
Q_UNUSED(node)
|
||||
Q_UNUSED(node);
|
||||
return true;
|
||||
}
|
||||
|
||||
void PrettyPretty::endVisit(AST::Program *node)
|
||||
{
|
||||
Q_UNUSED(node)
|
||||
Q_UNUSED(node);
|
||||
}
|
||||
|
||||
bool PrettyPretty::visit(AST::SourceElements *node)
|
||||
{
|
||||
Q_UNUSED(node)
|
||||
Q_UNUSED(node);
|
||||
accept(node->element);
|
||||
for (node = node->next; node != 0; node = node->next) {
|
||||
newlineAndIndent();
|
||||
@@ -1285,47 +1285,47 @@ bool PrettyPretty::visit(AST::SourceElements *node)
|
||||
|
||||
void PrettyPretty::endVisit(AST::SourceElements *node)
|
||||
{
|
||||
Q_UNUSED(node)
|
||||
Q_UNUSED(node);
|
||||
}
|
||||
|
||||
bool PrettyPretty::visit(AST::FunctionSourceElement *node)
|
||||
{
|
||||
Q_UNUSED(node)
|
||||
Q_UNUSED(node);
|
||||
return true;
|
||||
}
|
||||
|
||||
void PrettyPretty::endVisit(AST::FunctionSourceElement *node)
|
||||
{
|
||||
Q_UNUSED(node)
|
||||
Q_UNUSED(node);
|
||||
}
|
||||
|
||||
bool PrettyPretty::visit(AST::StatementSourceElement *node)
|
||||
{
|
||||
Q_UNUSED(node)
|
||||
Q_UNUSED(node);
|
||||
return true;
|
||||
}
|
||||
|
||||
void PrettyPretty::endVisit(AST::StatementSourceElement *node)
|
||||
{
|
||||
Q_UNUSED(node)
|
||||
Q_UNUSED(node);
|
||||
}
|
||||
|
||||
bool PrettyPretty::visit(AST::DebuggerStatement *node)
|
||||
{
|
||||
Q_UNUSED(node)
|
||||
Q_UNUSED(node);
|
||||
out << "debugger";
|
||||
return true;
|
||||
}
|
||||
|
||||
void PrettyPretty::endVisit(AST::DebuggerStatement *node)
|
||||
{
|
||||
Q_UNUSED(node)
|
||||
Q_UNUSED(node);
|
||||
out << ";";
|
||||
}
|
||||
|
||||
bool PrettyPretty::preVisit(AST::Node *node)
|
||||
{
|
||||
Q_UNUSED(node)
|
||||
Q_UNUSED(node);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
||||
** Contact: Nokia Corporation (qt-info@nokia.com)
|
||||
** Contact: Qt Software Information (qt-info@nokia.com)
|
||||
**
|
||||
** This file is part of the QtScript module of the Qt Toolkit.
|
||||
** This file is part of the QtDeclarative module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** No Commercial Usage
|
||||
@@ -34,7 +34,7 @@
|
||||
** met: http://www.gnu.org/copyleft/gpl.html.
|
||||
**
|
||||
** If you are unsure which license is appropriate for your use, please
|
||||
** contact the sales department at http://www.qtsoftware.com/contact.
|
||||
** contact the sales department at qt-sales@nokia.com.
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
Reference in New Issue
Block a user