X-Git-Url: https://git.saurik.com/cycript.git/blobdiff_plain/561e7f1c23ea3804db1625ab806be939b4e9c5d1..9a98069f5e4cd10c3115bfab077f00c4b40eaa42:/ObjectiveC/Syntax.hpp diff --git a/ObjectiveC/Syntax.hpp b/ObjectiveC/Syntax.hpp index e910154..effaa24 100644 --- a/ObjectiveC/Syntax.hpp +++ b/ObjectiveC/Syntax.hpp @@ -38,9 +38,9 @@ struct CYTypeModifier : struct CYTypeArrayOf : CYTypeModifier { - size_t size_; + CYExpression *size_; - CYTypeArrayOf(size_t size, CYTypeModifier *next = NULL) : + CYTypeArrayOf(CYExpression *size, CYTypeModifier *next = NULL) : CYTypeModifier(next), size_(size) { @@ -106,6 +106,41 @@ struct CYTypedIdentifier : } }; +struct CYTypedParameter : + CYNext +{ + CYTypedIdentifier *typed_; + + CYTypedParameter(CYTypedIdentifier *typed, CYTypedParameter *next) : + CYNext(next), + typed_(typed) + { + } + + CYFunctionParameter *Parameters(CYContext &context); + CYExpression *TypeSignature(CYContext &context, CYExpression *prefix); +}; + +struct CYObjCBlock : + CYExpression +{ + CYTypeModifier *type_; + CYTypedParameter *parameters_; + CYStatement *statements_; + + CYObjCBlock(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 CYEncodedType : CYExpression {