From ca0f097f7dc607b35506501cec9b5871ebdfd617 Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Tue, 5 Jun 2012 03:48:55 -0700 Subject: [PATCH] Remove as many double-replaces as could be found. --- Parser.hpp | 2 -- Replace.cpp | 11 ++--------- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/Parser.hpp b/Parser.hpp index db4b1e6..69609ad 100644 --- a/Parser.hpp +++ b/Parser.hpp @@ -1329,8 +1329,6 @@ struct CYMember : void SetLeft(CYExpression *object) { object_ = object; } - - void Replace_(CYContext &context); }; struct CYDirectMember : diff --git a/Replace.cpp b/Replace.cpp index d946583..5ec0b93 100644 --- a/Replace.cpp +++ b/Replace.cpp @@ -55,7 +55,6 @@ CYExpression *CYAdd::Replace(CYContext &context) { } CYExpression *CYAddressOf::Replace(CYContext &context) { - CYPrefix::Replace(context); return $C0($M(rhs_, $S("$cya"))); } @@ -243,7 +242,8 @@ CYCompound *CYDeclarations::Compound(CYContext &context) { $T(NULL) } CYExpression *CYDirectMember::Replace(CYContext &context) { - Replace_(context); + context.Replace(object_); + context.Replace(property_); return this; } @@ -451,12 +451,10 @@ CYStatement *CYIfComprehension::Replace(CYContext &context, CYStatement *stateme } CYExpression *CYIndirect::Replace(CYContext &context) { - CYPrefix::Replace(context); return $M(rhs_, $S("$cyi")); } CYExpression *CYIndirectMember::Replace(CYContext &context) { - Replace_(context); return $M($ CYIndirect(object_), property_); } @@ -475,11 +473,6 @@ CYStatement *CYLet::Replace(CYContext &context) { return $E($ CYCall($ CYFunctionExpression(NULL, declarations_->Parameter(context), code_), declarations_->Argument(context))); } -void CYMember::Replace_(CYContext &context) { - context.Replace(object_); - context.Replace(property_); -} - namespace cy { namespace Syntax { -- 2.45.2