return this;
}
- virtual const char *Name() const = 0;
-
virtual CYFunctionParameter *Parameter(CYContext &context) const = 0;
CYFunctionParameter *Parameters(CYContext &context) const;
virtual CYStatement *Replace(CYContext &context, CYStatement *statement) const;
struct CYForInComprehension :
CYComprehension
{
- CYIdentifier *name_;
+ CYDeclaration *declaration_;
CYExpression *set_;
- CYForInComprehension(CYIdentifier *name, CYExpression *set, CYComprehension *next = NULL) :
+ CYForInComprehension(CYDeclaration *declaration, CYExpression *set, CYComprehension *next = NULL) :
CYComprehension(next),
- name_(name),
+ declaration_(declaration),
set_(set)
{
}
- virtual const char *Name() const {
- return name_->Word();
- }
-
virtual CYFunctionParameter *Parameter(CYContext &context) const;
virtual CYStatement *Replace(CYContext &context, CYStatement *statement) const;
virtual void Output(CYOutput &out) const;
struct CYForOfComprehension :
CYComprehension
{
- CYIdentifier *name_;
+ CYDeclaration *declaration_;
CYExpression *set_;
- CYForOfComprehension(CYIdentifier *name, CYExpression *set, CYComprehension *next = NULL) :
+ CYForOfComprehension(CYDeclaration *declaration, CYExpression *set, CYComprehension *next = NULL) :
CYComprehension(next),
- name_(name),
+ declaration_(declaration),
set_(set)
{
}
- virtual const char *Name() const {
- return name_->Word();
- }
-
virtual CYFunctionParameter *Parameter(CYContext &context) const;
virtual CYStatement *Replace(CYContext &context, CYStatement *statement) const;
virtual void Output(CYOutput &out) const;
{
}
- virtual const char *Name() const {
- return NULL;
- }
-
virtual CYFunctionParameter *Parameter(CYContext &context) const;
virtual CYStatement *Replace(CYContext &context, CYStatement *statement) const;
virtual void Output(CYOutput &out) const;