Browse Source

focus on CS8765

pull/3287/head
apmoskevitz 9 months ago
parent
commit
6e4a0255ae
  1. 9
      .editorconfig
  2. 2
      ICSharpCode.Decompiler/CSharp/Resolver/CSharpConversions.cs
  3. 2
      ICSharpCode.Decompiler/CSharp/Syntax/AstNodeCollection.cs
  4. 8
      ICSharpCode.Decompiler/CSharp/Syntax/AstType.cs
  5. 4
      ICSharpCode.Decompiler/CSharp/Syntax/CSharpModifierToken.cs
  6. 6
      ICSharpCode.Decompiler/CSharp/Syntax/CSharpTokenNode.cs
  7. 8
      ICSharpCode.Decompiler/CSharp/Syntax/ComposedType.cs
  8. 2
      ICSharpCode.Decompiler/CSharp/Syntax/DocumentationReference.cs
  9. 2
      ICSharpCode.Decompiler/CSharp/Syntax/Expressions/AnonymousMethodExpression.cs
  10. 2
      ICSharpCode.Decompiler/CSharp/Syntax/Expressions/AnonymousTypeCreateExpression.cs
  11. 2
      ICSharpCode.Decompiler/CSharp/Syntax/Expressions/ArrayCreateExpression.cs
  12. 6
      ICSharpCode.Decompiler/CSharp/Syntax/Expressions/ArrayInitializerExpression.cs
  13. 2
      ICSharpCode.Decompiler/CSharp/Syntax/Expressions/AsExpression.cs
  14. 2
      ICSharpCode.Decompiler/CSharp/Syntax/Expressions/AssignmentExpression.cs
  15. 2
      ICSharpCode.Decompiler/CSharp/Syntax/Expressions/BaseReferenceExpression.cs
  16. 2
      ICSharpCode.Decompiler/CSharp/Syntax/Expressions/BinaryOperatorExpression.cs
  17. 2
      ICSharpCode.Decompiler/CSharp/Syntax/Expressions/CastExpression.cs
  18. 2
      ICSharpCode.Decompiler/CSharp/Syntax/Expressions/CheckedExpression.cs
  19. 2
      ICSharpCode.Decompiler/CSharp/Syntax/Expressions/ConditionalExpression.cs
  20. 2
      ICSharpCode.Decompiler/CSharp/Syntax/Expressions/DeclarationExpression.cs
  21. 2
      ICSharpCode.Decompiler/CSharp/Syntax/Expressions/DefaultValueExpression.cs
  22. 2
      ICSharpCode.Decompiler/CSharp/Syntax/Expressions/DirectionExpression.cs
  23. 2
      ICSharpCode.Decompiler/CSharp/Syntax/Expressions/ErrorExpression.cs
  24. 4
      ICSharpCode.Decompiler/CSharp/Syntax/Expressions/Expression.cs
  25. 2
      ICSharpCode.Decompiler/CSharp/Syntax/Expressions/IdentifierExpression.cs
  26. 8
      ICSharpCode.Decompiler/CSharp/Syntax/Expressions/InterpolatedStringExpression.cs
  27. 2
      ICSharpCode.Decompiler/CSharp/Syntax/Expressions/InvocationExpression.cs
  28. 2
      ICSharpCode.Decompiler/CSharp/Syntax/Expressions/IsExpression.cs
  29. 2
      ICSharpCode.Decompiler/CSharp/Syntax/Expressions/LambdaExpression.cs
  30. 2
      ICSharpCode.Decompiler/CSharp/Syntax/Expressions/MemberReferenceExpression.cs
  31. 2
      ICSharpCode.Decompiler/CSharp/Syntax/Expressions/NamedArgumentExpression.cs
  32. 2
      ICSharpCode.Decompiler/CSharp/Syntax/Expressions/NamedExpression.cs
  33. 2
      ICSharpCode.Decompiler/CSharp/Syntax/Expressions/NullReferenceExpression.cs
  34. 2
      ICSharpCode.Decompiler/CSharp/Syntax/Expressions/ObjectCreateExpression.cs
  35. 2
      ICSharpCode.Decompiler/CSharp/Syntax/Expressions/OutVarDeclarationExpression.cs
  36. 2
      ICSharpCode.Decompiler/CSharp/Syntax/Expressions/ParenthesizedExpression.cs
  37. 2
      ICSharpCode.Decompiler/CSharp/Syntax/Expressions/PointerReferenceExpression.cs
  38. 2
      ICSharpCode.Decompiler/CSharp/Syntax/Expressions/PrimitiveExpression.cs
  39. 22
      ICSharpCode.Decompiler/CSharp/Syntax/Expressions/QueryExpression.cs
  40. 2
      ICSharpCode.Decompiler/CSharp/Syntax/Expressions/RecursivePatternExpression.cs
  41. 2
      ICSharpCode.Decompiler/CSharp/Syntax/Expressions/SizeOfExpression.cs
  42. 2
      ICSharpCode.Decompiler/CSharp/Syntax/Expressions/StackAllocExpression.cs
  43. 4
      ICSharpCode.Decompiler/CSharp/Syntax/Expressions/SwitchExpression.cs
  44. 2
      ICSharpCode.Decompiler/CSharp/Syntax/Expressions/ThisReferenceExpression.cs
  45. 2
      ICSharpCode.Decompiler/CSharp/Syntax/Expressions/ThrowExpression.cs
  46. 2
      ICSharpCode.Decompiler/CSharp/Syntax/Expressions/TupleExpression.cs
  47. 2
      ICSharpCode.Decompiler/CSharp/Syntax/Expressions/TypeOfExpression.cs
  48. 2
      ICSharpCode.Decompiler/CSharp/Syntax/Expressions/TypeReferenceExpression.cs
  49. 2
      ICSharpCode.Decompiler/CSharp/Syntax/Expressions/UnaryOperatorExpression.cs
  50. 2
      ICSharpCode.Decompiler/CSharp/Syntax/Expressions/UncheckedExpression.cs
  51. 2
      ICSharpCode.Decompiler/CSharp/Syntax/Expressions/UndocumentedExpression.cs
  52. 2
      ICSharpCode.Decompiler/CSharp/Syntax/Expressions/WithInitializerExpression.cs
  53. 2
      ICSharpCode.Decompiler/CSharp/Syntax/FunctionPointerAstType.cs
  54. 4
      ICSharpCode.Decompiler/CSharp/Syntax/GeneralScope/Attribute.cs
  55. 4
      ICSharpCode.Decompiler/CSharp/Syntax/GeneralScope/AttributeSection.cs
  56. 2
      ICSharpCode.Decompiler/CSharp/Syntax/GeneralScope/Comment.cs
  57. 2
      ICSharpCode.Decompiler/CSharp/Syntax/GeneralScope/Constraint.cs
  58. 2
      ICSharpCode.Decompiler/CSharp/Syntax/GeneralScope/DelegateDeclaration.cs
  59. 2
      ICSharpCode.Decompiler/CSharp/Syntax/GeneralScope/ExternAliasDeclaration.cs
  60. 2
      ICSharpCode.Decompiler/CSharp/Syntax/GeneralScope/NamespaceDeclaration.cs
  61. 2
      ICSharpCode.Decompiler/CSharp/Syntax/GeneralScope/PreProcessorDirective.cs
  62. 2
      ICSharpCode.Decompiler/CSharp/Syntax/GeneralScope/TypeDeclaration.cs
  63. 2
      ICSharpCode.Decompiler/CSharp/Syntax/GeneralScope/TypeParameterDeclaration.cs
  64. 2
      ICSharpCode.Decompiler/CSharp/Syntax/GeneralScope/UsingAliasDeclaration.cs
  65. 2
      ICSharpCode.Decompiler/CSharp/Syntax/GeneralScope/UsingDeclaration.cs
  66. 4
      ICSharpCode.Decompiler/CSharp/Syntax/Identifier.cs
  67. 2
      ICSharpCode.Decompiler/CSharp/Syntax/InvocationAstType.cs
  68. 2
      ICSharpCode.Decompiler/CSharp/Syntax/MemberType.cs
  69. 2
      ICSharpCode.Decompiler/CSharp/Syntax/PatternMatching/Pattern.cs
  70. 4
      ICSharpCode.Decompiler/CSharp/Syntax/PrimitiveType.cs
  71. 6
      ICSharpCode.Decompiler/CSharp/Syntax/SimpleType.cs
  72. 6
      ICSharpCode.Decompiler/CSharp/Syntax/Statements/BlockStatement.cs
  73. 2
      ICSharpCode.Decompiler/CSharp/Syntax/Statements/BreakStatement.cs
  74. 2
      ICSharpCode.Decompiler/CSharp/Syntax/Statements/CheckedStatement.cs
  75. 2
      ICSharpCode.Decompiler/CSharp/Syntax/Statements/ContinueStatement.cs
  76. 2
      ICSharpCode.Decompiler/CSharp/Syntax/Statements/DoWhileStatement.cs
  77. 2
      ICSharpCode.Decompiler/CSharp/Syntax/Statements/EmptyStatement.cs
  78. 2
      ICSharpCode.Decompiler/CSharp/Syntax/Statements/ExpressionStatement.cs
  79. 2
      ICSharpCode.Decompiler/CSharp/Syntax/Statements/FixedStatement.cs
  80. 2
      ICSharpCode.Decompiler/CSharp/Syntax/Statements/ForStatement.cs
  81. 2
      ICSharpCode.Decompiler/CSharp/Syntax/Statements/ForeachStatement.cs
  82. 6
      ICSharpCode.Decompiler/CSharp/Syntax/Statements/GotoStatement.cs
  83. 2
      ICSharpCode.Decompiler/CSharp/Syntax/Statements/IfElseStatement.cs
  84. 2
      ICSharpCode.Decompiler/CSharp/Syntax/Statements/LabelStatement.cs
  85. 2
      ICSharpCode.Decompiler/CSharp/Syntax/Statements/LocalFunctionDeclarationStatement.cs
  86. 2
      ICSharpCode.Decompiler/CSharp/Syntax/Statements/LockStatement.cs
  87. 2
      ICSharpCode.Decompiler/CSharp/Syntax/Statements/ReturnStatement.cs
  88. 4
      ICSharpCode.Decompiler/CSharp/Syntax/Statements/Statement.cs
  89. 8
      ICSharpCode.Decompiler/CSharp/Syntax/Statements/SwitchStatement.cs
  90. 2
      ICSharpCode.Decompiler/CSharp/Syntax/Statements/ThrowStatement.cs
  91. 8
      ICSharpCode.Decompiler/CSharp/Syntax/Statements/TryCatchStatement.cs
  92. 2
      ICSharpCode.Decompiler/CSharp/Syntax/Statements/UncheckedStatement.cs
  93. 2
      ICSharpCode.Decompiler/CSharp/Syntax/Statements/UnsafeStatement.cs
  94. 2
      ICSharpCode.Decompiler/CSharp/Syntax/Statements/UsingStatement.cs
  95. 2
      ICSharpCode.Decompiler/CSharp/Syntax/Statements/VariableDeclarationStatement.cs
  96. 2
      ICSharpCode.Decompiler/CSharp/Syntax/Statements/WhileStatement.cs
  97. 2
      ICSharpCode.Decompiler/CSharp/Syntax/Statements/YieldBreakStatement.cs
  98. 2
      ICSharpCode.Decompiler/CSharp/Syntax/Statements/YieldReturnStatement.cs
  99. 2
      ICSharpCode.Decompiler/CSharp/Syntax/SyntaxTree.cs
  100. 10
      ICSharpCode.Decompiler/CSharp/Syntax/TextLocation.cs
  101. Some files were not shown because too many files have changed in this diff Show More

9
.editorconfig

@ -149,4 +149,11 @@ dotnet_naming_rule.private_fields_rule.symbols = private_fields_symbols @@ -149,4 +149,11 @@ dotnet_naming_rule.private_fields_rule.symbols = private_fields_symbols
dotnet_diagnostic.MEF006.severity = silent
dotnet_diagnostic.IDE2003.severity = silent
dotnet_diagnostic.IDE2003.severity = silent
#cleared null error types
dotnet_diagnostic.CS8765.severity = error
dotnet_diagnostic.CS8766.severity = error
dotnet_diagnostic.CS8767.severity = error
dotnet_diagnostic.CS8768.severity = error
dotnet_diagnostic.CS8769.severity = error

2
ICSharpCode.Decompiler/CSharp/Resolver/CSharpConversions.cs

@ -77,7 +77,7 @@ namespace ICSharpCode.Decompiler.CSharp.Resolver @@ -77,7 +77,7 @@ namespace ICSharpCode.Decompiler.CSharp.Resolver
this.ToType = toType;
}
public override bool Equals(object obj)
public override bool Equals(object? obj)
{
return (obj is TypePair) && Equals((TypePair)obj);
}

2
ICSharpCode.Decompiler/CSharp/Syntax/AstNodeCollection.cs

@ -200,7 +200,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -200,7 +200,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return node.GetHashCode() ^ role.GetHashCode();
}
public override bool Equals(object obj)
public override bool Equals(object? obj)
{
AstNodeCollection<T>? other = obj as AstNodeCollection<T>;
if (other == null)

8
ICSharpCode.Decompiler/CSharp/Syntax/AstType.cs

@ -56,12 +56,12 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -56,12 +56,12 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitNullNode(this, data);
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
protected internal override bool DoMatch(AstNode? other, PatternMatching.Match match)
{
return other == null || other.IsNull;
}
public override ITypeReference ToTypeReference(NameLookupMode lookupMode, InterningProvider interningProvider)
public override ITypeReference ToTypeReference(NameLookupMode lookupMode, InterningProvider? interningProvider)
{
return SpecialType.UnknownType;
}
@ -102,12 +102,12 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -102,12 +102,12 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitPatternPlaceholder(this, child, data);
}
public override ITypeReference ToTypeReference(NameLookupMode lookupMode, InterningProvider interningProvider)
public override ITypeReference ToTypeReference(NameLookupMode lookupMode, InterningProvider? interningProvider)
{
throw new NotSupportedException();
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
protected internal override bool DoMatch(AstNode? other, PatternMatching.Match match)
{
return child.DoMatch(other, match);
}

4
ICSharpCode.Decompiler/CSharp/Syntax/CSharpModifierToken.cs

@ -49,12 +49,12 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -49,12 +49,12 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
}
}
public override string ToString(CSharpFormattingOptions formattingOptions)
public override string ToString(CSharpFormattingOptions? formattingOptions)
{
return GetModifierName(Modifier);
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
protected internal override bool DoMatch(AstNode? other, PatternMatching.Match match)
{
CSharpModifierToken? o = other as CSharpModifierToken;
return o != null && this.modifier == o.modifier;

6
ICSharpCode.Decompiler/CSharp/Syntax/CSharpTokenNode.cs

@ -64,7 +64,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -64,7 +64,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitNullNode(this, data);
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
protected internal override bool DoMatch(AstNode? other, PatternMatching.Match match)
{
return other == null || other.IsNull;
}
@ -107,7 +107,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -107,7 +107,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
this.flags |= role.Index << AstNodeFlagsUsedBits;
}
public override string ToString(CSharpFormattingOptions formattingOptions)
public override string ToString(CSharpFormattingOptions? formattingOptions)
{
uint tokenRoleIndex = (this.flags >> AstNodeFlagsUsedBits);
if (Role.GetByIndex(tokenRoleIndex) is TokenRole r)
@ -132,7 +132,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -132,7 +132,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitCSharpTokenNode(this, data);
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
protected internal override bool DoMatch(AstNode? other, PatternMatching.Match match)
{
CSharpTokenNode? o = other as CSharpTokenNode;
return o != null && !o.IsNull && !(o is CSharpModifierToken);

8
ICSharpCode.Decompiler/CSharp/Syntax/ComposedType.cs

@ -144,7 +144,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -144,7 +144,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitComposedType(this, data);
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
protected internal override bool DoMatch(AstNode? other, PatternMatching.Match match)
{
ComposedType? o = other as ComposedType;
return o != null
@ -156,7 +156,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -156,7 +156,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
&& this.ArraySpecifiers.DoMatch(o.ArraySpecifiers, match);
}
public override string ToString(CSharpFormattingOptions formattingOptions)
public override string ToString(CSharpFormattingOptions? formattingOptions)
{
StringBuilder b = new StringBuilder();
if (this.HasRefSpecifier)
@ -287,13 +287,13 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -287,13 +287,13 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitArraySpecifier(this, data);
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
protected internal override bool DoMatch(AstNode? other, PatternMatching.Match match)
{
ArraySpecifier? o = other as ArraySpecifier;
return o != null && this.Dimensions == o.Dimensions;
}
public override string ToString(CSharpFormattingOptions formattingOptions)
public override string ToString(CSharpFormattingOptions? formattingOptions)
{
return "[" + new string(',', this.Dimensions - 1) + "]";
}

2
ICSharpCode.Decompiler/CSharp/Syntax/DocumentationReference.cs

@ -109,7 +109,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -109,7 +109,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
get { return GetChildrenByRole(Roles.Parameter); }
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
protected internal override bool DoMatch(AstNode? other, PatternMatching.Match match)
{
DocumentationReference? o = other as DocumentationReference;
if (!(o != null && this.SymbolKind == o.SymbolKind && this.HasParameterList == o.HasParameterList))

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

@ -109,7 +109,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -109,7 +109,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitAnonymousMethodExpression(this, data);
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
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

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

@ -81,7 +81,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -81,7 +81,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitAnonymousTypeCreateExpression(this, data);
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
protected internal override bool DoMatch(AstNode? other, PatternMatching.Match match)
{
var o = other as AnonymousTypeCreateExpression;
return o != null && this.Initializers.DoMatch(o.Initializers, match);

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

@ -69,7 +69,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -69,7 +69,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitArrayCreateExpression(this, data);
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
protected internal override bool DoMatch(AstNode? other, PatternMatching.Match match)
{
ArrayCreateExpression? o = other as ArrayCreateExpression;
return o != null && this.Type.DoMatch(o.Type, match)

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

@ -85,7 +85,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -85,7 +85,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitNullNode(this, data);
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
protected internal override bool DoMatch(AstNode? other, PatternMatching.Match match)
{
return other == null || other.IsNull;
}
@ -119,7 +119,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -119,7 +119,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitArrayInitializerExpression(this, data);
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
protected internal override bool DoMatch(AstNode? other, PatternMatching.Match match)
{
ArrayInitializerExpression? o = other as ArrayInitializerExpression;
return o != null && this.Elements.DoMatch(o.Elements, match);
@ -176,7 +176,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -176,7 +176,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitPatternPlaceholder(this, child, data);
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
protected internal override bool DoMatch(AstNode? other, PatternMatching.Match match)
{
return child.DoMatch(other, match);
}

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

@ -73,7 +73,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -73,7 +73,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitAsExpression(this, data);
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
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);

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

@ -103,7 +103,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -103,7 +103,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitAssignmentExpression(this, data);
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
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)

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

@ -63,7 +63,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -63,7 +63,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitBaseReferenceExpression(this, data);
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
protected internal override bool DoMatch(AstNode? other, PatternMatching.Match match)
{
BaseReferenceExpression? o = other as BaseReferenceExpression;
return o != null;

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

@ -105,7 +105,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -105,7 +105,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitBinaryOperatorExpression(this, data);
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
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)

2
ICSharpCode.Decompiler/CSharp/Syntax/Expressions/CastExpression.cs

@ -75,7 +75,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -75,7 +75,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitCastExpression(this, data);
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
protected internal override bool DoMatch(AstNode? other, PatternMatching.Match match)
{
CastExpression? o = other as CastExpression;
return o != null && this.Type.DoMatch(o.Type, match) && this.Expression.DoMatch(o.Expression, match);

2
ICSharpCode.Decompiler/CSharp/Syntax/Expressions/CheckedExpression.cs

@ -75,7 +75,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -75,7 +75,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitCheckedExpression(this, data);
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
protected internal override bool DoMatch(AstNode? other, PatternMatching.Match match)
{
CheckedExpression? o = other as CheckedExpression;
return o != null && this.Expression.DoMatch(o.Expression, match);

2
ICSharpCode.Decompiler/CSharp/Syntax/Expressions/ConditionalExpression.cs

@ -87,7 +87,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -87,7 +87,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitConditionalExpression(this, data);
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
protected internal override bool DoMatch(AstNode? other, PatternMatching.Match match)
{
ConditionalExpression? o = other as ConditionalExpression;
return o != null && this.Condition.DoMatch(o.Condition, match) && this.TrueExpression.DoMatch(o.TrueExpression, match) && this.FalseExpression.DoMatch(o.FalseExpression, match);

2
ICSharpCode.Decompiler/CSharp/Syntax/Expressions/DeclarationExpression.cs

@ -50,7 +50,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -50,7 +50,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitDeclarationExpression(this, data);
}
protected internal override bool DoMatch(AstNode other, Match match)
protected internal override bool DoMatch(AstNode? other, Match match)
{
return other is DeclarationExpression o
&& Type.DoMatch(o.Type, match)

2
ICSharpCode.Decompiler/CSharp/Syntax/Expressions/DefaultValueExpression.cs

@ -75,7 +75,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -75,7 +75,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitDefaultValueExpression(this, data);
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
protected internal override bool DoMatch(AstNode? other, PatternMatching.Match match)
{
DefaultValueExpression? o = other as DefaultValueExpression;
return o != null && this.Type.DoMatch(o.Type, match);

2
ICSharpCode.Decompiler/CSharp/Syntax/Expressions/DirectionExpression.cs

@ -93,7 +93,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -93,7 +93,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitDirectionExpression(this, data);
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
protected internal override bool DoMatch(AstNode? other, PatternMatching.Match match)
{
DirectionExpression? o = other as DirectionExpression;
return o != null && this.FieldDirection == o.FieldDirection && this.Expression.DoMatch(o.Expression, match);

2
ICSharpCode.Decompiler/CSharp/Syntax/Expressions/ErrorExpression.cs

@ -72,7 +72,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -72,7 +72,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitErrorNode(this, data);
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
protected internal override bool DoMatch(AstNode? other, PatternMatching.Match match)
{
var o = other as ErrorExpression;
return o != null;

4
ICSharpCode.Decompiler/CSharp/Syntax/Expressions/Expression.cs

@ -56,7 +56,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -56,7 +56,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitNullNode(this, data);
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
protected internal override bool DoMatch(AstNode? other, PatternMatching.Match match)
{
return other == null || other.IsNull;
}
@ -97,7 +97,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -97,7 +97,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitPatternPlaceholder(this, child, data);
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
protected internal override bool DoMatch(AstNode? other, PatternMatching.Match match)
{
return child.DoMatch(other, match);
}

2
ICSharpCode.Decompiler/CSharp/Syntax/Expressions/IdentifierExpression.cs

@ -79,7 +79,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -79,7 +79,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitIdentifierExpression(this, data);
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
protected internal override bool DoMatch(AstNode? other, PatternMatching.Match match)
{
IdentifierExpression? o = other as IdentifierExpression;
return o != null && MatchString(this.Identifier, o.Identifier) && this.TypeArguments.DoMatch(o.TypeArguments, match);

8
ICSharpCode.Decompiler/CSharp/Syntax/Expressions/InterpolatedStringExpression.cs

@ -40,7 +40,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -40,7 +40,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitInterpolatedStringExpression(this, data);
}
protected internal override bool DoMatch(AstNode other, Match match)
protected internal override bool DoMatch(AstNode? other, Match match)
{
InterpolatedStringExpression? o = other as InterpolatedStringExpression;
return o != null && !o.IsNull && this.Content.DoMatch(o.Content, match);
@ -75,7 +75,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -75,7 +75,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitNullNode(this, data);
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
protected internal override bool DoMatch(AstNode? other, PatternMatching.Match match)
{
return other == null || other.IsNull;
}
@ -139,7 +139,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -139,7 +139,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitInterpolation(this, data);
}
protected internal override bool DoMatch(AstNode other, Match match)
protected internal override bool DoMatch(AstNode? other, Match match)
{
Interpolation? o = other as Interpolation;
return o != null && this.Expression.DoMatch(o.Expression, match);
@ -175,7 +175,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -175,7 +175,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitInterpolatedStringText(this, data);
}
protected internal override bool DoMatch(AstNode other, Match match)
protected internal override bool DoMatch(AstNode? other, Match match)
{
InterpolatedStringText? o = other as InterpolatedStringText;
return o != null && o.Text == this.Text;

2
ICSharpCode.Decompiler/CSharp/Syntax/Expressions/InvocationExpression.cs

@ -85,7 +85,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -85,7 +85,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
{
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
protected internal override bool DoMatch(AstNode? other, PatternMatching.Match match)
{
InvocationExpression? o = other as InvocationExpression;
return o != null && this.Target.DoMatch(o.Target, match) && this.Arguments.DoMatch(o.Arguments, match);

2
ICSharpCode.Decompiler/CSharp/Syntax/Expressions/IsExpression.cs

@ -74,7 +74,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -74,7 +74,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitIsExpression(this, data);
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
protected internal override bool DoMatch(AstNode? other, PatternMatching.Match match)
{
IsExpression? o = other as IsExpression;
return o != null && this.Expression.DoMatch(o.Expression, match) && this.Type.DoMatch(o.Type, match);

2
ICSharpCode.Decompiler/CSharp/Syntax/Expressions/LambdaExpression.cs

@ -82,7 +82,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -82,7 +82,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitLambdaExpression(this, data);
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
protected internal override bool DoMatch(AstNode? other, PatternMatching.Match match)
{
LambdaExpression? o = other as LambdaExpression;
return o != null && this.IsAsync == o.IsAsync && this.Parameters.DoMatch(o.Parameters, match) && this.Body.DoMatch(o.Body, match);

2
ICSharpCode.Decompiler/CSharp/Syntax/Expressions/MemberReferenceExpression.cs

@ -112,7 +112,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -112,7 +112,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitMemberReferenceExpression(this, data);
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
protected internal override bool DoMatch(AstNode? other, PatternMatching.Match match)
{
MemberReferenceExpression? o = other as MemberReferenceExpression;
return o != null && this.Target.DoMatch(o.Target, match) && MatchString(this.MemberName, o.MemberName) && this.TypeArguments.DoMatch(o.TypeArguments, match);

2
ICSharpCode.Decompiler/CSharp/Syntax/Expressions/NamedArgumentExpression.cs

@ -77,7 +77,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -77,7 +77,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitNamedArgumentExpression(this, data);
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
protected internal override bool DoMatch(AstNode? other, PatternMatching.Match match)
{
NamedArgumentExpression? o = other as NamedArgumentExpression;
return o != null && MatchString(this.Name, o.Name) && this.Expression.DoMatch(o.Expression, match);

2
ICSharpCode.Decompiler/CSharp/Syntax/Expressions/NamedExpression.cs

@ -86,7 +86,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -86,7 +86,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitNamedExpression(this, data);
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
protected internal override bool DoMatch(AstNode? other, PatternMatching.Match match)
{
var o = other as NamedExpression;
return o != null && MatchString(this.Name, o.Name) && this.Expression.DoMatch(o.Expression, match);

2
ICSharpCode.Decompiler/CSharp/Syntax/Expressions/NullReferenceExpression.cs

@ -75,7 +75,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -75,7 +75,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitNullReferenceExpression(this, data);
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
protected internal override bool DoMatch(AstNode? other, PatternMatching.Match match)
{
NullReferenceExpression? o = other as NullReferenceExpression;
return o != null;

2
ICSharpCode.Decompiler/CSharp/Syntax/Expressions/ObjectCreateExpression.cs

@ -97,7 +97,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -97,7 +97,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitObjectCreateExpression(this, data);
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
protected internal override bool DoMatch(AstNode? other, PatternMatching.Match match)
{
ObjectCreateExpression? o = other as ObjectCreateExpression;
return o != null && this.Type.DoMatch(o.Type, match) && this.Arguments.DoMatch(o.Arguments, match) && this.Initializer.DoMatch(o.Initializer, match);

2
ICSharpCode.Decompiler/CSharp/Syntax/Expressions/OutVarDeclarationExpression.cs

@ -64,7 +64,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -64,7 +64,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitOutVarDeclarationExpression(this, data);
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
protected internal override bool DoMatch(AstNode? other, PatternMatching.Match match)
{
var o = other as OutVarDeclarationExpression;
return o != null && this.Type.DoMatch(o.Type, match) && this.Variable.DoMatch(o.Variable, match);

2
ICSharpCode.Decompiler/CSharp/Syntax/Expressions/ParenthesizedExpression.cs

@ -69,7 +69,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -69,7 +69,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitParenthesizedExpression(this, data);
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
protected internal override bool DoMatch(AstNode? other, PatternMatching.Match match)
{
ParenthesizedExpression? o = other as ParenthesizedExpression;
return o != null && this.Expression.DoMatch(o.Expression, match);

2
ICSharpCode.Decompiler/CSharp/Syntax/Expressions/PointerReferenceExpression.cs

@ -80,7 +80,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -80,7 +80,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitPointerReferenceExpression(this, data);
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
protected internal override bool DoMatch(AstNode? other, PatternMatching.Match match)
{
PointerReferenceExpression? o = other as PointerReferenceExpression;
return o != null && MatchString(this.MemberName, o.MemberName) && this.TypeArguments.DoMatch(o.TypeArguments, match);

2
ICSharpCode.Decompiler/CSharp/Syntax/Expressions/PrimitiveExpression.cs

@ -143,7 +143,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -143,7 +143,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return new TextLocation(line, col);
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
protected internal override bool DoMatch(AstNode? other, PatternMatching.Match match)
{
PrimitiveExpression? o = other as PrimitiveExpression;
return o != null && (this.Value == AnyValue || object.Equals(this.Value, o.Value));

22
ICSharpCode.Decompiler/CSharp/Syntax/Expressions/QueryExpression.cs

@ -48,7 +48,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -48,7 +48,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitNullNode(this, data);
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
protected internal override bool DoMatch(AstNode? other, PatternMatching.Match match)
{
return other == null || other.IsNull;
}
@ -74,7 +74,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -74,7 +74,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitQueryExpression(this, data);
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
protected internal override bool DoMatch(AstNode? other, PatternMatching.Match match)
{
QueryExpression? o = other as QueryExpression;
return o != null && !o.IsNull && this.Clauses.DoMatch(o.Clauses, match);
@ -148,7 +148,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -148,7 +148,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitQueryContinuationClause(this, data);
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
protected internal override bool DoMatch(AstNode? other, PatternMatching.Match match)
{
QueryContinuationClause? o = other as QueryContinuationClause;
return o != null && MatchString(this.Identifier, o.Identifier) && this.PrecedingQuery.DoMatch(o.PrecedingQuery, match);
@ -206,7 +206,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -206,7 +206,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitQueryFromClause(this, data);
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
protected internal override bool DoMatch(AstNode? other, PatternMatching.Match match)
{
QueryFromClause? o = other as QueryFromClause;
return o != null && this.Type.DoMatch(o.Type, match) && MatchString(this.Identifier, o.Identifier)
@ -259,7 +259,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -259,7 +259,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitQueryLetClause(this, data);
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
protected internal override bool DoMatch(AstNode? other, PatternMatching.Match match)
{
QueryLetClause? o = other as QueryLetClause;
return o != null && MatchString(this.Identifier, o.Identifier) && this.Expression.DoMatch(o.Expression, match);
@ -295,7 +295,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -295,7 +295,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitQueryWhereClause(this, data);
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
protected internal override bool DoMatch(AstNode? other, PatternMatching.Match match)
{
QueryWhereClause? o = other as QueryWhereClause;
return o != null && this.Condition.DoMatch(o.Condition, match);
@ -404,7 +404,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -404,7 +404,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitQueryJoinClause(this, data);
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
protected internal override bool DoMatch(AstNode? other, PatternMatching.Match match)
{
QueryJoinClause? o = other as QueryJoinClause;
return o != null && this.IsGroupJoin == o.IsGroupJoin
@ -443,7 +443,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -443,7 +443,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitQueryOrderClause(this, data);
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
protected internal override bool DoMatch(AstNode? other, PatternMatching.Match match)
{
QueryOrderClause? o = other as QueryOrderClause;
return o != null && this.Orderings.DoMatch(o.Orderings, match);
@ -488,7 +488,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -488,7 +488,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitQueryOrdering(this, data);
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
protected internal override bool DoMatch(AstNode? other, PatternMatching.Match match)
{
QueryOrdering? o = other as QueryOrdering;
return o != null && this.Direction == o.Direction && this.Expression.DoMatch(o.Expression, match);
@ -530,7 +530,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -530,7 +530,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitQuerySelectClause(this, data);
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
protected internal override bool DoMatch(AstNode? other, PatternMatching.Match match)
{
QuerySelectClause? o = other as QuerySelectClause;
return o != null && this.Expression.DoMatch(o.Expression, match);
@ -577,7 +577,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -577,7 +577,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitQueryGroupClause(this, data);
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
protected internal override bool DoMatch(AstNode? other, PatternMatching.Match match)
{
QueryGroupClause? o = other as QueryGroupClause;
return o != null && this.Projection.DoMatch(o.Projection, match) && this.Key.DoMatch(o.Key, match);

2
ICSharpCode.Decompiler/CSharp/Syntax/Expressions/RecursivePatternExpression.cs

@ -55,7 +55,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -55,7 +55,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitRecursivePatternExpression(this, data);
}
protected internal override bool DoMatch(AstNode other, Match match)
protected internal override bool DoMatch(AstNode? other, Match match)
{
return other is RecursivePatternExpression o
&& Type.DoMatch(o.Type, match)

2
ICSharpCode.Decompiler/CSharp/Syntax/Expressions/SizeOfExpression.cs

@ -75,7 +75,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -75,7 +75,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitSizeOfExpression(this, data);
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
protected internal override bool DoMatch(AstNode? other, PatternMatching.Match match)
{
SizeOfExpression? o = other as SizeOfExpression;
return o != null && this.Type.DoMatch(o.Type, match);

2
ICSharpCode.Decompiler/CSharp/Syntax/Expressions/StackAllocExpression.cs

@ -77,7 +77,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -77,7 +77,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitStackAllocExpression(this, data);
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
protected internal override bool DoMatch(AstNode? other, PatternMatching.Match match)
{
StackAllocExpression? o = other as StackAllocExpression;
return o != null && this.Type.DoMatch(o.Type, match)

4
ICSharpCode.Decompiler/CSharp/Syntax/Expressions/SwitchExpression.cs

@ -63,7 +63,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -63,7 +63,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitSwitchExpression(this, data);
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
protected internal override bool DoMatch(AstNode? other, PatternMatching.Match match)
{
SwitchExpression? o = other as SwitchExpression;
return o != null && this.Expression.DoMatch(o.Expression, match) && this.SwitchSections.DoMatch(o.SwitchSections, match);
@ -109,7 +109,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -109,7 +109,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitSwitchExpressionSection(this, data);
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
protected internal override bool DoMatch(AstNode? other, PatternMatching.Match match)
{
SwitchExpressionSection? o = other as SwitchExpressionSection;
return o != null && this.Pattern.DoMatch(o.Pattern, match) && this.Body.DoMatch(o.Body, match);

2
ICSharpCode.Decompiler/CSharp/Syntax/Expressions/ThisReferenceExpression.cs

@ -63,7 +63,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -63,7 +63,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitThisReferenceExpression(this, data);
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
protected internal override bool DoMatch(AstNode? other, PatternMatching.Match match)
{
ThisReferenceExpression? o = other as ThisReferenceExpression;
return o != null;

2
ICSharpCode.Decompiler/CSharp/Syntax/Expressions/ThrowExpression.cs

@ -58,7 +58,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -58,7 +58,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitThrowExpression(this, data);
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
protected internal override bool DoMatch(AstNode? other, PatternMatching.Match match)
{
ThrowExpression? o = other as ThrowExpression;
return o != null && this.Expression.DoMatch(o.Expression, match);

2
ICSharpCode.Decompiler/CSharp/Syntax/Expressions/TupleExpression.cs

@ -43,7 +43,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -43,7 +43,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitTupleExpression(this, data);
}
protected internal override bool DoMatch(AstNode other, Match match)
protected internal override bool DoMatch(AstNode? other, Match match)
{
return other is TupleExpression tuple
&& Elements.DoMatch(tuple.Elements, match);

2
ICSharpCode.Decompiler/CSharp/Syntax/Expressions/TypeOfExpression.cs

@ -76,7 +76,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -76,7 +76,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitTypeOfExpression(this, data);
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
protected internal override bool DoMatch(AstNode? other, PatternMatching.Match match)
{
TypeOfExpression? o = other as TypeOfExpression;
return o != null && this.Type.DoMatch(o.Type, match);

2
ICSharpCode.Decompiler/CSharp/Syntax/Expressions/TypeReferenceExpression.cs

@ -54,7 +54,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -54,7 +54,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
AddChild(type, Roles.Type);
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
protected internal override bool DoMatch(AstNode? other, PatternMatching.Match match)
{
TypeReferenceExpression? o = other as TypeReferenceExpression;
return o != null && this.Type.DoMatch(o.Type, match);

2
ICSharpCode.Decompiler/CSharp/Syntax/Expressions/UnaryOperatorExpression.cs

@ -87,7 +87,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -87,7 +87,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitUnaryOperatorExpression(this, data);
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
protected internal override bool DoMatch(AstNode? other, PatternMatching.Match match)
{
UnaryOperatorExpression? o = other as UnaryOperatorExpression;
return o != null && (this.Operator == UnaryOperatorType.Any || this.Operator == o.Operator)

2
ICSharpCode.Decompiler/CSharp/Syntax/Expressions/UncheckedExpression.cs

@ -75,7 +75,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -75,7 +75,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitUncheckedExpression(this, data);
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
protected internal override bool DoMatch(AstNode? other, PatternMatching.Match match)
{
UncheckedExpression? o = other as UncheckedExpression;
return o != null && this.Expression.DoMatch(o.Expression, match);

2
ICSharpCode.Decompiler/CSharp/Syntax/Expressions/UndocumentedExpression.cs

@ -95,7 +95,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -95,7 +95,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitUndocumentedExpression(this, data);
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
protected internal override bool DoMatch(AstNode? other, PatternMatching.Match match)
{
UndocumentedExpression? o = other as UndocumentedExpression;
return o != null && this.UndocumentedExpressionType == o.UndocumentedExpressionType && this.Arguments.DoMatch(o.Arguments, match);

2
ICSharpCode.Decompiler/CSharp/Syntax/Expressions/WithInitializerExpression.cs

@ -57,7 +57,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -57,7 +57,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitWithInitializerExpression(this, data);
}
protected internal override bool DoMatch(AstNode other, Match match)
protected internal override bool DoMatch(AstNode? other, Match match)
{
return other is WithInitializerExpression o
&& this.Expression.DoMatch(o.Expression, match)

2
ICSharpCode.Decompiler/CSharp/Syntax/FunctionPointerAstType.cs

@ -66,7 +66,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -66,7 +66,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitFunctionPointerType(this, data);
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
protected internal override bool DoMatch(AstNode? other, PatternMatching.Match match)
{
return other is FunctionPointerAstType o
&& this.CallingConventions.DoMatch(o.CallingConventions, match)

4
ICSharpCode.Decompiler/CSharp/Syntax/GeneralScope/Attribute.cs

@ -77,13 +77,13 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -77,13 +77,13 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitAttribute(this, data);
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
protected internal override bool DoMatch(AstNode? other, PatternMatching.Match match)
{
Attribute? o = other as Attribute;
return o != null && this.Type.DoMatch(o.Type, match) && this.Arguments.DoMatch(o.Arguments, match);
}
public override string ToString(CSharpFormattingOptions formattingOptions)
public override string ToString(CSharpFormattingOptions? formattingOptions)
{
if (IsNull)
return "Null";

4
ICSharpCode.Decompiler/CSharp/Syntax/GeneralScope/AttributeSection.cs

@ -66,7 +66,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -66,7 +66,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitPatternPlaceholder(this, child, data);
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
protected internal override bool DoMatch(AstNode? other, PatternMatching.Match match)
{
return child.DoMatch(other, match);
}
@ -129,7 +129,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -129,7 +129,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitAttributeSection(this, data);
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
protected internal override bool DoMatch(AstNode? other, PatternMatching.Match match)
{
AttributeSection? o = other as AttributeSection;
return o != null && MatchString(this.AttributeTarget, o.AttributeTarget) && this.Attributes.DoMatch(o.Attributes, match);

2
ICSharpCode.Decompiler/CSharp/Syntax/GeneralScope/Comment.cs

@ -143,7 +143,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -143,7 +143,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitComment(this, data);
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
protected internal override bool DoMatch(AstNode? other, PatternMatching.Match match)
{
Comment? o = other as Comment;
return o != null && this.CommentType == o.CommentType && MatchString(this.Content, o.Content);

2
ICSharpCode.Decompiler/CSharp/Syntax/GeneralScope/Constraint.cs

@ -73,7 +73,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -73,7 +73,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitConstraint(this, data);
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
protected internal override bool DoMatch(AstNode? other, PatternMatching.Match match)
{
Constraint? o = other as Constraint;
return o != null && this.TypeParameter.DoMatch(o.TypeParameter, match) && this.BaseTypes.DoMatch(o.BaseTypes, match);

2
ICSharpCode.Decompiler/CSharp/Syntax/GeneralScope/DelegateDeclaration.cs

@ -80,7 +80,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -80,7 +80,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitDelegateDeclaration(this, data);
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
protected internal override bool DoMatch(AstNode? other, PatternMatching.Match match)
{
DelegateDeclaration? o = other as DelegateDeclaration;
return o != null && MatchString(this.Name, o.Name)

2
ICSharpCode.Decompiler/CSharp/Syntax/GeneralScope/ExternAliasDeclaration.cs

@ -83,7 +83,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -83,7 +83,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitExternAliasDeclaration(this, data);
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
protected internal override bool DoMatch(AstNode? other, PatternMatching.Match match)
{
var o = other as ExternAliasDeclaration;
return o != null && MatchString(this.Name, o.Name);

2
ICSharpCode.Decompiler/CSharp/Syntax/GeneralScope/NamespaceDeclaration.cs

@ -150,7 +150,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -150,7 +150,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitNamespaceDeclaration(this, data);
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
protected internal override bool DoMatch(AstNode? other, PatternMatching.Match match)
{
NamespaceDeclaration? o = other as NamespaceDeclaration;
return o != null && MatchString(this.Name, o.Name) && this.Members.DoMatch(o.Members, match);

2
ICSharpCode.Decompiler/CSharp/Syntax/GeneralScope/PreProcessorDirective.cs

@ -193,7 +193,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -193,7 +193,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitPreProcessorDirective(this, data);
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
protected internal override bool DoMatch(AstNode? other, PatternMatching.Match match)
{
PreProcessorDirective? o = other as PreProcessorDirective;
return o != null && Type == o.Type && MatchString(Argument, o.Argument);

2
ICSharpCode.Decompiler/CSharp/Syntax/GeneralScope/TypeDeclaration.cs

@ -147,7 +147,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -147,7 +147,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitTypeDeclaration(this, data);
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
protected internal override bool DoMatch(AstNode? other, PatternMatching.Match match)
{
TypeDeclaration? o = other as TypeDeclaration;
return o != null && this.ClassType == o.ClassType && MatchString(this.Name, o.Name)

2
ICSharpCode.Decompiler/CSharp/Syntax/GeneralScope/TypeParameterDeclaration.cs

@ -104,7 +104,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -104,7 +104,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitTypeParameterDeclaration(this, data);
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
protected internal override bool DoMatch(AstNode? other, PatternMatching.Match match)
{
TypeParameterDeclaration? o = other as TypeParameterDeclaration;
return o != null && this.Variance == o.Variance && MatchString(this.Name, o.Name) && this.Attributes.DoMatch(o.Attributes, match);

2
ICSharpCode.Decompiler/CSharp/Syntax/GeneralScope/UsingAliasDeclaration.cs

@ -99,7 +99,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -99,7 +99,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitUsingAliasDeclaration(this, data);
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
protected internal override bool DoMatch(AstNode? other, PatternMatching.Match match)
{
UsingAliasDeclaration? o = other as UsingAliasDeclaration;
return o != null && MatchString(this.Alias, o.Alias) && this.Import.DoMatch(o.Import, match);

2
ICSharpCode.Decompiler/CSharp/Syntax/GeneralScope/UsingDeclaration.cs

@ -115,7 +115,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -115,7 +115,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitUsingDeclaration(this, data);
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
protected internal override bool DoMatch(AstNode? other, PatternMatching.Match match)
{
UsingDeclaration? o = other as UsingDeclaration;
return o != null && this.Import.DoMatch(o.Import, match);

4
ICSharpCode.Decompiler/CSharp/Syntax/Identifier.cs

@ -54,7 +54,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -54,7 +54,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitNullNode(this, data);
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
protected internal override bool DoMatch(AstNode? other, PatternMatching.Match match)
{
return other == null || other.IsNull;
}
@ -164,7 +164,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -164,7 +164,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitIdentifier(this, data);
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
protected internal override bool DoMatch(AstNode? other, PatternMatching.Match match)
{
Identifier? o = other as Identifier;
return o != null && !o.IsNull && MatchString(this.Name, o.Name);

2
ICSharpCode.Decompiler/CSharp/Syntax/InvocationAstType.cs

@ -55,7 +55,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -55,7 +55,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitInvocationType(this, data);
}
protected internal override bool DoMatch(AstNode other, Match match)
protected internal override bool DoMatch(AstNode? other, Match match)
{
return other is InvocationAstType o
&& this.BaseType.DoMatch(o.BaseType, match)

2
ICSharpCode.Decompiler/CSharp/Syntax/MemberType.cs

@ -112,7 +112,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -112,7 +112,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitMemberType(this, data);
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
protected internal override bool DoMatch(AstNode? other, PatternMatching.Match match)
{
MemberType? o = other as MemberType;
return o != null && this.IsDoubleColon == o.IsDoubleColon

2
ICSharpCode.Decompiler/CSharp/Syntax/PatternMatching/Pattern.cs

@ -31,7 +31,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax.PatternMatching @@ -31,7 +31,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax.PatternMatching
/// </summary>
public static readonly string AnyString = "$any$";
public static bool MatchString(string pattern, string text)
public static bool MatchString(string? pattern, string? text)
{
return pattern == AnyString || pattern == text;
}

4
ICSharpCode.Decompiler/CSharp/Syntax/PrimitiveType.cs

@ -100,13 +100,13 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -100,13 +100,13 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitPrimitiveType(this, data);
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
protected internal override bool DoMatch(AstNode? other, PatternMatching.Match match)
{
PrimitiveType? o = other as PrimitiveType;
return o != null && MatchString(this.Keyword, o.Keyword);
}
public override string ToString(CSharpFormattingOptions formattingOptions)
public override string ToString(CSharpFormattingOptions? formattingOptions)
{
return Keyword;
}

6
ICSharpCode.Decompiler/CSharp/Syntax/SimpleType.cs

@ -60,12 +60,12 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -60,12 +60,12 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitNullNode(this, data);
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
protected internal override bool DoMatch(AstNode? other, PatternMatching.Match match)
{
return other == null || other.IsNull;
}
public override ITypeReference ToTypeReference(NameLookupMode lookupMode, InterningProvider interningProvider)
public override ITypeReference ToTypeReference(NameLookupMode lookupMode, InterningProvider? interningProvider)
{
return SpecialType.UnknownType;
}
@ -141,7 +141,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -141,7 +141,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitSimpleType(this, data);
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
protected internal override bool DoMatch(AstNode? other, PatternMatching.Match match)
{
SimpleType? o = other as SimpleType;
return o != null && MatchString(this.Identifier, o.Identifier) && this.TypeArguments.DoMatch(o.TypeArguments, match);

6
ICSharpCode.Decompiler/CSharp/Syntax/Statements/BlockStatement.cs

@ -60,7 +60,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -60,7 +60,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitNullNode(this, data);
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
protected internal override bool DoMatch(AstNode? other, PatternMatching.Match match)
{
return other == null || other.IsNull;
}
@ -101,7 +101,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -101,7 +101,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitPatternPlaceholder(this, child, data);
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
protected internal override bool DoMatch(AstNode? other, PatternMatching.Match match)
{
return child.DoMatch(other, match);
}
@ -140,7 +140,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -140,7 +140,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitBlockStatement(this, data);
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
protected internal override bool DoMatch(AstNode? other, PatternMatching.Match match)
{
BlockStatement? o = other as BlockStatement;
return o != null && !o.IsNull && this.Statements.DoMatch(o.Statements, match);

2
ICSharpCode.Decompiler/CSharp/Syntax/Statements/BreakStatement.cs

@ -57,7 +57,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -57,7 +57,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitBreakStatement(this, data);
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
protected internal override bool DoMatch(AstNode? other, PatternMatching.Match match)
{
BreakStatement? o = other as BreakStatement;
return o != null;

2
ICSharpCode.Decompiler/CSharp/Syntax/Statements/CheckedStatement.cs

@ -67,7 +67,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -67,7 +67,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitCheckedStatement(this, data);
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
protected internal override bool DoMatch(AstNode? other, PatternMatching.Match match)
{
CheckedStatement? o = other as CheckedStatement;
return o != null && this.Body.DoMatch(o.Body, match);

2
ICSharpCode.Decompiler/CSharp/Syntax/Statements/ContinueStatement.cs

@ -57,7 +57,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -57,7 +57,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitContinueStatement(this, data);
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
protected internal override bool DoMatch(AstNode? other, PatternMatching.Match match)
{
ContinueStatement? o = other as ContinueStatement;
return o != null;

2
ICSharpCode.Decompiler/CSharp/Syntax/Statements/DoWhileStatement.cs

@ -80,7 +80,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -80,7 +80,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitDoWhileStatement(this, data);
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
protected internal override bool DoMatch(AstNode? other, PatternMatching.Match match)
{
DoWhileStatement? o = other as DoWhileStatement;
return o != null && this.EmbeddedStatement.DoMatch(o.EmbeddedStatement, match) && this.Condition.DoMatch(o.Condition, match);

2
ICSharpCode.Decompiler/CSharp/Syntax/Statements/EmptyStatement.cs

@ -64,7 +64,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -64,7 +64,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitEmptyStatement(this, data);
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
protected internal override bool DoMatch(AstNode? other, PatternMatching.Match match)
{
EmptyStatement? o = other as EmptyStatement;
return o != null;

2
ICSharpCode.Decompiler/CSharp/Syntax/Statements/ExpressionStatement.cs

@ -65,7 +65,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -65,7 +65,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
this.Expression = expression;
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
protected internal override bool DoMatch(AstNode? other, PatternMatching.Match match)
{
ExpressionStatement? o = other as ExpressionStatement;
return o != null && this.Expression.DoMatch(o.Expression, match);

2
ICSharpCode.Decompiler/CSharp/Syntax/Statements/FixedStatement.cs

@ -75,7 +75,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -75,7 +75,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitFixedStatement(this, data);
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
protected internal override bool DoMatch(AstNode? other, PatternMatching.Match match)
{
FixedStatement? o = other as FixedStatement;
return o != null && this.Type.DoMatch(o.Type, match) && this.Variables.DoMatch(o.Variables, match) && this.EmbeddedStatement.DoMatch(o.EmbeddedStatement, match);

2
ICSharpCode.Decompiler/CSharp/Syntax/Statements/ForStatement.cs

@ -86,7 +86,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -86,7 +86,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitForStatement(this, data);
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
protected internal override bool DoMatch(AstNode? other, PatternMatching.Match match)
{
ForStatement? o = other as ForStatement;
return o != null && this.Initializers.DoMatch(o.Initializers, match) && this.Condition.DoMatch(o.Condition, match)

2
ICSharpCode.Decompiler/CSharp/Syntax/Statements/ForeachStatement.cs

@ -96,7 +96,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -96,7 +96,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitForeachStatement(this, data);
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
protected internal override bool DoMatch(AstNode? other, PatternMatching.Match match)
{
ForeachStatement? o = other as ForeachStatement;
return o != null && this.VariableType.DoMatch(o.VariableType, match) && this.VariableDesignation.DoMatch(o.VariableDesignation, match)

6
ICSharpCode.Decompiler/CSharp/Syntax/Statements/GotoStatement.cs

@ -78,7 +78,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -78,7 +78,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitGotoStatement(this, data);
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
protected internal override bool DoMatch(AstNode? other, PatternMatching.Match match)
{
GotoStatement? o = other as GotoStatement;
return o != null && MatchString(this.Label, o.Label);
@ -128,7 +128,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -128,7 +128,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitGotoCaseStatement(this, data);
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
protected internal override bool DoMatch(AstNode? other, PatternMatching.Match match)
{
GotoCaseStatement? o = other as GotoCaseStatement;
return o != null && this.LabelExpression.DoMatch(o.LabelExpression, match);
@ -170,7 +170,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -170,7 +170,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitGotoDefaultStatement(this, data);
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
protected internal override bool DoMatch(AstNode? other, PatternMatching.Match match)
{
GotoDefaultStatement? o = other as GotoDefaultStatement;
return o != null;

2
ICSharpCode.Decompiler/CSharp/Syntax/Statements/IfElseStatement.cs

@ -84,7 +84,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -84,7 +84,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitIfElseStatement(this, data);
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
protected internal override bool DoMatch(AstNode? other, PatternMatching.Match match)
{
IfElseStatement? o = other as IfElseStatement;
return o != null && this.Condition.DoMatch(o.Condition, match) && this.TrueStatement.DoMatch(o.TrueStatement, match) && this.FalseStatement.DoMatch(o.FalseStatement, match);

2
ICSharpCode.Decompiler/CSharp/Syntax/Statements/LabelStatement.cs

@ -65,7 +65,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -65,7 +65,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitLabelStatement(this, data);
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
protected internal override bool DoMatch(AstNode? other, PatternMatching.Match match)
{
LabelStatement? o = other as LabelStatement;
return o != null && MatchString(this.Label, o.Label);

2
ICSharpCode.Decompiler/CSharp/Syntax/Statements/LocalFunctionDeclarationStatement.cs

@ -49,7 +49,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -49,7 +49,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitLocalFunctionDeclarationStatement(this, data);
}
protected internal override bool DoMatch(AstNode other, Match match)
protected internal override bool DoMatch(AstNode? other, Match match)
{
return other is LocalFunctionDeclarationStatement o && Declaration.DoMatch(o.Declaration, match);
}

2
ICSharpCode.Decompiler/CSharp/Syntax/Statements/LockStatement.cs

@ -71,7 +71,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -71,7 +71,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitLockStatement(this, data);
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
protected internal override bool DoMatch(AstNode? other, PatternMatching.Match match)
{
LockStatement? o = other as LockStatement;
return o != null && this.Expression.DoMatch(o.Expression, match) && this.EmbeddedStatement.DoMatch(o.EmbeddedStatement, match);

2
ICSharpCode.Decompiler/CSharp/Syntax/Statements/ReturnStatement.cs

@ -71,7 +71,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -71,7 +71,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitReturnStatement(this, data);
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
protected internal override bool DoMatch(AstNode? other, PatternMatching.Match match)
{
ReturnStatement? o = other as ReturnStatement;
return o != null && this.Expression.DoMatch(o.Expression, match);

4
ICSharpCode.Decompiler/CSharp/Syntax/Statements/Statement.cs

@ -55,7 +55,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -55,7 +55,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitNullNode(this, data);
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
protected internal override bool DoMatch(AstNode? other, PatternMatching.Match match)
{
return other == null || other.IsNull;
}
@ -96,7 +96,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -96,7 +96,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitPatternPlaceholder(this, child, data);
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
protected internal override bool DoMatch(AstNode? other, PatternMatching.Match match)
{
return child.DoMatch(other, match);
}

8
ICSharpCode.Decompiler/CSharp/Syntax/Statements/SwitchStatement.cs

@ -79,7 +79,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -79,7 +79,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitSwitchStatement(this, data);
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
protected internal override bool DoMatch(AstNode? other, PatternMatching.Match match)
{
SwitchStatement? o = other as SwitchStatement;
return o != null && this.Expression.DoMatch(o.Expression, match) && this.SwitchSections.DoMatch(o.SwitchSections, match);
@ -122,7 +122,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -122,7 +122,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitPatternPlaceholder(this, child, data);
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
protected internal override bool DoMatch(AstNode? other, PatternMatching.Match match)
{
return child.DoMatch(other, match);
}
@ -165,7 +165,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -165,7 +165,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitSwitchSection(this, data);
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
protected internal override bool DoMatch(AstNode? other, PatternMatching.Match match)
{
SwitchSection? o = other as SwitchSection;
return o != null && this.CaseLabels.DoMatch(o.CaseLabels, match) && this.Statements.DoMatch(o.Statements, match);
@ -219,7 +219,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -219,7 +219,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitCaseLabel(this, data);
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
protected internal override bool DoMatch(AstNode? other, PatternMatching.Match match)
{
CaseLabel? o = other as CaseLabel;
return o != null && this.Expression.DoMatch(o.Expression, match);

2
ICSharpCode.Decompiler/CSharp/Syntax/Statements/ThrowStatement.cs

@ -71,7 +71,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -71,7 +71,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitThrowStatement(this, data);
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
protected internal override bool DoMatch(AstNode? other, PatternMatching.Match match)
{
ThrowStatement? o = other as ThrowStatement;
return o != null && this.Expression.DoMatch(o.Expression, match);

8
ICSharpCode.Decompiler/CSharp/Syntax/Statements/TryCatchStatement.cs

@ -75,7 +75,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -75,7 +75,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitTryCatchStatement(this, data);
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
protected internal override bool DoMatch(AstNode? other, PatternMatching.Match match)
{
TryCatchStatement? o = other as TryCatchStatement;
return o != null && this.TryBlock.DoMatch(o.TryBlock, match) && this.CatchClauses.DoMatch(o.CatchClauses, match) && this.FinallyBlock.DoMatch(o.FinallyBlock, match);
@ -119,7 +119,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -119,7 +119,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitNullNode(this, data);
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
protected internal override bool DoMatch(AstNode? other, PatternMatching.Match match)
{
return other == null || other.IsNull;
}
@ -160,7 +160,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -160,7 +160,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitPatternPlaceholder(this, child, data);
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
protected internal override bool DoMatch(AstNode? other, PatternMatching.Match match)
{
return child.DoMatch(other, match);
}
@ -251,7 +251,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -251,7 +251,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitCatchClause(this, data);
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
protected internal override bool DoMatch(AstNode? other, PatternMatching.Match match)
{
CatchClause? o = other as CatchClause;
return o != null && this.Type.DoMatch(o.Type, match) && MatchString(this.VariableName, o.VariableName) && this.Body.DoMatch(o.Body, match);

2
ICSharpCode.Decompiler/CSharp/Syntax/Statements/UncheckedStatement.cs

@ -67,7 +67,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -67,7 +67,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitUncheckedStatement(this, data);
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
protected internal override bool DoMatch(AstNode? other, PatternMatching.Match match)
{
UncheckedStatement? o = other as UncheckedStatement;
return o != null && this.Body.DoMatch(o.Body, match);

2
ICSharpCode.Decompiler/CSharp/Syntax/Statements/UnsafeStatement.cs

@ -58,7 +58,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -58,7 +58,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitUnsafeStatement(this, data);
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
protected internal override bool DoMatch(AstNode? other, PatternMatching.Match match)
{
UnsafeStatement? o = other as UnsafeStatement;
return o != null && this.Body.DoMatch(o.Body, match);

2
ICSharpCode.Decompiler/CSharp/Syntax/Statements/UsingStatement.cs

@ -87,7 +87,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -87,7 +87,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitUsingStatement(this, data);
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
protected internal override bool DoMatch(AstNode? other, PatternMatching.Match match)
{
UsingStatement? o = other as UsingStatement;
return o != null && this.IsAsync == o.IsAsync && this.ResourceAcquisition.DoMatch(o.ResourceAcquisition, match) && this.EmbeddedStatement.DoMatch(o.EmbeddedStatement, match);

2
ICSharpCode.Decompiler/CSharp/Syntax/Statements/VariableDeclarationStatement.cs

@ -79,7 +79,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -79,7 +79,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitVariableDeclarationStatement(this, data);
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
protected internal override bool DoMatch(AstNode? other, PatternMatching.Match match)
{
VariableDeclarationStatement? o = other as VariableDeclarationStatement;
return o != null && this.Modifiers == o.Modifiers && this.Type.DoMatch(o.Type, match) && this.Variables.DoMatch(o.Variables, match);

2
ICSharpCode.Decompiler/CSharp/Syntax/Statements/WhileStatement.cs

@ -71,7 +71,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -71,7 +71,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitWhileStatement(this, data);
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
protected internal override bool DoMatch(AstNode? other, PatternMatching.Match match)
{
WhileStatement? o = other as WhileStatement;
return o != null && this.Condition.DoMatch(o.Condition, match) && this.EmbeddedStatement.DoMatch(o.EmbeddedStatement, match);

2
ICSharpCode.Decompiler/CSharp/Syntax/Statements/YieldBreakStatement.cs

@ -62,7 +62,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -62,7 +62,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitYieldBreakStatement(this, data);
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
protected internal override bool DoMatch(AstNode? other, PatternMatching.Match match)
{
YieldBreakStatement? o = other as YieldBreakStatement;
return o != null;

2
ICSharpCode.Decompiler/CSharp/Syntax/Statements/YieldReturnStatement.cs

@ -67,7 +67,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -67,7 +67,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return visitor.VisitYieldReturnStatement(this, data);
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
protected internal override bool DoMatch(AstNode? other, PatternMatching.Match match)
{
YieldReturnStatement? o = other as YieldReturnStatement;
return o != null && this.Expression.DoMatch(o.Expression, match);

2
ICSharpCode.Decompiler/CSharp/Syntax/SyntaxTree.cs

@ -117,7 +117,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -117,7 +117,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
protected internal override bool DoMatch(AstNode? other, PatternMatching.Match match)
{
SyntaxTree? o = other as SyntaxTree;
return o != null && this.Members.DoMatch(o.Members, match);

10
ICSharpCode.Decompiler/CSharp/Syntax/TextLocation.cs

@ -98,7 +98,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -98,7 +98,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// <summary>
/// Equality test.
/// </summary>
public override bool Equals(object obj)
public override bool Equals(object? obj)
{
if (!(obj is TextLocation))
return false;
@ -187,17 +187,17 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -187,17 +187,17 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
public class TextLocationConverter : TypeConverter
{
public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType)
public override bool CanConvertFrom(ITypeDescriptorContext? context, Type sourceType)
{
return sourceType == typeof(string) || base.CanConvertFrom(context, sourceType);
}
public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType)
public override bool CanConvertTo(ITypeDescriptorContext? context, Type? destinationType)
{
return destinationType == typeof(TextLocation) || base.CanConvertTo(context, destinationType);
}
public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value)
public override object? ConvertFrom(ITypeDescriptorContext? context, CultureInfo? culture, object value)
{
if (value is string)
{
@ -210,7 +210,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -210,7 +210,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return base.ConvertFrom(context, culture, value);
}
public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
public override object? ConvertTo(ITypeDescriptorContext? context, CultureInfo? culture, object? value, Type destinationType)
{
if (value is TextLocation)
{

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save