X-Git-Url: https://git.saurik.com/cycript.git/blobdiff_plain/09fc3efbc1e9a22b345b6e542737fc682a1f4332..a02c6df345464ac9361230ae4b0c9fa3957fddff:/Syntax.hpp diff --git a/Syntax.hpp b/Syntax.hpp index d7d783b..cb39f40 100644 --- a/Syntax.hpp +++ b/Syntax.hpp @@ -1090,7 +1090,7 @@ struct CYElementValue : { CYExpression *value_; - CYElementValue(CYExpression *value, CYElement *next) : + CYElementValue(CYExpression *value, CYElement *next = NULL) : CYNext(next), value_(value) { @@ -2256,6 +2256,22 @@ struct CYExternal : virtual void Output(CYOutput &out, CYFlags flags) const; }; +struct CYTypeExpression : + CYTarget +{ + CYTypedIdentifier *typed_; + + CYTypeExpression(CYTypedIdentifier *typed) : + typed_(typed) + { + } + + CYPrecedence(0) + + virtual CYTarget *Replace(CYContext &context); + virtual void Output(CYOutput &out, CYFlags flags) const; +}; + struct CYTypeDefinition : CYStatement { @@ -2308,6 +2324,34 @@ struct CYTypeFunctionWith : virtual CYTypeFunctionWith *Function() { return this; } }; +struct CYTypeStructField : + CYNext +{ + CYTypedIdentifier *typed_; + + CYTypeStructField(CYTypedIdentifier *typed, CYTypeStructField *next = NULL) : + CYNext(next), + typed_(typed) + { + } +}; + +struct CYTypeStruct : + CYTypeSpecifier +{ + CYIdentifier *name_; + CYTypeStructField *fields_; + + CYTypeStruct(CYIdentifier *name, CYTypeStructField *fields) : + name_(name), + fields_(fields) + { + } + + virtual CYTarget *Replace(CYContext &context); + virtual void Output(CYOutput &out) const; +}; + namespace cy { namespace Syntax {