From: Jay Freeman (saurik) Date: Fri, 4 Dec 2015 09:35:12 +0000 (-0800) Subject: Slightly improve syntax hierarchy near CYFunction. X-Git-Tag: v0.9.590~242 X-Git-Url: https://git.saurik.com/cycript.git/commitdiff_plain/6ce0f978082e635957b8ccde2280740f46eb4217 Slightly improve syntax hierarchy near CYFunction. --- diff --git a/Syntax.hpp b/Syntax.hpp index b20e511..a70e4a3 100644 --- a/Syntax.hpp +++ b/Syntax.hpp @@ -1480,7 +1480,6 @@ struct CYWhile : virtual void Output(CYOutput &out, CYFlags flags) const; }; -// XXX: this should be split up into CYAnonymousFunction and CYNamedFunction (subclass) struct CYFunction { CYIdentifier *name_; CYFunctionParameter *parameters_; @@ -1504,7 +1503,6 @@ struct CYFunction { virtual void Output(CYOutput &out, CYFlags flags) const; }; -// XXX: this should be split up into CYAnonymousFunctionExpression and CYNamedFunctionExpression struct CYFunctionExpression : CYFunction, CYExpression @@ -1521,7 +1519,6 @@ struct CYFunctionExpression : virtual void Output(CYOutput &out, CYFlags flags) const; }; -// XXX: this should derive from CYAnonymousFunction struct CYFatArrow : CYFunction, CYExpression @@ -1538,12 +1535,12 @@ struct CYFatArrow : virtual void Output(CYOutput &out, CYFlags flags) const; }; -// XXX: this should derive from CYAnonymousFunctionExpression struct CYRubyProc : - CYFunctionExpression + CYFunction, + CYExpression { CYRubyProc(CYFunctionParameter *parameters, CYStatement *code) : - CYFunctionExpression(NULL, parameters, code) + CYFunction(NULL, parameters, code) { } @@ -1551,7 +1548,6 @@ struct CYRubyProc : virtual void Output(CYOutput &out, CYFlags flags) const; }; -// XXX: this should derive from CYNamedFunction struct CYFunctionStatement : CYFunction, CYStatement