X-Git-Url: https://git.saurik.com/cycript.git/blobdiff_plain/bfd79faeaedfb0028661b7ad25a496def9d1f454..12809e4cf4ce3b5ec8ae5f6086d533a980ed1d6d:/Syntax.hpp diff --git a/Syntax.hpp b/Syntax.hpp index db2b816..f11c2f2 100644 --- a/Syntax.hpp +++ b/Syntax.hpp @@ -896,6 +896,12 @@ struct CYThis : struct CYBoolean : CYTrivial { + CYPrecedence(4) + + virtual bool RightHand() const { + return true; + } + virtual bool Value() const = 0; virtual void Output(CYOutput &out, CYFlags flags) const; }; @@ -1021,8 +1027,8 @@ struct CYAssignment : { } - void SetLeft(CYTarget *lhs) { - lhs_ = lhs; + void SetRight(CYExpression *rhs) { + rhs_ = rhs; } virtual const char *Operator() const = 0; @@ -1261,6 +1267,8 @@ struct CYProperty : { } + virtual bool Update() const; + CYProperty *ReplaceAll(CYContext &context, CYBuilder &builder, CYExpression *self, bool update); void Replace(CYContext &context, CYBuilder &builder, CYExpression *self, bool protect); @@ -1328,6 +1336,26 @@ struct CYForIn : virtual void Output(CYOutput &out, CYFlags flags) const; }; +struct CYForInitialized : + CYStatement +{ + CYDeclaration *declaration_; + CYExpression *set_; + CYStatement *code_; + + CYForInitialized(CYDeclaration *declaration, CYExpression *set, CYStatement *code) : + declaration_(declaration), + set_(set), + code_(code) + { + } + + CYCompact(Long) + + virtual CYStatement *Replace(CYContext &context); + virtual void Output(CYOutput &out, CYFlags flags) const; +}; + struct CYForOf : CYStatement { @@ -1695,6 +1723,8 @@ struct CYPropertyMethod : { } + bool Update() const override; + virtual CYFunctionExpression *Constructor(); virtual void Replace(CYContext &context, CYBuilder &builder, CYExpression *self, CYExpression *name, bool protect);