Update QML front-end from qt/kinetic-declarativeui (rev bcae9d84fb5dd2bdc5a5298c8841702505a02867)

This commit is contained in:
Roberto Raggi
2009-07-15 15:20:10 +02:00
parent 41a9395d21
commit a5180a4ab5
18 changed files with 1730 additions and 1290 deletions

View File

@@ -1,9 +1,9 @@
---------------------------------------------------------------------------- ----------------------------------------------------------------------------
-- --
-- Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -- 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$ -- $QT_BEGIN_LICENSE:LGPL$
-- No Commercial Usage -- No Commercial Usage
@@ -34,7 +34,7 @@
-- met: http://www.gnu.org/copyleft/gpl.html. -- met: http://www.gnu.org/copyleft/gpl.html.
-- --
-- If you are unsure which license is appropriate for your use, please -- 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$ -- $QT_END_LICENSE$
-- --
-- This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -- This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
@@ -84,18 +84,24 @@
--- context keywords. --- context keywords.
%token T_PUBLIC "public" %token T_PUBLIC "public"
%token T_IMPORT "import" %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 SHIFT_THERE
%nonassoc T_IDENTIFIER T_COLON T_SIGNAL T_PROPERTY %nonassoc T_IDENTIFIER T_COLON T_SIGNAL T_PROPERTY
%nonassoc REDUCE_HERE %nonassoc REDUCE_HERE
%start UiProgram %start TopLevel
/. /.
/**************************************************************************** /****************************************************************************
** **
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** 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 QtScript module of the Qt Toolkit.
** **
@@ -128,7 +134,7 @@
** met: http://www.gnu.org/copyleft/gpl.html. ** met: http://www.gnu.org/copyleft/gpl.html.
** **
** If you are unsure which license is appropriate for your use, please ** 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$ ** $QT_END_LICENSE$
** **
****************************************************************************/ ****************************************************************************/
@@ -148,7 +154,7 @@
/**************************************************************************** /****************************************************************************
** **
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** 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 QtScript module of the Qt Toolkit.
** **
@@ -181,7 +187,7 @@
** met: http://www.gnu.org/copyleft/gpl.html. ** met: http://www.gnu.org/copyleft/gpl.html.
** **
** If you are unsure which license is appropriate for your use, please ** 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$ ** $QT_END_LICENSE$
** **
****************************************************************************/ ****************************************************************************/
@@ -254,6 +260,7 @@ public:
AST::UiProgram *UiProgram; AST::UiProgram *UiProgram;
AST::UiImportList *UiImportList; AST::UiImportList *UiImportList;
AST::UiImport *UiImport; AST::UiImport *UiImport;
AST::UiParameterList *UiParameterList;
AST::UiPublicMember *UiPublicMember; AST::UiPublicMember *UiPublicMember;
AST::UiObjectDefinition *UiObjectDefinition; AST::UiObjectDefinition *UiObjectDefinition;
AST::UiObjectInitializer *UiObjectInitializer; AST::UiObjectInitializer *UiObjectInitializer;
@@ -270,10 +277,29 @@ public:
Parser(Engine *engine); Parser(Engine *engine);
~Parser(); ~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() AST::UiProgram *ast() const
{ return program; } { 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 QList<DiagnosticMessage> diagnosticMessages() const
{ return diagnostic_messages; } { return diagnostic_messages; }
@@ -298,6 +324,8 @@ public:
{ return diagnosticMessage().loc.startColumn; } { return diagnosticMessage().loc.startColumn; }
protected: protected:
bool parse(int startToken);
void reallocateStack(); void reallocateStack();
inline Value &sym(int index) inline Value &sym(int index)
@@ -316,7 +344,7 @@ protected:
int *state_stack; int *state_stack;
AST::SourceLocation *location_stack; AST::SourceLocation *location_stack;
AST::UiProgram *program; AST::Node *program;
// error recovery // error recovery
enum { TOKEN_BUFFER_SIZE = 3 }; enum { TOKEN_BUFFER_SIZE = 3 };
@@ -437,14 +465,16 @@ AST::UiQualifiedId *Parser::reparseAsQualifiedId(AST::ExpressionNode *expr)
return 0; return 0;
} }
bool Parser::parse() bool Parser::parse(int startToken)
{ {
Lexer *lexer = driver->lexer(); Lexer *lexer = driver->lexer();
bool hadErrors = false; bool hadErrors = false;
int yytoken = -1; int yytoken = -1;
int action = 0; 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; tos = -1;
program = 0; program = 0;
@@ -492,12 +522,35 @@ bool Parser::parse()
-- Declarative UI -- 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 ; UiProgram: UiImportListOpt UiRootMember ;
/. /.
case $rule_number: { 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(2).UiObjectMemberList->finish());
sym(1).UiProgram = program;
} break; } break;
./ ./
@@ -536,6 +589,77 @@ case $rule_number: {
} break; } 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: ; Empty: ;
/. /.
case $rule_number: { case $rule_number: {
@@ -706,6 +830,52 @@ case $rule_number: {
UiPropertyType: T_IDENTIFIER ; 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 ; UiObjectMember: T_SIGNAL T_IDENTIFIER ;
/. /.
case $rule_number: { case $rule_number: {
@@ -2843,7 +3013,8 @@ PropertyNameAndValueListOpt: PropertyNameAndValueList ;
} }
for (int tk = 1; tk < TERMINAL_COUNT; ++tk) { 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; continue;
int a = t_action(errorState, tk); int a = t_action(errorState, tk);

View File

@@ -1,7 +1,7 @@
/**************************************************************************** /****************************************************************************
** **
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** 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 QtScript module of the Qt Toolkit.
** **
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html. ** met: http://www.gnu.org/copyleft/gpl.html.
** **
** If you are unsure which license is appropriate for your use, please ** 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$ ** $QT_END_LICENSE$
** **
****************************************************************************/ ****************************************************************************/

View File

@@ -1,9 +1,9 @@
/**************************************************************************** /****************************************************************************
** **
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** 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$ ** $QT_BEGIN_LICENSE:LGPL$
** No Commercial Usage ** No Commercial Usage
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html. ** met: http://www.gnu.org/copyleft/gpl.html.
** **
** If you are unsure which license is appropriate for your use, please ** 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$ ** $QT_END_LICENSE$
** **
****************************************************************************/ ****************************************************************************/
@@ -209,6 +209,7 @@ public:
Kind_UiObjectMemberList, Kind_UiObjectMemberList,
Kind_UiArrayMemberList, Kind_UiArrayMemberList,
Kind_UiProgram, Kind_UiProgram,
Kind_UiParameterList,
Kind_UiPublicMember, Kind_UiPublicMember,
Kind_UiQualifiedId, Kind_UiQualifiedId,
Kind_UiScriptBinding, Kind_UiScriptBinding,
@@ -2220,15 +2221,24 @@ public:
QMLJS_DECLARE_AST_NODE(UiImport) QMLJS_DECLARE_AST_NODE(UiImport)
UiImport(NameId *fileName) UiImport(NameId *fileName)
: fileName(fileName) : fileName(fileName), importUri(0), importId(0)
{ kind = K; }
UiImport(UiQualifiedId *uri)
: fileName(0), importUri(uri), importId(0)
{ kind = K; } { kind = K; }
virtual void accept0(Visitor *visitor); virtual void accept0(Visitor *visitor);
// attributes // attributes
NameId *fileName; NameId *fileName;
UiQualifiedId *importUri;
NameId *importId;
SourceLocation importToken; SourceLocation importToken;
SourceLocation fileNameToken; SourceLocation fileNameToken;
SourceLocation versionToken;
SourceLocation asToken;
SourceLocation importIdToken;
SourceLocation semicolonToken; SourceLocation semicolonToken;
}; };
@@ -2351,6 +2361,42 @@ public:
SourceLocation rbraceToken; 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 class UiPublicMember: public UiObjectMember
{ {
public: public:
@@ -2358,13 +2404,13 @@ public:
UiPublicMember(NameId *memberType, UiPublicMember(NameId *memberType,
NameId *name) 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; } { kind = K; }
UiPublicMember(NameId *memberType, UiPublicMember(NameId *memberType,
NameId *name, NameId *name,
ExpressionNode *expression) 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; } { kind = K; }
virtual SourceLocation firstSourceLocation() const virtual SourceLocation firstSourceLocation() const
@@ -2388,6 +2434,7 @@ public:
NameId *name; NameId *name;
ExpressionNode *expression; ExpressionNode *expression;
bool isDefaultMember; bool isDefaultMember;
UiParameterList *parameters;
SourceLocation defaultToken; SourceLocation defaultToken;
SourceLocation propertyToken; SourceLocation propertyToken;
SourceLocation typeToken; SourceLocation typeToken;

View File

@@ -1,7 +1,7 @@
/**************************************************************************** /****************************************************************************
** **
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** 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 QtScript module of the Qt Toolkit.
** **
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html. ** met: http://www.gnu.org/copyleft/gpl.html.
** **
** If you are unsure which license is appropriate for your use, please ** 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$ ** $QT_END_LICENSE$
** **
****************************************************************************/ ****************************************************************************/

View File

@@ -1,7 +1,7 @@
/**************************************************************************** /****************************************************************************
** **
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** 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 QtScript module of the Qt Toolkit.
** **
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html. ** met: http://www.gnu.org/copyleft/gpl.html.
** **
** If you are unsure which license is appropriate for your use, please ** 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$ ** $QT_END_LICENSE$
** **
****************************************************************************/ ****************************************************************************/

View File

@@ -1,7 +1,7 @@
/**************************************************************************** /****************************************************************************
** **
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** 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 QtScript module of the Qt Toolkit.
** **
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html. ** met: http://www.gnu.org/copyleft/gpl.html.
** **
** If you are unsure which license is appropriate for your use, please ** 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$ ** $QT_END_LICENSE$
** **
****************************************************************************/ ****************************************************************************/

View File

@@ -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) ** $QT_BEGIN_LICENSE:LGPL$
** ** No Commercial Usage
** 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
** Licensees holding valid Qt Commercial licenses may use this file in ** contained in the either Technology Preview License Agreement or the
** accordance with the Qt Commercial License Agreement provided with the ** Beta Release License Agreement.
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Nokia.
** **
** GNU Lesser General Public License Usage ** GNU Lesser General Public License Usage
**
** Alternatively, this file may be used under the terms of the GNU Lesser ** 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 ** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the ** 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 ** 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. ** 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 ** In addition, as a special exception, Nokia gives you certain
** contact the sales department at http://www.qtsoftware.com/contact. ** 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 "qmljsengine_p.h"
#include "qmljsnodepool_p.h" #include "qmljsnodepool_p.h"

View File

@@ -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) ** $QT_BEGIN_LICENSE:LGPL$
** ** No Commercial Usage
** 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
** Licensees holding valid Qt Commercial licenses may use this file in ** contained in the either Technology Preview License Agreement or the
** accordance with the Qt Commercial License Agreement provided with the ** Beta Release License Agreement.
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Nokia.
** **
** GNU Lesser General Public License Usage ** GNU Lesser General Public License Usage
**
** Alternatively, this file may be used under the terms of the GNU Lesser ** 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 ** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the ** 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 ** 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. ** 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 ** In addition, as a special exception, Nokia gives you certain
** contact the sales department at http://www.qtsoftware.com/contact. ** 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 #ifndef QMLJSENGINE_P_H
#define 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 <QString>
#include <QSet> #include <QSet>

File diff suppressed because it is too large Load Diff

View File

@@ -2,7 +2,7 @@
/**************************************************************************** /****************************************************************************
** **
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** 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. ** This file is part of the QtCore module of the Qt Toolkit.
** **
@@ -35,7 +35,7 @@
** met: http://www.gnu.org/copyleft/gpl.html. ** met: http://www.gnu.org/copyleft/gpl.html.
** **
** If you are unsure which license is appropriate for your use, please ** 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$ ** $QT_END_LICENSE$
** **
****************************************************************************/ ****************************************************************************/
@@ -59,11 +59,12 @@ class QmlJSGrammar
public: public:
enum { enum {
EOF_SYMBOL = 0, EOF_SYMBOL = 0,
REDUCE_HERE = 90, REDUCE_HERE = 94,
SHIFT_THERE = 89, SHIFT_THERE = 93,
T_AND = 1, T_AND = 1,
T_AND_AND = 2, T_AND_AND = 2,
T_AND_EQ = 3, T_AND_EQ = 3,
T_AS = 89,
T_AUTOMATIC_SEMICOLON = 62, T_AUTOMATIC_SEMICOLON = 62,
T_BREAK = 4, T_BREAK = 4,
T_CASE = 5, T_CASE = 5,
@@ -84,6 +85,9 @@ public:
T_EQ_EQ = 18, T_EQ_EQ = 18,
T_EQ_EQ_EQ = 19, T_EQ_EQ_EQ = 19,
T_FALSE = 82, T_FALSE = 82,
T_FEED_JS_EXPRESSION = 92,
T_FEED_JS_STATEMENT = 91,
T_FEED_UI_PROGRAM = 90,
T_FINALLY = 20, T_FINALLY = 20,
T_FOR = 21, T_FOR = 21,
T_FUNCTION = 22, T_FUNCTION = 22,
@@ -150,15 +154,15 @@ public:
T_XOR = 78, T_XOR = 78,
T_XOR_EQ = 79, T_XOR_EQ = 79,
ACCEPT_STATE = 588, ACCEPT_STATE = 621,
RULE_COUNT = 323, RULE_COUNT = 341,
STATE_COUNT = 589, STATE_COUNT = 622,
TERMINAL_COUNT = 91, TERMINAL_COUNT = 95,
NON_TERMINAL_COUNT = 102, NON_TERMINAL_COUNT = 105,
GOTO_INDEX_OFFSET = 589, GOTO_INDEX_OFFSET = 622,
GOTO_INFO_OFFSET = 2092, GOTO_INFO_OFFSET = 2247,
GOTO_CHECK_OFFSET = 2092 GOTO_CHECK_OFFSET = 2247
}; };
static const char *const spell []; static const char *const spell [];

View File

@@ -1,9 +1,9 @@
/**************************************************************************** /****************************************************************************
** **
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** 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$ ** $QT_BEGIN_LICENSE:LGPL$
** No Commercial Usage ** No Commercial Usage
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html. ** met: http://www.gnu.org/copyleft/gpl.html.
** **
** If you are unsure which license is appropriate for your use, please ** 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$ ** $QT_END_LICENSE$
** **
****************************************************************************/ ****************************************************************************/
@@ -159,6 +159,8 @@ int Lexer::findReservedWord(const QChar *c, int size) const
return QmlJSGrammar::T_IF; return QmlJSGrammar::T_IF;
else if (c[0] == QLatin1Char('i') && c[1] == QLatin1Char('n')) else if (c[0] == QLatin1Char('i') && c[1] == QLatin1Char('n'))
return QmlJSGrammar::T_IN; return QmlJSGrammar::T_IN;
else if (c[0] == QLatin1Char('a') && c[1] == QLatin1Char('s'))
return QmlJSGrammar::T_AS;
} break; } break;
case 3: { case 3: {

View File

@@ -1,7 +1,7 @@
/**************************************************************************** /****************************************************************************
** **
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** 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 QtScript module of the Qt Toolkit.
** **
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html. ** met: http://www.gnu.org/copyleft/gpl.html.
** **
** If you are unsure which license is appropriate for your use, please ** 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$ ** $QT_END_LICENSE$
** **
****************************************************************************/ ****************************************************************************/

View File

@@ -1,9 +1,9 @@
/**************************************************************************** /****************************************************************************
** **
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** 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$ ** $QT_BEGIN_LICENSE:LGPL$
** No Commercial Usage ** No Commercial Usage
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html. ** met: http://www.gnu.org/copyleft/gpl.html.
** **
** If you are unsure which license is appropriate for your use, please ** 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$ ** $QT_END_LICENSE$
** **
****************************************************************************/ ****************************************************************************/

View File

@@ -1,9 +1,9 @@
/**************************************************************************** /****************************************************************************
** **
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** 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$ ** $QT_BEGIN_LICENSE:LGPL$
** No Commercial Usage ** No Commercial Usage
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html. ** met: http://www.gnu.org/copyleft/gpl.html.
** **
** If you are unsure which license is appropriate for your use, please ** 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$ ** $QT_END_LICENSE$
** **
****************************************************************************/ ****************************************************************************/

File diff suppressed because it is too large Load Diff

View File

@@ -3,7 +3,7 @@
/**************************************************************************** /****************************************************************************
** **
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** 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 QtScript module of the Qt Toolkit.
** **
@@ -36,7 +36,7 @@
** met: http://www.gnu.org/copyleft/gpl.html. ** met: http://www.gnu.org/copyleft/gpl.html.
** **
** If you are unsure which license is appropriate for your use, please ** 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$ ** $QT_END_LICENSE$
** **
****************************************************************************/ ****************************************************************************/
@@ -109,6 +109,7 @@ public:
AST::UiProgram *UiProgram; AST::UiProgram *UiProgram;
AST::UiImportList *UiImportList; AST::UiImportList *UiImportList;
AST::UiImport *UiImport; AST::UiImport *UiImport;
AST::UiParameterList *UiParameterList;
AST::UiPublicMember *UiPublicMember; AST::UiPublicMember *UiPublicMember;
AST::UiObjectDefinition *UiObjectDefinition; AST::UiObjectDefinition *UiObjectDefinition;
AST::UiObjectInitializer *UiObjectInitializer; AST::UiObjectInitializer *UiObjectInitializer;
@@ -125,10 +126,29 @@ public:
Parser(Engine *engine); Parser(Engine *engine);
~Parser(); ~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() AST::UiProgram *ast() const
{ return program; } { 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 QList<DiagnosticMessage> diagnosticMessages() const
{ return diagnostic_messages; } { return diagnostic_messages; }
@@ -153,6 +173,8 @@ public:
{ return diagnosticMessage().loc.startColumn; } { return diagnosticMessage().loc.startColumn; }
protected: protected:
bool parse(int startToken);
void reallocateStack(); void reallocateStack();
inline Value &sym(int index) inline Value &sym(int index)
@@ -171,7 +193,7 @@ protected:
int *state_stack; int *state_stack;
AST::SourceLocation *location_stack; AST::SourceLocation *location_stack;
AST::UiProgram *program; AST::Node *program;
// error recovery // error recovery
enum { TOKEN_BUFFER_SIZE = 3 }; 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 QT_END_NAMESPACE

View File

@@ -1,9 +1,9 @@
/**************************************************************************** /****************************************************************************
** **
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** 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$ ** $QT_BEGIN_LICENSE:LGPL$
** No Commercial Usage ** No Commercial Usage
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html. ** met: http://www.gnu.org/copyleft/gpl.html.
** **
** If you are unsure which license is appropriate for your use, please ** 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$ ** $QT_END_LICENSE$
** **
****************************************************************************/ ****************************************************************************/
@@ -170,14 +170,14 @@ void PrettyPretty::accept(AST::Node *node)
bool PrettyPretty::visit(AST::ThisExpression *node) bool PrettyPretty::visit(AST::ThisExpression *node)
{ {
Q_UNUSED(node) Q_UNUSED(node);
out << "this"; out << "this";
return true; return true;
} }
void PrettyPretty::endVisit(AST::ThisExpression *node) void PrettyPretty::endVisit(AST::ThisExpression *node)
{ {
Q_UNUSED(node) Q_UNUSED(node);
} }
bool PrettyPretty::visit(AST::IdentifierExpression *node) bool PrettyPretty::visit(AST::IdentifierExpression *node)
@@ -188,43 +188,43 @@ bool PrettyPretty::visit(AST::IdentifierExpression *node)
void PrettyPretty::endVisit(AST::IdentifierExpression *node) void PrettyPretty::endVisit(AST::IdentifierExpression *node)
{ {
Q_UNUSED(node) Q_UNUSED(node);
} }
bool PrettyPretty::visit(AST::NullExpression *node) bool PrettyPretty::visit(AST::NullExpression *node)
{ {
Q_UNUSED(node) Q_UNUSED(node);
out << "null"; out << "null";
return false; return false;
} }
void PrettyPretty::endVisit(AST::NullExpression *node) void PrettyPretty::endVisit(AST::NullExpression *node)
{ {
Q_UNUSED(node) Q_UNUSED(node);
} }
bool PrettyPretty::visit(AST::TrueLiteral *node) bool PrettyPretty::visit(AST::TrueLiteral *node)
{ {
Q_UNUSED(node) Q_UNUSED(node);
out << "true"; out << "true";
return false; return false;
} }
void PrettyPretty::endVisit(AST::TrueLiteral *node) void PrettyPretty::endVisit(AST::TrueLiteral *node)
{ {
Q_UNUSED(node) Q_UNUSED(node);
} }
bool PrettyPretty::visit(AST::FalseLiteral *node) bool PrettyPretty::visit(AST::FalseLiteral *node)
{ {
Q_UNUSED(node) Q_UNUSED(node);
out << "false"; out << "false";
return false; return false;
} }
void PrettyPretty::endVisit(AST::FalseLiteral *node) void PrettyPretty::endVisit(AST::FalseLiteral *node)
{ {
Q_UNUSED(node) Q_UNUSED(node);
} }
bool PrettyPretty::visit(AST::StringLiteral *node) bool PrettyPretty::visit(AST::StringLiteral *node)
@@ -237,7 +237,7 @@ bool PrettyPretty::visit(AST::StringLiteral *node)
void PrettyPretty::endVisit(AST::StringLiteral *node) void PrettyPretty::endVisit(AST::StringLiteral *node)
{ {
Q_UNUSED(node) Q_UNUSED(node);
} }
bool PrettyPretty::visit(AST::NumericLiteral *node) bool PrettyPretty::visit(AST::NumericLiteral *node)
@@ -248,7 +248,7 @@ bool PrettyPretty::visit(AST::NumericLiteral *node)
void PrettyPretty::endVisit(AST::NumericLiteral *node) void PrettyPretty::endVisit(AST::NumericLiteral *node)
{ {
Q_UNUSED(node) Q_UNUSED(node);
} }
bool PrettyPretty::visit(AST::RegExpLiteral *node) bool PrettyPretty::visit(AST::RegExpLiteral *node)
@@ -262,7 +262,7 @@ bool PrettyPretty::visit(AST::RegExpLiteral *node)
void PrettyPretty::endVisit(AST::RegExpLiteral *node) void PrettyPretty::endVisit(AST::RegExpLiteral *node)
{ {
Q_UNUSED(node) Q_UNUSED(node);
} }
bool PrettyPretty::visit(AST::ArrayLiteral *node) bool PrettyPretty::visit(AST::ArrayLiteral *node)
@@ -276,7 +276,7 @@ bool PrettyPretty::visit(AST::ArrayLiteral *node)
void PrettyPretty::endVisit(AST::ArrayLiteral *node) void PrettyPretty::endVisit(AST::ArrayLiteral *node)
{ {
Q_UNUSED(node) Q_UNUSED(node);
} }
bool PrettyPretty::visit(AST::ObjectLiteral *node) bool PrettyPretty::visit(AST::ObjectLiteral *node)
@@ -300,7 +300,7 @@ bool PrettyPretty::visit(AST::ObjectLiteral *node)
void PrettyPretty::endVisit(AST::ObjectLiteral *node) void PrettyPretty::endVisit(AST::ObjectLiteral *node)
{ {
Q_UNUSED(node) Q_UNUSED(node);
} }
bool PrettyPretty::visit(AST::ElementList *node) bool PrettyPretty::visit(AST::ElementList *node)
@@ -317,7 +317,7 @@ bool PrettyPretty::visit(AST::ElementList *node)
void PrettyPretty::endVisit(AST::ElementList *node) void PrettyPretty::endVisit(AST::ElementList *node)
{ {
Q_UNUSED(node) Q_UNUSED(node);
} }
bool PrettyPretty::visit(AST::Elision *node) bool PrettyPretty::visit(AST::Elision *node)
@@ -330,7 +330,7 @@ bool PrettyPretty::visit(AST::Elision *node)
void PrettyPretty::endVisit(AST::Elision *node) void PrettyPretty::endVisit(AST::Elision *node)
{ {
Q_UNUSED(node) Q_UNUSED(node);
} }
bool PrettyPretty::visit(AST::PropertyNameAndValueList *node) bool PrettyPretty::visit(AST::PropertyNameAndValueList *node)
@@ -343,7 +343,7 @@ bool PrettyPretty::visit(AST::PropertyNameAndValueList *node)
void PrettyPretty::endVisit(AST::PropertyNameAndValueList *node) void PrettyPretty::endVisit(AST::PropertyNameAndValueList *node)
{ {
Q_UNUSED(node) Q_UNUSED(node);
} }
bool PrettyPretty::visit(AST::IdentifierPropertyName *node) bool PrettyPretty::visit(AST::IdentifierPropertyName *node)
@@ -354,7 +354,7 @@ bool PrettyPretty::visit(AST::IdentifierPropertyName *node)
void PrettyPretty::endVisit(AST::IdentifierPropertyName *node) void PrettyPretty::endVisit(AST::IdentifierPropertyName *node)
{ {
Q_UNUSED(node) Q_UNUSED(node);
} }
bool PrettyPretty::visit(AST::StringLiteralPropertyName *node) bool PrettyPretty::visit(AST::StringLiteralPropertyName *node)
@@ -367,7 +367,7 @@ bool PrettyPretty::visit(AST::StringLiteralPropertyName *node)
void PrettyPretty::endVisit(AST::StringLiteralPropertyName *node) void PrettyPretty::endVisit(AST::StringLiteralPropertyName *node)
{ {
Q_UNUSED(node) Q_UNUSED(node);
} }
bool PrettyPretty::visit(AST::NumericLiteralPropertyName *node) bool PrettyPretty::visit(AST::NumericLiteralPropertyName *node)
@@ -378,7 +378,7 @@ bool PrettyPretty::visit(AST::NumericLiteralPropertyName *node)
void PrettyPretty::endVisit(AST::NumericLiteralPropertyName *node) void PrettyPretty::endVisit(AST::NumericLiteralPropertyName *node)
{ {
Q_UNUSED(node) Q_UNUSED(node);
} }
bool PrettyPretty::visit(AST::ArrayMemberExpression *node) bool PrettyPretty::visit(AST::ArrayMemberExpression *node)
@@ -392,7 +392,7 @@ bool PrettyPretty::visit(AST::ArrayMemberExpression *node)
void PrettyPretty::endVisit(AST::ArrayMemberExpression *node) void PrettyPretty::endVisit(AST::ArrayMemberExpression *node)
{ {
Q_UNUSED(node) Q_UNUSED(node);
} }
bool PrettyPretty::visit(AST::FieldMemberExpression *node) bool PrettyPretty::visit(AST::FieldMemberExpression *node)
@@ -404,7 +404,7 @@ bool PrettyPretty::visit(AST::FieldMemberExpression *node)
void PrettyPretty::endVisit(AST::FieldMemberExpression *node) void PrettyPretty::endVisit(AST::FieldMemberExpression *node)
{ {
Q_UNUSED(node) Q_UNUSED(node);
} }
bool PrettyPretty::visit(AST::NewMemberExpression *node) bool PrettyPretty::visit(AST::NewMemberExpression *node)
@@ -419,19 +419,19 @@ bool PrettyPretty::visit(AST::NewMemberExpression *node)
void PrettyPretty::endVisit(AST::NewMemberExpression *node) void PrettyPretty::endVisit(AST::NewMemberExpression *node)
{ {
Q_UNUSED(node) Q_UNUSED(node);
} }
bool PrettyPretty::visit(AST::NewExpression *node) bool PrettyPretty::visit(AST::NewExpression *node)
{ {
Q_UNUSED(node) Q_UNUSED(node);
out << "new "; out << "new ";
return true; return true;
} }
void PrettyPretty::endVisit(AST::NewExpression *node) void PrettyPretty::endVisit(AST::NewExpression *node)
{ {
Q_UNUSED(node) Q_UNUSED(node);
} }
bool PrettyPretty::visit(AST::CallExpression *node) bool PrettyPretty::visit(AST::CallExpression *node)
@@ -445,7 +445,7 @@ bool PrettyPretty::visit(AST::CallExpression *node)
void PrettyPretty::endVisit(AST::CallExpression *node) void PrettyPretty::endVisit(AST::CallExpression *node)
{ {
Q_UNUSED(node) Q_UNUSED(node);
} }
bool PrettyPretty::visit(AST::ArgumentList *node) bool PrettyPretty::visit(AST::ArgumentList *node)
@@ -460,91 +460,91 @@ bool PrettyPretty::visit(AST::ArgumentList *node)
void PrettyPretty::endVisit(AST::ArgumentList *node) void PrettyPretty::endVisit(AST::ArgumentList *node)
{ {
Q_UNUSED(node) Q_UNUSED(node);
} }
bool PrettyPretty::visit(AST::PostIncrementExpression *node) bool PrettyPretty::visit(AST::PostIncrementExpression *node)
{ {
Q_UNUSED(node) Q_UNUSED(node);
return true; return true;
} }
void PrettyPretty::endVisit(AST::PostIncrementExpression *node) void PrettyPretty::endVisit(AST::PostIncrementExpression *node)
{ {
Q_UNUSED(node) Q_UNUSED(node);
out << "++"; out << "++";
} }
bool PrettyPretty::visit(AST::PostDecrementExpression *node) bool PrettyPretty::visit(AST::PostDecrementExpression *node)
{ {
Q_UNUSED(node) Q_UNUSED(node);
return true; return true;
} }
void PrettyPretty::endVisit(AST::PostDecrementExpression *node) void PrettyPretty::endVisit(AST::PostDecrementExpression *node)
{ {
Q_UNUSED(node) Q_UNUSED(node);
out << "--"; out << "--";
} }
bool PrettyPretty::visit(AST::DeleteExpression *node) bool PrettyPretty::visit(AST::DeleteExpression *node)
{ {
Q_UNUSED(node) Q_UNUSED(node);
out << "delete "; out << "delete ";
return true; return true;
} }
void PrettyPretty::endVisit(AST::DeleteExpression *node) void PrettyPretty::endVisit(AST::DeleteExpression *node)
{ {
Q_UNUSED(node) Q_UNUSED(node);
} }
bool PrettyPretty::visit(AST::VoidExpression *node) bool PrettyPretty::visit(AST::VoidExpression *node)
{ {
Q_UNUSED(node) Q_UNUSED(node);
out << "void "; out << "void ";
return true; return true;
} }
void PrettyPretty::endVisit(AST::VoidExpression *node) void PrettyPretty::endVisit(AST::VoidExpression *node)
{ {
Q_UNUSED(node) Q_UNUSED(node);
} }
bool PrettyPretty::visit(AST::TypeOfExpression *node) bool PrettyPretty::visit(AST::TypeOfExpression *node)
{ {
Q_UNUSED(node) Q_UNUSED(node);
out << "typeof "; out << "typeof ";
return true; return true;
} }
void PrettyPretty::endVisit(AST::TypeOfExpression *node) void PrettyPretty::endVisit(AST::TypeOfExpression *node)
{ {
Q_UNUSED(node) Q_UNUSED(node);
} }
bool PrettyPretty::visit(AST::PreIncrementExpression *node) bool PrettyPretty::visit(AST::PreIncrementExpression *node)
{ {
Q_UNUSED(node) Q_UNUSED(node);
out << "++"; out << "++";
return true; return true;
} }
void PrettyPretty::endVisit(AST::PreIncrementExpression *node) void PrettyPretty::endVisit(AST::PreIncrementExpression *node)
{ {
Q_UNUSED(node) Q_UNUSED(node);
} }
bool PrettyPretty::visit(AST::PreDecrementExpression *node) bool PrettyPretty::visit(AST::PreDecrementExpression *node)
{ {
Q_UNUSED(node) Q_UNUSED(node);
out << "--"; out << "--";
return true; return true;
} }
void PrettyPretty::endVisit(AST::PreDecrementExpression *node) void PrettyPretty::endVisit(AST::PreDecrementExpression *node)
{ {
Q_UNUSED(node) Q_UNUSED(node);
} }
bool PrettyPretty::visit(AST::UnaryPlusExpression *node) bool PrettyPretty::visit(AST::UnaryPlusExpression *node)
@@ -561,7 +561,7 @@ bool PrettyPretty::visit(AST::UnaryPlusExpression *node)
void PrettyPretty::endVisit(AST::UnaryPlusExpression *node) void PrettyPretty::endVisit(AST::UnaryPlusExpression *node)
{ {
Q_UNUSED(node) Q_UNUSED(node);
} }
bool PrettyPretty::visit(AST::UnaryMinusExpression *node) bool PrettyPretty::visit(AST::UnaryMinusExpression *node)
@@ -578,7 +578,7 @@ bool PrettyPretty::visit(AST::UnaryMinusExpression *node)
void PrettyPretty::endVisit(AST::UnaryMinusExpression *node) void PrettyPretty::endVisit(AST::UnaryMinusExpression *node)
{ {
Q_UNUSED(node) Q_UNUSED(node);
} }
bool PrettyPretty::visit(AST::TildeExpression *node) bool PrettyPretty::visit(AST::TildeExpression *node)
@@ -595,7 +595,7 @@ bool PrettyPretty::visit(AST::TildeExpression *node)
void PrettyPretty::endVisit(AST::TildeExpression *node) void PrettyPretty::endVisit(AST::TildeExpression *node)
{ {
Q_UNUSED(node) Q_UNUSED(node);
} }
bool PrettyPretty::visit(AST::NotExpression *node) bool PrettyPretty::visit(AST::NotExpression *node)
@@ -612,7 +612,7 @@ bool PrettyPretty::visit(AST::NotExpression *node)
void PrettyPretty::endVisit(AST::NotExpression *node) void PrettyPretty::endVisit(AST::NotExpression *node)
{ {
Q_UNUSED(node) Q_UNUSED(node);
} }
bool PrettyPretty::visit(AST::BinaryExpression *node) bool PrettyPretty::visit(AST::BinaryExpression *node)
@@ -712,7 +712,7 @@ bool PrettyPretty::visit(AST::BinaryExpression *node)
void PrettyPretty::endVisit(AST::BinaryExpression *node) void PrettyPretty::endVisit(AST::BinaryExpression *node)
{ {
Q_UNUSED(node) Q_UNUSED(node);
} }
bool PrettyPretty::visit(AST::ConditionalExpression *node) bool PrettyPretty::visit(AST::ConditionalExpression *node)
@@ -727,7 +727,7 @@ bool PrettyPretty::visit(AST::ConditionalExpression *node)
void PrettyPretty::endVisit(AST::ConditionalExpression *node) void PrettyPretty::endVisit(AST::ConditionalExpression *node)
{ {
Q_UNUSED(node) Q_UNUSED(node);
} }
bool PrettyPretty::visit(AST::Expression *node) bool PrettyPretty::visit(AST::Expression *node)
@@ -740,18 +740,18 @@ bool PrettyPretty::visit(AST::Expression *node)
void PrettyPretty::endVisit(AST::Expression *node) void PrettyPretty::endVisit(AST::Expression *node)
{ {
Q_UNUSED(node) Q_UNUSED(node);
} }
bool PrettyPretty::visit(AST::Block *node) bool PrettyPretty::visit(AST::Block *node)
{ {
Q_UNUSED(node) Q_UNUSED(node);
return true; return true;
} }
void PrettyPretty::endVisit(AST::Block *node) void PrettyPretty::endVisit(AST::Block *node)
{ {
Q_UNUSED(node) Q_UNUSED(node);
} }
bool PrettyPretty::visit(AST::StatementList *node) bool PrettyPretty::visit(AST::StatementList *node)
@@ -766,7 +766,7 @@ bool PrettyPretty::visit(AST::StatementList *node)
void PrettyPretty::endVisit(AST::StatementList *node) void PrettyPretty::endVisit(AST::StatementList *node)
{ {
Q_UNUSED(node) Q_UNUSED(node);
} }
bool PrettyPretty::visit(AST::VariableDeclarationList *node) bool PrettyPretty::visit(AST::VariableDeclarationList *node)
@@ -785,19 +785,19 @@ bool PrettyPretty::visit(AST::VariableDeclarationList *node)
void PrettyPretty::endVisit(AST::VariableDeclarationList *node) void PrettyPretty::endVisit(AST::VariableDeclarationList *node)
{ {
Q_UNUSED(node) Q_UNUSED(node);
} }
bool PrettyPretty::visit(AST::VariableStatement *node) bool PrettyPretty::visit(AST::VariableStatement *node)
{ {
out << "var "; out << "var ";
Q_UNUSED(node) Q_UNUSED(node);
return true; return true;
} }
void PrettyPretty::endVisit(AST::VariableStatement *node) void PrettyPretty::endVisit(AST::VariableStatement *node)
{ {
Q_UNUSED(node) Q_UNUSED(node);
out << ";"; out << ";";
} }
@@ -813,19 +813,19 @@ bool PrettyPretty::visit(AST::VariableDeclaration *node)
void PrettyPretty::endVisit(AST::VariableDeclaration *node) void PrettyPretty::endVisit(AST::VariableDeclaration *node)
{ {
Q_UNUSED(node) Q_UNUSED(node);
} }
bool PrettyPretty::visit(AST::EmptyStatement *node) bool PrettyPretty::visit(AST::EmptyStatement *node)
{ {
Q_UNUSED(node) Q_UNUSED(node);
out << ";"; out << ";";
return true; return true;
} }
void PrettyPretty::endVisit(AST::EmptyStatement *node) void PrettyPretty::endVisit(AST::EmptyStatement *node)
{ {
Q_UNUSED(node) Q_UNUSED(node);
} }
bool PrettyPretty::visit(AST::ExpressionStatement *node) bool PrettyPretty::visit(AST::ExpressionStatement *node)
@@ -837,7 +837,7 @@ bool PrettyPretty::visit(AST::ExpressionStatement *node)
void PrettyPretty::endVisit(AST::ExpressionStatement *node) void PrettyPretty::endVisit(AST::ExpressionStatement *node)
{ {
Q_UNUSED(node) Q_UNUSED(node);
} }
bool PrettyPretty::visit(AST::IfStatement *node) bool PrettyPretty::visit(AST::IfStatement *node)
@@ -855,7 +855,7 @@ bool PrettyPretty::visit(AST::IfStatement *node)
void PrettyPretty::endVisit(AST::IfStatement *node) void PrettyPretty::endVisit(AST::IfStatement *node)
{ {
Q_UNUSED(node) Q_UNUSED(node);
} }
bool PrettyPretty::visit(AST::DoWhileStatement *node) bool PrettyPretty::visit(AST::DoWhileStatement *node)
@@ -870,7 +870,7 @@ bool PrettyPretty::visit(AST::DoWhileStatement *node)
void PrettyPretty::endVisit(AST::DoWhileStatement *node) void PrettyPretty::endVisit(AST::DoWhileStatement *node)
{ {
Q_UNUSED(node) Q_UNUSED(node);
} }
bool PrettyPretty::visit(AST::WhileStatement *node) bool PrettyPretty::visit(AST::WhileStatement *node)
@@ -884,7 +884,7 @@ bool PrettyPretty::visit(AST::WhileStatement *node)
void PrettyPretty::endVisit(AST::WhileStatement *node) void PrettyPretty::endVisit(AST::WhileStatement *node)
{ {
Q_UNUSED(node) Q_UNUSED(node);
} }
bool PrettyPretty::visit(AST::ForStatement *node) bool PrettyPretty::visit(AST::ForStatement *node)
@@ -902,7 +902,7 @@ bool PrettyPretty::visit(AST::ForStatement *node)
void PrettyPretty::endVisit(AST::ForStatement *node) void PrettyPretty::endVisit(AST::ForStatement *node)
{ {
Q_UNUSED(node) Q_UNUSED(node);
} }
bool PrettyPretty::visit(AST::LocalForStatement *node) bool PrettyPretty::visit(AST::LocalForStatement *node)
@@ -920,7 +920,7 @@ bool PrettyPretty::visit(AST::LocalForStatement *node)
void PrettyPretty::endVisit(AST::LocalForStatement *node) void PrettyPretty::endVisit(AST::LocalForStatement *node)
{ {
Q_UNUSED(node) Q_UNUSED(node);
} }
bool PrettyPretty::visit(AST::ForEachStatement *node) bool PrettyPretty::visit(AST::ForEachStatement *node)
@@ -936,7 +936,7 @@ bool PrettyPretty::visit(AST::ForEachStatement *node)
void PrettyPretty::endVisit(AST::ForEachStatement *node) void PrettyPretty::endVisit(AST::ForEachStatement *node)
{ {
Q_UNUSED(node) Q_UNUSED(node);
} }
bool PrettyPretty::visit(AST::LocalForEachStatement *node) bool PrettyPretty::visit(AST::LocalForEachStatement *node)
@@ -952,7 +952,7 @@ bool PrettyPretty::visit(AST::LocalForEachStatement *node)
void PrettyPretty::endVisit(AST::LocalForEachStatement *node) void PrettyPretty::endVisit(AST::LocalForEachStatement *node)
{ {
Q_UNUSED(node) Q_UNUSED(node);
} }
bool PrettyPretty::visit(AST::ContinueStatement *node) bool PrettyPretty::visit(AST::ContinueStatement *node)
@@ -967,7 +967,7 @@ bool PrettyPretty::visit(AST::ContinueStatement *node)
void PrettyPretty::endVisit(AST::ContinueStatement *node) void PrettyPretty::endVisit(AST::ContinueStatement *node)
{ {
Q_UNUSED(node) Q_UNUSED(node);
} }
bool PrettyPretty::visit(AST::BreakStatement *node) bool PrettyPretty::visit(AST::BreakStatement *node)
@@ -982,7 +982,7 @@ bool PrettyPretty::visit(AST::BreakStatement *node)
void PrettyPretty::endVisit(AST::BreakStatement *node) void PrettyPretty::endVisit(AST::BreakStatement *node)
{ {
Q_UNUSED(node) Q_UNUSED(node);
} }
bool PrettyPretty::visit(AST::ReturnStatement *node) bool PrettyPretty::visit(AST::ReturnStatement *node)
@@ -998,7 +998,7 @@ bool PrettyPretty::visit(AST::ReturnStatement *node)
void PrettyPretty::endVisit(AST::ReturnStatement *node) void PrettyPretty::endVisit(AST::ReturnStatement *node)
{ {
Q_UNUSED(node) Q_UNUSED(node);
} }
bool PrettyPretty::visit(AST::WithStatement *node) bool PrettyPretty::visit(AST::WithStatement *node)
@@ -1012,7 +1012,7 @@ bool PrettyPretty::visit(AST::WithStatement *node)
void PrettyPretty::endVisit(AST::WithStatement *node) void PrettyPretty::endVisit(AST::WithStatement *node)
{ {
Q_UNUSED(node) Q_UNUSED(node);
} }
bool PrettyPretty::visit(AST::SwitchStatement *node) bool PrettyPretty::visit(AST::SwitchStatement *node)
@@ -1026,7 +1026,7 @@ bool PrettyPretty::visit(AST::SwitchStatement *node)
void PrettyPretty::endVisit(AST::SwitchStatement *node) void PrettyPretty::endVisit(AST::SwitchStatement *node)
{ {
Q_UNUSED(node) Q_UNUSED(node);
} }
bool PrettyPretty::visit(AST::CaseBlock *node) bool PrettyPretty::visit(AST::CaseBlock *node)
@@ -1045,7 +1045,7 @@ bool PrettyPretty::visit(AST::CaseBlock *node)
void PrettyPretty::endVisit(AST::CaseBlock *node) void PrettyPretty::endVisit(AST::CaseBlock *node)
{ {
Q_UNUSED(node) Q_UNUSED(node);
} }
bool PrettyPretty::visit(AST::CaseClauses *node) bool PrettyPretty::visit(AST::CaseClauses *node)
@@ -1060,7 +1060,7 @@ bool PrettyPretty::visit(AST::CaseClauses *node)
void PrettyPretty::endVisit(AST::CaseClauses *node) void PrettyPretty::endVisit(AST::CaseClauses *node)
{ {
Q_UNUSED(node) Q_UNUSED(node);
} }
bool PrettyPretty::visit(AST::CaseClause *node) bool PrettyPretty::visit(AST::CaseClause *node)
@@ -1077,12 +1077,12 @@ bool PrettyPretty::visit(AST::CaseClause *node)
void PrettyPretty::endVisit(AST::CaseClause *node) void PrettyPretty::endVisit(AST::CaseClause *node)
{ {
Q_UNUSED(node) Q_UNUSED(node);
} }
bool PrettyPretty::visit(AST::DefaultClause *node) bool PrettyPretty::visit(AST::DefaultClause *node)
{ {
Q_UNUSED(node) Q_UNUSED(node);
out << "default:"; out << "default:";
newlineAndIndent(); newlineAndIndent();
return true; return true;
@@ -1090,7 +1090,7 @@ bool PrettyPretty::visit(AST::DefaultClause *node)
void PrettyPretty::endVisit(AST::DefaultClause *node) void PrettyPretty::endVisit(AST::DefaultClause *node)
{ {
Q_UNUSED(node) Q_UNUSED(node);
} }
bool PrettyPretty::visit(AST::LabelledStatement *node) bool PrettyPretty::visit(AST::LabelledStatement *node)
@@ -1101,12 +1101,12 @@ bool PrettyPretty::visit(AST::LabelledStatement *node)
void PrettyPretty::endVisit(AST::LabelledStatement *node) void PrettyPretty::endVisit(AST::LabelledStatement *node)
{ {
Q_UNUSED(node) Q_UNUSED(node);
} }
bool PrettyPretty::visit(AST::ThrowStatement *node) bool PrettyPretty::visit(AST::ThrowStatement *node)
{ {
Q_UNUSED(node) Q_UNUSED(node);
out << "throw "; out << "throw ";
accept(node->expression); accept(node->expression);
out << ";"; out << ";";
@@ -1115,7 +1115,7 @@ bool PrettyPretty::visit(AST::ThrowStatement *node)
void PrettyPretty::endVisit(AST::ThrowStatement *node) void PrettyPretty::endVisit(AST::ThrowStatement *node)
{ {
Q_UNUSED(node) Q_UNUSED(node);
} }
bool PrettyPretty::visit(AST::TryStatement *node) bool PrettyPretty::visit(AST::TryStatement *node)
@@ -1135,30 +1135,30 @@ bool PrettyPretty::visit(AST::TryStatement *node)
void PrettyPretty::endVisit(AST::TryStatement *node) void PrettyPretty::endVisit(AST::TryStatement *node)
{ {
Q_UNUSED(node) Q_UNUSED(node);
} }
bool PrettyPretty::visit(AST::Catch *node) bool PrettyPretty::visit(AST::Catch *node)
{ {
Q_UNUSED(node) Q_UNUSED(node);
return true; return true;
} }
void PrettyPretty::endVisit(AST::Catch *node) void PrettyPretty::endVisit(AST::Catch *node)
{ {
Q_UNUSED(node) Q_UNUSED(node);
} }
bool PrettyPretty::visit(AST::Finally *node) bool PrettyPretty::visit(AST::Finally *node)
{ {
Q_UNUSED(node) Q_UNUSED(node);
out << "finally "; out << "finally ";
return true; return true;
} }
void PrettyPretty::endVisit(AST::Finally *node) void PrettyPretty::endVisit(AST::Finally *node)
{ {
Q_UNUSED(node) Q_UNUSED(node);
} }
bool PrettyPretty::visit(AST::FunctionDeclaration *node) bool PrettyPretty::visit(AST::FunctionDeclaration *node)
@@ -1197,7 +1197,7 @@ bool PrettyPretty::visit(AST::FunctionDeclaration *node)
void PrettyPretty::endVisit(AST::FunctionDeclaration *node) void PrettyPretty::endVisit(AST::FunctionDeclaration *node)
{ {
Q_UNUSED(node) Q_UNUSED(node);
} }
bool PrettyPretty::visit(AST::FunctionExpression *node) bool PrettyPretty::visit(AST::FunctionExpression *node)
@@ -1236,45 +1236,45 @@ bool PrettyPretty::visit(AST::FunctionExpression *node)
void PrettyPretty::endVisit(AST::FunctionExpression *node) void PrettyPretty::endVisit(AST::FunctionExpression *node)
{ {
Q_UNUSED(node) Q_UNUSED(node);
} }
bool PrettyPretty::visit(AST::FormalParameterList *node) bool PrettyPretty::visit(AST::FormalParameterList *node)
{ {
Q_UNUSED(node) Q_UNUSED(node);
return true; return true;
} }
void PrettyPretty::endVisit(AST::FormalParameterList *node) void PrettyPretty::endVisit(AST::FormalParameterList *node)
{ {
Q_UNUSED(node) Q_UNUSED(node);
} }
bool PrettyPretty::visit(AST::FunctionBody *node) bool PrettyPretty::visit(AST::FunctionBody *node)
{ {
Q_UNUSED(node) Q_UNUSED(node);
return true; return true;
} }
void PrettyPretty::endVisit(AST::FunctionBody *node) void PrettyPretty::endVisit(AST::FunctionBody *node)
{ {
Q_UNUSED(node) Q_UNUSED(node);
} }
bool PrettyPretty::visit(AST::Program *node) bool PrettyPretty::visit(AST::Program *node)
{ {
Q_UNUSED(node) Q_UNUSED(node);
return true; return true;
} }
void PrettyPretty::endVisit(AST::Program *node) void PrettyPretty::endVisit(AST::Program *node)
{ {
Q_UNUSED(node) Q_UNUSED(node);
} }
bool PrettyPretty::visit(AST::SourceElements *node) bool PrettyPretty::visit(AST::SourceElements *node)
{ {
Q_UNUSED(node) Q_UNUSED(node);
accept(node->element); accept(node->element);
for (node = node->next; node != 0; node = node->next) { for (node = node->next; node != 0; node = node->next) {
newlineAndIndent(); newlineAndIndent();
@@ -1285,47 +1285,47 @@ bool PrettyPretty::visit(AST::SourceElements *node)
void PrettyPretty::endVisit(AST::SourceElements *node) void PrettyPretty::endVisit(AST::SourceElements *node)
{ {
Q_UNUSED(node) Q_UNUSED(node);
} }
bool PrettyPretty::visit(AST::FunctionSourceElement *node) bool PrettyPretty::visit(AST::FunctionSourceElement *node)
{ {
Q_UNUSED(node) Q_UNUSED(node);
return true; return true;
} }
void PrettyPretty::endVisit(AST::FunctionSourceElement *node) void PrettyPretty::endVisit(AST::FunctionSourceElement *node)
{ {
Q_UNUSED(node) Q_UNUSED(node);
} }
bool PrettyPretty::visit(AST::StatementSourceElement *node) bool PrettyPretty::visit(AST::StatementSourceElement *node)
{ {
Q_UNUSED(node) Q_UNUSED(node);
return true; return true;
} }
void PrettyPretty::endVisit(AST::StatementSourceElement *node) void PrettyPretty::endVisit(AST::StatementSourceElement *node)
{ {
Q_UNUSED(node) Q_UNUSED(node);
} }
bool PrettyPretty::visit(AST::DebuggerStatement *node) bool PrettyPretty::visit(AST::DebuggerStatement *node)
{ {
Q_UNUSED(node) Q_UNUSED(node);
out << "debugger"; out << "debugger";
return true; return true;
} }
void PrettyPretty::endVisit(AST::DebuggerStatement *node) void PrettyPretty::endVisit(AST::DebuggerStatement *node)
{ {
Q_UNUSED(node) Q_UNUSED(node);
out << ";"; out << ";";
} }
bool PrettyPretty::preVisit(AST::Node *node) bool PrettyPretty::preVisit(AST::Node *node)
{ {
Q_UNUSED(node) Q_UNUSED(node);
return true; return true;
} }

View File

@@ -1,9 +1,9 @@
/**************************************************************************** /****************************************************************************
** **
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** 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$ ** $QT_BEGIN_LICENSE:LGPL$
** No Commercial Usage ** No Commercial Usage
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html. ** met: http://www.gnu.org/copyleft/gpl.html.
** **
** If you are unsure which license is appropriate for your use, please ** 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$ ** $QT_END_LICENSE$
** **
****************************************************************************/ ****************************************************************************/