};
struct CYTypedIdentifier :
- CYNext<CYTypedIdentifier>
+ CYNext<CYTypedIdentifier>,
+ CYThing
{
CYIdentifier *identifier_;
CYTypeModifier *type_;
type_(NULL)
{
}
+
+ virtual void Output(CYOutput &out) const;
};
struct CYTypedParameter :
{
}
+ CYArgument *Argument(CYContext &context);
CYFunctionParameter *Parameters(CYContext &context);
CYExpression *TypeSignature(CYContext &context, CYExpression *prefix);
};
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;
+};
+
+struct CYTypeFunctionWith :
+ CYTypeModifier
+{
+ CYTypedParameter *parameters_;
+
+ CYTypeFunctionWith(CYTypedParameter *parameters, CYTypeModifier *next = NULL) :
+ CYTypeModifier(next),
+ parameters_(parameters)
+ {
+ }
+
+ CYPrecedence(2)
+
+ virtual CYExpression *Replace(CYContext &context);
+};
+
namespace cy {
namespace Syntax {