Skip to content

Commit 31ebba1

Browse files
DoMatch 1
1 parent bcac87c commit 31ebba1

File tree

8 files changed

+0
-58
lines changed

8 files changed

+0
-58
lines changed

ICSharpCode.Decompiler/CSharp/Syntax/Expressions/AnonymousMethodExpression.cs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -94,12 +94,5 @@ public AnonymousMethodExpression(BlockStatement body, IEnumerable<ParameterDecla
9494
public AnonymousMethodExpression(BlockStatement body, params ParameterDeclaration[] parameters) : this(body, (IEnumerable<ParameterDeclaration>)parameters)
9595
{
9696
}
97-
98-
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
99-
{
100-
AnonymousMethodExpression o = other as AnonymousMethodExpression;
101-
return o != null && this.IsAsync == o.IsAsync && this.HasParameterList == o.HasParameterList
102-
&& this.Parameters.DoMatch(o.Parameters, match) && this.Body.DoMatch(o.Body, match);
103-
}
10497
}
10598
}

ICSharpCode.Decompiler/CSharp/Syntax/Expressions/AnonymousTypeCreateExpression.cs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,6 @@ public AnonymousTypeCreateExpression(IEnumerable<Expression> initializers)
6666
public AnonymousTypeCreateExpression(params Expression[] initializer) : this((IEnumerable<Expression>)initializer)
6767
{
6868
}
69-
70-
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
71-
{
72-
var o = other as AnonymousTypeCreateExpression;
73-
return o != null && this.Initializers.DoMatch(o.Initializers, match);
74-
}
7569
}
7670
}
7771

ICSharpCode.Decompiler/CSharp/Syntax/Expressions/ArrayCreateExpression.cs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
1717
// DEALINGS IN THE SOFTWARE.
1818

19-
2019
namespace ICSharpCode.Decompiler.CSharp.Syntax
2120
{
2221
/// <summary>
@@ -54,13 +53,5 @@ public ArrayInitializerExpression Initializer {
5453
get { return GetChildByRole(InitializerRole); }
5554
set { SetChildByRole(InitializerRole, value); }
5655
}
57-
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
58-
{
59-
ArrayCreateExpression o = other as ArrayCreateExpression;
60-
return o != null && this.Type.DoMatch(o.Type, match)
61-
&& this.Arguments.DoMatch(o.Arguments, match)
62-
&& this.AdditionalArraySpecifiers.DoMatch(o.AdditionalArraySpecifiers, match)
63-
&& this.Initializer.DoMatch(o.Initializer, match);
64-
}
6556
}
6657
}

ICSharpCode.Decompiler/CSharp/Syntax/Expressions/ArrayInitializerExpression.cs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,6 @@ public AstNodeCollection<Expression> Elements {
5959
public CSharpTokenNode RBraceToken {
6060
get { return GetChildByRole(Roles.RBrace); }
6161
}
62-
63-
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
64-
{
65-
ArrayInitializerExpression o = other as ArrayInitializerExpression;
66-
return o != null && this.Elements.DoMatch(o.Elements, match);
67-
}
6862
}
6963
}
7064

ICSharpCode.Decompiler/CSharp/Syntax/Expressions/AsExpression.cs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@
2323
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2424
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
2525
// THE SOFTWARE.
26-
using System.Collections.Generic;
27-
2826
namespace ICSharpCode.Decompiler.CSharp.Syntax
2927
{
3028
/// <summary>
@@ -58,12 +56,6 @@ public AsExpression(Expression expression, AstType type)
5856
AddChild(expression, Roles.Expression);
5957
AddChild(type, Roles.Type);
6058
}
61-
62-
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
63-
{
64-
AsExpression o = other as AsExpression;
65-
return o != null && this.Expression.DoMatch(o.Expression, match) && this.Type.DoMatch(o.Type, match);
66-
}
6759
}
6860
}
6961

ICSharpCode.Decompiler/CSharp/Syntax/Expressions/AssignmentExpression.cs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
// THE SOFTWARE.
2626

2727
using System;
28-
using System.Collections.Generic;
2928
using System.Linq.Expressions;
3029

3130
namespace ICSharpCode.Decompiler.CSharp.Syntax
@@ -89,13 +88,6 @@ public Expression Right {
8988
set { SetChildByRole(RightRole, value); }
9089
}
9190

92-
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
93-
{
94-
AssignmentExpression o = other as AssignmentExpression;
95-
return o != null && (this.Operator == AssignmentOperatorType.Any || this.Operator == o.Operator)
96-
&& this.Left.DoMatch(o.Left, match) && this.Right.DoMatch(o.Right, match);
97-
}
98-
9991
public static TokenRole GetOperatorRole(AssignmentOperatorType op)
10092
{
10193
switch (op)

ICSharpCode.Decompiler/CSharp/Syntax/Expressions/BaseReferenceExpression.cs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
2525
// THE SOFTWARE.
2626

27-
2827
namespace ICSharpCode.Decompiler.CSharp.Syntax
2928
{
3029
/// <summary>
@@ -48,11 +47,5 @@ public override TextLocation EndLocation {
4847
return new TextLocation(Location.Line, Location.Column + "base".Length);
4948
}
5049
}
51-
52-
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
53-
{
54-
BaseReferenceExpression o = other as BaseReferenceExpression;
55-
return o != null;
56-
}
5750
}
5851
}

ICSharpCode.Decompiler/CSharp/Syntax/Expressions/BinaryOperatorExpression.cs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -91,13 +91,6 @@ public Expression Right {
9191
set { SetChildByRole(RightRole, value); }
9292
}
9393

94-
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
95-
{
96-
BinaryOperatorExpression o = other as BinaryOperatorExpression;
97-
return o != null && (this.Operator == BinaryOperatorType.Any || this.Operator == o.Operator)
98-
&& this.Left.DoMatch(o.Left, match) && this.Right.DoMatch(o.Right, match);
99-
}
100-
10194
public static TokenRole GetOperatorRole(BinaryOperatorType op)
10295
{
10396
switch (op)

0 commit comments

Comments
 (0)