diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/AnonymousMethodExpression.cs b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/AnonymousMethodExpression.cs index 34caf0551..964a4fd2a 100644 --- a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/AnonymousMethodExpression.cs +++ b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/AnonymousMethodExpression.cs @@ -94,12 +94,5 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax public AnonymousMethodExpression(BlockStatement body, params ParameterDeclaration[] parameters) : this(body, (IEnumerable)parameters) { } - - protected internal override bool DoMatch(AstNode other, PatternMatching.Match match) - { - AnonymousMethodExpression o = other as AnonymousMethodExpression; - return o != null && this.IsAsync == o.IsAsync && this.HasParameterList == o.HasParameterList - && this.Parameters.DoMatch(o.Parameters, match) && this.Body.DoMatch(o.Body, match); - } } } diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/AnonymousTypeCreateExpression.cs b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/AnonymousTypeCreateExpression.cs index 908ddb6fe..0160c3b25 100644 --- a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/AnonymousTypeCreateExpression.cs +++ b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/AnonymousTypeCreateExpression.cs @@ -66,12 +66,6 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax public AnonymousTypeCreateExpression(params Expression[] initializer) : this((IEnumerable)initializer) { } - - protected internal override bool DoMatch(AstNode other, PatternMatching.Match match) - { - var o = other as AnonymousTypeCreateExpression; - return o != null && this.Initializers.DoMatch(o.Initializers, match); - } } } diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/ArrayCreateExpression.cs b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/ArrayCreateExpression.cs index aece68c6b..de1a58ff7 100644 --- a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/ArrayCreateExpression.cs +++ b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/ArrayCreateExpression.cs @@ -16,7 +16,6 @@ // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. - namespace ICSharpCode.Decompiler.CSharp.Syntax { /// @@ -54,13 +53,5 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax get { return GetChildByRole(InitializerRole); } set { SetChildByRole(InitializerRole, value); } } - protected internal override bool DoMatch(AstNode other, PatternMatching.Match match) - { - ArrayCreateExpression o = other as ArrayCreateExpression; - return o != null && this.Type.DoMatch(o.Type, match) - && this.Arguments.DoMatch(o.Arguments, match) - && this.AdditionalArraySpecifiers.DoMatch(o.AdditionalArraySpecifiers, match) - && this.Initializer.DoMatch(o.Initializer, match); - } } } diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/ArrayInitializerExpression.cs b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/ArrayInitializerExpression.cs index 53b06f1e4..3702f18cb 100644 --- a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/ArrayInitializerExpression.cs +++ b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/ArrayInitializerExpression.cs @@ -59,12 +59,6 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax public CSharpTokenNode RBraceToken { get { return GetChildByRole(Roles.RBrace); } } - - protected internal override bool DoMatch(AstNode other, PatternMatching.Match match) - { - ArrayInitializerExpression o = other as ArrayInitializerExpression; - return o != null && this.Elements.DoMatch(o.Elements, match); - } } } diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/AsExpression.cs b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/AsExpression.cs index 1ec95755b..13666c173 100644 --- a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/AsExpression.cs +++ b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/AsExpression.cs @@ -23,8 +23,6 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -using System.Collections.Generic; - namespace ICSharpCode.Decompiler.CSharp.Syntax { /// @@ -58,12 +56,6 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax AddChild(expression, Roles.Expression); AddChild(type, Roles.Type); } - - protected internal override bool DoMatch(AstNode other, PatternMatching.Match match) - { - AsExpression o = other as AsExpression; - return o != null && this.Expression.DoMatch(o.Expression, match) && this.Type.DoMatch(o.Type, match); - } } } diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/AssignmentExpression.cs b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/AssignmentExpression.cs index 839cafae8..56c4eba2a 100644 --- a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/AssignmentExpression.cs +++ b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/AssignmentExpression.cs @@ -25,7 +25,6 @@ // THE SOFTWARE. using System; -using System.Collections.Generic; using System.Linq.Expressions; namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -89,13 +88,6 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax set { SetChildByRole(RightRole, value); } } - protected internal override bool DoMatch(AstNode other, PatternMatching.Match match) - { - AssignmentExpression o = other as AssignmentExpression; - return o != null && (this.Operator == AssignmentOperatorType.Any || this.Operator == o.Operator) - && this.Left.DoMatch(o.Left, match) && this.Right.DoMatch(o.Right, match); - } - public static TokenRole GetOperatorRole(AssignmentOperatorType op) { switch (op) diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/BaseReferenceExpression.cs b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/BaseReferenceExpression.cs index 82cf0fc0a..ace2c05d9 100644 --- a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/BaseReferenceExpression.cs +++ b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/BaseReferenceExpression.cs @@ -24,7 +24,6 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. - namespace ICSharpCode.Decompiler.CSharp.Syntax { /// @@ -48,11 +47,5 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax return new TextLocation(Location.Line, Location.Column + "base".Length); } } - - protected internal override bool DoMatch(AstNode other, PatternMatching.Match match) - { - BaseReferenceExpression o = other as BaseReferenceExpression; - return o != null; - } } } diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/BinaryOperatorExpression.cs b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/BinaryOperatorExpression.cs index 2c98080f1..af73340e4 100644 --- a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/BinaryOperatorExpression.cs +++ b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/BinaryOperatorExpression.cs @@ -91,13 +91,6 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax set { SetChildByRole(RightRole, value); } } - protected internal override bool DoMatch(AstNode other, PatternMatching.Match match) - { - BinaryOperatorExpression o = other as BinaryOperatorExpression; - return o != null && (this.Operator == BinaryOperatorType.Any || this.Operator == o.Operator) - && this.Left.DoMatch(o.Left, match) && this.Right.DoMatch(o.Right, match); - } - public static TokenRole GetOperatorRole(BinaryOperatorType op) { switch (op)