+struct CYTypeModifier :
+ CYNext<CYTypeModifier>
+{
+ CYTypeModifier(CYTypeModifier *next) :
+ CYNext<CYTypeModifier>(next)
+ {
+ }
+
+ virtual CYExpression *Replace(CYContext &context) = 0;
+};
+
+struct CYTypeArrayOf :
+ CYTypeModifier
+{
+ CYExpression *size_;
+
+ CYTypeArrayOf(CYExpression *size, CYTypeModifier *next = NULL) :
+ CYTypeModifier(next),
+ size_(size)
+ {
+ }
+
+ CYPrecedence(2)
+
+ virtual CYExpression *Replace(CYContext &context);
+};
+
+struct CYTypeConstant :
+ CYTypeModifier
+{
+ CYTypeConstant(CYTypeModifier *next = NULL) :
+ CYTypeModifier(next)
+ {
+ }
+
+ CYPrecedence(3)
+
+ virtual CYExpression *Replace(CYContext &context);
+};
+
+struct CYTypePointerTo :
+ CYTypeModifier
+{
+ CYTypePointerTo(CYTypeModifier *next = NULL) :
+ CYTypeModifier(next)
+ {
+ }
+
+ CYPrecedence(3)
+
+ virtual CYExpression *Replace(CYContext &context);
+};
+
+struct CYTypeVariable :
+ CYTypeModifier
+{
+ CYExpression *expression_;
+
+ CYTypeVariable(CYExpression *expression) :
+ CYTypeModifier(NULL),
+ expression_(expression)
+ {
+ }
+
+ CYPrecedence(1)
+
+ virtual CYExpression *Replace(CYContext &context);
+};
+
+struct CYTypedIdentifier :
+ CYNext<CYTypedIdentifier>,
+ CYThing
+{
+ CYIdentifier *identifier_;
+ CYTypeModifier *type_;
+
+ CYTypedIdentifier(CYIdentifier *identifier) :
+ identifier_(identifier),
+ type_(NULL)
+ {
+ }
+
+ virtual void Output(CYOutput &out) const;
+};
+
+struct CYTypedParameter :
+ CYNext<CYTypedParameter>
+{
+ CYTypedIdentifier *typed_;
+
+ CYTypedParameter(CYTypedIdentifier *typed, CYTypedParameter *next) :
+ CYNext<CYTypedParameter>(next),
+ typed_(typed)
+ {
+ }
+
+ CYFunctionParameter *Parameters(CYContext &context);
+ CYExpression *TypeSignature(CYContext &context, CYExpression *prefix);
+};
+
+struct CYLambda :
+ CYExpression
+{
+ CYTypeModifier *type_;
+ CYTypedParameter *parameters_;
+ CYStatement *statements_;
+
+ CYLambda(CYTypeModifier *type, CYTypedParameter *parameters, CYStatement *statements) :
+ type_(type),
+ parameters_(parameters),
+ statements_(statements)
+ {
+ }
+
+ CYPrecedence(1)
+
+ virtual CYExpression *Replace(CYContext &context);
+ virtual void Output(CYOutput &out, CYFlags flags) const;
+};
+
+struct CYTypeDefinition :
+ CYStatement
+{
+ CYTypedIdentifier *typed_;
+
+ CYTypeDefinition(CYTypedIdentifier *typed) :
+ typed_(typed)
+ {
+ }
+
+ virtual CYStatement *Replace(CYContext &context);
+ virtual void Output(CYOutput &out, CYFlags flags) const;
+};
+
+namespace cy {
+namespace Syntax {
+
+struct Catch :
+ CYThing
+{
+ CYIdentifier *name_;
+ CYBlock code_;
+
+ Catch(CYIdentifier *name, CYStatement *statements) :
+ name_(name),
+ code_(statements)
+ {
+ }
+
+ void Replace(CYContext &context);
+ virtual void Output(CYOutput &out) const;
+};
+
+struct Try :