Browse Source

Remove the generator's null-node emission machinery

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

10
ICSharpCode.Decompiler.Generators/DecompilerSyntaxTreeGenerator.cs

@ -30,7 +30,7 @@ namespace ICSharpCode.Decompiler.Generators; @@ -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 @@ -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 @@ -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 @@ -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]

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

@ -37,8 +37,8 @@ using ICSharpCode.Decompiler.TypeSystem; @@ -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 @@ -298,7 +298,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// <summary>
/// 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.
/// </summary>
public T GetChildByRole<T>(SlotKind kind) where T : AstNode?
{
@ -429,7 +429,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -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<T>(ref T? field, T? value) where T : AstNode
{
T? newValue = value;
@ -488,7 +488,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -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)
{

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

@ -26,7 +26,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -26,7 +26,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// <summary>
/// A type reference in the C# AST.
/// </summary>
[DecompilerAstNode(hasNullNode: true, hasPatternPlaceholder: true)]
[DecompilerAstNode(hasPatternPlaceholder: true)]
public abstract partial class AstType : AstNode
{

9
ICSharpCode.Decompiler/CSharp/Syntax/CSharpSlotInfo.cs

@ -40,25 +40,18 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -40,25 +40,18 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// <summary>Whether the slot holds a collection of children rather than a single child.</summary>
public bool IsCollection { get; }
/// <summary>
/// Whether the slot is syntactically optional. Populated accurately once the null-object model
/// is replaced by nullable reference types; currently informational.
/// </summary>
public bool IsOptional { get; }
/// <summary>
/// The slot's kind, shared across node types (so <c>node.Slot.Kind == SlotKind.X</c> identifies a
/// node's position the way <c>node.Role == Roles.X</c> did, including polymorphically).
/// </summary>
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;

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

@ -38,7 +38,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -38,7 +38,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// <c>nullable_reference_type ::= non_nullable_reference_type nullable_type_annotation</c> (C# grammar §8.2.1)
/// <c>nullable_value_type ::= non_nullable_value_type nullable_type_annotation</c> (C# grammar §8.3.1)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
[DecompilerAstNode]
public sealed partial class ComposedType : AstType
{
public const string RefKeyword = "ref";
@ -132,7 +132,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -132,7 +132,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// <summary>
/// <c>rank_specifier ::= '[' ','* ']'</c> (C# grammar §8.2.1)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
[DecompilerAstNode]
public sealed partial class ArraySpecifier : AstNode
{

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

@ -31,7 +31,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -31,7 +31,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// | member_name
/// </code>
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
[DecompilerAstNode]
public sealed partial class DocumentationReference : AstNode
{

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

@ -32,7 +32,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -32,7 +32,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// <summary>
/// <c>anonymous_method_expression ::= 'async'? 'delegate' parameter* block</c> (C# grammar §12.22.1)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
[DecompilerAstNode]
public sealed partial class AnonymousMethodExpression : Expression
{
public const string DelegateKeyword = "delegate";

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

@ -30,7 +30,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -30,7 +30,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// <summary>
/// <c>anonymous_object_creation_expression ::= 'new' '{' expression* '}'</c> (C# grammar §12.8.17.4)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
[DecompilerAstNode]
public sealed partial class AnonymousTypeCreateExpression : Expression
{
public const string NewKeyword = "new";

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

@ -23,7 +23,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -23,7 +23,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// <summary>
/// <c>array_creation_expression ::= 'new' type '[' expression* ']' array_specifier* array_initializer?</c> (C# grammar §12.8.17.5)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
[DecompilerAstNode]
public sealed partial class ArrayCreateExpression : Expression
{
public const string NewKeyword = "new";

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

@ -31,7 +31,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -31,7 +31,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// <summary>
/// <c>array_initializer ::= '{' expression* '}'</c> (C# grammar §17.7)
/// </summary>
[DecompilerAstNode(hasNullNode: true, hasPatternPlaceholder: true)]
[DecompilerAstNode(hasPatternPlaceholder: true)]
public partial class ArrayInitializerExpression : Expression
{
[Slot("Expression")]

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

@ -29,7 +29,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -29,7 +29,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// Operator precedence is not represented in the syntax tree; required parentheses are reconstructed by <see cref="ICSharpCode.Decompiler.CSharp.OutputVisitor.InsertParenthesesVisitor"/>.
/// <c>as_expression ::= expression 'as' type</c> (C# grammar §12.15.1)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
[DecompilerAstNode]
public sealed partial class AsExpression : Expression
{
public const string AsKeyword = "as";

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

@ -34,7 +34,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -34,7 +34,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// <c>assignment_expression ::= expression assignment_operator expression</c> (C# grammar §12.24)
/// <c>assignment_operator ::= '=' | '+=' | '-=' | '*=' | '/=' | '%=' | '&lt;&lt;=' | '&gt;&gt;=' | '&gt;&gt;&gt;=' | '&amp;=' | '|=' | '^='</c>
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
[DecompilerAstNode]
public sealed partial class AssignmentExpression : Expression
{
// reuse roles from BinaryOperatorExpression

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

@ -29,7 +29,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -29,7 +29,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// <summary>
/// <c>base_access ::= 'base'</c> (C# grammar §12.8.15)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
[DecompilerAstNode]
public sealed partial class BaseReferenceExpression : Expression
{
// StartLocation comes from the base (stored at print time); only the end needs deriving.

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

@ -36,7 +36,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -36,7 +36,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// <c>binary_operator_expression ::= expression binary_operator expression</c> (C# grammar §12.13-§12.18, precedence-flattened)
/// <c>binary_operator ::= '*' | '/' | '%' | '+' | '-' | '&lt;&lt;' | '&gt;&gt;' | '&gt;&gt;&gt;' | '&lt;' | '&gt;' | '&lt;=' | '&gt;=' | '==' | '!=' | '&amp;' | '^' | '|' | '&amp;&amp;' | '||' | '??' | '..'</c>
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
[DecompilerAstNode]
public sealed partial class BinaryOperatorExpression : Expression
{
public const string BitwiseAndToken = "&";
@ -230,7 +230,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -230,7 +230,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// <summary>left ?? right</summary>
NullCoalescing,
/// <summary>left .. right</summary>
/// <remarks>left and right are optional = may be Expression.Null</remarks>
/// <remarks>left and right are optional and may be null</remarks>
Range,
/// <summary>left is right</summary>

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

@ -28,7 +28,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -28,7 +28,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// <summary>
/// <c>cast_expression ::= '(' type ')' expression</c> (C# grammar §12.9.8)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
[DecompilerAstNode]
public sealed partial class CastExpression : Expression
{
[Slot("Type")]

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

@ -29,7 +29,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -29,7 +29,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// <summary>
/// <c>checked_expression ::= 'checked' '(' expression ')'</c> (C# grammar §12.8.20)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
[DecompilerAstNode]
public sealed partial class CheckedExpression : Expression
{
public const string CheckedKeyword = "checked";

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

@ -29,7 +29,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -29,7 +29,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// Operator precedence is not represented in the syntax tree; required parentheses are reconstructed by <see cref="ICSharpCode.Decompiler.CSharp.OutputVisitor.InsertParenthesesVisitor"/>.
/// <c>conditional_expression ::= expression '?' expression ':' expression</c> (C# grammar §12.21)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
[DecompilerAstNode]
public sealed partial class ConditionalExpression : Expression
{
public const string QuestionMarkToken = "?";

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

@ -21,7 +21,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -21,7 +21,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// <summary>
/// <c>declaration_expression ::= type variable_designation</c> (C# grammar §12.20)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
[DecompilerAstNode]
public sealed partial class DeclarationExpression : Expression
{
[Slot("Type")]

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

@ -29,7 +29,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -29,7 +29,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// <summary>
/// <c>default_value_expression ::= 'default' ( '(' type ')' )?</c> (C# grammar §12.8.21)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
[DecompilerAstNode]
public sealed partial class DefaultValueExpression : Expression
{
public const string DefaultKeyword = "default";

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

@ -37,7 +37,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -37,7 +37,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// <summary>
/// <c>argument_value ::= ( 'ref' | 'out' | 'in' )? expression</c> (C# grammar §12.6.2.1)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
[DecompilerAstNode]
public sealed partial class DirectionExpression : Expression
{
public const string RefKeyword = "ref";

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

@ -29,7 +29,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -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#.
/// <c>error_expression ::= /* unparseable input */</c>
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
[DecompilerAstNode]
public sealed partial class ErrorExpression : Expression
{
public TextLocation Location { get; set; }

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

@ -27,7 +27,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -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"
/// </remarks>
[DecompilerAstNode(hasNullNode: true, hasPatternPlaceholder: true)]
[DecompilerAstNode(hasPatternPlaceholder: true)]
public abstract partial class Expression : AstNode
{

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

@ -29,7 +29,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -29,7 +29,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// <summary>
/// <c>simple_name ::= identifier ( '&lt;' type ( ',' type )* '&gt;' )?</c> (C# grammar §12.8.4)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
[DecompilerAstNode]
public sealed partial class IdentifierExpression : Expression
{
public IdentifierExpression(string identifier, TextLocation location)

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

@ -33,7 +33,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -33,7 +33,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// <summary>
/// <c>element_access ::= expression '[' expression* ']'</c> (C# grammar §12.8.12.1)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
[DecompilerAstNode]
public sealed partial class IndexerExpression : Expression
{
[Slot("TargetExpression")]

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

@ -5,7 +5,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -5,7 +5,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// <summary>
/// <c>interpolated_string_expression ::= interpolated_string_content*</c> (C# grammar §12.8.3)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
[DecompilerAstNode]
public sealed partial class InterpolatedStringExpression : Expression
{
public const string OpenQuote = "$\"";
@ -28,7 +28,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -28,7 +28,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// </code>
/// (C# grammar §12.8.3)
/// </summary>
[DecompilerAstNode(hasNullNode: true)]
[DecompilerAstNode]
public abstract partial class InterpolatedStringContent : AstNode
{
@ -37,7 +37,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -37,7 +37,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// <summary>
/// <c>interpolation ::= '{' expression ( ',' alignment )? ( ':' format )? '}'</c> (C# grammar §12.8.3)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
[DecompilerAstNode]
public sealed partial class Interpolation : InterpolatedStringContent
{
@ -58,7 +58,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -58,7 +58,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// <summary>
/// <c>interpolated_string_text ::= text_character+</c> (C# lexical grammar §12.8.3)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
[DecompilerAstNode]
public sealed partial class InterpolatedStringText : InterpolatedStringContent
{
public string Text { get; set; }

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

@ -31,7 +31,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -31,7 +31,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// <summary>
/// <c>invocation_expression ::= expression '(' expression* ')'</c> (C# grammar §12.8.10.1)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
[DecompilerAstNode]
public sealed partial class InvocationExpression : Expression
{
[Slot("TargetExpression")]

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

@ -30,7 +30,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -30,7 +30,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// Operator precedence is not represented in the syntax tree; required parentheses are reconstructed by <see cref="ICSharpCode.Decompiler.CSharp.OutputVisitor.InsertParenthesesVisitor"/>.
/// <c>is_expression ::= expression 'is' type</c> (C# grammar §12.15.1)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
[DecompilerAstNode]
public sealed partial class IsExpression : Expression
{
public const string IsKeyword = "is";

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

@ -29,7 +29,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -29,7 +29,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// <summary>
/// <c>lambda_expression ::= attribute_section* 'async'? parameter* '=&gt;' ( block | expression )</c> (C# grammar §12.22.1)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
[DecompilerAstNode]
public sealed partial class LambdaExpression : Expression
{
public const string AsyncModifier = "async";

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

@ -31,7 +31,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -31,7 +31,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// <summary>
/// <c>member_reference_expression ::= expression '.' identifier ( '&lt;' type ( ',' type )* '&gt;' )?</c> (C# grammar §12.8.7.1)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
[DecompilerAstNode]
public sealed partial class MemberReferenceExpression : Expression
{
[Slot("TargetExpression")]

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

@ -22,7 +22,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -22,7 +22,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// Represents a named argument passed to a method or attribute.
/// <c>named_argument_expression ::= identifier ':' expression</c> (C# grammar §12.6.2.1)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
[DecompilerAstNode]
public sealed partial class NamedArgumentExpression : Expression
{
[NameSlot("Identifier")]

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

@ -30,7 +30,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -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.
/// <c>named_expression ::= identifier '=' expression</c>
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
[DecompilerAstNode]
public sealed partial class NamedExpression : Expression
{
[NameSlot("Identifier")]

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

@ -29,7 +29,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -29,7 +29,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// <summary>
/// <c>null_reference_expression ::= 'null'</c> (C# grammar §6.4.5.1)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
[DecompilerAstNode]
public sealed partial class NullReferenceExpression : Expression
{
// StartLocation comes from the base (stored at print time); only the end needs deriving.

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

@ -33,7 +33,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -33,7 +33,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// <summary>
/// <c>object_create_expression ::= 'new' type '(' expression* ')' array_initializer?</c> (C# grammar §12.8.17.2.1)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
[DecompilerAstNode]
public sealed partial class ObjectCreateExpression : Expression
{
public const string NewKeyword = "new";

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

@ -21,7 +21,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -21,7 +21,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// <summary>
/// <c>out_var_declaration_expression ::= type variable_initializer</c> (C# grammar §12.20)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
[DecompilerAstNode]
public sealed partial class OutVarDeclarationExpression : Expression
{
public const string OutKeyword = DirectionExpression.OutKeyword;

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

@ -29,7 +29,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -29,7 +29,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// <summary>
/// <c>parenthesized_expression ::= '(' expression ')'</c> (C# grammar §12.8.5)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
[DecompilerAstNode]
public sealed partial class ParenthesizedExpression : Expression
{
[Slot("Expression")]

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

@ -29,7 +29,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -29,7 +29,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// <summary>
/// <c>pointer_member_access ::= expression '-&gt;' identifier ( '&lt;' type ( ',' type )* '&gt;' )?</c> (C# grammar §24.6.3)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
[DecompilerAstNode]
public sealed partial class PointerReferenceExpression : Expression
{
public const string ArrowToken = "->";

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

@ -56,7 +56,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -56,7 +56,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// </code>
/// (C# grammar §6.4.5.1)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
[DecompilerAstNode]
public sealed partial class PrimitiveExpression : Expression
{
public static readonly object AnyValue = new object();

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

@ -23,7 +23,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -23,7 +23,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// <summary>
/// <c>query_expression ::= query_clause+</c> (C# grammar §12.23.1)
/// </summary>
[DecompilerAstNode(hasNullNode: true)]
[DecompilerAstNode]
public sealed partial class QueryExpression : Expression
{
@ -41,7 +41,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -41,7 +41,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// A continuation is always the first clause of the query expression that contains it.
/// <c>query_continuation ::= query_expression 'into' identifier</c> (C# grammar §12.23.1)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
[DecompilerAstNode]
public sealed partial class QueryContinuationClause : QueryClause
{
public const string IntoKeyword = "into";
@ -56,7 +56,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -56,7 +56,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// <summary>
/// <c>from_clause ::= 'from' type? identifier 'in' expression</c> (C# grammar §12.23.1)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
[DecompilerAstNode]
public sealed partial class QueryFromClause : QueryClause
{
public const string FromKeyword = "from";
@ -75,7 +75,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -75,7 +75,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// <summary>
/// <c>let_clause ::= 'let' identifier '=' expression</c> (C# grammar §12.23.1)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
[DecompilerAstNode]
public sealed partial class QueryLetClause : QueryClause
{
public const string LetKeyword = "let";
@ -90,7 +90,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -90,7 +90,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// <summary>
/// <c>where_clause ::= 'where' expression</c> (C# grammar §12.23.1)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
[DecompilerAstNode]
public sealed partial class QueryWhereClause : QueryClause
{
public const string WhereKeyword = "where";
@ -108,7 +108,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -108,7 +108,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// </code>
/// (C# grammar §12.23.1)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
[DecompilerAstNode]
public sealed partial class QueryJoinClause : QueryClause
{
public const string JoinKeyword = "join";
@ -145,7 +145,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -145,7 +145,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// <summary>
/// <c>orderby_clause ::= 'orderby' ordering ( ',' ordering )*</c> (C# grammar §12.23.1)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
[DecompilerAstNode]
public sealed partial class QueryOrderClause : QueryClause
{
public const string OrderbyKeyword = "orderby";
@ -157,7 +157,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -157,7 +157,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// <summary>
/// <c>ordering ::= expression ( 'ascending' | 'descending' )?</c> (C# grammar §12.23.1)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
[DecompilerAstNode]
public sealed partial class QueryOrdering : AstNode
{
public const string AscendingKeyword = "ascending";
@ -179,7 +179,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -179,7 +179,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// <summary>
/// <c>select_clause ::= 'select' expression</c> (C# grammar §12.23.1)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
[DecompilerAstNode]
public sealed partial class QuerySelectClause : QueryClause
{
public const string SelectKeyword = "select";
@ -191,7 +191,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -191,7 +191,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// <summary>
/// <c>group_clause ::= 'group' expression 'by' expression</c> (C# grammar §12.23.1)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
[DecompilerAstNode]
public sealed partial class QueryGroupClause : QueryClause
{
public const string GroupKeyword = "group";

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

@ -28,7 +28,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -28,7 +28,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// </code>
/// (C# grammar §11.2.5, §11.2.6)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
[DecompilerAstNode]
public sealed partial class RecursivePatternExpression : Expression
{

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

@ -29,7 +29,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -29,7 +29,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// <summary>
/// <c>sizeof_expression ::= 'sizeof' '(' type ')'</c> (C# grammar §12.8.19)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
[DecompilerAstNode]
public sealed partial class SizeOfExpression : Expression
{
public const string SizeofKeyword = "sizeof";

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

@ -38,7 +38,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -38,7 +38,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// </code>
/// (C# grammar §12.8.22)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
[DecompilerAstNode]
public sealed partial class StackAllocExpression : Expression
{
public const string StackallocKeyword = "stackalloc";

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

@ -22,7 +22,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -22,7 +22,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// Operator precedence is not represented in the syntax tree; required parentheses are reconstructed by <see cref="ICSharpCode.Decompiler.CSharp.OutputVisitor.InsertParenthesesVisitor"/>.
/// <c>switch_expression ::= expression 'switch' '{' switch_expression_arm* '}'</c> (C# grammar §12.12)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
[DecompilerAstNode]
public sealed partial class SwitchExpression : Expression
{
public const string SwitchKeyword = "switch";
@ -37,7 +37,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -37,7 +37,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// <summary>
/// <c>switch_expression_arm ::= pattern '=&gt;' expression</c> (C# grammar §12.12)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
[DecompilerAstNode]
public sealed partial class SwitchExpressionSection : AstNode
{

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

@ -29,7 +29,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -29,7 +29,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// <summary>
/// <c>this_access ::= 'this'</c> (C# grammar §12.8.14)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
[DecompilerAstNode]
public sealed partial class ThisReferenceExpression : Expression
{
// StartLocation comes from the base (stored at print time); only the end needs deriving.

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

@ -21,7 +21,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -21,7 +21,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// <summary>
/// <c>throw_expression ::= 'throw' expression</c> (C# grammar §12.19)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
[DecompilerAstNode]
public sealed partial class ThrowExpression : Expression
{
public const string ThrowKeyword = ThrowStatement.ThrowKeyword;

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

@ -21,7 +21,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -21,7 +21,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// <summary>
/// <c>tuple_literal ::= '(' expression ( ',' expression )+ ')'</c> (C# grammar §12.8.6)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
[DecompilerAstNode]
public sealed partial class TupleExpression : Expression
{
[Slot("Expression")]

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

@ -29,7 +29,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -29,7 +29,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// <summary>
/// <c>typeof_expression ::= 'typeof' '(' type ')'</c> (C# grammar §12.8.18)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
[DecompilerAstNode]
public sealed partial class TypeOfExpression : Expression
{
public const string TypeofKeyword = "typeof";

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

@ -22,7 +22,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -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(...)').
/// <c>type_reference_expression ::= type</c>
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
[DecompilerAstNode]
public sealed partial class TypeReferenceExpression : Expression
{
[Slot("Type")]

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

@ -40,7 +40,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -40,7 +40,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// <c>unary_operator ::= '+' | '-' | '!' | '~' | '++' | '--' | '*' | '&amp;' | '^' | 'await'</c>
/// <c>postfix_unary_operator ::= '++' | '--' | '!' | '?'</c>
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
[DecompilerAstNode]
public sealed partial class UnaryOperatorExpression : Expression
{
public const string NotToken = "!";

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

@ -29,7 +29,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -29,7 +29,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// <summary>
/// <c>unchecked_expression ::= 'unchecked' '(' expression ')'</c> (C# grammar §12.8.20)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
[DecompilerAstNode]
public sealed partial class UncheckedExpression : Expression
{
public const string UncheckedKeyword = "unchecked";

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

@ -46,7 +46,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -46,7 +46,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// | '__makeref' '(' expression ')'
/// </code>
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
[DecompilerAstNode]
public sealed partial class UndocumentedExpression : Expression
{
public const string ArglistKeyword = "__arglist";

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

@ -22,7 +22,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -22,7 +22,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// Operator precedence is not represented in the syntax tree; required parentheses are reconstructed by <see cref="ICSharpCode.Decompiler.CSharp.OutputVisitor.InsertParenthesesVisitor"/>.
/// <c>with_expression ::= expression 'with' array_initializer</c> (C# grammar §12.10)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
[DecompilerAstNode]
public sealed partial class WithInitializerExpression : Expression
{

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

@ -29,7 +29,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -29,7 +29,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// <summary>
/// <c>funcptr_type ::= 'delegate' '*' calling_convention_specifier? '&lt;' funcptr_parameter_list funcptr_return_type '&gt;'</c> (C# grammar §24.3.3)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
[DecompilerAstNode]
public sealed partial class FunctionPointerAstType : AstType
{
public const string PointerToken = "*";

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

@ -31,7 +31,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -31,7 +31,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// <summary>
/// <c>attribute ::= type ( '(' expression* ')' )?</c> (C# grammar §23.3)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
[DecompilerAstNode]
public sealed partial class Attribute : AstNode
{

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

@ -29,7 +29,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -29,7 +29,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// <summary>
/// <c>attribute_section ::= '[' ( identifier ':' )? attribute* ']'</c> (C# grammar §23.3)
/// </summary>
[DecompilerAstNode(hasNullNode: false, hasPatternPlaceholder: true)]
[DecompilerAstNode(hasPatternPlaceholder: true)]
public partial class AttributeSection : AstNode
{

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

@ -53,7 +53,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -53,7 +53,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// <summary>
/// <c>comment ::= '//' input_character* | '/*' input_character* '*/'</c> (C# lexical grammar §6.3.3)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
[DecompilerAstNode]
public sealed partial class Comment : Trivia
{

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

@ -30,7 +30,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -30,7 +30,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// new(), struct and class constraints are represented using a PrimitiveType "new", "struct" or "class".
/// <c>type_parameter_constraints_clause ::= 'where' type ':' type+</c> (C# grammar §15.2.5)
/// </summary>
[DecompilerAstNode(hasNullNode: true)]
[DecompilerAstNode]
public sealed partial class Constraint : AstNode
{

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

@ -31,7 +31,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -31,7 +31,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// <summary>
/// <c>delegate_declaration ::= attribute_section* modifier* 'delegate' ( 'ref' 'readonly'? )? type identifier type_parameter* '(' parameter* ')' constraint*</c> (C# grammar §21.2)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
[DecompilerAstNode]
public sealed partial class DelegateDeclaration : EntityDeclaration
{

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

@ -29,7 +29,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -29,7 +29,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// <summary>
/// <c>extern_alias_directive ::= 'extern' 'alias' identifier ';'</c> (C# grammar §14.4)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
[DecompilerAstNode]
public sealed partial class ExternAliasDeclaration : AstNode
{

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

@ -36,7 +36,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -36,7 +36,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// </code>
/// (C# grammar §14.3)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
[DecompilerAstNode]
public sealed partial class NamespaceDeclaration : AstNode
{

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

@ -49,7 +49,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -49,7 +49,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// <summary>
/// <c>line_directive ::= '#' 'line' ( decimal_digit+ string_literal? | 'default' | 'hidden' )</c> (C# lexical grammar)
/// </summary>
[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 @@ -64,7 +64,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// <summary>
/// <c>pragma_warning_directive ::= '#' 'pragma' 'warning' ( 'disable' | 'restore' ) expression*</c> (C# lexical grammar)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
[DecompilerAstNode]
public sealed partial class PragmaWarningPreprocessorDirective : PreProcessorDirective
{
@ -97,7 +97,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -97,7 +97,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// <summary>
/// <c>pp_directive ::= '#' pp_kind new_line</c> (C# lexical grammar §6.5.1)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
[DecompilerAstNode]
public partial class PreProcessorDirective : Trivia
{

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

@ -47,7 +47,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -47,7 +47,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// <summary>
/// <c>type_declaration ::= attribute_section* modifier* ( 'class' | 'struct' | 'interface' | 'enum' | 'record' 'class'? | 'record' 'struct' ) identifier type_parameter* ( '(' parameter* ')' )? ( ':' type+ )? constraint* '{' member* '}' ';'?</c> (C# grammar §15.2.1, §16.2.1, §19.2.1, §20.2)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
[DecompilerAstNode]
public sealed partial class TypeDeclaration : EntityDeclaration
{

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

@ -26,7 +26,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -26,7 +26,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// they belong to the parent type or method.
/// <c>type_parameter ::= attribute_section* ( 'in' | 'out' )? identifier</c> (C# grammar §8.5, §15.2.3)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
[DecompilerAstNode]
public sealed partial class TypeParameterDeclaration : AstNode
{
public const string OutVarianceKeyword = "out";

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

@ -29,7 +29,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -29,7 +29,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// <summary>
/// <c>using_alias_directive ::= 'using' identifier '=' type ';'</c> (C# grammar §14.6.2)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
[DecompilerAstNode]
public sealed partial class UsingAliasDeclaration : AstNode
{
public const string UsingKeyword = "using";

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

@ -37,7 +37,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -37,7 +37,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// </code>
/// (C# grammar §14.6.3, §14.6.4)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
[DecompilerAstNode]
public sealed partial class UsingDeclaration : AstNode
{
public const string UsingKeyword = "using";

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

@ -37,7 +37,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -37,7 +37,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// </code>
/// (C# lexical grammar §6.4.3)
/// </summary>
[DecompilerAstNode(hasNullNode: true)]
[DecompilerAstNode]
public sealed partial class Identifier : AstNode
{

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

@ -22,7 +22,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -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).
/// <c>invocation_ast_type ::= type '(' argument_list? ')'</c>
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
[DecompilerAstNode]
public sealed partial class InvocationAstType : AstType
{
[Slot("Expression")]

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

@ -31,7 +31,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -31,7 +31,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// <summary>
/// <c>member_type ::= type ( '.' | '::' ) identifier ( '&lt;' type ( ',' type )* '&gt;' )?</c> (C# grammar §7.8.1)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
[DecompilerAstNode]
public sealed partial class MemberType : AstType
{

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

@ -35,7 +35,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -35,7 +35,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// <c>predefined_type ::= 'bool' | 'byte' | 'char' | 'decimal' | 'double' | 'float' | 'int' | 'long' | 'object' | 'sbyte' | 'short' | 'string' | 'uint' | 'ulong' | 'ushort'</c> (C# grammar §12.8.7.1)
/// <c>simple_type ::= numeric_type | 'bool'</c> (C# grammar §8.3.1)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
[DecompilerAstNode]
public sealed partial class PrimitiveType : AstType
{
string keyword = string.Empty;

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

@ -31,7 +31,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -31,7 +31,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// <summary>
/// <c>simple_type ::= identifier ( '&lt;' type ( ',' type )* '&gt;' )?</c> (C# grammar §7.8.1)
/// </summary>
[DecompilerAstNode(hasNullNode: true)]
[DecompilerAstNode]
public sealed partial class SimpleType : AstType
{
public SimpleType(Identifier identifier)

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

@ -31,7 +31,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -31,7 +31,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// <summary>
/// <c>block ::= '{' statement* '}'</c> (C# grammar §13.3.1)
/// </summary>
[DecompilerAstNode(hasNullNode: true, hasPatternPlaceholder: true)]
[DecompilerAstNode(hasPatternPlaceholder: true)]
public partial class BlockStatement : Statement, IEnumerable<Statement>
{

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

@ -29,7 +29,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -29,7 +29,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// <summary>
/// <c>break_statement ::= 'break' ';'</c> (C# grammar §13.10.2)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
[DecompilerAstNode]
public sealed partial class BreakStatement : Statement
{
public const string BreakKeyword = "break";

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

@ -29,7 +29,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -29,7 +29,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// <summary>
/// <c>checked_statement ::= 'checked' block</c> (C# grammar §13.12)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
[DecompilerAstNode]
public sealed partial class CheckedStatement : Statement
{
public const string CheckedKeyword = "checked";

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

@ -29,7 +29,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -29,7 +29,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// <summary>
/// <c>continue_statement ::= 'continue' ';'</c> (C# grammar §13.10.3)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
[DecompilerAstNode]
public sealed partial class ContinueStatement : Statement
{
}

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

@ -29,7 +29,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -29,7 +29,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// <summary>
/// <c>do_statement ::= 'do' statement 'while' '(' expression ')' ';'</c> (C# grammar §13.9.3)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
[DecompilerAstNode]
public sealed partial class DoWhileStatement : Statement
{
public const string DoKeyword = "do";

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

@ -29,7 +29,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -29,7 +29,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// <summary>
/// <c>empty_statement ::= ';'</c> (C# grammar §13.4)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
[DecompilerAstNode]
public sealed partial class EmptyStatement : Statement
{
public TextLocation Location { get; set; }

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

@ -29,7 +29,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -29,7 +29,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// <summary>
/// <c>expression_statement ::= expression ';'</c> (C# grammar §13.7)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
[DecompilerAstNode]
public sealed partial class ExpressionStatement : Statement
{
[Slot("Expression")]

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

@ -29,7 +29,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -29,7 +29,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// <summary>
/// <c>fixed_statement ::= 'fixed' '(' type variable_initializer* ')' statement</c> (C# grammar §24.7)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
[DecompilerAstNode]
public sealed partial class FixedStatement : Statement
{
public const string FixedKeyword = "fixed";

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

@ -31,7 +31,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -31,7 +31,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// <summary>
/// <c>for_statement ::= 'for' '(' statement* ';' expression? ';' statement* ')' statement</c> (C# grammar §13.9.4)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
[DecompilerAstNode]
public sealed partial class ForStatement : Statement
{
public const string ForKeyword = "for";

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

@ -29,7 +29,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -29,7 +29,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// <summary>
/// <c>foreach_statement ::= 'await'? 'foreach' '(' type variable_designation 'in' expression ')' statement</c> (C# grammar §13.9.5.1)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
[DecompilerAstNode]
public sealed partial class ForeachStatement : Statement
{
public const string AwaitKeyword = UnaryOperatorExpression.AwaitKeyword;

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

@ -29,7 +29,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -29,7 +29,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// <summary>
/// <c>goto_statement ::= 'goto' identifier ';'</c> (C# grammar §13.10.4)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
[DecompilerAstNode]
public sealed partial class GotoStatement : Statement
{
public const string GotoKeyword = "goto";
@ -40,7 +40,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -40,7 +40,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// <summary>
/// <c>goto_statement ::= 'goto' 'case' expression ';'</c> (C# grammar §13.10.4)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
[DecompilerAstNode]
public sealed partial class GotoCaseStatement : Statement
{
public const string GotoKeyword = "goto";
@ -56,7 +56,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -56,7 +56,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// <summary>
/// <c>goto_statement ::= 'goto' 'default' ';'</c> (C# grammar §13.10.4)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
[DecompilerAstNode]
public sealed partial class GotoDefaultStatement : Statement
{
public const string GotoKeyword = "goto";

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

@ -31,7 +31,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -31,7 +31,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// <summary>
/// <c>if_statement ::= 'if' '(' expression ')' statement ( 'else' statement )?</c> (C# grammar §13.8.2)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
[DecompilerAstNode]
public sealed partial class IfElseStatement : Statement
{
public const string IfKeyword = "if";

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

@ -29,7 +29,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -29,7 +29,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// <summary>
/// <c>labeled_statement ::= identifier ':' statement</c> (C# grammar §13.5)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
[DecompilerAstNode]
public sealed partial class LabelStatement : Statement
{
[NameSlot("Identifier")]

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

@ -21,7 +21,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -21,7 +21,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// <summary>
/// <c>local_function_declaration ::= method_declaration</c> (C# grammar §13.6.4)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
[DecompilerAstNode]
public sealed partial class LocalFunctionDeclarationStatement : Statement
{

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

@ -29,7 +29,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -29,7 +29,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// <summary>
/// <c>lock_statement ::= 'lock' '(' expression ')' statement</c> (C# grammar §13.13)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
[DecompilerAstNode]
public sealed partial class LockStatement : Statement
{
public const string LockKeyword = "lock";

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

@ -31,7 +31,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -31,7 +31,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// <summary>
/// <c>return_statement ::= 'return' expression? ';'</c> (C# grammar §13.10.5)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
[DecompilerAstNode]
public sealed partial class ReturnStatement : Statement
{
public const string ReturnKeyword = "return";

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

@ -27,7 +27,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -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"
/// </remarks>
[DecompilerAstNode(hasNullNode: true, hasPatternPlaceholder: true)]
[DecompilerAstNode(hasPatternPlaceholder: true)]
public abstract partial class Statement : AstNode
{
public new Statement Clone()

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

@ -31,7 +31,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -31,7 +31,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// <summary>
/// <c>switch_statement ::= 'switch' expression switch_section*</c> (C# grammar §13.8.3)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
[DecompilerAstNode]
public sealed partial class SwitchStatement : Statement
{
public const string SwitchKeyword = "switch";
@ -46,7 +46,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -46,7 +46,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// <summary>
/// <c>switch_section ::= switch_label+ statement*</c> (C# grammar §13.8.3)
/// </summary>
[DecompilerAstNode(hasNullNode: false, hasPatternPlaceholder: true)]
[DecompilerAstNode(hasPatternPlaceholder: true)]
public partial class SwitchSection : AstNode
{
@ -60,7 +60,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -60,7 +60,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// <summary>
/// <c>switch_label ::= 'case' expression ':' | 'default' ':'</c> (C# grammar §13.8.3)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
[DecompilerAstNode]
public sealed partial class CaseLabel : AstNode
{
public const string CaseKeyword = "case";

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

@ -31,7 +31,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -31,7 +31,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// <summary>
/// <c>throw_statement ::= 'throw' expression? ';'</c> (C# grammar §13.10.6)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
[DecompilerAstNode]
public sealed partial class ThrowStatement : Statement
{
public const string ThrowKeyword = "throw";

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

@ -31,7 +31,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -31,7 +31,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// <summary>
/// <c>try_statement ::= 'try' block catch_clause* ( 'finally' block )?</c> (C# grammar §13.11)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
[DecompilerAstNode]
public sealed partial class TryCatchStatement : Statement
{
public const string TryKeyword = "try";
@ -50,7 +50,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -50,7 +50,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// <summary>
/// <c>catch_clause ::= 'catch' ( '(' type identifier? ')' )? ( 'when' '(' expression ')' )? block</c> (C# grammar §13.11)
/// </summary>
[DecompilerAstNode(hasNullNode: true, hasPatternPlaceholder: true)]
[DecompilerAstNode(hasPatternPlaceholder: true)]
public partial class CatchClause : AstNode
{
public const string CatchKeyword = "catch";

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

@ -29,7 +29,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -29,7 +29,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// <summary>
/// <c>unchecked_statement ::= 'unchecked' block</c> (C# grammar §13.12)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
[DecompilerAstNode]
public sealed partial class UncheckedStatement : Statement
{
public const string UncheckedKeyword = "unchecked";

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

@ -29,7 +29,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -29,7 +29,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// <summary>
/// <c>unsafe_statement ::= 'unsafe' block</c> (C# grammar §24.2)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
[DecompilerAstNode]
public sealed partial class UnsafeStatement : Statement
{
public const string UnsafeKeyword = "unsafe";

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

@ -29,7 +29,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -29,7 +29,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// <summary>
/// <c>using_statement ::= 'await'? 'using' '(' ( local_variable_declaration | expression ) ')' statement</c> (C# grammar §13.14.1)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
[DecompilerAstNode]
public sealed partial class UsingStatement : Statement
{
public const string UsingKeyword = "using";

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

@ -29,7 +29,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -29,7 +29,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// <summary>
/// <c>local_variable_declaration ::= type variable_initializer+</c> (C# grammar §13.6.2.1)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
[DecompilerAstNode]
public sealed partial class VariableDeclarationStatement : Statement
{
public VariableDeclarationStatement(AstType type, string name, Expression initializer = null)

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

@ -29,7 +29,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -29,7 +29,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// <summary>
/// <c>while_statement ::= 'while' '(' expression ')' statement</c> (C# grammar §13.9.2)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
[DecompilerAstNode]
public sealed partial class WhileStatement : Statement
{
public const string WhileKeyword = "while";

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

@ -29,7 +29,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -29,7 +29,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// <summary>
/// <c>yield_statement ::= 'yield' 'break' ';'</c> (C# grammar §13.15)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
[DecompilerAstNode]
public sealed partial class YieldBreakStatement : Statement
{
public const string YieldKeyword = "yield";

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

@ -29,7 +29,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -29,7 +29,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// <summary>
/// <c>yield_statement ::= 'yield' 'return' expression ';'</c> (C# grammar §13.15)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
[DecompilerAstNode]
public sealed partial class YieldReturnStatement : Statement
{
public const string YieldKeyword = "yield";

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

@ -33,7 +33,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -33,7 +33,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// <summary>
/// <c>compilation_unit ::= extern_alias_directive* using_directive* global_attributes? compilation_unit_body</c> (C# grammar §14.2)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
[DecompilerAstNode]
public sealed partial class SyntaxTree : AstNode
{

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

@ -21,7 +21,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -21,7 +21,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// <summary>
/// <c>tuple_type ::= '(' tuple_type_element (',' tuple_type_element)+ ')'</c> (C# grammar §8.3.1)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
[DecompilerAstNode]
public sealed partial class TupleAstType : AstType
{
@ -32,7 +32,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -32,7 +32,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// <summary>
/// <c>tuple_type_element ::= type identifier?</c> (C# grammar §8.3.1)
/// </summary>
[DecompilerAstNode(hasNullNode: true)]
[DecompilerAstNode]
public sealed partial class TupleTypeElement : AstNode
{
[Slot("Type")]

2
ICSharpCode.Decompiler/CSharp/Syntax/TypeMembers/Accessor.cs

@ -43,7 +43,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -43,7 +43,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// <summary>
/// get/set/init/add/remove
/// </summary>
[DecompilerAstNode(hasNullNode: true)]
[DecompilerAstNode]
public sealed partial class Accessor : EntityDeclaration
{

4
ICSharpCode.Decompiler/CSharp/Syntax/TypeMembers/ConstructorDeclaration.cs

@ -33,7 +33,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -33,7 +33,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// <summary>
/// <c>constructor_declaration ::= attribute_section* modifier* identifier '(' parameter* ')' constructor_initializer? ( block | ';' )</c> (C# grammar §15.11.1)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
[DecompilerAstNode]
public sealed partial class ConstructorDeclaration : EntityDeclaration
{
@ -69,7 +69,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -69,7 +69,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// <summary>
/// <c>constructor_initializer ::= ':' ( 'base' | 'this' ) '(' expression* ')'</c> (C# grammar §15.11.1)
/// </summary>
[DecompilerAstNode(hasNullNode: true)]
[DecompilerAstNode]
public sealed partial class ConstructorInitializer : AstNode
{
public const string BaseKeyword = "base";

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

Loading…
Cancel
Save