X-Git-Url: https://git.saurik.com/cycript.git/blobdiff_plain/09fc3efbc1e9a22b345b6e542737fc682a1f4332..b0e6429c745211a7fa3036f22a74e85ae227af2b:/ObjectiveC/Syntax.hpp diff --git a/ObjectiveC/Syntax.hpp b/ObjectiveC/Syntax.hpp index 16927ac..f47d935 100644 --- a/ObjectiveC/Syntax.hpp +++ b/ObjectiveC/Syntax.hpp @@ -1,5 +1,5 @@ -/* Cycript - Optimizing JavaScript Compiler/Runtime - * Copyright (C) 2009-2015 Jay Freeman (saurik) +/* Cycript - The Truly Universal Scripting Language + * Copyright (C) 2009-2016 Jay Freeman (saurik) */ /* GNU Affero General Public License, Version 3 {{{ */ @@ -76,6 +76,52 @@ struct CYBox : virtual void Output(CYOutput &out, CYFlags flags) const; }; +struct CYObjCArray : + CYTarget +{ + CYElement *elements_; + + CYObjCArray(CYElement *elements = NULL) : + elements_(elements) + { + } + + CYPrecedence(0) + + virtual CYTarget *Replace(CYContext &context); + virtual void Output(CYOutput &out, CYFlags flags) const; +}; + +struct CYObjCKeyValue : + CYNext +{ + CYExpression *key_; + CYExpression *value_; + + CYObjCKeyValue(CYExpression *key, CYExpression *value, CYObjCKeyValue *next) : + CYNext(next), + key_(key), + value_(value) + { + } +}; + +struct CYObjCDictionary : + CYTarget +{ + CYObjCKeyValue *pairs_; + + CYObjCDictionary(CYObjCKeyValue *pairs) : + pairs_(pairs) + { + } + + CYPrecedence(0) + + virtual CYTarget *Replace(CYContext &context); + virtual void Output(CYOutput &out, CYFlags flags) const; +}; + struct CYSelectorPart : CYNext, CYThing @@ -131,7 +177,8 @@ struct CYMessageParameter : CYWord *name_; CYTypedIdentifier *type_; - CYMessageParameter(CYWord *name, CYTypedIdentifier *type) : + CYMessageParameter(CYWord *name, CYTypedIdentifier *type, CYMessageParameter *next = NULL) : + CYNext(next), name_(name), type_(type) {