X-Git-Url: https://git.saurik.com/cycript.git/blobdiff_plain/690cf1a8442f51ef6d03d9a0a4fb4ee2e9bb714d..73fd6f57b6d5c6e7a1f0242016d04d232db58639:/Parser.hpp?ds=inline diff --git a/Parser.hpp b/Parser.hpp index e120123..be97c0b 100644 --- a/Parser.hpp +++ b/Parser.hpp @@ -1670,7 +1670,8 @@ struct CYTypeVariable : }; struct CYTypedIdentifier : - CYNext + CYNext, + CYThing { CYIdentifier *identifier_; CYTypeModifier *type_; @@ -1680,6 +1681,8 @@ struct CYTypedIdentifier : type_(NULL) { } + + virtual void Output(CYOutput &out) const; }; struct CYTypedParameter : @@ -1693,6 +1696,7 @@ struct CYTypedParameter : { } + CYArgument *Argument(CYContext &context); CYFunctionParameter *Parameters(CYContext &context); CYExpression *TypeSignature(CYContext &context, CYExpression *prefix); }; @@ -1717,6 +1721,36 @@ struct CYLambda : 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 {