typedef CYList<CYStatement> CYStatements;
+struct CYForInitializer :
+ CYStatement
+{
+ virtual CYForInitializer *Replace(CYContext &context) = 0;
+ virtual void Output(CYOutput &out, CYFlags flags) const = 0;
+};
+
struct CYWord :
CYThing,
CYPropertyName
virtual CYStatement *Return();
};
-struct CYForInitializer {
- virtual CYExpression *Replace(CYContext &context) = 0;
- virtual void Output(CYOutput &out, CYFlags flags) const = 0;
-};
-
struct CYTarget;
struct CYVar;
struct CYString;
struct CYExpression :
- CYForInitializer,
CYThing
{
virtual int Precedence() const = 0;
virtual void Output(CYOutput &out, CYFlags flags) const;
};
-struct CYForDeclarations :
- CYForInitializer
-{
- CYDeclarations *declarations_;
-
- CYForDeclarations(CYDeclarations *declarations) :
- declarations_(declarations)
- {
- }
-
- virtual CYExpression *Replace(CYContext &context);
- virtual void Output(CYOutput &out, CYFlags flags) const;
-};
-
struct CYVar :
- CYStatement
+ CYForInitializer
{
CYDeclarations *declarations_;
CYCompact(None)
- virtual CYStatement *Replace(CYContext &context);
+ virtual CYForInitializer *Replace(CYContext &context);
virtual void Output(CYOutput &out, CYFlags flags) const;
};
struct CYLet :
- CYStatement
+ CYForInitializer
{
bool constant_;
CYDeclarations *declarations_;
CYCompact(None)
- virtual CYStatement *Replace(CYContext &context);
+ virtual CYForInitializer *Replace(CYContext &context);
virtual void Output(CYOutput &out, CYFlags flags) const;
};
};
struct CYExpress :
- CYStatement
+ CYForInitializer
{
CYExpression *expression_;
CYCompact(None)
- CYStatement *Replace(CYContext &context) override;
+ CYForInitializer *Replace(CYContext &context) override;
virtual void Output(CYOutput &out, CYFlags flags) const;
virtual CYStatement *Return();
};
struct CYEmpty :
- CYStatement
+ CYForInitializer
{
CYCompact(Short)
- virtual CYStatement *Replace(CYContext &context);
+ virtual CYForInitializer *Replace(CYContext &context);
virtual void Output(CYOutput &out, CYFlags flags) const;
};