2010-01-18 16:15:23 +01:00
|
|
|
/**************************************************************************
|
|
|
|
**
|
|
|
|
** This file is part of Qt Creator
|
|
|
|
**
|
2011-01-11 16:28:15 +01:00
|
|
|
** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
|
2010-01-18 16:15:23 +01:00
|
|
|
**
|
2011-04-13 08:42:33 +02:00
|
|
|
** Contact: Nokia Corporation (info@qt.nokia.com)
|
2010-01-18 16:15:23 +01:00
|
|
|
**
|
|
|
|
**
|
|
|
|
** GNU Lesser General Public License Usage
|
|
|
|
**
|
2011-04-13 08:42:33 +02:00
|
|
|
** 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 packaging of this file.
|
|
|
|
** Please review the following information to 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.
|
2010-01-18 16:15:23 +01:00
|
|
|
**
|
2010-12-17 16:01:08 +01:00
|
|
|
** In addition, as a special exception, Nokia gives you certain additional
|
2011-04-13 08:42:33 +02:00
|
|
|
** rights. These rights are described in the Nokia Qt LGPL Exception
|
2010-12-17 16:01:08 +01:00
|
|
|
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
|
|
|
**
|
2011-04-13 08:42:33 +02:00
|
|
|
** Other Usage
|
|
|
|
**
|
|
|
|
** Alternatively, this file may be used in accordance with the terms and
|
|
|
|
** conditions contained in a signed written agreement between you and Nokia.
|
|
|
|
**
|
2010-12-17 16:01:08 +01:00
|
|
|
** If you have questions regarding the use of this file, please contact
|
2011-05-06 15:05:37 +02:00
|
|
|
** Nokia at info@qt.nokia.com.
|
2010-01-18 16:15:23 +01:00
|
|
|
**
|
|
|
|
**************************************************************************/
|
|
|
|
|
|
|
|
#include "parser/qmljsast_p.h"
|
2010-01-26 14:50:52 +01:00
|
|
|
#include "qmljsbind.h"
|
2010-09-16 15:29:37 +02:00
|
|
|
#include "qmljscheck.h"
|
2010-02-03 15:59:15 +01:00
|
|
|
#include "qmljsdocument.h"
|
2010-02-01 17:04:31 +01:00
|
|
|
|
2010-12-03 11:17:25 +01:00
|
|
|
#include <languageutils/componentversion.h>
|
|
|
|
|
2010-02-01 17:04:31 +01:00
|
|
|
#include <QtCore/QDir>
|
|
|
|
#include <QtCore/QFileInfo>
|
2010-01-26 17:23:18 +01:00
|
|
|
#include <QtCore/QDebug>
|
2010-01-18 16:15:23 +01:00
|
|
|
|
2010-12-03 11:17:25 +01:00
|
|
|
using namespace LanguageUtils;
|
2010-01-18 16:15:23 +01:00
|
|
|
using namespace QmlJS;
|
2010-01-26 14:50:52 +01:00
|
|
|
using namespace QmlJS::AST;
|
|
|
|
using namespace QmlJS::Interpreter;
|
2010-01-18 16:15:23 +01:00
|
|
|
|
2010-09-15 15:25:59 +02:00
|
|
|
/*!
|
|
|
|
\class QmlJS::Bind
|
|
|
|
\brief Collected information about a single Document.
|
|
|
|
\sa QmlJS::Document QmlJS::Link
|
|
|
|
|
|
|
|
Each QmlJS::Document owns a instance of Bind. It provides access to data
|
|
|
|
that can be derived by looking at the document in isolation. If you need
|
|
|
|
information that goes beyond that, you need to create a
|
|
|
|
\l{QmlJS::Interpreter::Context} using \l{QmlJS::Link}.
|
|
|
|
|
2010-09-16 09:40:19 +02:00
|
|
|
The document's imports are classified and available through imports().
|
2010-09-15 15:25:59 +02:00
|
|
|
|
|
|
|
It allows AST to code model lookup through findQmlObject() and findFunctionScope().
|
|
|
|
*/
|
|
|
|
|
2010-09-16 15:29:37 +02:00
|
|
|
Bind::Bind(Document *doc, QList<DiagnosticMessage> *messages)
|
2010-01-26 16:21:03 +01:00
|
|
|
: _doc(doc),
|
2010-01-26 15:51:31 +01:00
|
|
|
_currentObjectValue(0),
|
|
|
|
_idEnvironment(0),
|
2010-09-16 15:29:37 +02:00
|
|
|
_rootObjectValue(0),
|
|
|
|
_diagnosticMessages(messages)
|
2010-01-18 16:15:23 +01:00
|
|
|
{
|
2010-02-03 14:31:03 +01:00
|
|
|
if (_doc)
|
|
|
|
accept(_doc->ast());
|
2010-01-18 16:15:23 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
Bind::~Bind()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2010-09-16 15:29:37 +02:00
|
|
|
QList<ImportInfo> Bind::imports() const
|
2010-02-01 17:20:46 +01:00
|
|
|
{
|
2010-09-16 09:40:19 +02:00
|
|
|
return _imports;
|
2010-04-06 09:52:29 +02:00
|
|
|
}
|
|
|
|
|
2010-02-10 17:05:45 +01:00
|
|
|
Interpreter::ObjectValue *Bind::idEnvironment() const
|
|
|
|
{
|
|
|
|
return _idEnvironment;
|
|
|
|
}
|
|
|
|
|
|
|
|
Interpreter::ObjectValue *Bind::rootObjectValue() const
|
|
|
|
{
|
|
|
|
return _rootObjectValue;
|
|
|
|
}
|
|
|
|
|
|
|
|
Interpreter::ObjectValue *Bind::findQmlObject(AST::Node *node) const
|
|
|
|
{
|
|
|
|
return _qmlObjects.value(node);
|
|
|
|
}
|
|
|
|
|
2010-02-11 18:58:17 +01:00
|
|
|
bool Bind::usesQmlPrototype(ObjectValue *prototype,
|
2010-08-25 11:51:34 +02:00
|
|
|
const Context *context) const
|
2010-02-11 18:58:17 +01:00
|
|
|
{
|
2010-11-23 12:57:48 +01:00
|
|
|
if (!prototype)
|
|
|
|
return false;
|
|
|
|
|
|
|
|
const QString componentName = prototype->className();
|
|
|
|
|
|
|
|
// all component objects have classname set
|
|
|
|
if (componentName.isEmpty())
|
|
|
|
return false;
|
|
|
|
|
|
|
|
// get a list of all the names that may refer to this component
|
|
|
|
// this can only happen for file imports with an 'as' clause
|
|
|
|
// if there aren't any, possibleNames will be left empty
|
|
|
|
QSet<QString> possibleNames;
|
|
|
|
foreach (const ImportInfo &import, imports()) {
|
|
|
|
if (import.type() == ImportInfo::FileImport
|
|
|
|
&& !import.id().isEmpty()
|
|
|
|
&& import.name().contains(componentName)) {
|
|
|
|
possibleNames.insert(import.id());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (!possibleNames.isEmpty())
|
|
|
|
possibleNames.insert(componentName);
|
|
|
|
|
|
|
|
// if there are no renamed imports and the document does not use
|
|
|
|
// the className string anywhere, it's out
|
|
|
|
if (possibleNames.isEmpty()) {
|
|
|
|
NameId nameId(componentName.data(), componentName.size());
|
|
|
|
if (!_doc->engine()->literals().contains(nameId))
|
|
|
|
return false;
|
|
|
|
}
|
2010-10-20 14:48:38 +02:00
|
|
|
|
2010-11-23 12:57:48 +01:00
|
|
|
QHashIterator<Node *, ObjectValue *> it(_qmlObjects);
|
|
|
|
while (it.hasNext()) {
|
|
|
|
it.next();
|
|
|
|
|
|
|
|
// if the type id does not contain one of the possible names, skip
|
|
|
|
Node *node = it.key();
|
|
|
|
UiQualifiedId *id = 0;
|
|
|
|
if (UiObjectDefinition *n = cast<UiObjectDefinition *>(node)) {
|
|
|
|
id = n->qualifiedTypeNameId;
|
|
|
|
} else if (UiObjectBinding *n = cast<UiObjectBinding *>(node)) {
|
|
|
|
id = n->qualifiedTypeNameId;
|
|
|
|
}
|
|
|
|
if (!id)
|
|
|
|
continue;
|
|
|
|
|
|
|
|
bool skip = false;
|
|
|
|
// optimize the common case of no renamed imports
|
|
|
|
if (possibleNames.isEmpty()) {
|
|
|
|
for (UiQualifiedId *idIt = id; idIt; idIt = idIt->next) {
|
|
|
|
if (!idIt->next && idIt->name->asString() != componentName)
|
|
|
|
skip = true;
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
for (UiQualifiedId *idIt = id; idIt; idIt = idIt->next) {
|
|
|
|
if (!idIt->next && !possibleNames.contains(idIt->name->asString()))
|
|
|
|
skip = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (skip)
|
|
|
|
continue;
|
|
|
|
|
|
|
|
// resolve and check the prototype
|
|
|
|
const ObjectValue *object = it.value();
|
2010-02-11 18:58:17 +01:00
|
|
|
const ObjectValue *resolvedPrototype = object->prototype(context);
|
|
|
|
if (resolvedPrototype == prototype)
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2010-11-16 13:53:39 +01:00
|
|
|
Interpreter::ObjectValue *Bind::findFunctionScope(AST::FunctionExpression *node) const
|
2010-04-20 15:19:37 +02:00
|
|
|
{
|
|
|
|
return _functionScopes.value(node);
|
|
|
|
}
|
|
|
|
|
2010-05-12 13:58:23 +02:00
|
|
|
bool Bind::isGroupedPropertyBinding(AST::Node *node) const
|
|
|
|
{
|
|
|
|
return _groupedPropertyBindings.contains(node);
|
|
|
|
}
|
|
|
|
|
2010-02-01 12:26:40 +01:00
|
|
|
ObjectValue *Bind::switchObjectValue(ObjectValue *newObjectValue)
|
2010-01-18 16:15:23 +01:00
|
|
|
{
|
2010-02-01 12:26:40 +01:00
|
|
|
ObjectValue *oldObjectValue = _currentObjectValue;
|
|
|
|
_currentObjectValue = newObjectValue;
|
|
|
|
return oldObjectValue;
|
2010-01-28 14:53:53 +01:00
|
|
|
}
|
2010-01-26 14:50:52 +01:00
|
|
|
|
2010-02-01 12:17:39 +01:00
|
|
|
QString Bind::toString(UiQualifiedId *qualifiedId, QChar delimiter)
|
|
|
|
{
|
|
|
|
QString result;
|
|
|
|
|
|
|
|
for (UiQualifiedId *iter = qualifiedId; iter; iter = iter->next) {
|
|
|
|
if (iter != qualifiedId)
|
|
|
|
result += delimiter;
|
|
|
|
|
|
|
|
if (iter->name)
|
|
|
|
result += iter->name->asString();
|
|
|
|
}
|
|
|
|
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
|
2010-02-01 12:26:40 +01:00
|
|
|
ObjectValue *Bind::bindObject(UiQualifiedId *qualifiedTypeNameId, UiObjectInitializer *initializer)
|
2010-01-18 16:15:23 +01:00
|
|
|
{
|
2010-02-01 17:04:31 +01:00
|
|
|
ObjectValue *parentObjectValue = 0;
|
2010-01-18 16:15:23 +01:00
|
|
|
|
2010-02-01 17:04:31 +01:00
|
|
|
// normal component instance
|
2010-02-10 17:05:45 +01:00
|
|
|
ASTObjectValue *objectValue = new ASTObjectValue(qualifiedTypeNameId, initializer, _doc, &_engine);
|
2010-02-04 09:44:43 +01:00
|
|
|
QmlPrototypeReference *prototypeReference =
|
2010-02-10 17:05:45 +01:00
|
|
|
new QmlPrototypeReference(qualifiedTypeNameId, _doc, &_engine);
|
2010-02-03 15:39:57 +01:00
|
|
|
objectValue->setPrototype(prototypeReference);
|
|
|
|
|
2010-02-01 17:04:31 +01:00
|
|
|
parentObjectValue = switchObjectValue(objectValue);
|
|
|
|
|
|
|
|
if (parentObjectValue)
|
|
|
|
objectValue->setProperty(QLatin1String("parent"), parentObjectValue);
|
2010-04-22 15:44:42 +02:00
|
|
|
else {
|
2010-02-01 17:04:31 +01:00
|
|
|
_rootObjectValue = objectValue;
|
2010-04-22 15:44:42 +02:00
|
|
|
_rootObjectValue->setClassName(_doc->componentName());
|
|
|
|
}
|
2010-02-01 17:04:31 +01:00
|
|
|
|
2010-02-01 12:26:40 +01:00
|
|
|
accept(initializer);
|
|
|
|
|
|
|
|
return switchObjectValue(parentObjectValue);
|
2010-01-18 16:15:23 +01:00
|
|
|
}
|
|
|
|
|
2010-02-01 12:26:40 +01:00
|
|
|
void Bind::accept(Node *node)
|
2010-01-18 16:15:23 +01:00
|
|
|
{
|
2010-02-01 12:26:40 +01:00
|
|
|
Node::accept(node, this);
|
2010-01-18 16:15:23 +01:00
|
|
|
}
|
|
|
|
|
2010-02-03 14:31:03 +01:00
|
|
|
bool Bind::visit(AST::UiProgram *)
|
|
|
|
{
|
2010-02-10 17:05:45 +01:00
|
|
|
_idEnvironment = _engine.newObject(/*prototype =*/ 0);
|
2010-02-03 14:31:03 +01:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool Bind::visit(AST::Program *)
|
|
|
|
{
|
2010-02-11 18:58:17 +01:00
|
|
|
_currentObjectValue = _engine.newObject(/*prototype =*/ 0);
|
|
|
|
_rootObjectValue = _currentObjectValue;
|
2010-02-03 14:31:03 +01:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2010-04-06 09:52:29 +02:00
|
|
|
bool Bind::visit(UiImport *ast)
|
2010-01-18 16:15:23 +01:00
|
|
|
{
|
2010-09-16 15:29:37 +02:00
|
|
|
ComponentVersion version;
|
|
|
|
ImportInfo::Type type = ImportInfo::InvalidImport;
|
|
|
|
QString name;
|
2010-05-20 15:19:42 +02:00
|
|
|
|
|
|
|
if (ast->versionToken.isValid()) {
|
|
|
|
const QString versionString = _doc->source().mid(ast->versionToken.offset, ast->versionToken.length);
|
2011-02-08 11:01:37 +01:00
|
|
|
version = ComponentVersion(versionString);
|
|
|
|
if (!version.isValid()) {
|
2010-09-16 15:29:37 +02:00
|
|
|
_diagnosticMessages->append(
|
|
|
|
errorMessage(ast->versionToken, tr("expected two numbers separated by a dot")));
|
2010-05-20 15:19:42 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2010-04-06 09:52:29 +02:00
|
|
|
if (ast->importUri) {
|
2010-09-16 15:29:37 +02:00
|
|
|
type = ImportInfo::LibraryImport;
|
|
|
|
name = toString(ast->importUri, QDir::separator());
|
|
|
|
|
|
|
|
if (!version.isValid()) {
|
|
|
|
_diagnosticMessages->append(
|
|
|
|
errorMessage(ast, tr("package import requires a version number")));
|
|
|
|
}
|
2010-04-06 09:52:29 +02:00
|
|
|
} else if (ast->fileName) {
|
2010-09-16 15:29:37 +02:00
|
|
|
const QFileInfo importFileInfo(_doc->path() + QDir::separator() + ast->fileName->asString());
|
|
|
|
name = importFileInfo.absoluteFilePath();
|
2010-04-22 16:32:28 +02:00
|
|
|
if (importFileInfo.isFile())
|
2010-09-16 15:29:37 +02:00
|
|
|
type = ImportInfo::FileImport;
|
2010-04-22 16:32:28 +02:00
|
|
|
else if (importFileInfo.isDir())
|
2010-09-16 15:29:37 +02:00
|
|
|
type = ImportInfo::DirectoryImport;
|
|
|
|
else {
|
|
|
|
_diagnosticMessages->append(
|
|
|
|
errorMessage(ast, tr("file or directory not found")));
|
|
|
|
type = ImportInfo::UnknownFileImport;
|
|
|
|
}
|
2010-04-06 09:52:29 +02:00
|
|
|
}
|
2010-09-16 15:29:37 +02:00
|
|
|
_imports += ImportInfo(type, name, version, ast);
|
2010-04-06 09:52:29 +02:00
|
|
|
|
2010-01-26 14:50:52 +01:00
|
|
|
return false;
|
2010-01-18 16:15:23 +01:00
|
|
|
}
|
|
|
|
|
2010-02-01 16:40:42 +01:00
|
|
|
bool Bind::visit(UiPublicMember *)
|
2010-01-18 16:15:23 +01:00
|
|
|
{
|
2010-02-01 16:40:42 +01:00
|
|
|
// nothing to do.
|
2010-09-28 15:50:42 +02:00
|
|
|
return true;
|
2010-01-18 16:15:23 +01:00
|
|
|
}
|
|
|
|
|
2010-01-26 14:50:52 +01:00
|
|
|
bool Bind::visit(UiObjectDefinition *ast)
|
|
|
|
{
|
2010-05-12 13:58:23 +02:00
|
|
|
// an UiObjectDefinition may be used to group property bindings
|
|
|
|
// think anchors { ... }
|
|
|
|
bool isGroupedBinding = false;
|
|
|
|
for (UiQualifiedId *it = ast->qualifiedTypeNameId; it; it = it->next) {
|
2010-10-14 15:14:35 +02:00
|
|
|
if (!it->next && it->name)
|
2010-05-12 13:58:23 +02:00
|
|
|
isGroupedBinding = it->name->asString().at(0).isLower();
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!isGroupedBinding) {
|
|
|
|
ObjectValue *value = bindObject(ast->qualifiedTypeNameId, ast->initializer);
|
|
|
|
_qmlObjects.insert(ast, value);
|
|
|
|
} else {
|
|
|
|
_groupedPropertyBindings.insert(ast);
|
|
|
|
}
|
2010-01-26 14:50:52 +01:00
|
|
|
|
|
|
|
return false;
|
2010-01-18 16:15:23 +01:00
|
|
|
}
|
|
|
|
|
2010-01-26 14:50:52 +01:00
|
|
|
bool Bind::visit(UiObjectBinding *ast)
|
|
|
|
{
|
|
|
|
// const QString name = serialize(ast->qualifiedId);
|
|
|
|
ObjectValue *value = bindObject(ast->qualifiedTypeNameId, ast->initializer);
|
2010-02-02 17:06:48 +01:00
|
|
|
_qmlObjects.insert(ast, value);
|
2010-01-26 14:50:52 +01:00
|
|
|
// ### FIXME: we don't handle dot-properties correctly (i.e. font.size)
|
|
|
|
// _currentObjectValue->setProperty(name, value);
|
|
|
|
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool Bind::visit(UiScriptBinding *ast)
|
|
|
|
{
|
2010-02-01 12:17:39 +01:00
|
|
|
if (toString(ast->qualifiedId) == QLatin1String("id")) {
|
2010-01-26 14:50:52 +01:00
|
|
|
if (ExpressionStatement *e = cast<ExpressionStatement*>(ast->statement))
|
|
|
|
if (IdentifierExpression *i = cast<IdentifierExpression*>(e->expression))
|
|
|
|
if (i->name)
|
|
|
|
_idEnvironment->setProperty(i->name->asString(), _currentObjectValue);
|
2010-02-01 12:17:39 +01:00
|
|
|
}
|
2010-01-26 14:50:52 +01:00
|
|
|
|
2010-11-16 13:53:39 +01:00
|
|
|
return true;
|
2010-01-26 14:50:52 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
bool Bind::visit(UiArrayBinding *)
|
2010-01-18 16:15:23 +01:00
|
|
|
{
|
2010-01-26 14:50:52 +01:00
|
|
|
// ### FIXME: do we need to store the members into the property? Or, maybe the property type is an JS Array?
|
|
|
|
|
2010-01-18 16:15:23 +01:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2010-02-03 14:31:03 +01:00
|
|
|
bool Bind::visit(VariableDeclaration *ast)
|
|
|
|
{
|
|
|
|
if (! ast->name)
|
|
|
|
return false;
|
|
|
|
|
2010-02-10 17:05:45 +01:00
|
|
|
ASTVariableReference *ref = new ASTVariableReference(ast, &_engine);
|
2010-02-03 14:31:03 +01:00
|
|
|
_currentObjectValue->setProperty(ast->name->asString(), ref);
|
2010-11-24 14:42:10 +01:00
|
|
|
return true;
|
2010-02-03 14:31:03 +01:00
|
|
|
}
|
|
|
|
|
2010-11-16 13:53:39 +01:00
|
|
|
bool Bind::visit(FunctionExpression *ast)
|
2010-01-18 16:15:23 +01:00
|
|
|
{
|
2010-02-03 15:39:57 +01:00
|
|
|
// ### FIXME: the first declaration counts
|
|
|
|
//if (_currentObjectValue->property(ast->name->asString(), 0))
|
|
|
|
// return false;
|
2010-01-26 18:07:35 +01:00
|
|
|
|
2010-07-16 10:50:28 +02:00
|
|
|
ASTFunctionValue *function = new ASTFunctionValue(ast, _doc, &_engine);
|
2010-11-24 14:42:10 +01:00
|
|
|
if (ast->name && cast<FunctionDeclaration *>(ast))
|
|
|
|
_currentObjectValue->setProperty(ast->name->asString(), function);
|
2010-02-02 16:36:14 +01:00
|
|
|
|
2010-04-20 15:19:37 +02:00
|
|
|
// build function scope
|
|
|
|
ObjectValue *functionScope = _engine.newObject(/*prototype=*/0);
|
|
|
|
_functionScopes.insert(ast, functionScope);
|
|
|
|
ObjectValue *parent = switchObjectValue(functionScope);
|
|
|
|
|
|
|
|
// The order of the following is important. Example: A function with name "arguments"
|
|
|
|
// overrides the arguments object, a variable doesn't.
|
|
|
|
|
|
|
|
// 1. Function formal arguments
|
|
|
|
for (FormalParameterList *it = ast->formals; it; it = it->next) {
|
|
|
|
if (it->name)
|
|
|
|
functionScope->setProperty(it->name->asString(), _engine.undefinedValue());
|
|
|
|
}
|
|
|
|
|
|
|
|
// 2. Functions defined inside the function body
|
|
|
|
// ### TODO, currently covered by the accept(body)
|
|
|
|
|
|
|
|
// 3. Arguments object
|
|
|
|
ObjectValue *arguments = _engine.newObject(/*prototype=*/0);
|
|
|
|
arguments->setProperty(QLatin1String("callee"), function);
|
|
|
|
arguments->setProperty(QLatin1String("length"), _engine.numberValue());
|
|
|
|
functionScope->setProperty(QLatin1String("arguments"), arguments);
|
|
|
|
|
|
|
|
// 4. Variables defined inside the function body
|
|
|
|
// ### TODO, currently covered by the accept(body)
|
|
|
|
|
|
|
|
// visit body
|
|
|
|
accept(ast->body);
|
|
|
|
switchObjectValue(parent);
|
|
|
|
|
|
|
|
return false;
|
2010-01-18 16:15:23 +01:00
|
|
|
}
|
2010-11-16 13:53:39 +01:00
|
|
|
|
|
|
|
bool Bind::visit(FunctionDeclaration *ast)
|
|
|
|
{
|
|
|
|
return visit(static_cast<FunctionExpression *>(ast));
|
|
|
|
}
|