diff --git a/ICSharpCode.Decompiler.Generators/DecompilerSyntaxTreeGenerator.cs b/ICSharpCode.Decompiler.Generators/DecompilerSyntaxTreeGenerator.cs
index f0d06f5dd..6bab20b84 100644
--- a/ICSharpCode.Decompiler.Generators/DecompilerSyntaxTreeGenerator.cs
+++ b/ICSharpCode.Decompiler.Generators/DecompilerSyntaxTreeGenerator.cs
@@ -30,7 +30,7 @@ namespace ICSharpCode.Decompiler.Generators;
[Generator]
internal class DecompilerSyntaxTreeGenerator : IIncrementalGenerator
{
- record AstNodeAdditions(string NodeName, bool NeedsVisitor, bool IsAbstract, bool BaseHasDefaultConstructor, bool NeedsNullNode, bool NeedsPatternPlaceholder, int NullNodeBaseCtorParamCount, bool IsTypeNode, string VisitMethodName, string VisitMethodParamType, EquatableArray<(string Member, string TypeName, bool RecursiveMatch, bool MatchAny, bool Nullable)>? MembersToMatch, EquatableArray<(string RoleExpr, bool IsCollection, string PropertyName, string PropertyType, string ElementType, bool IsOverride, bool IsNullable, string KindName, bool IsPartial)>? Slots, EquatableArray<(string StringName, string TokenName, bool NullOnEmpty)>? NameSlots, EquatableArray<(string PropertyName, string ParamType, string ElementType, bool IsCollection, bool IsOptional)>? CtorParams);
+ record AstNodeAdditions(string NodeName, bool NeedsVisitor, bool IsAbstract, bool BaseHasDefaultConstructor, bool NeedsPatternPlaceholder, bool IsTypeNode, string VisitMethodName, string VisitMethodParamType, EquatableArray<(string Member, string TypeName, bool RecursiveMatch, bool MatchAny, bool Nullable)>? MembersToMatch, EquatableArray<(string RoleExpr, bool IsCollection, string PropertyName, string PropertyType, string ElementType, bool IsOverride, bool IsNullable, string KindName, bool IsPartial)>? Slots, EquatableArray<(string StringName, string TokenName, bool NullOnEmpty)>? NameSlots, EquatableArray<(string PropertyName, string ParamType, string ElementType, bool IsCollection, bool IsOptional)>? CtorParams);
// Derives the shared SlotKind name from a [Slot] role expression: the last dotted segment with a
// trailing "Role" removed (e.g. "Roles.EmbeddedStatement" -> "EmbeddedStatement", "LeftRole" ->
@@ -174,9 +174,7 @@ internal class DecompilerSyntaxTreeGenerator : IIncrementalGenerator
NeedsVisitor: !targetSymbol.IsAbstract && targetSymbol.BaseType!.IsAbstract,
IsAbstract: targetSymbol.IsAbstract,
BaseHasDefaultConstructor: targetSymbol.BaseType is { } bt && bt.InstanceConstructors.Any(c => c.Parameters.Length == 0 && c.DeclaredAccessibility != Accessibility.Private),
- NeedsNullNode: (bool)attribute.ConstructorArguments[0].Value!,
- NeedsPatternPlaceholder: (bool)attribute.ConstructorArguments[1].Value!,
- NullNodeBaseCtorParamCount: targetSymbol.InstanceConstructors.Min(m => m.Parameters.Length),
+ NeedsPatternPlaceholder: (bool)attribute.ConstructorArguments[0].Value!,
IsTypeNode: targetSymbol.Name == "AstType" || targetSymbol.BaseType?.Name == "AstType",
visitMethodName, paramTypeName, membersToMatch?.ToEquatableArray(), slots?.ToEquatableArray(), nameSlots?.ToEquatableArray(), ctorParams?.ToEquatableArray());
}
@@ -589,7 +587,7 @@ internal class DecompilerSyntaxTreeGenerator : IIncrementalGenerator
builder.AppendLine("namespace ICSharpCode.Decompiler.CSharp.Syntax;");
source = source
- .Concat([new("PatternPlaceholder", true, false, true, false, false, 0, false, "PatternPlaceholder", "AstNode", null, null, null, null)])
+ .Concat([new("PatternPlaceholder", true, false, true, false, false, "PatternPlaceholder", "AstNode", null, null, null, null)])
.ToImmutableArray();
WriteInterface("IAstVisitor", "void", "");
@@ -653,7 +651,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
[global::Microsoft.CodeAnalysis.EmbeddedAttribute]
sealed class DecompilerAstNodeAttribute : global::System.Attribute
{
- public DecompilerAstNodeAttribute(bool hasNullNode = false, bool hasPatternPlaceholder = false) { }
+ public DecompilerAstNodeAttribute(bool hasPatternPlaceholder = false) { }
}
[global::Microsoft.CodeAnalysis.EmbeddedAttribute]
diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/AstNode.cs b/ICSharpCode.Decompiler/CSharp/Syntax/AstNode.cs
index 08b5b110b..ddcf00c8c 100644
--- a/ICSharpCode.Decompiler/CSharp/Syntax/AstNode.cs
+++ b/ICSharpCode.Decompiler/CSharp/Syntax/AstNode.cs
@@ -37,8 +37,8 @@ using ICSharpCode.Decompiler.TypeSystem;
namespace ICSharpCode.Decompiler.CSharp.Syntax
{
- [DecompilerAstNode(hasNullNode: true, hasPatternPlaceholder: true)]
- public abstract partial class AstNode : AbstractAnnotatable, IFreezable, INode, ICloneable
+ [DecompilerAstNode(hasPatternPlaceholder: true)]
+ public abstract partial class AstNode : AbstractAnnotatable, INode, ICloneable
{
AstNode? parent;
// Flattened index of this node within its parent's child-index space (-1 when unparented).
@@ -298,7 +298,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
///
/// Gets the first child with the specified role.
- /// Returns the role's null object if the child is not found.
+ /// Returns null if the child is not found.
///
public T GetChildByRole(SlotKind kind) where T : AstNode?
{
@@ -429,7 +429,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
}
// Writes a single-slot backing field: detaches the old child, attaches the new one, renumbers.
- // A null or null-object value empties the slot. Called by generated single-slot property setters.
+ // A null value empties the slot. Called by generated single-slot property setters.
internal void SetChildNode(ref T? field, T? value) where T : AstNode
{
T? newValue = value;
@@ -488,7 +488,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
}
// Sets the single slot matching the role (used by the non-generic mutation API). Symmetric with
- // GetChildByRole, which returns the null object for a role this node does not declare a slot for:
+ // GetChildByRole, which returns null for a role this node does not declare a slot for:
// a node has no child of a role it has no slot for, so writing one is a no-op.
internal void SetChildByRoleUntyped(SlotKind kind, AstNode? child)
{
diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/AstType.cs b/ICSharpCode.Decompiler/CSharp/Syntax/AstType.cs
index aec98518e..abe9bc689 100644
--- a/ICSharpCode.Decompiler/CSharp/Syntax/AstType.cs
+++ b/ICSharpCode.Decompiler/CSharp/Syntax/AstType.cs
@@ -26,7 +26,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
///
/// A type reference in the C# AST.
///
- [DecompilerAstNode(hasNullNode: true, hasPatternPlaceholder: true)]
+ [DecompilerAstNode(hasPatternPlaceholder: true)]
public abstract partial class AstType : AstNode
{
diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/CSharpSlotInfo.cs b/ICSharpCode.Decompiler/CSharp/Syntax/CSharpSlotInfo.cs
index 2132b2c6f..b9242effd 100644
--- a/ICSharpCode.Decompiler/CSharp/Syntax/CSharpSlotInfo.cs
+++ b/ICSharpCode.Decompiler/CSharp/Syntax/CSharpSlotInfo.cs
@@ -40,25 +40,18 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// Whether the slot holds a collection of children rather than a single child.
public bool IsCollection { get; }
- ///
- /// Whether the slot is syntactically optional. Populated accurately once the null-object model
- /// is replaced by nullable reference types; currently informational.
- ///
- public bool IsOptional { get; }
-
///
/// The slot's kind, shared across node types (so node.Slot.Kind == SlotKind.X identifies a
/// node's position the way node.Role == Roles.X did, including polymorphically).
///
public SlotKind Kind { get; }
- internal CSharpSlotInfo(string name, Type childType, bool isCollection, SlotKind kind, bool isOptional = false)
+ internal CSharpSlotInfo(string name, Type childType, bool isCollection, SlotKind kind)
{
Name = name;
ChildType = childType;
IsCollection = isCollection;
Kind = kind;
- IsOptional = isOptional;
}
public override string ToString() => Name;
diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/ComposedType.cs b/ICSharpCode.Decompiler/CSharp/Syntax/ComposedType.cs
index f772a3a61..653099229 100644
--- a/ICSharpCode.Decompiler/CSharp/Syntax/ComposedType.cs
+++ b/ICSharpCode.Decompiler/CSharp/Syntax/ComposedType.cs
@@ -38,7 +38,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// nullable_reference_type ::= non_nullable_reference_type nullable_type_annotation (C# grammar §8.2.1)
/// nullable_value_type ::= non_nullable_value_type nullable_type_annotation (C# grammar §8.3.1)
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class ComposedType : AstType
{
public const string RefKeyword = "ref";
@@ -132,7 +132,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
///
/// rank_specifier ::= '[' ','* ']' (C# grammar §8.2.1)
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class ArraySpecifier : AstNode
{
diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/DocumentationReference.cs b/ICSharpCode.Decompiler/CSharp/Syntax/DocumentationReference.cs
index f096a0ac9..ffba9be7d 100644
--- a/ICSharpCode.Decompiler/CSharp/Syntax/DocumentationReference.cs
+++ b/ICSharpCode.Decompiler/CSharp/Syntax/DocumentationReference.cs
@@ -31,7 +31,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// | member_name
///
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class DocumentationReference : AstNode
{
diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/AnonymousMethodExpression.cs b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/AnonymousMethodExpression.cs
index 2a98a94de..0f6b11783 100644
--- a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/AnonymousMethodExpression.cs
+++ b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/AnonymousMethodExpression.cs
@@ -32,7 +32,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
///
/// anonymous_method_expression ::= 'async'? 'delegate' parameter* block (C# grammar §12.22.1)
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class AnonymousMethodExpression : Expression
{
public const string DelegateKeyword = "delegate";
diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/AnonymousTypeCreateExpression.cs b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/AnonymousTypeCreateExpression.cs
index 616788503..bb9e5b7c1 100644
--- a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/AnonymousTypeCreateExpression.cs
+++ b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/AnonymousTypeCreateExpression.cs
@@ -30,7 +30,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
///
/// anonymous_object_creation_expression ::= 'new' '{' expression* '}' (C# grammar §12.8.17.4)
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class AnonymousTypeCreateExpression : Expression
{
public const string NewKeyword = "new";
diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/ArrayCreateExpression.cs b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/ArrayCreateExpression.cs
index 07ddd4af0..1e66eebc1 100644
--- a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/ArrayCreateExpression.cs
+++ b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/ArrayCreateExpression.cs
@@ -23,7 +23,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
///
/// array_creation_expression ::= 'new' type '[' expression* ']' array_specifier* array_initializer? (C# grammar §12.8.17.5)
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class ArrayCreateExpression : Expression
{
public const string NewKeyword = "new";
diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/ArrayInitializerExpression.cs b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/ArrayInitializerExpression.cs
index e547141bc..dd8572176 100644
--- a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/ArrayInitializerExpression.cs
+++ b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/ArrayInitializerExpression.cs
@@ -31,7 +31,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
///
/// array_initializer ::= '{' expression* '}' (C# grammar §17.7)
///
- [DecompilerAstNode(hasNullNode: true, hasPatternPlaceholder: true)]
+ [DecompilerAstNode(hasPatternPlaceholder: true)]
public partial class ArrayInitializerExpression : Expression
{
[Slot("Expression")]
diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/AsExpression.cs b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/AsExpression.cs
index c35c02425..398be8bfa 100644
--- a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/AsExpression.cs
+++ b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/AsExpression.cs
@@ -29,7 +29,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// Operator precedence is not represented in the syntax tree; required parentheses are reconstructed by .
/// as_expression ::= expression 'as' type (C# grammar §12.15.1)
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class AsExpression : Expression
{
public const string AsKeyword = "as";
diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/AssignmentExpression.cs b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/AssignmentExpression.cs
index c0203bf06..89cbef82f 100644
--- a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/AssignmentExpression.cs
+++ b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/AssignmentExpression.cs
@@ -34,7 +34,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// assignment_expression ::= expression assignment_operator expression (C# grammar §12.24)
/// assignment_operator ::= '=' | '+=' | '-=' | '*=' | '/=' | '%=' | '<<=' | '>>=' | '>>>=' | '&=' | '|=' | '^='
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class AssignmentExpression : Expression
{
// reuse roles from BinaryOperatorExpression
diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/BaseReferenceExpression.cs b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/BaseReferenceExpression.cs
index 02ec523d1..4c78c6f16 100644
--- a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/BaseReferenceExpression.cs
+++ b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/BaseReferenceExpression.cs
@@ -29,7 +29,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
///
/// base_access ::= 'base' (C# grammar §12.8.15)
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class BaseReferenceExpression : Expression
{
// StartLocation comes from the base (stored at print time); only the end needs deriving.
diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/BinaryOperatorExpression.cs b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/BinaryOperatorExpression.cs
index 536946780..cae740e91 100644
--- a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/BinaryOperatorExpression.cs
+++ b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/BinaryOperatorExpression.cs
@@ -36,7 +36,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// binary_operator_expression ::= expression binary_operator expression (C# grammar §12.13-§12.18, precedence-flattened)
/// binary_operator ::= '*' | '/' | '%' | '+' | '-' | '<<' | '>>' | '>>>' | '<' | '>' | '<=' | '>=' | '==' | '!=' | '&' | '^' | '|' | '&&' | '||' | '??' | '..'
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class BinaryOperatorExpression : Expression
{
public const string BitwiseAndToken = "&";
@@ -230,7 +230,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// left ?? right
NullCoalescing,
/// left .. right
- /// left and right are optional = may be Expression.Null
+ /// left and right are optional and may be null
Range,
/// left is right
diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/CastExpression.cs b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/CastExpression.cs
index 7590c7900..8e1a0f752 100644
--- a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/CastExpression.cs
+++ b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/CastExpression.cs
@@ -28,7 +28,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
///
/// cast_expression ::= '(' type ')' expression (C# grammar §12.9.8)
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class CastExpression : Expression
{
[Slot("Type")]
diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/CheckedExpression.cs b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/CheckedExpression.cs
index acb4ae698..eaf54f329 100644
--- a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/CheckedExpression.cs
+++ b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/CheckedExpression.cs
@@ -29,7 +29,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
///
/// checked_expression ::= 'checked' '(' expression ')' (C# grammar §12.8.20)
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class CheckedExpression : Expression
{
public const string CheckedKeyword = "checked";
diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/ConditionalExpression.cs b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/ConditionalExpression.cs
index 6a09816d0..24d5473fc 100644
--- a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/ConditionalExpression.cs
+++ b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/ConditionalExpression.cs
@@ -29,7 +29,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// Operator precedence is not represented in the syntax tree; required parentheses are reconstructed by .
/// conditional_expression ::= expression '?' expression ':' expression (C# grammar §12.21)
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class ConditionalExpression : Expression
{
public const string QuestionMarkToken = "?";
diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/DeclarationExpression.cs b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/DeclarationExpression.cs
index b61d6ae4b..2f54379f1 100644
--- a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/DeclarationExpression.cs
+++ b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/DeclarationExpression.cs
@@ -21,7 +21,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
///
/// declaration_expression ::= type variable_designation (C# grammar §12.20)
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class DeclarationExpression : Expression
{
[Slot("Type")]
diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/DefaultValueExpression.cs b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/DefaultValueExpression.cs
index dfaa357f0..d501bfed4 100644
--- a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/DefaultValueExpression.cs
+++ b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/DefaultValueExpression.cs
@@ -29,7 +29,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
///
/// default_value_expression ::= 'default' ( '(' type ')' )? (C# grammar §12.8.21)
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class DefaultValueExpression : Expression
{
public const string DefaultKeyword = "default";
diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/DirectionExpression.cs b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/DirectionExpression.cs
index 6f297fab9..28d3ba4de 100644
--- a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/DirectionExpression.cs
+++ b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/DirectionExpression.cs
@@ -37,7 +37,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
///
/// argument_value ::= ( 'ref' | 'out' | 'in' )? expression (C# grammar §12.6.2.1)
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class DirectionExpression : Expression
{
public const string RefKeyword = "ref";
diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/ErrorExpression.cs b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/ErrorExpression.cs
index 3611c4e24..bd85c20e0 100644
--- a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/ErrorExpression.cs
+++ b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/ErrorExpression.cs
@@ -29,7 +29,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// No C# spec grammar production: placeholder inserted when the AST is built from input that does not parse as valid C#.
/// error_expression ::= /* unparseable input */
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class ErrorExpression : Expression
{
public TextLocation Location { get; set; }
diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/Expression.cs b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/Expression.cs
index e86d8ad4f..e13b5c12f 100644
--- a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/Expression.cs
+++ b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/Expression.cs
@@ -27,7 +27,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// This class is useful even though it doesn't provide any additional functionality:
/// It can be used to communicate more information in APIs, e.g. "this subnode will always be an expression"
///
- [DecompilerAstNode(hasNullNode: true, hasPatternPlaceholder: true)]
+ [DecompilerAstNode(hasPatternPlaceholder: true)]
public abstract partial class Expression : AstNode
{
diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/IdentifierExpression.cs b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/IdentifierExpression.cs
index e0e74f34b..3f66d0024 100644
--- a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/IdentifierExpression.cs
+++ b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/IdentifierExpression.cs
@@ -29,7 +29,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
///
/// simple_name ::= identifier ( '<' type ( ',' type )* '>' )? (C# grammar §12.8.4)
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class IdentifierExpression : Expression
{
public IdentifierExpression(string identifier, TextLocation location)
diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/IndexerExpression.cs b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/IndexerExpression.cs
index 92a73db37..1227353b8 100644
--- a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/IndexerExpression.cs
+++ b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/IndexerExpression.cs
@@ -33,7 +33,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
///
/// element_access ::= expression '[' expression* ']' (C# grammar §12.8.12.1)
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class IndexerExpression : Expression
{
[Slot("TargetExpression")]
diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/InterpolatedStringExpression.cs b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/InterpolatedStringExpression.cs
index 0107dda84..7af01c342 100644
--- a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/InterpolatedStringExpression.cs
+++ b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/InterpolatedStringExpression.cs
@@ -5,7 +5,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
///
/// interpolated_string_expression ::= interpolated_string_content* (C# grammar §12.8.3)
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class InterpolatedStringExpression : Expression
{
public const string OpenQuote = "$\"";
@@ -28,7 +28,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
///
/// (C# grammar §12.8.3)
///
- [DecompilerAstNode(hasNullNode: true)]
+ [DecompilerAstNode]
public abstract partial class InterpolatedStringContent : AstNode
{
@@ -37,7 +37,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
///
/// interpolation ::= '{' expression ( ',' alignment )? ( ':' format )? '}' (C# grammar §12.8.3)
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class Interpolation : InterpolatedStringContent
{
@@ -58,7 +58,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
///
/// interpolated_string_text ::= text_character+ (C# lexical grammar §12.8.3)
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class InterpolatedStringText : InterpolatedStringContent
{
public string Text { get; set; }
diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/InvocationExpression.cs b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/InvocationExpression.cs
index 3a688521c..4c3cef210 100644
--- a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/InvocationExpression.cs
+++ b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/InvocationExpression.cs
@@ -31,7 +31,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
///
/// invocation_expression ::= expression '(' expression* ')' (C# grammar §12.8.10.1)
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class InvocationExpression : Expression
{
[Slot("TargetExpression")]
diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/IsExpression.cs b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/IsExpression.cs
index 9c51e757a..930d7bc6c 100644
--- a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/IsExpression.cs
+++ b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/IsExpression.cs
@@ -30,7 +30,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// Operator precedence is not represented in the syntax tree; required parentheses are reconstructed by .
/// is_expression ::= expression 'is' type (C# grammar §12.15.1)
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class IsExpression : Expression
{
public const string IsKeyword = "is";
diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/LambdaExpression.cs b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/LambdaExpression.cs
index 47c922715..2d8ff21c6 100644
--- a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/LambdaExpression.cs
+++ b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/LambdaExpression.cs
@@ -29,7 +29,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
///
/// lambda_expression ::= attribute_section* 'async'? parameter* '=>' ( block | expression ) (C# grammar §12.22.1)
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class LambdaExpression : Expression
{
public const string AsyncModifier = "async";
diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/MemberReferenceExpression.cs b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/MemberReferenceExpression.cs
index 1072285a2..77a559610 100644
--- a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/MemberReferenceExpression.cs
+++ b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/MemberReferenceExpression.cs
@@ -31,7 +31,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
///
/// member_reference_expression ::= expression '.' identifier ( '<' type ( ',' type )* '>' )? (C# grammar §12.8.7.1)
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class MemberReferenceExpression : Expression
{
[Slot("TargetExpression")]
diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/NamedArgumentExpression.cs b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/NamedArgumentExpression.cs
index 0ac95213d..ba909ac05 100644
--- a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/NamedArgumentExpression.cs
+++ b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/NamedArgumentExpression.cs
@@ -22,7 +22,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// Represents a named argument passed to a method or attribute.
/// named_argument_expression ::= identifier ':' expression (C# grammar §12.6.2.1)
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class NamedArgumentExpression : Expression
{
[NameSlot("Identifier")]
diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/NamedExpression.cs b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/NamedExpression.cs
index 53d8c3b85..762d5aa58 100644
--- a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/NamedExpression.cs
+++ b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/NamedExpression.cs
@@ -30,7 +30,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// No standalone expression production: 'name = value' as used in object initializers (member_initializer), anonymous-object members (member_declarator), and named attribute arguments.
/// named_expression ::= identifier '=' expression
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class NamedExpression : Expression
{
[NameSlot("Identifier")]
diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/NullReferenceExpression.cs b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/NullReferenceExpression.cs
index 3c9e6878f..26836c619 100644
--- a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/NullReferenceExpression.cs
+++ b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/NullReferenceExpression.cs
@@ -29,7 +29,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
///
/// null_reference_expression ::= 'null' (C# grammar §6.4.5.1)
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class NullReferenceExpression : Expression
{
// StartLocation comes from the base (stored at print time); only the end needs deriving.
diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/ObjectCreateExpression.cs b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/ObjectCreateExpression.cs
index 8f5eb99e2..f11edeb7b 100644
--- a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/ObjectCreateExpression.cs
+++ b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/ObjectCreateExpression.cs
@@ -33,7 +33,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
///
/// object_create_expression ::= 'new' type '(' expression* ')' array_initializer? (C# grammar §12.8.17.2.1)
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class ObjectCreateExpression : Expression
{
public const string NewKeyword = "new";
diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/OutVarDeclarationExpression.cs b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/OutVarDeclarationExpression.cs
index 9a7ebffe8..8f3bc04fc 100644
--- a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/OutVarDeclarationExpression.cs
+++ b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/OutVarDeclarationExpression.cs
@@ -21,7 +21,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
///
/// out_var_declaration_expression ::= type variable_initializer (C# grammar §12.20)
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class OutVarDeclarationExpression : Expression
{
public const string OutKeyword = DirectionExpression.OutKeyword;
diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/ParenthesizedExpression.cs b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/ParenthesizedExpression.cs
index 506c1e5f4..2b1246876 100644
--- a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/ParenthesizedExpression.cs
+++ b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/ParenthesizedExpression.cs
@@ -29,7 +29,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
///
/// parenthesized_expression ::= '(' expression ')' (C# grammar §12.8.5)
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class ParenthesizedExpression : Expression
{
[Slot("Expression")]
diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/PointerReferenceExpression.cs b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/PointerReferenceExpression.cs
index 12ad74469..720d86d2d 100644
--- a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/PointerReferenceExpression.cs
+++ b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/PointerReferenceExpression.cs
@@ -29,7 +29,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
///
/// pointer_member_access ::= expression '->' identifier ( '<' type ( ',' type )* '>' )? (C# grammar §24.6.3)
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class PointerReferenceExpression : Expression
{
public const string ArrowToken = "->";
diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/PrimitiveExpression.cs b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/PrimitiveExpression.cs
index e1539cb59..3b9927741 100644
--- a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/PrimitiveExpression.cs
+++ b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/PrimitiveExpression.cs
@@ -56,7 +56,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
///
/// (C# grammar §6.4.5.1)
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class PrimitiveExpression : Expression
{
public static readonly object AnyValue = new object();
diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/QueryExpression.cs b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/QueryExpression.cs
index 07e6939b4..4b49bfd1d 100644
--- a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/QueryExpression.cs
+++ b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/QueryExpression.cs
@@ -23,7 +23,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
///
/// query_expression ::= query_clause+ (C# grammar §12.23.1)
///
- [DecompilerAstNode(hasNullNode: true)]
+ [DecompilerAstNode]
public sealed partial class QueryExpression : Expression
{
@@ -41,7 +41,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// A continuation is always the first clause of the query expression that contains it.
/// query_continuation ::= query_expression 'into' identifier (C# grammar §12.23.1)
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class QueryContinuationClause : QueryClause
{
public const string IntoKeyword = "into";
@@ -56,7 +56,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
///
/// from_clause ::= 'from' type? identifier 'in' expression (C# grammar §12.23.1)
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class QueryFromClause : QueryClause
{
public const string FromKeyword = "from";
@@ -75,7 +75,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
///
/// let_clause ::= 'let' identifier '=' expression (C# grammar §12.23.1)
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class QueryLetClause : QueryClause
{
public const string LetKeyword = "let";
@@ -90,7 +90,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
///
/// where_clause ::= 'where' expression (C# grammar §12.23.1)
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class QueryWhereClause : QueryClause
{
public const string WhereKeyword = "where";
@@ -108,7 +108,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
///
/// (C# grammar §12.23.1)
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class QueryJoinClause : QueryClause
{
public const string JoinKeyword = "join";
@@ -145,7 +145,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
///
/// orderby_clause ::= 'orderby' ordering ( ',' ordering )* (C# grammar §12.23.1)
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class QueryOrderClause : QueryClause
{
public const string OrderbyKeyword = "orderby";
@@ -157,7 +157,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
///
/// ordering ::= expression ( 'ascending' | 'descending' )? (C# grammar §12.23.1)
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class QueryOrdering : AstNode
{
public const string AscendingKeyword = "ascending";
@@ -179,7 +179,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
///
/// select_clause ::= 'select' expression (C# grammar §12.23.1)
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class QuerySelectClause : QueryClause
{
public const string SelectKeyword = "select";
@@ -191,7 +191,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
///
/// group_clause ::= 'group' expression 'by' expression (C# grammar §12.23.1)
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class QueryGroupClause : QueryClause
{
public const string GroupKeyword = "group";
diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/RecursivePatternExpression.cs b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/RecursivePatternExpression.cs
index 97bce4771..ba6eeff98 100644
--- a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/RecursivePatternExpression.cs
+++ b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/RecursivePatternExpression.cs
@@ -28,7 +28,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
///
/// (C# grammar §11.2.5, §11.2.6)
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class RecursivePatternExpression : Expression
{
diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/SizeOfExpression.cs b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/SizeOfExpression.cs
index f69c3d95c..948e2c9c0 100644
--- a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/SizeOfExpression.cs
+++ b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/SizeOfExpression.cs
@@ -29,7 +29,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
///
/// sizeof_expression ::= 'sizeof' '(' type ')' (C# grammar §12.8.19)
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class SizeOfExpression : Expression
{
public const string SizeofKeyword = "sizeof";
diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/StackAllocExpression.cs b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/StackAllocExpression.cs
index 69d54e8f3..810cc93db 100644
--- a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/StackAllocExpression.cs
+++ b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/StackAllocExpression.cs
@@ -38,7 +38,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
///
/// (C# grammar §12.8.22)
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class StackAllocExpression : Expression
{
public const string StackallocKeyword = "stackalloc";
diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/SwitchExpression.cs b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/SwitchExpression.cs
index 1a027a590..8c80bf221 100644
--- a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/SwitchExpression.cs
+++ b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/SwitchExpression.cs
@@ -22,7 +22,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// Operator precedence is not represented in the syntax tree; required parentheses are reconstructed by .
/// switch_expression ::= expression 'switch' '{' switch_expression_arm* '}' (C# grammar §12.12)
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class SwitchExpression : Expression
{
public const string SwitchKeyword = "switch";
@@ -37,7 +37,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
///
/// switch_expression_arm ::= pattern '=>' expression (C# grammar §12.12)
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class SwitchExpressionSection : AstNode
{
diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/ThisReferenceExpression.cs b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/ThisReferenceExpression.cs
index ae3da63e3..05b6fdf16 100644
--- a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/ThisReferenceExpression.cs
+++ b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/ThisReferenceExpression.cs
@@ -29,7 +29,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
///
/// this_access ::= 'this' (C# grammar §12.8.14)
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class ThisReferenceExpression : Expression
{
// StartLocation comes from the base (stored at print time); only the end needs deriving.
diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/ThrowExpression.cs b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/ThrowExpression.cs
index 1df6b187e..b9944bae0 100644
--- a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/ThrowExpression.cs
+++ b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/ThrowExpression.cs
@@ -21,7 +21,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
///
/// throw_expression ::= 'throw' expression (C# grammar §12.19)
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class ThrowExpression : Expression
{
public const string ThrowKeyword = ThrowStatement.ThrowKeyword;
diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/TupleExpression.cs b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/TupleExpression.cs
index 0e50c339d..262fdc0dd 100644
--- a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/TupleExpression.cs
+++ b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/TupleExpression.cs
@@ -21,7 +21,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
///
/// tuple_literal ::= '(' expression ( ',' expression )+ ')' (C# grammar §12.8.6)
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class TupleExpression : Expression
{
[Slot("Expression")]
diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/TypeOfExpression.cs b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/TypeOfExpression.cs
index 722269378..5f030efad 100644
--- a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/TypeOfExpression.cs
+++ b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/TypeOfExpression.cs
@@ -29,7 +29,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
///
/// typeof_expression ::= 'typeof' '(' type ')' (C# grammar §12.8.18)
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class TypeOfExpression : Expression
{
public const string TypeofKeyword = "typeof";
diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/TypeReferenceExpression.cs b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/TypeReferenceExpression.cs
index 9b016e78b..6863a31ad 100644
--- a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/TypeReferenceExpression.cs
+++ b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/TypeReferenceExpression.cs
@@ -22,7 +22,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// No C# spec grammar production: ILSpy wrapper that lets an AstType appear in expression position (e.g. the 'int' in 'int.Parse(...)').
/// type_reference_expression ::= type
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class TypeReferenceExpression : Expression
{
[Slot("Type")]
diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/UnaryOperatorExpression.cs b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/UnaryOperatorExpression.cs
index 8354848ed..850e644d1 100644
--- a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/UnaryOperatorExpression.cs
+++ b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/UnaryOperatorExpression.cs
@@ -40,7 +40,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// unary_operator ::= '+' | '-' | '!' | '~' | '++' | '--' | '*' | '&' | '^' | 'await'
/// postfix_unary_operator ::= '++' | '--' | '!' | '?'
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class UnaryOperatorExpression : Expression
{
public const string NotToken = "!";
diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/UncheckedExpression.cs b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/UncheckedExpression.cs
index f2f0de94d..36d7255a1 100644
--- a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/UncheckedExpression.cs
+++ b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/UncheckedExpression.cs
@@ -29,7 +29,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
///
/// unchecked_expression ::= 'unchecked' '(' expression ')' (C# grammar §12.8.20)
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class UncheckedExpression : Expression
{
public const string UncheckedKeyword = "unchecked";
diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/UndocumentedExpression.cs b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/UndocumentedExpression.cs
index 97434924f..bac716432 100644
--- a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/UndocumentedExpression.cs
+++ b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/UndocumentedExpression.cs
@@ -46,7 +46,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// | '__makeref' '(' expression ')'
///
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class UndocumentedExpression : Expression
{
public const string ArglistKeyword = "__arglist";
diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/WithInitializerExpression.cs b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/WithInitializerExpression.cs
index 707c65247..bce24ea13 100644
--- a/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/WithInitializerExpression.cs
+++ b/ICSharpCode.Decompiler/CSharp/Syntax/Expressions/WithInitializerExpression.cs
@@ -22,7 +22,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// Operator precedence is not represented in the syntax tree; required parentheses are reconstructed by .
/// with_expression ::= expression 'with' array_initializer (C# grammar §12.10)
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class WithInitializerExpression : Expression
{
diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/FunctionPointerAstType.cs b/ICSharpCode.Decompiler/CSharp/Syntax/FunctionPointerAstType.cs
index 1688f7d38..f130c70f9 100644
--- a/ICSharpCode.Decompiler/CSharp/Syntax/FunctionPointerAstType.cs
+++ b/ICSharpCode.Decompiler/CSharp/Syntax/FunctionPointerAstType.cs
@@ -29,7 +29,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
///
/// funcptr_type ::= 'delegate' '*' calling_convention_specifier? '<' funcptr_parameter_list funcptr_return_type '>' (C# grammar §24.3.3)
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class FunctionPointerAstType : AstType
{
public const string PointerToken = "*";
diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/GeneralScope/Attribute.cs b/ICSharpCode.Decompiler/CSharp/Syntax/GeneralScope/Attribute.cs
index 3e991cf82..47fd3d6e0 100644
--- a/ICSharpCode.Decompiler/CSharp/Syntax/GeneralScope/Attribute.cs
+++ b/ICSharpCode.Decompiler/CSharp/Syntax/GeneralScope/Attribute.cs
@@ -31,7 +31,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
///
/// attribute ::= type ( '(' expression* ')' )? (C# grammar §23.3)
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class Attribute : AstNode
{
diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/GeneralScope/AttributeSection.cs b/ICSharpCode.Decompiler/CSharp/Syntax/GeneralScope/AttributeSection.cs
index cb57f5bb9..ae1a5b9f1 100644
--- a/ICSharpCode.Decompiler/CSharp/Syntax/GeneralScope/AttributeSection.cs
+++ b/ICSharpCode.Decompiler/CSharp/Syntax/GeneralScope/AttributeSection.cs
@@ -29,7 +29,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
///
/// attribute_section ::= '[' ( identifier ':' )? attribute* ']' (C# grammar §23.3)
///
- [DecompilerAstNode(hasNullNode: false, hasPatternPlaceholder: true)]
+ [DecompilerAstNode(hasPatternPlaceholder: true)]
public partial class AttributeSection : AstNode
{
diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/GeneralScope/Comment.cs b/ICSharpCode.Decompiler/CSharp/Syntax/GeneralScope/Comment.cs
index 6a7c1510c..4a12670b2 100644
--- a/ICSharpCode.Decompiler/CSharp/Syntax/GeneralScope/Comment.cs
+++ b/ICSharpCode.Decompiler/CSharp/Syntax/GeneralScope/Comment.cs
@@ -53,7 +53,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
///
/// comment ::= '//' input_character* | '/*' input_character* '*/' (C# lexical grammar §6.3.3)
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class Comment : Trivia
{
diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/GeneralScope/Constraint.cs b/ICSharpCode.Decompiler/CSharp/Syntax/GeneralScope/Constraint.cs
index adc09efb8..aef37af22 100644
--- a/ICSharpCode.Decompiler/CSharp/Syntax/GeneralScope/Constraint.cs
+++ b/ICSharpCode.Decompiler/CSharp/Syntax/GeneralScope/Constraint.cs
@@ -30,7 +30,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// new(), struct and class constraints are represented using a PrimitiveType "new", "struct" or "class".
/// type_parameter_constraints_clause ::= 'where' type ':' type+ (C# grammar §15.2.5)
///
- [DecompilerAstNode(hasNullNode: true)]
+ [DecompilerAstNode]
public sealed partial class Constraint : AstNode
{
diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/GeneralScope/DelegateDeclaration.cs b/ICSharpCode.Decompiler/CSharp/Syntax/GeneralScope/DelegateDeclaration.cs
index 398704744..2e77297d4 100644
--- a/ICSharpCode.Decompiler/CSharp/Syntax/GeneralScope/DelegateDeclaration.cs
+++ b/ICSharpCode.Decompiler/CSharp/Syntax/GeneralScope/DelegateDeclaration.cs
@@ -31,7 +31,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
///
/// delegate_declaration ::= attribute_section* modifier* 'delegate' ( 'ref' 'readonly'? )? type identifier type_parameter* '(' parameter* ')' constraint* (C# grammar §21.2)
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class DelegateDeclaration : EntityDeclaration
{
diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/GeneralScope/ExternAliasDeclaration.cs b/ICSharpCode.Decompiler/CSharp/Syntax/GeneralScope/ExternAliasDeclaration.cs
index 61d76244b..dd7eb948c 100644
--- a/ICSharpCode.Decompiler/CSharp/Syntax/GeneralScope/ExternAliasDeclaration.cs
+++ b/ICSharpCode.Decompiler/CSharp/Syntax/GeneralScope/ExternAliasDeclaration.cs
@@ -29,7 +29,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
///
/// extern_alias_directive ::= 'extern' 'alias' identifier ';' (C# grammar §14.4)
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class ExternAliasDeclaration : AstNode
{
diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/GeneralScope/NamespaceDeclaration.cs b/ICSharpCode.Decompiler/CSharp/Syntax/GeneralScope/NamespaceDeclaration.cs
index f47f78f24..7166001ab 100644
--- a/ICSharpCode.Decompiler/CSharp/Syntax/GeneralScope/NamespaceDeclaration.cs
+++ b/ICSharpCode.Decompiler/CSharp/Syntax/GeneralScope/NamespaceDeclaration.cs
@@ -36,7 +36,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
///
/// (C# grammar §14.3)
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class NamespaceDeclaration : AstNode
{
diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/GeneralScope/PreProcessorDirective.cs b/ICSharpCode.Decompiler/CSharp/Syntax/GeneralScope/PreProcessorDirective.cs
index 8ad9ac6c8..8421735d0 100644
--- a/ICSharpCode.Decompiler/CSharp/Syntax/GeneralScope/PreProcessorDirective.cs
+++ b/ICSharpCode.Decompiler/CSharp/Syntax/GeneralScope/PreProcessorDirective.cs
@@ -49,7 +49,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
///
/// line_directive ::= '#' 'line' ( decimal_digit+ string_literal? | 'default' | 'hidden' ) (C# lexical grammar)
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class LinePreprocessorDirective : PreProcessorDirective
{
public LinePreprocessorDirective(TextLocation startLocation, TextLocation endLocation) : base(PreProcessorDirectiveType.Line, startLocation, endLocation)
@@ -64,7 +64,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
///
/// pragma_warning_directive ::= '#' 'pragma' 'warning' ( 'disable' | 'restore' ) expression* (C# lexical grammar)
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class PragmaWarningPreprocessorDirective : PreProcessorDirective
{
@@ -97,7 +97,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
///
/// pp_directive ::= '#' pp_kind new_line (C# lexical grammar §6.5.1)
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public partial class PreProcessorDirective : Trivia
{
diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/GeneralScope/TypeDeclaration.cs b/ICSharpCode.Decompiler/CSharp/Syntax/GeneralScope/TypeDeclaration.cs
index d38f80d59..57bcdad74 100644
--- a/ICSharpCode.Decompiler/CSharp/Syntax/GeneralScope/TypeDeclaration.cs
+++ b/ICSharpCode.Decompiler/CSharp/Syntax/GeneralScope/TypeDeclaration.cs
@@ -47,7 +47,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
///
/// type_declaration ::= attribute_section* modifier* ( 'class' | 'struct' | 'interface' | 'enum' | 'record' 'class'? | 'record' 'struct' ) identifier type_parameter* ( '(' parameter* ')' )? ( ':' type+ )? constraint* '{' member* '}' ';'? (C# grammar §15.2.1, §16.2.1, §19.2.1, §20.2)
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class TypeDeclaration : EntityDeclaration
{
diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/GeneralScope/TypeParameterDeclaration.cs b/ICSharpCode.Decompiler/CSharp/Syntax/GeneralScope/TypeParameterDeclaration.cs
index 0a35e4ce5..dd88004be 100644
--- a/ICSharpCode.Decompiler/CSharp/Syntax/GeneralScope/TypeParameterDeclaration.cs
+++ b/ICSharpCode.Decompiler/CSharp/Syntax/GeneralScope/TypeParameterDeclaration.cs
@@ -26,7 +26,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// they belong to the parent type or method.
/// type_parameter ::= attribute_section* ( 'in' | 'out' )? identifier (C# grammar §8.5, §15.2.3)
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class TypeParameterDeclaration : AstNode
{
public const string OutVarianceKeyword = "out";
diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/GeneralScope/UsingAliasDeclaration.cs b/ICSharpCode.Decompiler/CSharp/Syntax/GeneralScope/UsingAliasDeclaration.cs
index af2bcadb6..9647e65eb 100644
--- a/ICSharpCode.Decompiler/CSharp/Syntax/GeneralScope/UsingAliasDeclaration.cs
+++ b/ICSharpCode.Decompiler/CSharp/Syntax/GeneralScope/UsingAliasDeclaration.cs
@@ -29,7 +29,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
///
/// using_alias_directive ::= 'using' identifier '=' type ';' (C# grammar §14.6.2)
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class UsingAliasDeclaration : AstNode
{
public const string UsingKeyword = "using";
diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/GeneralScope/UsingDeclaration.cs b/ICSharpCode.Decompiler/CSharp/Syntax/GeneralScope/UsingDeclaration.cs
index 53afdc44b..5ead8bb19 100644
--- a/ICSharpCode.Decompiler/CSharp/Syntax/GeneralScope/UsingDeclaration.cs
+++ b/ICSharpCode.Decompiler/CSharp/Syntax/GeneralScope/UsingDeclaration.cs
@@ -37,7 +37,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
///
/// (C# grammar §14.6.3, §14.6.4)
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class UsingDeclaration : AstNode
{
public const string UsingKeyword = "using";
diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/Identifier.cs b/ICSharpCode.Decompiler/CSharp/Syntax/Identifier.cs
index f49d78849..2bb706d70 100644
--- a/ICSharpCode.Decompiler/CSharp/Syntax/Identifier.cs
+++ b/ICSharpCode.Decompiler/CSharp/Syntax/Identifier.cs
@@ -37,7 +37,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
///
/// (C# lexical grammar §6.4.3)
///
- [DecompilerAstNode(hasNullNode: true)]
+ [DecompilerAstNode]
public sealed partial class Identifier : AstNode
{
diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/InvocationAstType.cs b/ICSharpCode.Decompiler/CSharp/Syntax/InvocationAstType.cs
index 92f9fbf88..9d015b2bd 100644
--- a/ICSharpCode.Decompiler/CSharp/Syntax/InvocationAstType.cs
+++ b/ICSharpCode.Decompiler/CSharp/Syntax/InvocationAstType.cs
@@ -22,7 +22,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// No C# spec grammar production: ILSpy-internal type form used when a type appears applied to arguments (e.g. an attribute type written with its constructor arguments).
/// invocation_ast_type ::= type '(' argument_list? ')'
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class InvocationAstType : AstType
{
[Slot("Expression")]
diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/MemberType.cs b/ICSharpCode.Decompiler/CSharp/Syntax/MemberType.cs
index 2f34d508d..0c33bfcd4 100644
--- a/ICSharpCode.Decompiler/CSharp/Syntax/MemberType.cs
+++ b/ICSharpCode.Decompiler/CSharp/Syntax/MemberType.cs
@@ -31,7 +31,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
///
/// member_type ::= type ( '.' | '::' ) identifier ( '<' type ( ',' type )* '>' )? (C# grammar §7.8.1)
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class MemberType : AstType
{
diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/PrimitiveType.cs b/ICSharpCode.Decompiler/CSharp/Syntax/PrimitiveType.cs
index 60fd4a629..604d2dd77 100644
--- a/ICSharpCode.Decompiler/CSharp/Syntax/PrimitiveType.cs
+++ b/ICSharpCode.Decompiler/CSharp/Syntax/PrimitiveType.cs
@@ -35,7 +35,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// predefined_type ::= 'bool' | 'byte' | 'char' | 'decimal' | 'double' | 'float' | 'int' | 'long' | 'object' | 'sbyte' | 'short' | 'string' | 'uint' | 'ulong' | 'ushort' (C# grammar §12.8.7.1)
/// simple_type ::= numeric_type | 'bool' (C# grammar §8.3.1)
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class PrimitiveType : AstType
{
string keyword = string.Empty;
diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/SimpleType.cs b/ICSharpCode.Decompiler/CSharp/Syntax/SimpleType.cs
index 400d5aa55..87466d0fe 100644
--- a/ICSharpCode.Decompiler/CSharp/Syntax/SimpleType.cs
+++ b/ICSharpCode.Decompiler/CSharp/Syntax/SimpleType.cs
@@ -31,7 +31,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
///
/// simple_type ::= identifier ( '<' type ( ',' type )* '>' )? (C# grammar §7.8.1)
///
- [DecompilerAstNode(hasNullNode: true)]
+ [DecompilerAstNode]
public sealed partial class SimpleType : AstType
{
public SimpleType(Identifier identifier)
diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/Statements/BlockStatement.cs b/ICSharpCode.Decompiler/CSharp/Syntax/Statements/BlockStatement.cs
index acc1281b3..c72380a6d 100644
--- a/ICSharpCode.Decompiler/CSharp/Syntax/Statements/BlockStatement.cs
+++ b/ICSharpCode.Decompiler/CSharp/Syntax/Statements/BlockStatement.cs
@@ -31,7 +31,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
///
/// block ::= '{' statement* '}' (C# grammar §13.3.1)
///
- [DecompilerAstNode(hasNullNode: true, hasPatternPlaceholder: true)]
+ [DecompilerAstNode(hasPatternPlaceholder: true)]
public partial class BlockStatement : Statement, IEnumerable
{
diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/Statements/BreakStatement.cs b/ICSharpCode.Decompiler/CSharp/Syntax/Statements/BreakStatement.cs
index 929f2e6a6..7e948b4b1 100644
--- a/ICSharpCode.Decompiler/CSharp/Syntax/Statements/BreakStatement.cs
+++ b/ICSharpCode.Decompiler/CSharp/Syntax/Statements/BreakStatement.cs
@@ -29,7 +29,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
///
/// break_statement ::= 'break' ';' (C# grammar §13.10.2)
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class BreakStatement : Statement
{
public const string BreakKeyword = "break";
diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/Statements/CheckedStatement.cs b/ICSharpCode.Decompiler/CSharp/Syntax/Statements/CheckedStatement.cs
index eb5e7a04c..9eb13afca 100644
--- a/ICSharpCode.Decompiler/CSharp/Syntax/Statements/CheckedStatement.cs
+++ b/ICSharpCode.Decompiler/CSharp/Syntax/Statements/CheckedStatement.cs
@@ -29,7 +29,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
///
/// checked_statement ::= 'checked' block (C# grammar §13.12)
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class CheckedStatement : Statement
{
public const string CheckedKeyword = "checked";
diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/Statements/ContinueStatement.cs b/ICSharpCode.Decompiler/CSharp/Syntax/Statements/ContinueStatement.cs
index 2c7a21d88..2b1291684 100644
--- a/ICSharpCode.Decompiler/CSharp/Syntax/Statements/ContinueStatement.cs
+++ b/ICSharpCode.Decompiler/CSharp/Syntax/Statements/ContinueStatement.cs
@@ -29,7 +29,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
///
/// continue_statement ::= 'continue' ';' (C# grammar §13.10.3)
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class ContinueStatement : Statement
{
}
diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/Statements/DoWhileStatement.cs b/ICSharpCode.Decompiler/CSharp/Syntax/Statements/DoWhileStatement.cs
index 3bc722a7a..56df5fbc4 100644
--- a/ICSharpCode.Decompiler/CSharp/Syntax/Statements/DoWhileStatement.cs
+++ b/ICSharpCode.Decompiler/CSharp/Syntax/Statements/DoWhileStatement.cs
@@ -29,7 +29,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
///
/// do_statement ::= 'do' statement 'while' '(' expression ')' ';' (C# grammar §13.9.3)
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class DoWhileStatement : Statement
{
public const string DoKeyword = "do";
diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/Statements/EmptyStatement.cs b/ICSharpCode.Decompiler/CSharp/Syntax/Statements/EmptyStatement.cs
index 0f4615f53..f0736ff28 100644
--- a/ICSharpCode.Decompiler/CSharp/Syntax/Statements/EmptyStatement.cs
+++ b/ICSharpCode.Decompiler/CSharp/Syntax/Statements/EmptyStatement.cs
@@ -29,7 +29,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
///
/// empty_statement ::= ';' (C# grammar §13.4)
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class EmptyStatement : Statement
{
public TextLocation Location { get; set; }
diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/Statements/ExpressionStatement.cs b/ICSharpCode.Decompiler/CSharp/Syntax/Statements/ExpressionStatement.cs
index 0419655dd..0fc269024 100644
--- a/ICSharpCode.Decompiler/CSharp/Syntax/Statements/ExpressionStatement.cs
+++ b/ICSharpCode.Decompiler/CSharp/Syntax/Statements/ExpressionStatement.cs
@@ -29,7 +29,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
///
/// expression_statement ::= expression ';' (C# grammar §13.7)
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class ExpressionStatement : Statement
{
[Slot("Expression")]
diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/Statements/FixedStatement.cs b/ICSharpCode.Decompiler/CSharp/Syntax/Statements/FixedStatement.cs
index c2b93c1d7..b5906da1b 100644
--- a/ICSharpCode.Decompiler/CSharp/Syntax/Statements/FixedStatement.cs
+++ b/ICSharpCode.Decompiler/CSharp/Syntax/Statements/FixedStatement.cs
@@ -29,7 +29,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
///
/// fixed_statement ::= 'fixed' '(' type variable_initializer* ')' statement (C# grammar §24.7)
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class FixedStatement : Statement
{
public const string FixedKeyword = "fixed";
diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/Statements/ForStatement.cs b/ICSharpCode.Decompiler/CSharp/Syntax/Statements/ForStatement.cs
index 873d62113..fa54913fc 100644
--- a/ICSharpCode.Decompiler/CSharp/Syntax/Statements/ForStatement.cs
+++ b/ICSharpCode.Decompiler/CSharp/Syntax/Statements/ForStatement.cs
@@ -31,7 +31,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
///
/// for_statement ::= 'for' '(' statement* ';' expression? ';' statement* ')' statement (C# grammar §13.9.4)
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class ForStatement : Statement
{
public const string ForKeyword = "for";
diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/Statements/ForeachStatement.cs b/ICSharpCode.Decompiler/CSharp/Syntax/Statements/ForeachStatement.cs
index a303bacae..1160c0fef 100644
--- a/ICSharpCode.Decompiler/CSharp/Syntax/Statements/ForeachStatement.cs
+++ b/ICSharpCode.Decompiler/CSharp/Syntax/Statements/ForeachStatement.cs
@@ -29,7 +29,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
///
/// foreach_statement ::= 'await'? 'foreach' '(' type variable_designation 'in' expression ')' statement (C# grammar §13.9.5.1)
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class ForeachStatement : Statement
{
public const string AwaitKeyword = UnaryOperatorExpression.AwaitKeyword;
diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/Statements/GotoStatement.cs b/ICSharpCode.Decompiler/CSharp/Syntax/Statements/GotoStatement.cs
index f00c4dc39..93802cf9b 100644
--- a/ICSharpCode.Decompiler/CSharp/Syntax/Statements/GotoStatement.cs
+++ b/ICSharpCode.Decompiler/CSharp/Syntax/Statements/GotoStatement.cs
@@ -29,7 +29,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
///
/// goto_statement ::= 'goto' identifier ';' (C# grammar §13.10.4)
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class GotoStatement : Statement
{
public const string GotoKeyword = "goto";
@@ -40,7 +40,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
///
/// goto_statement ::= 'goto' 'case' expression ';' (C# grammar §13.10.4)
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class GotoCaseStatement : Statement
{
public const string GotoKeyword = "goto";
@@ -56,7 +56,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
///
/// goto_statement ::= 'goto' 'default' ';' (C# grammar §13.10.4)
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class GotoDefaultStatement : Statement
{
public const string GotoKeyword = "goto";
diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/Statements/IfElseStatement.cs b/ICSharpCode.Decompiler/CSharp/Syntax/Statements/IfElseStatement.cs
index 944c2b188..4c69b8e90 100644
--- a/ICSharpCode.Decompiler/CSharp/Syntax/Statements/IfElseStatement.cs
+++ b/ICSharpCode.Decompiler/CSharp/Syntax/Statements/IfElseStatement.cs
@@ -31,7 +31,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
///
/// if_statement ::= 'if' '(' expression ')' statement ( 'else' statement )? (C# grammar §13.8.2)
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class IfElseStatement : Statement
{
public const string IfKeyword = "if";
diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/Statements/LabelStatement.cs b/ICSharpCode.Decompiler/CSharp/Syntax/Statements/LabelStatement.cs
index eadb2b669..0f64a4968 100644
--- a/ICSharpCode.Decompiler/CSharp/Syntax/Statements/LabelStatement.cs
+++ b/ICSharpCode.Decompiler/CSharp/Syntax/Statements/LabelStatement.cs
@@ -29,7 +29,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
///
/// labeled_statement ::= identifier ':' statement (C# grammar §13.5)
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class LabelStatement : Statement
{
[NameSlot("Identifier")]
diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/Statements/LocalFunctionDeclarationStatement.cs b/ICSharpCode.Decompiler/CSharp/Syntax/Statements/LocalFunctionDeclarationStatement.cs
index 8cbe10d9a..3b23f08be 100644
--- a/ICSharpCode.Decompiler/CSharp/Syntax/Statements/LocalFunctionDeclarationStatement.cs
+++ b/ICSharpCode.Decompiler/CSharp/Syntax/Statements/LocalFunctionDeclarationStatement.cs
@@ -21,7 +21,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
///
/// local_function_declaration ::= method_declaration (C# grammar §13.6.4)
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class LocalFunctionDeclarationStatement : Statement
{
diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/Statements/LockStatement.cs b/ICSharpCode.Decompiler/CSharp/Syntax/Statements/LockStatement.cs
index e4ddcc8dd..e3320ff8c 100644
--- a/ICSharpCode.Decompiler/CSharp/Syntax/Statements/LockStatement.cs
+++ b/ICSharpCode.Decompiler/CSharp/Syntax/Statements/LockStatement.cs
@@ -29,7 +29,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
///
/// lock_statement ::= 'lock' '(' expression ')' statement (C# grammar §13.13)
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class LockStatement : Statement
{
public const string LockKeyword = "lock";
diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/Statements/ReturnStatement.cs b/ICSharpCode.Decompiler/CSharp/Syntax/Statements/ReturnStatement.cs
index c4f8eb10a..43ec5a2c4 100644
--- a/ICSharpCode.Decompiler/CSharp/Syntax/Statements/ReturnStatement.cs
+++ b/ICSharpCode.Decompiler/CSharp/Syntax/Statements/ReturnStatement.cs
@@ -31,7 +31,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
///
/// return_statement ::= 'return' expression? ';' (C# grammar §13.10.5)
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class ReturnStatement : Statement
{
public const string ReturnKeyword = "return";
diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/Statements/Statement.cs b/ICSharpCode.Decompiler/CSharp/Syntax/Statements/Statement.cs
index 55a50804e..ac9ae230d 100644
--- a/ICSharpCode.Decompiler/CSharp/Syntax/Statements/Statement.cs
+++ b/ICSharpCode.Decompiler/CSharp/Syntax/Statements/Statement.cs
@@ -27,7 +27,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// This class is useful even though it doesn't provide any additional functionality:
/// It can be used to communicate more information in APIs, e.g. "this subnode will always be a statement"
///
- [DecompilerAstNode(hasNullNode: true, hasPatternPlaceholder: true)]
+ [DecompilerAstNode(hasPatternPlaceholder: true)]
public abstract partial class Statement : AstNode
{
public new Statement Clone()
diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/Statements/SwitchStatement.cs b/ICSharpCode.Decompiler/CSharp/Syntax/Statements/SwitchStatement.cs
index 232e89d69..2a27c9755 100644
--- a/ICSharpCode.Decompiler/CSharp/Syntax/Statements/SwitchStatement.cs
+++ b/ICSharpCode.Decompiler/CSharp/Syntax/Statements/SwitchStatement.cs
@@ -31,7 +31,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
///
/// switch_statement ::= 'switch' expression switch_section* (C# grammar §13.8.3)
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class SwitchStatement : Statement
{
public const string SwitchKeyword = "switch";
@@ -46,7 +46,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
///
/// switch_section ::= switch_label+ statement* (C# grammar §13.8.3)
///
- [DecompilerAstNode(hasNullNode: false, hasPatternPlaceholder: true)]
+ [DecompilerAstNode(hasPatternPlaceholder: true)]
public partial class SwitchSection : AstNode
{
@@ -60,7 +60,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
///
/// switch_label ::= 'case' expression ':' | 'default' ':' (C# grammar §13.8.3)
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class CaseLabel : AstNode
{
public const string CaseKeyword = "case";
diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/Statements/ThrowStatement.cs b/ICSharpCode.Decompiler/CSharp/Syntax/Statements/ThrowStatement.cs
index 842997513..c853391a0 100644
--- a/ICSharpCode.Decompiler/CSharp/Syntax/Statements/ThrowStatement.cs
+++ b/ICSharpCode.Decompiler/CSharp/Syntax/Statements/ThrowStatement.cs
@@ -31,7 +31,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
///
/// throw_statement ::= 'throw' expression? ';' (C# grammar §13.10.6)
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class ThrowStatement : Statement
{
public const string ThrowKeyword = "throw";
diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/Statements/TryCatchStatement.cs b/ICSharpCode.Decompiler/CSharp/Syntax/Statements/TryCatchStatement.cs
index 41a0bd74c..6cb800bee 100644
--- a/ICSharpCode.Decompiler/CSharp/Syntax/Statements/TryCatchStatement.cs
+++ b/ICSharpCode.Decompiler/CSharp/Syntax/Statements/TryCatchStatement.cs
@@ -31,7 +31,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
///
/// try_statement ::= 'try' block catch_clause* ( 'finally' block )? (C# grammar §13.11)
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class TryCatchStatement : Statement
{
public const string TryKeyword = "try";
@@ -50,7 +50,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
///
/// catch_clause ::= 'catch' ( '(' type identifier? ')' )? ( 'when' '(' expression ')' )? block (C# grammar §13.11)
///
- [DecompilerAstNode(hasNullNode: true, hasPatternPlaceholder: true)]
+ [DecompilerAstNode(hasPatternPlaceholder: true)]
public partial class CatchClause : AstNode
{
public const string CatchKeyword = "catch";
diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/Statements/UncheckedStatement.cs b/ICSharpCode.Decompiler/CSharp/Syntax/Statements/UncheckedStatement.cs
index a4de92a20..473ea21aa 100644
--- a/ICSharpCode.Decompiler/CSharp/Syntax/Statements/UncheckedStatement.cs
+++ b/ICSharpCode.Decompiler/CSharp/Syntax/Statements/UncheckedStatement.cs
@@ -29,7 +29,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
///
/// unchecked_statement ::= 'unchecked' block (C# grammar §13.12)
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class UncheckedStatement : Statement
{
public const string UncheckedKeyword = "unchecked";
diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/Statements/UnsafeStatement.cs b/ICSharpCode.Decompiler/CSharp/Syntax/Statements/UnsafeStatement.cs
index 18b575bc9..1722f0f88 100644
--- a/ICSharpCode.Decompiler/CSharp/Syntax/Statements/UnsafeStatement.cs
+++ b/ICSharpCode.Decompiler/CSharp/Syntax/Statements/UnsafeStatement.cs
@@ -29,7 +29,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
///
/// unsafe_statement ::= 'unsafe' block (C# grammar §24.2)
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class UnsafeStatement : Statement
{
public const string UnsafeKeyword = "unsafe";
diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/Statements/UsingStatement.cs b/ICSharpCode.Decompiler/CSharp/Syntax/Statements/UsingStatement.cs
index d2524d059..9f8c4ecae 100644
--- a/ICSharpCode.Decompiler/CSharp/Syntax/Statements/UsingStatement.cs
+++ b/ICSharpCode.Decompiler/CSharp/Syntax/Statements/UsingStatement.cs
@@ -29,7 +29,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
///
/// using_statement ::= 'await'? 'using' '(' ( local_variable_declaration | expression ) ')' statement (C# grammar §13.14.1)
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class UsingStatement : Statement
{
public const string UsingKeyword = "using";
diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/Statements/VariableDeclarationStatement.cs b/ICSharpCode.Decompiler/CSharp/Syntax/Statements/VariableDeclarationStatement.cs
index 67fefb6d2..74156faaf 100644
--- a/ICSharpCode.Decompiler/CSharp/Syntax/Statements/VariableDeclarationStatement.cs
+++ b/ICSharpCode.Decompiler/CSharp/Syntax/Statements/VariableDeclarationStatement.cs
@@ -29,7 +29,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
///
/// local_variable_declaration ::= type variable_initializer+ (C# grammar §13.6.2.1)
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class VariableDeclarationStatement : Statement
{
public VariableDeclarationStatement(AstType type, string name, Expression initializer = null)
diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/Statements/WhileStatement.cs b/ICSharpCode.Decompiler/CSharp/Syntax/Statements/WhileStatement.cs
index 3daf868bd..33253b28d 100644
--- a/ICSharpCode.Decompiler/CSharp/Syntax/Statements/WhileStatement.cs
+++ b/ICSharpCode.Decompiler/CSharp/Syntax/Statements/WhileStatement.cs
@@ -29,7 +29,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
///
/// while_statement ::= 'while' '(' expression ')' statement (C# grammar §13.9.2)
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class WhileStatement : Statement
{
public const string WhileKeyword = "while";
diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/Statements/YieldBreakStatement.cs b/ICSharpCode.Decompiler/CSharp/Syntax/Statements/YieldBreakStatement.cs
index 8bc8b69ed..df0a5b60d 100644
--- a/ICSharpCode.Decompiler/CSharp/Syntax/Statements/YieldBreakStatement.cs
+++ b/ICSharpCode.Decompiler/CSharp/Syntax/Statements/YieldBreakStatement.cs
@@ -29,7 +29,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
///
/// yield_statement ::= 'yield' 'break' ';' (C# grammar §13.15)
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class YieldBreakStatement : Statement
{
public const string YieldKeyword = "yield";
diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/Statements/YieldReturnStatement.cs b/ICSharpCode.Decompiler/CSharp/Syntax/Statements/YieldReturnStatement.cs
index d3f388bde..371c61836 100644
--- a/ICSharpCode.Decompiler/CSharp/Syntax/Statements/YieldReturnStatement.cs
+++ b/ICSharpCode.Decompiler/CSharp/Syntax/Statements/YieldReturnStatement.cs
@@ -29,7 +29,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
///
/// yield_statement ::= 'yield' 'return' expression ';' (C# grammar §13.15)
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class YieldReturnStatement : Statement
{
public const string YieldKeyword = "yield";
diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/SyntaxTree.cs b/ICSharpCode.Decompiler/CSharp/Syntax/SyntaxTree.cs
index cbdef8087..17ef63b64 100644
--- a/ICSharpCode.Decompiler/CSharp/Syntax/SyntaxTree.cs
+++ b/ICSharpCode.Decompiler/CSharp/Syntax/SyntaxTree.cs
@@ -33,7 +33,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
///
/// compilation_unit ::= extern_alias_directive* using_directive* global_attributes? compilation_unit_body (C# grammar §14.2)
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class SyntaxTree : AstNode
{
diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/TupleAstType.cs b/ICSharpCode.Decompiler/CSharp/Syntax/TupleAstType.cs
index 1252a3d82..cec61126e 100644
--- a/ICSharpCode.Decompiler/CSharp/Syntax/TupleAstType.cs
+++ b/ICSharpCode.Decompiler/CSharp/Syntax/TupleAstType.cs
@@ -21,7 +21,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
///
/// tuple_type ::= '(' tuple_type_element (',' tuple_type_element)+ ')' (C# grammar §8.3.1)
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class TupleAstType : AstType
{
@@ -32,7 +32,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
///
/// tuple_type_element ::= type identifier? (C# grammar §8.3.1)
///
- [DecompilerAstNode(hasNullNode: true)]
+ [DecompilerAstNode]
public sealed partial class TupleTypeElement : AstNode
{
[Slot("Type")]
diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/TypeMembers/Accessor.cs b/ICSharpCode.Decompiler/CSharp/Syntax/TypeMembers/Accessor.cs
index fd2b2cf12..937f48e57 100644
--- a/ICSharpCode.Decompiler/CSharp/Syntax/TypeMembers/Accessor.cs
+++ b/ICSharpCode.Decompiler/CSharp/Syntax/TypeMembers/Accessor.cs
@@ -43,7 +43,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
///
/// get/set/init/add/remove
///
- [DecompilerAstNode(hasNullNode: true)]
+ [DecompilerAstNode]
public sealed partial class Accessor : EntityDeclaration
{
diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/TypeMembers/ConstructorDeclaration.cs b/ICSharpCode.Decompiler/CSharp/Syntax/TypeMembers/ConstructorDeclaration.cs
index fed466622..794cd2382 100644
--- a/ICSharpCode.Decompiler/CSharp/Syntax/TypeMembers/ConstructorDeclaration.cs
+++ b/ICSharpCode.Decompiler/CSharp/Syntax/TypeMembers/ConstructorDeclaration.cs
@@ -33,7 +33,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
///
/// constructor_declaration ::= attribute_section* modifier* identifier '(' parameter* ')' constructor_initializer? ( block | ';' ) (C# grammar §15.11.1)
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class ConstructorDeclaration : EntityDeclaration
{
@@ -69,7 +69,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
///
/// constructor_initializer ::= ':' ( 'base' | 'this' ) '(' expression* ')' (C# grammar §15.11.1)
///
- [DecompilerAstNode(hasNullNode: true)]
+ [DecompilerAstNode]
public sealed partial class ConstructorInitializer : AstNode
{
public const string BaseKeyword = "base";
diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/TypeMembers/DestructorDeclaration.cs b/ICSharpCode.Decompiler/CSharp/Syntax/TypeMembers/DestructorDeclaration.cs
index ab653bc15..7d8f33c09 100644
--- a/ICSharpCode.Decompiler/CSharp/Syntax/TypeMembers/DestructorDeclaration.cs
+++ b/ICSharpCode.Decompiler/CSharp/Syntax/TypeMembers/DestructorDeclaration.cs
@@ -33,7 +33,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
///
/// finalizer_declaration ::= attribute_section* modifier* '~' identifier '(' ')' ( block | ';' ) (C# grammar §15.13)
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class DestructorDeclaration : EntityDeclaration
{
public const string TildeToken = "~";
diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/TypeMembers/EnumMemberDeclaration.cs b/ICSharpCode.Decompiler/CSharp/Syntax/TypeMembers/EnumMemberDeclaration.cs
index 6ab0db9f3..e18b14b6b 100644
--- a/ICSharpCode.Decompiler/CSharp/Syntax/TypeMembers/EnumMemberDeclaration.cs
+++ b/ICSharpCode.Decompiler/CSharp/Syntax/TypeMembers/EnumMemberDeclaration.cs
@@ -33,7 +33,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
///
/// enum_member_declaration ::= attribute_section* identifier ( '=' expression )? (C# grammar §20.4)
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class EnumMemberDeclaration : EntityDeclaration
{
diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/TypeMembers/EventDeclaration.cs b/ICSharpCode.Decompiler/CSharp/Syntax/TypeMembers/EventDeclaration.cs
index 50b4396d1..2c68d2e00 100644
--- a/ICSharpCode.Decompiler/CSharp/Syntax/TypeMembers/EventDeclaration.cs
+++ b/ICSharpCode.Decompiler/CSharp/Syntax/TypeMembers/EventDeclaration.cs
@@ -36,7 +36,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
///
/// event_declaration ::= attribute_section* modifier* 'event' type variable_initializer* ';' (C# grammar §15.8.1)
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class EventDeclaration : EntityDeclaration
{
public const string EventKeyword = "event";
@@ -72,7 +72,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
///
/// custom_event_declaration ::= attribute_section* modifier* 'event' type ( type '.' )? identifier '{' accessor accessor '}' (C# grammar §15.8.1)
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class CustomEventDeclaration : EntityDeclaration
{
public const string EventKeyword = "event";
diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/TypeMembers/ExtensionDeclaration.cs b/ICSharpCode.Decompiler/CSharp/Syntax/TypeMembers/ExtensionDeclaration.cs
index cb9797163..15bbbf8c6 100644
--- a/ICSharpCode.Decompiler/CSharp/Syntax/TypeMembers/ExtensionDeclaration.cs
+++ b/ICSharpCode.Decompiler/CSharp/Syntax/TypeMembers/ExtensionDeclaration.cs
@@ -24,7 +24,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// Not present in this revision of the C# specification grammar: C# 14 extension blocks ('extension(receiver) { members }').
/// extension_declaration ::= attribute_section* 'extension' type_parameter* '(' parameter* ')' constraint* '{' member* '}'
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class ExtensionDeclaration : EntityDeclaration
{
public const string ExtensionKeyword = "extension";
diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/TypeMembers/FieldDeclaration.cs b/ICSharpCode.Decompiler/CSharp/Syntax/TypeMembers/FieldDeclaration.cs
index 7d67fa86c..d269fcd4b 100644
--- a/ICSharpCode.Decompiler/CSharp/Syntax/TypeMembers/FieldDeclaration.cs
+++ b/ICSharpCode.Decompiler/CSharp/Syntax/TypeMembers/FieldDeclaration.cs
@@ -34,7 +34,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
///
/// field_declaration ::= attribute_section* modifier* type variable_initializer* ';' (C# grammar §15.5.1)
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class FieldDeclaration : EntityDeclaration
{
public override SymbolKind SymbolKind {
diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/TypeMembers/FixedFieldDeclaration.cs b/ICSharpCode.Decompiler/CSharp/Syntax/TypeMembers/FixedFieldDeclaration.cs
index 7575e47ac..a2eeafb81 100644
--- a/ICSharpCode.Decompiler/CSharp/Syntax/TypeMembers/FixedFieldDeclaration.cs
+++ b/ICSharpCode.Decompiler/CSharp/Syntax/TypeMembers/FixedFieldDeclaration.cs
@@ -30,7 +30,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
///
/// fixed_size_buffer_declaration ::= attribute_section* modifier* 'fixed' type variable_initializer* ';' (C# grammar §24.8.2)
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class FixedFieldDeclaration : EntityDeclaration
{
public const string FixedKeyword = "fixed";
diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/TypeMembers/FixedVariableInitializer.cs b/ICSharpCode.Decompiler/CSharp/Syntax/TypeMembers/FixedVariableInitializer.cs
index a51ea3fe3..1b07d1e50 100644
--- a/ICSharpCode.Decompiler/CSharp/Syntax/TypeMembers/FixedVariableInitializer.cs
+++ b/ICSharpCode.Decompiler/CSharp/Syntax/TypeMembers/FixedVariableInitializer.cs
@@ -29,7 +29,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
///
/// fixed_size_buffer_declarator ::= identifier '[' expression ']' (C# grammar §24.8.2)
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class FixedVariableInitializer : AstNode
{
[NameSlot("Identifier")]
diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/TypeMembers/IndexerDeclaration.cs b/ICSharpCode.Decompiler/CSharp/Syntax/TypeMembers/IndexerDeclaration.cs
index f24461d04..f32636c92 100644
--- a/ICSharpCode.Decompiler/CSharp/Syntax/TypeMembers/IndexerDeclaration.cs
+++ b/ICSharpCode.Decompiler/CSharp/Syntax/TypeMembers/IndexerDeclaration.cs
@@ -41,7 +41,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
///
/// (C# grammar §15.9.1)
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class IndexerDeclaration : EntityDeclaration
{
public const string ThisKeyword = "this";
diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/TypeMembers/MethodDeclaration.cs b/ICSharpCode.Decompiler/CSharp/Syntax/TypeMembers/MethodDeclaration.cs
index 147fdb8c0..7d6dcfc6e 100644
--- a/ICSharpCode.Decompiler/CSharp/Syntax/TypeMembers/MethodDeclaration.cs
+++ b/ICSharpCode.Decompiler/CSharp/Syntax/TypeMembers/MethodDeclaration.cs
@@ -33,7 +33,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
///
/// method_declaration ::= attribute_section* modifier* type ( type '.' )? identifier type_parameter* '(' parameter* ')' constraint* ( block | ';' ) (C# grammar §15.6.1)
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class MethodDeclaration : EntityDeclaration
{
public override SymbolKind SymbolKind {
diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/TypeMembers/OperatorDeclaration.cs b/ICSharpCode.Decompiler/CSharp/Syntax/TypeMembers/OperatorDeclaration.cs
index 8d4fd31ee..09036e6e5 100644
--- a/ICSharpCode.Decompiler/CSharp/Syntax/TypeMembers/OperatorDeclaration.cs
+++ b/ICSharpCode.Decompiler/CSharp/Syntax/TypeMembers/OperatorDeclaration.cs
@@ -81,7 +81,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
///
/// operator_declaration ::= attribute_section* modifier+ type ( type '.' )? 'operator' 'checked'? operator_token '(' parameter* ')' ( block | ';' ) (C# grammar §15.10.1)
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class OperatorDeclaration : EntityDeclaration
{
public const string OperatorKeyword = "operator";
diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/TypeMembers/ParameterDeclaration.cs b/ICSharpCode.Decompiler/CSharp/Syntax/TypeMembers/ParameterDeclaration.cs
index 9a5a519ef..f90d3648d 100644
--- a/ICSharpCode.Decompiler/CSharp/Syntax/TypeMembers/ParameterDeclaration.cs
+++ b/ICSharpCode.Decompiler/CSharp/Syntax/TypeMembers/ParameterDeclaration.cs
@@ -34,7 +34,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// fixed_parameter ::= attribute_section* ( 'this' | 'scoped'? ( 'ref' 'readonly'? | 'out' | 'in' ) )? type identifier ( '=' expression )? (C# grammar §15.6.2.1)
/// parameter_array ::= attribute_section* 'params' type identifier (C# grammar §15.6.2.1)
///
- [DecompilerAstNode(hasNullNode: false, hasPatternPlaceholder: true)]
+ [DecompilerAstNode(hasPatternPlaceholder: true)]
public partial class ParameterDeclaration : AstNode
{
public const string ThisModifier = "this";
diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/TypeMembers/PropertyDeclaration.cs b/ICSharpCode.Decompiler/CSharp/Syntax/TypeMembers/PropertyDeclaration.cs
index beccbd1f7..7a6a6a162 100644
--- a/ICSharpCode.Decompiler/CSharp/Syntax/TypeMembers/PropertyDeclaration.cs
+++ b/ICSharpCode.Decompiler/CSharp/Syntax/TypeMembers/PropertyDeclaration.cs
@@ -38,7 +38,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
///
/// (C# grammar §15.7.1)
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class PropertyDeclaration : EntityDeclaration
{
diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/TypeMembers/VariableInitializer.cs b/ICSharpCode.Decompiler/CSharp/Syntax/TypeMembers/VariableInitializer.cs
index 2695ad73f..609dcb95e 100644
--- a/ICSharpCode.Decompiler/CSharp/Syntax/TypeMembers/VariableInitializer.cs
+++ b/ICSharpCode.Decompiler/CSharp/Syntax/TypeMembers/VariableInitializer.cs
@@ -31,7 +31,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
///
/// variable_declarator ::= identifier ( '=' expression )? (C# grammar §15.5.1)
///
- [DecompilerAstNode(hasNullNode: true, hasPatternPlaceholder: true)]
+ [DecompilerAstNode(hasPatternPlaceholder: true)]
public partial class VariableInitializer : AstNode
{
[NameSlot("Identifier")]
diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/VariableDesignation.cs b/ICSharpCode.Decompiler/CSharp/Syntax/VariableDesignation.cs
index 841ef7d5f..5cb5ef981 100644
--- a/ICSharpCode.Decompiler/CSharp/Syntax/VariableDesignation.cs
+++ b/ICSharpCode.Decompiler/CSharp/Syntax/VariableDesignation.cs
@@ -18,7 +18,7 @@
namespace ICSharpCode.Decompiler.CSharp.Syntax
{
- [DecompilerAstNode(hasNullNode: true)]
+ [DecompilerAstNode]
public abstract partial class VariableDesignation : AstNode
{
}
@@ -26,7 +26,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
///
/// single_variable_designation ::= identifier (C# grammar §11.2.2)
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class SingleVariableDesignation : VariableDesignation
{
[NameSlot("Identifier")]
@@ -36,7 +36,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
///
/// tuple_designation ::= '(' designations? ')' (C# grammar §11.2.4)
///
- [DecompilerAstNode(hasNullNode: false)]
+ [DecompilerAstNode]
public sealed partial class ParenthesizedVariableDesignation : VariableDesignation
{