Browse Source

Annotate AST node classes with their C# grammar productions

Each concrete syntax node now carries, in an XML-doc <remarks> block, the
matching production from the C# language specification grammar (ECMA/Microsoft,
ANTLR notation), quoted verbatim. Aggregate nodes (e.g. BinaryOperatorExpression,
ComposedType, TypeDeclaration) list every production they span; lexical/trivia
nodes (Comment, the preprocessor directives, Identifier) cite the lexical rule.

Nodes with no spec production -- ErrorExpression, UndocumentedExpression,
InvocationAstType, TypeReferenceExpression, NamedExpression, DocumentationReference,
and the C# 14 ExtensionDeclaration -- carry a hand-written EBNF plus a note
explaining why no official production exists.

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

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

@ -32,6 +32,12 @@ using ICSharpCode.Decompiler.CSharp.OutputVisitor; @@ -32,6 +32,12 @@ using ICSharpCode.Decompiler.CSharp.OutputVisitor;
namespace ICSharpCode.Decompiler.CSharp.Syntax
{
/// <summary>
/// <c>array_type : non_array_type rank_specifier+ ;</c> (C# grammar §8.2.1)
/// <c>pointer_type : dataptr_type | funcptr_type | voidptr_type ;</c> (C# grammar §24.3.1)
/// <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)]
public partial class ComposedType : AstType
{
@ -144,7 +150,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -144,7 +150,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
}
/// <summary>
/// [,,,]
/// <c>rank_specifier : '[' ','* ']' ;</c> (C# grammar §8.2.1)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
public partial class ArraySpecifier : AstNode

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

@ -21,7 +21,8 @@ using ICSharpCode.Decompiler.TypeSystem; @@ -21,7 +21,8 @@ using ICSharpCode.Decompiler.TypeSystem;
namespace ICSharpCode.Decompiler.CSharp.Syntax
{
/// <summary>
/// Represents a 'cref' reference in XML documentation.
/// No C# spec grammar production: this models a 'cref' reference inside XML documentation comments, not C# source syntax.
/// <c>documentation_reference : type_name | type_name '.' member_name | member_name ;</c>
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
public partial class DocumentationReference : AstNode

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

@ -30,7 +30,7 @@ using System.Linq; @@ -30,7 +30,7 @@ using System.Linq;
namespace ICSharpCode.Decompiler.CSharp.Syntax
{
/// <summary>
/// [async] delegate(Parameters) {Body}
/// <c>anonymous_method_expression : anonymous_function_modifier? 'delegate' explicit_anonymous_function_signature? block ;</c> (C# grammar §12.22.1)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
public partial class AnonymousMethodExpression : Expression

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

@ -28,7 +28,7 @@ using System.Collections.Generic; @@ -28,7 +28,7 @@ using System.Collections.Generic;
namespace ICSharpCode.Decompiler.CSharp.Syntax
{
/// <summary>
/// new { [ExpressionList] }
/// <c>anonymous_object_creation_expression : 'new' anonymous_object_initializer ;</c> (C# grammar §12.8.17.4)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
public partial class AnonymousTypeCreateExpression : Expression

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

@ -19,7 +19,7 @@ @@ -19,7 +19,7 @@
namespace ICSharpCode.Decompiler.CSharp.Syntax
{
/// <summary>
/// new Type[Dimensions]
/// <c>array_creation_expression : 'new' non_array_type '[' expression_list ']' rank_specifier* array_initializer? | 'new' array_type array_initializer | 'new' rank_specifier array_initializer ;</c> (C# grammar §12.8.17.5)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
public partial class ArrayCreateExpression : Expression

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

@ -29,7 +29,7 @@ using System.Collections.Generic; @@ -29,7 +29,7 @@ using System.Collections.Generic;
namespace ICSharpCode.Decompiler.CSharp.Syntax
{
/// <summary>
/// { Elements }
/// <c>array_initializer : '{' variable_initializer_list? '}' | '{' variable_initializer_list ',' '}' ;</c> (C# grammar §17.7)
/// </summary>
[DecompilerAstNode(hasNullNode: true, hasPatternPlaceholder: true)]
public partial class ArrayInitializerExpression : Expression

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

@ -26,7 +26,8 @@ @@ -26,7 +26,8 @@
namespace ICSharpCode.Decompiler.CSharp.Syntax
{
/// <summary>
/// Expression as TypeReference
/// 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)]
public partial class AsExpression : Expression

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

@ -30,7 +30,9 @@ using System.Linq.Expressions; @@ -30,7 +30,9 @@ using System.Linq.Expressions;
namespace ICSharpCode.Decompiler.CSharp.Syntax
{
/// <summary>
/// Left Operator= Right
/// Operator precedence is not represented in the syntax tree; required parentheses are reconstructed by <see cref="ICSharpCode.Decompiler.CSharp.OutputVisitor.InsertParenthesesVisitor"/>.
/// <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)]
public partial class AssignmentExpression : Expression

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

@ -27,7 +27,7 @@ @@ -27,7 +27,7 @@
namespace ICSharpCode.Decompiler.CSharp.Syntax
{
/// <summary>
/// base
/// <c>base_access : 'base' '.' identifier type_argument_list? | 'base' '[' argument_list ']' ;</c> (C# grammar §12.8.15)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
public partial class BaseReferenceExpression : Expression

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

@ -30,7 +30,9 @@ using System.Linq.Expressions; @@ -30,7 +30,9 @@ using System.Linq.Expressions;
namespace ICSharpCode.Decompiler.CSharp.Syntax
{
/// <summary>
/// Left Operator Right
/// Operator precedence is not represented in the syntax tree; required parentheses are reconstructed by <see cref="ICSharpCode.Decompiler.CSharp.OutputVisitor.InsertParenthesesVisitor"/>.
/// <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)]
public partial class BinaryOperatorExpression : Expression

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

@ -26,7 +26,7 @@ @@ -26,7 +26,7 @@
namespace ICSharpCode.Decompiler.CSharp.Syntax
{
/// <summary>
/// (CastTo)Expression
/// <c>cast_expression : '(' type ')' unary_expression ;</c> (C# grammar §12.9.8)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
public partial class CastExpression : Expression

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

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

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

@ -26,7 +26,8 @@ @@ -26,7 +26,8 @@
namespace ICSharpCode.Decompiler.CSharp.Syntax
{
/// <summary>
/// Condition ? TrueExpression : FalseExpression
/// 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)]
public partial class ConditionalExpression : Expression

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

@ -19,7 +19,7 @@ @@ -19,7 +19,7 @@
namespace ICSharpCode.Decompiler.CSharp.Syntax
{
/// <summary>
/// TypeName VariableDesignation
/// <c>declaration_expression : 'scoped'? local_variable_type identifier ;</c> (C# grammar §12.20)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
public partial class DeclarationExpression : Expression

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

@ -27,7 +27,7 @@ @@ -27,7 +27,7 @@
namespace ICSharpCode.Decompiler.CSharp.Syntax
{
/// <summary>
/// default(Type)
/// <c>default_value_expression : explicitly_typed_default | default_literal ;</c> (C# grammar §12.8.21)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
public partial class DefaultValueExpression : Expression

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

@ -35,7 +35,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -35,7 +35,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
}
/// <summary>
/// ref Expression
/// <c>argument_value : expression | 'in' 'scoped'? variable_reference | 'ref' 'scoped'? variable_reference | 'out' 'scoped'? variable_reference ;</c> (C# grammar §12.6.2.1)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
public partial class DirectionExpression : Expression

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

@ -25,6 +25,10 @@ @@ -25,6 +25,10 @@
// THE SOFTWARE.
namespace ICSharpCode.Decompiler.CSharp.Syntax
{
/// <summary>
/// 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)]
public partial class ErrorExpression : Expression
{

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

@ -26,6 +26,9 @@ @@ -26,6 +26,9 @@
namespace ICSharpCode.Decompiler.CSharp.Syntax
{
/// <summary>
/// <c>simple_name : identifier type_argument_list? ;</c> (C# grammar §12.8.4)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
public partial class IdentifierExpression : Expression
{

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

@ -29,7 +29,7 @@ using System.Collections.Generic; @@ -29,7 +29,7 @@ using System.Collections.Generic;
namespace ICSharpCode.Decompiler.CSharp.Syntax
{
/// <summary>
/// Target[Arguments]
/// <c>element_access : primary_expression '[' argument_list ']' ;</c> (C# grammar §12.8.12.1)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
public partial class IndexerExpression : Expression

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

@ -4,6 +4,9 @@ using ICSharpCode.Decompiler.CSharp.Syntax.PatternMatching; @@ -4,6 +4,9 @@ using ICSharpCode.Decompiler.CSharp.Syntax.PatternMatching;
namespace ICSharpCode.Decompiler.CSharp.Syntax
{
/// <summary>
/// <c>interpolated_string_expression : interpolated_regular_string_expression | interpolated_verbatim_string_expression | interpolated_raw_string_expression ;</c> (C# grammar §12.8.3)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
public partial class InterpolatedStringExpression : Expression
{
@ -39,7 +42,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -39,7 +42,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
}
/// <summary>
/// { Expression , Alignment : Suffix }
/// <c>regular_interpolation : expression (',' interpolation_minimum_width)? Regular_Interpolation_Format? ;</c> (C# grammar §12.8.3)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
public partial class Interpolation : InterpolatedStringContent
@ -73,6 +76,9 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -73,6 +76,9 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
}
}
/// <summary>
/// <c>Interpolated_Regular_String_Mid : Interpolated_Regular_String_Element+ ;</c> (C# lexical grammar §12.8.3)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
public partial class InterpolatedStringText : InterpolatedStringContent
{

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

@ -29,7 +29,7 @@ using System.Collections.Generic; @@ -29,7 +29,7 @@ using System.Collections.Generic;
namespace ICSharpCode.Decompiler.CSharp.Syntax
{
/// <summary>
/// Target(Arguments)
/// <c>invocation_expression : primary_expression '(' argument_list? ')' ;</c> (C# grammar §12.8.10.1)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
public partial class InvocationExpression : Expression

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

@ -27,7 +27,8 @@ @@ -27,7 +27,8 @@
namespace ICSharpCode.Decompiler.CSharp.Syntax
{
/// <summary>
/// Expression is Type
/// 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 | pattern) ;</c> (C# grammar §12.15.1)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
public partial class IsExpression : Expression

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

@ -27,7 +27,7 @@ @@ -27,7 +27,7 @@
namespace ICSharpCode.Decompiler.CSharp.Syntax
{
/// <summary>
/// [async] Parameters => Body
/// <c>lambda_expression : attributes? anonymous_function_modifier? (return_type | ref_kind ref_return_type)? anonymous_function_signature '=&gt;' anonymous_function_body ;</c> (C# grammar §12.22.1)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
public partial class LambdaExpression : Expression

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

@ -29,7 +29,7 @@ using System.Collections.Generic; @@ -29,7 +29,7 @@ using System.Collections.Generic;
namespace ICSharpCode.Decompiler.CSharp.Syntax
{
/// <summary>
/// Target.MemberName
/// <c>member_access : primary_expression '.' identifier type_argument_list? | predefined_type '.' identifier type_argument_list? | qualified_alias_member '.' identifier type_argument_list? ;</c> (C# grammar §12.8.7.1)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
public partial class MemberReferenceExpression : Expression

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

@ -20,7 +20,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -20,7 +20,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
{
/// <summary>
/// Represents a named argument passed to a method or attribute.
/// name: expression
/// <c>argument : argument_name? argument_value ;</c> (C# grammar §12.6.2.1)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
public partial class NamedArgumentExpression : Expression

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

@ -27,9 +27,8 @@ @@ -27,9 +27,8 @@
namespace ICSharpCode.Decompiler.CSharp.Syntax
{
/// <summary>
/// name = expression
/// This isn't the same as 'assign' even though it has the same syntax.
/// This expression is used in object initializers and for named attribute arguments [Attr(FieldName = value)].
/// 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)]
public partial class NamedExpression : Expression

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

@ -27,7 +27,7 @@ @@ -27,7 +27,7 @@
namespace ICSharpCode.Decompiler.CSharp.Syntax
{
/// <summary>
/// null
/// <c>literal : boolean_literal | Integer_Literal | Real_Literal | Character_Literal | String_Literal | null_literal ;</c> (C# grammar §6.4.5.1)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
public partial class NullReferenceExpression : Expression

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

@ -29,7 +29,7 @@ using System.Collections.Generic; @@ -29,7 +29,7 @@ using System.Collections.Generic;
namespace ICSharpCode.Decompiler.CSharp.Syntax
{
/// <summary>
/// new Type(Arguments) { Initializer }
/// <c>object_creation_expression : 'new' type '(' argument_list? ')' object_or_collection_initializer? | 'new' type object_or_collection_initializer | target_typed_new ;</c> (C# grammar §12.8.17.2.1)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
public partial class ObjectCreateExpression : Expression

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

@ -19,7 +19,7 @@ @@ -19,7 +19,7 @@
namespace ICSharpCode.Decompiler.CSharp.Syntax
{
/// <summary>
/// out type expression
/// <c>declaration_expression : 'scoped'? local_variable_type identifier ;</c> (C# grammar §12.20)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
public partial class OutVarDeclarationExpression : Expression

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

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

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

@ -27,7 +27,7 @@ @@ -27,7 +27,7 @@
namespace ICSharpCode.Decompiler.CSharp.Syntax
{
/// <summary>
/// Target->MemberName
/// <c>pointer_member_access : primary_expression '-&gt;' identifier type_argument_list? ;</c> (C# grammar §24.6.3)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
public partial class PointerReferenceExpression : Expression

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

@ -45,6 +45,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -45,6 +45,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// <summary>
/// Represents a literal value.
/// <c>literal : boolean_literal | Integer_Literal | Real_Literal | Character_Literal | String_Literal | null_literal ;</c> (C# grammar §6.4.5.1)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
public partial class PrimitiveExpression : Expression

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

@ -18,6 +18,9 @@ @@ -18,6 +18,9 @@
namespace ICSharpCode.Decompiler.CSharp.Syntax
{
/// <summary>
/// <c>query_expression : from_clause query_body ;</c> (C# grammar §12.23.1)
/// </summary>
[DecompilerAstNode(hasNullNode: true)]
public partial class QueryExpression : Expression
{
@ -41,22 +44,10 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -41,22 +44,10 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
}
/// <summary>
/// Represents a query continuation.
/// "(from .. select ..) into Identifier" or "(from .. group .. by ..) into Identifier"
/// Note that "join .. into .." is not a query continuation!
///
/// This is always the first(!!) clause in a query expression.
/// The tree for "from a in b select c into d select e" looks like this:
/// new QueryExpression {
/// new QueryContinuationClause {
/// PrecedingQuery = new QueryExpression {
/// new QueryFromClause(a in b),
/// new QuerySelectClause(c)
/// },
/// Identifier = d
/// },
/// new QuerySelectClause(e)
/// }
/// Represents a query continuation, e.g. "(from .. select ..) into Identifier".
/// Note that "join .. into .." is not a query continuation.
/// A continuation is always the first clause of the query expression that contains it.
/// <c>query_continuation : 'into' identifier query_body ;</c> (C# grammar §12.23.1)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
public partial class QueryContinuationClause : QueryClause
@ -86,6 +77,9 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -86,6 +77,9 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
}
}
/// <summary>
/// <c>from_clause : 'from' type? identifier 'in' expression ;</c> (C# grammar §12.23.1)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
public partial class QueryFromClause : QueryClause
{
@ -118,6 +112,9 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -118,6 +112,9 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
}
}
/// <summary>
/// <c>let_clause : 'let' identifier '=' expression ;</c> (C# grammar §12.23.1)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
public partial class QueryLetClause : QueryClause
{
@ -146,6 +143,9 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -146,6 +143,9 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
}
/// <summary>
/// <c>where_clause : 'where' boolean_expression ;</c> (C# grammar §12.23.1)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
public partial class QueryWhereClause : QueryClause
{
@ -163,6 +163,8 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -163,6 +163,8 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
/// <summary>
/// Represents a join or group join clause.
/// <c>join_clause : 'join' type? identifier 'in' expression 'on' expression 'equals' expression ;</c> (C# grammar §12.23.1)
/// <c>join_into_clause : 'join' type? identifier 'in' expression 'on' expression 'equals' expression 'into' identifier ;</c> (C# grammar §12.23.1)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
public partial class QueryJoinClause : QueryClause
@ -230,6 +232,9 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -230,6 +232,9 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
}
}
/// <summary>
/// <c>orderby_clause : 'orderby' orderings ;</c> (C# grammar §12.23.1)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
public partial class QueryOrderClause : QueryClause
{
@ -246,6 +251,9 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -246,6 +251,9 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
}
}
/// <summary>
/// <c>ordering : expression ordering_direction? ;</c> (C# grammar §12.23.1)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
public partial class QueryOrdering : AstNode
{
@ -278,6 +286,9 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -278,6 +286,9 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
Descending
}
/// <summary>
/// <c>select_clause : 'select' expression ;</c> (C# grammar §12.23.1)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
public partial class QuerySelectClause : QueryClause
{
@ -293,6 +304,9 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -293,6 +304,9 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
}
}
/// <summary>
/// <c>group_clause : 'group' expression 'by' expression ;</c> (C# grammar §12.23.1)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
public partial class QueryGroupClause : QueryClause
{

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

@ -20,6 +20,10 @@ using ICSharpCode.Decompiler.CSharp.Syntax.PatternMatching; @@ -20,6 +20,10 @@ using ICSharpCode.Decompiler.CSharp.Syntax.PatternMatching;
namespace ICSharpCode.Decompiler.CSharp.Syntax
{
/// <summary>
/// <c>property_pattern : type? property_subpattern simple_designation? ;</c> (C# grammar §11.2.6)
/// <c>positional_pattern : type? '(' subpatterns? ')' property_subpattern? simple_designation? ;</c> (C# grammar §11.2.5)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
public partial class RecursivePatternExpression : Expression
{

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

@ -27,7 +27,7 @@ @@ -27,7 +27,7 @@
namespace ICSharpCode.Decompiler.CSharp.Syntax
{
/// <summary>
/// sizeof(Type)
/// <c>sizeof_expression : 'sizeof' '(' unmanaged_type ')' ;</c> (C# grammar §12.8.19)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
public partial class SizeOfExpression : Expression

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

@ -27,7 +27,7 @@ @@ -27,7 +27,7 @@
namespace ICSharpCode.Decompiler.CSharp.Syntax
{
/// <summary>
/// stackalloc Type[Count]
/// <c>stackalloc_expression : 'stackalloc' unmanaged_type '[' expression ']' | 'stackalloc' unmanaged_type? '[' constant_expression? ']' stackalloc_initializer ;</c> (C# grammar §12.8.22)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
public partial class StackAllocExpression : Expression

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

@ -19,7 +19,8 @@ @@ -19,7 +19,8 @@
namespace ICSharpCode.Decompiler.CSharp.Syntax
{
/// <summary>
/// Expression switch { SwitchSections }
/// 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_arms? '}' ;</c> (C# grammar §12.12)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
public partial class SwitchExpression : Expression
@ -41,7 +42,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -41,7 +42,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
}
/// <summary>
/// Pattern => Expression
/// <c>switch_expression_arm : pattern case_guard? '=&gt;' switch_expression_arm_expression ;</c> (C# grammar §12.12)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
public partial class SwitchExpressionSection : AstNode

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

@ -27,7 +27,7 @@ @@ -27,7 +27,7 @@
namespace ICSharpCode.Decompiler.CSharp.Syntax
{
/// <summary>
/// this
/// <c>this_access : 'this' ;</c> (C# grammar §12.8.14)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
public partial class ThisReferenceExpression : Expression

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

@ -19,7 +19,7 @@ @@ -19,7 +19,7 @@
namespace ICSharpCode.Decompiler.CSharp.Syntax
{
/// <summary>
/// throw Expression
/// <c>throw_expression : 'throw' null_coalescing_expression ;</c> (C# grammar §12.19)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
public partial class ThrowExpression : Expression

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

@ -20,6 +20,9 @@ using ICSharpCode.Decompiler.CSharp.Syntax.PatternMatching; @@ -20,6 +20,9 @@ using ICSharpCode.Decompiler.CSharp.Syntax.PatternMatching;
namespace ICSharpCode.Decompiler.CSharp.Syntax
{
/// <summary>
/// <c>tuple_literal : '(' tuple_element (',' tuple_element)+ ')' ;</c> (C# grammar §12.8.6)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
public partial class TupleExpression : Expression
{

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

@ -27,7 +27,7 @@ @@ -27,7 +27,7 @@
namespace ICSharpCode.Decompiler.CSharp.Syntax
{
/// <summary>
/// typeof(Type)
/// <c>typeof_expression : 'typeof' '(' type ')' | 'typeof' '(' unbound_type_name ')' | 'typeof' '(' 'void' ')' ;</c> (C# grammar §12.8.18)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
public partial class TypeOfExpression : Expression

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

@ -19,8 +19,8 @@ @@ -19,8 +19,8 @@
namespace ICSharpCode.Decompiler.CSharp.Syntax
{
/// <summary>
/// Represents an AstType as an expression.
/// This is used when calling a method on a primitive type: "int.Parse()"
/// 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)]
public partial class TypeReferenceExpression : Expression

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

@ -30,7 +30,10 @@ using System.Linq.Expressions; @@ -30,7 +30,10 @@ using System.Linq.Expressions;
namespace ICSharpCode.Decompiler.CSharp.Syntax
{
/// <summary>
/// Operator Expression
/// Operator precedence is not represented in the syntax tree; required parentheses are reconstructed by <see cref="ICSharpCode.Decompiler.CSharp.OutputVisitor.InsertParenthesesVisitor"/>.
/// <c>unary_operator_expression : unary_operator expression | expression postfix_unary_operator ;</c> (C# grammar §12.9, §12.8.16)
/// <c>unary_operator : '+' | '-' | '!' | '~' | '++' | '--' | '*' | '&amp;' | '^' | 'await' ;</c>
/// <c>postfix_unary_operator : '++' | '--' | '!' | '?' ;</c>
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
public partial class UnaryOperatorExpression : Expression

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

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

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

@ -36,7 +36,8 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -36,7 +36,8 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
}
/// <summary>
/// Represents undocumented expressions.
/// No C# spec grammar production: the undocumented compiler keywords __arglist, __refvalue, __reftype and __makeref.
/// <c>undocumented_expression : '__arglist' | '__arglist' '(' argument_list? ')' | '__refvalue' '(' expression ',' type ')' | '__reftype' '(' expression ')' | '__makeref' '(' expression ')' ;</c>
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
public partial class UndocumentedExpression : Expression

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

@ -21,7 +21,8 @@ using ICSharpCode.Decompiler.CSharp.Syntax.PatternMatching; @@ -21,7 +21,8 @@ using ICSharpCode.Decompiler.CSharp.Syntax.PatternMatching;
namespace ICSharpCode.Decompiler.CSharp.Syntax
{
/// <summary>
/// Expression with Initializer
/// 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' '{' member_initializer_list? '}' ;</c> (C# grammar §12.10)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
public partial class WithInitializerExpression : Expression

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

@ -26,6 +26,9 @@ @@ -26,6 +26,9 @@
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)]
public partial class FunctionPointerAstType : AstType
{

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

@ -29,7 +29,7 @@ using ICSharpCode.Decompiler.CSharp.OutputVisitor; @@ -29,7 +29,7 @@ using ICSharpCode.Decompiler.CSharp.OutputVisitor;
namespace ICSharpCode.Decompiler.CSharp.Syntax
{
/// <summary>
/// Attribute(Arguments)
/// <c>attribute : attribute_name attribute_arguments? ;</c> (C# grammar §23.3)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
public partial class Attribute : AstNode

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

@ -27,7 +27,8 @@ @@ -27,7 +27,8 @@
namespace ICSharpCode.Decompiler.CSharp.Syntax
{
/// <summary>
/// [AttributeTarget: Attributes]
/// <c>attribute_section : '[' attribute_target_specifier? attribute_list ']' ;</c> (C# grammar §23.3)
/// <c>global_attribute_section : '[' global_attribute_target_specifier attribute_list ']' ;</c> (C# grammar §23.3)
/// </summary>
[DecompilerAstNode(hasNullNode: false, hasPatternPlaceholder: true)]
public partial class AttributeSection : AstNode

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

@ -50,6 +50,9 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -50,6 +50,9 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
MultiLineDocumentation
}
/// <summary>
/// <c>Comment : Single_Line_Comment | Delimited_Comment ;</c> (C# lexical grammar §6.3.3)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
public partial class Comment : Trivia
{

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

@ -27,11 +27,9 @@ @@ -27,11 +27,9 @@
namespace ICSharpCode.Decompiler.CSharp.Syntax
{
/// <summary>
/// where TypeParameter : BaseTypes
/// new(), struct and class constraints are represented using a PrimitiveType "new", "struct" or "class".
/// <c>type_parameter_constraints_clause : 'where' type_parameter ':' type_parameter_constraints ;</c> (C# grammar §15.2.5)
/// </summary>
/// <remarks>
/// new(), struct and class constraints are represented using a PrimitiveType "new", "struct" or "class"
/// </remarks>
[DecompilerAstNode(hasNullNode: true)]
public partial class Constraint : AstNode
{

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

@ -29,7 +29,7 @@ using ICSharpCode.Decompiler.TypeSystem; @@ -29,7 +29,7 @@ using ICSharpCode.Decompiler.TypeSystem;
namespace ICSharpCode.Decompiler.CSharp.Syntax
{
/// <summary>
/// delegate ReturnType Name&lt;TypeParameters&gt;(Parameters) where Constraints;
/// <c>delegate_declaration : attributes? delegate_modifier* 'delegate' return_type delegate_header | attributes? delegate_modifier* 'delegate' ref_kind ref_return_type delegate_header ;</c> (C# grammar §21.2)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
public partial class DelegateDeclaration : EntityDeclaration

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

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

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

@ -29,7 +29,8 @@ using System.Collections.Generic; @@ -29,7 +29,8 @@ using System.Collections.Generic;
namespace ICSharpCode.Decompiler.CSharp.Syntax
{
/// <summary>
/// namespace Name { Members }
/// <c>namespace_declaration : 'namespace' qualified_identifier namespace_body ';'? ;</c> (C# grammar §14.3)
/// <c>file_scoped_namespace_declaration : 'namespace' qualified_identifier ';' extern_alias_directive* using_directive* type_declaration* ;</c> (C# grammar §14.3)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
public partial class NamespaceDeclaration : AstNode

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

@ -46,6 +46,9 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -46,6 +46,9 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
Line = 12
}
/// <summary>
/// <c>fragment PP_Line : 'line' PP_Whitespace PP_Line_Indicator ;</c> (C# lexical grammar)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
public partial class LinePreprocessorDirective : PreProcessorDirective
{
@ -68,6 +71,9 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -68,6 +71,9 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
}
}
/// <summary>
/// <c>fragment PP_Pragma : 'pragma' PP_Pragma_Text? ;</c> (C# lexical grammar)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
public partial class PragmaWarningPreprocessorDirective : PreProcessorDirective
{
@ -104,6 +110,9 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -104,6 +110,9 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
}
}
/// <summary>
/// <c>PP_Directive : PP_Start PP_Kind PP_New_Line ;</c> (C# lexical grammar §6.5.1)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
public partial class PreProcessorDirective : Trivia
{

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

@ -45,7 +45,10 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -45,7 +45,10 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
}
/// <summary>
/// class Name&lt;TypeParameters&gt; : BaseTypes where Constraints;
/// <c>class_declaration : attributes? class_modifier* 'partial'? class_tag identifier type_parameter_list? delimited_parameter_list? class_base? type_parameter_constraints_clause* class_body ;</c> (C# grammar §15.2.1)
/// <c>struct_declaration : non_record_struct_declaration | record_struct_declaration ;</c> (C# grammar §16.2.1)
/// <c>interface_declaration : attributes? interface_modifier* 'partial'? 'interface' identifier variant_type_parameter_list? interface_base? type_parameter_constraints_clause* interface_body ';'? ;</c> (C# grammar §19.2.1)
/// <c>enum_declaration : attributes? enum_modifier* 'enum' identifier enum_base? enum_body ';'? ;</c> (C# grammar §20.2)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
public partial class TypeDeclaration : EntityDeclaration

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

@ -21,11 +21,11 @@ using ICSharpCode.Decompiler.TypeSystem; @@ -21,11 +21,11 @@ using ICSharpCode.Decompiler.TypeSystem;
namespace ICSharpCode.Decompiler.CSharp.Syntax
{
/// <summary>
/// [in|out] Name
///
/// Represents a type parameter.
/// Note: mirroring the C# syntax, constraints are not part of the type parameter declaration, but belong
/// to the parent type or method.
/// Mirroring the C# syntax, constraints are not part of the type parameter declaration;
/// they belong to the parent type or method.
/// <c>type_parameter : identifier ;</c> (C# grammar §8.5)
/// <c>decorated_type_parameter : attributes? type_parameter ;</c> (C# grammar §15.2.3)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
public partial class TypeParameterDeclaration : AstNode

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

@ -27,7 +27,7 @@ @@ -27,7 +27,7 @@
namespace ICSharpCode.Decompiler.CSharp.Syntax
{
/// <summary>
/// using Alias = Import;
/// <c>using_alias_directive : 'using' identifier '=' namespace_or_type_name ';' ;</c> (C# grammar §14.6.2)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
public partial class UsingAliasDeclaration : AstNode

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

@ -30,7 +30,8 @@ using System.Text; @@ -30,7 +30,8 @@ using System.Text;
namespace ICSharpCode.Decompiler.CSharp.Syntax
{
/// <summary>
/// using Import;
/// <c>using_namespace_directive : 'using' namespace_name ';' ;</c> (C# grammar §14.6.3)
/// <c>using_static_directive : 'using' 'static' type_name ';' ;</c> (C# grammar §14.6.4)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
public partial class UsingDeclaration : AstNode

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

@ -28,6 +28,9 @@ using System; @@ -28,6 +28,9 @@ using System;
namespace ICSharpCode.Decompiler.CSharp.Syntax
{
/// <summary>
/// <c>identifier : Simple_Identifier | contextual_keyword | discard_token ;</c> (C# lexical grammar §6.4.3)
/// </summary>
[DecompilerAstNode(hasNullNode: true)]
public partial class Identifier : AstNode
{

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

@ -21,7 +21,8 @@ using ICSharpCode.Decompiler.CSharp.Syntax.PatternMatching; @@ -21,7 +21,8 @@ using ICSharpCode.Decompiler.CSharp.Syntax.PatternMatching;
namespace ICSharpCode.Decompiler.CSharp.Syntax
{
/// <summary>
/// BaseType "(" Argument { "," Argument } ")"
/// 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)]
public partial class InvocationAstType : AstType

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

@ -28,6 +28,9 @@ using System.Collections.Generic; @@ -28,6 +28,9 @@ using System.Collections.Generic;
namespace ICSharpCode.Decompiler.CSharp.Syntax
{
/// <summary>
/// <c>namespace_or_type_name : identifier type_argument_list? ('.' identifier type_argument_list?)* | qualified_alias_member ('.' identifier type_argument_list?)* ;</c> (C# grammar §7.8.1)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
public partial class MemberType : AstType
{

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

@ -31,6 +31,10 @@ using ICSharpCode.Decompiler.TypeSystem; @@ -31,6 +31,10 @@ using ICSharpCode.Decompiler.TypeSystem;
namespace ICSharpCode.Decompiler.CSharp.Syntax
{
/// <summary>
/// <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)]
public partial class PrimitiveType : AstType
{

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

@ -28,6 +28,9 @@ using System.Collections.Generic; @@ -28,6 +28,9 @@ using System.Collections.Generic;
namespace ICSharpCode.Decompiler.CSharp.Syntax
{
/// <summary>
/// <c>namespace_or_type_name : identifier type_argument_list? ('.' identifier type_argument_list?)* | qualified_alias_member ('.' identifier type_argument_list?)* ;</c> (C# grammar §7.8.1)
/// </summary>
[DecompilerAstNode(hasNullNode: true)]
public partial class SimpleType : AstType
{

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

@ -29,7 +29,7 @@ using System.Collections.Generic; @@ -29,7 +29,7 @@ using System.Collections.Generic;
namespace ICSharpCode.Decompiler.CSharp.Syntax
{
/// <summary>
/// { Statements }
/// <c>block : '{' statement_list? '}' ;</c> (C# grammar §13.3.1)
/// </summary>
[DecompilerAstNode(hasNullNode: true, hasPatternPlaceholder: true)]
public partial class BlockStatement : Statement, IEnumerable<Statement>

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

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

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

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

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

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

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

@ -27,7 +27,7 @@ @@ -27,7 +27,7 @@
namespace ICSharpCode.Decompiler.CSharp.Syntax
{
/// <summary>
/// "do EmbeddedStatement while(Condition);"
/// <c>do_statement : 'do' embedded_statement 'while' '(' boolean_expression ')' ';' ;</c> (C# grammar §13.9.3)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
public partial class DoWhileStatement : Statement

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

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

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

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

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

@ -27,7 +27,7 @@ @@ -27,7 +27,7 @@
namespace ICSharpCode.Decompiler.CSharp.Syntax
{
/// <summary>
/// fixed (Type Variables) EmbeddedStatement
/// <c>fixed_statement : 'fixed' '(' pointer_type fixed_pointer_declarators ')' embedded_statement ;</c> (C# grammar §24.7)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
public partial class FixedStatement : Statement

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

@ -27,7 +27,7 @@ @@ -27,7 +27,7 @@
namespace ICSharpCode.Decompiler.CSharp.Syntax
{
/// <summary>
/// for (Initializers; Condition; Iterators) EmbeddedStatement
/// <c>for_statement : 'for' '(' for_initializer? ';' for_condition? ';' for_iterator? ')' embedded_statement ;</c> (C# grammar §13.9.4)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
public partial class ForStatement : Statement

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

@ -27,7 +27,7 @@ @@ -27,7 +27,7 @@
namespace ICSharpCode.Decompiler.CSharp.Syntax
{
/// <summary>
/// foreach (Type VariableName in InExpression) EmbeddedStatement
/// <c>foreach_statement : 'await'? 'foreach' '(' 'scoped'? ref_kind? local_variable_type identifier 'in' expression ')' embedded_statement ;</c> (C# grammar §13.9.5.1)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
public partial class ForeachStatement : Statement

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

@ -27,7 +27,7 @@ @@ -27,7 +27,7 @@
namespace ICSharpCode.Decompiler.CSharp.Syntax
{
/// <summary>
/// "goto Label;"
/// <c>goto_statement : 'goto' identifier ';' | 'goto' 'case' constant_expression ';' | 'goto' 'default' ';' ;</c> (C# grammar §13.10.4)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
public partial class GotoStatement : Statement
@ -66,7 +66,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -66,7 +66,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
}
/// <summary>
/// or "goto case LabelExpression;"
/// <c>goto_statement : 'goto' identifier ';' | 'goto' 'case' constant_expression ';' | 'goto' 'default' ';' ;</c> (C# grammar §13.10.4)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
public partial class GotoCaseStatement : Statement
@ -88,7 +88,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -88,7 +88,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
}
/// <summary>
/// or "goto default;"
/// <c>goto_statement : 'goto' identifier ';' | 'goto' 'case' constant_expression ';' | 'goto' 'default' ';' ;</c> (C# grammar §13.10.4)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
public partial class GotoDefaultStatement : Statement

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

@ -27,7 +27,7 @@ @@ -27,7 +27,7 @@
namespace ICSharpCode.Decompiler.CSharp.Syntax
{
/// <summary>
/// if (Condition) TrueStatement else FalseStatement
/// <c>if_statement : 'if' '(' boolean_expression ')' embedded_statement | 'if' '(' boolean_expression ')' embedded_statement 'else' embedded_statement ;</c> (C# grammar §13.8.2)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
public partial class IfElseStatement : Statement

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

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

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

@ -20,6 +20,9 @@ using ICSharpCode.Decompiler.CSharp.Syntax.PatternMatching; @@ -20,6 +20,9 @@ using ICSharpCode.Decompiler.CSharp.Syntax.PatternMatching;
namespace ICSharpCode.Decompiler.CSharp.Syntax
{
/// <summary>
/// <c>local_function_declaration : attributes? local_function_modifier* return_type local_function_header local_function_body | attributes? ref_local_function_modifier* ref_kind ref_return_type local_function_header ref_local_function_body ;</c> (C# grammar §13.6.4)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
public partial class LocalFunctionDeclarationStatement : Statement
{

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

@ -27,7 +27,7 @@ @@ -27,7 +27,7 @@
namespace ICSharpCode.Decompiler.CSharp.Syntax
{
/// <summary>
/// lock (Expression) EmbeddedStatement;
/// <c>lock_statement : 'lock' '(' expression ')' embedded_statement ;</c> (C# grammar §13.13)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
public partial class LockStatement : Statement

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

@ -27,7 +27,7 @@ @@ -27,7 +27,7 @@
namespace ICSharpCode.Decompiler.CSharp.Syntax
{
/// <summary>
/// return Expression;
/// <c>return_statement : 'return' ';' | 'return' expression ';' | 'return' 'ref' variable_reference ';' ;</c> (C# grammar §13.10.5)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
public partial class ReturnStatement : Statement

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

@ -27,7 +27,7 @@ @@ -27,7 +27,7 @@
namespace ICSharpCode.Decompiler.CSharp.Syntax
{
/// <summary>
/// switch (Expression) { SwitchSections }
/// <c>switch_statement : 'switch' selector_expression switch_block ;</c> (C# grammar §13.8.3)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
public partial class SwitchStatement : Statement
@ -48,6 +48,9 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -48,6 +48,9 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
}
}
/// <summary>
/// <c>switch_section : switch_label+ statement_list ;</c> (C# grammar §13.8.3)
/// </summary>
[DecompilerAstNode(hasNullNode: false, hasPatternPlaceholder: true)]
public partial class SwitchSection : AstNode
{
@ -72,6 +75,9 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -72,6 +75,9 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
}
}
/// <summary>
/// <c>switch_label : 'case' pattern case_guard? ':' | 'default' ':' ;</c> (C# grammar §13.8.3)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
public partial class CaseLabel : AstNode
{

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

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

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

@ -27,7 +27,7 @@ @@ -27,7 +27,7 @@
namespace ICSharpCode.Decompiler.CSharp.Syntax
{
/// <summary>
/// try TryBlock CatchClauses finally FinallyBlock
/// <c>try_statement : 'try' block catch_clauses | 'try' block catch_clauses? finally_clause ;</c> (C# grammar §13.11)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
public partial class TryCatchStatement : Statement
@ -55,7 +55,8 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -55,7 +55,8 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
}
/// <summary>
/// catch (Type VariableName) { Body }
/// <c>specific_catch_clause : 'catch' exception_specifier exception_filter? block | 'catch' exception_filter block ;</c> (C# grammar §13.11)
/// <c>general_catch_clause : 'catch' block ;</c> (C# grammar §13.11)
/// </summary>
[DecompilerAstNode(hasNullNode: true, hasPatternPlaceholder: true)]
public partial class CatchClause : AstNode

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

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

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

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

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

@ -27,7 +27,8 @@ @@ -27,7 +27,8 @@
namespace ICSharpCode.Decompiler.CSharp.Syntax
{
/// <summary>
/// [ await ] using (ResourceAcquisition) EmbeddedStatement
/// <c>using_statement : 'await'? 'using' '(' resource_acquisition ')' embedded_statement ;</c> (C# grammar §13.14.1)
/// <c>local_using_declaration : 'await'? 'using' non_ref_local_variable_declaration ';' statement_list? ;</c> (C# grammar §13.14.2)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
public partial class UsingStatement : Statement

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

@ -26,6 +26,9 @@ @@ -26,6 +26,9 @@
namespace ICSharpCode.Decompiler.CSharp.Syntax
{
/// <summary>
/// <c>local_variable_declaration : implicitly_typed_local_variable_declaration | explicitly_typed_local_variable_declaration | explicitly_typed_ref_local_variable_declaration ;</c> (C# grammar §13.6.2.1)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
public partial class VariableDeclarationStatement : Statement
{

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

@ -27,7 +27,7 @@ @@ -27,7 +27,7 @@
namespace ICSharpCode.Decompiler.CSharp.Syntax
{
/// <summary>
/// "while (Condition) EmbeddedStatement"
/// <c>while_statement : 'while' '(' boolean_expression ')' embedded_statement ;</c> (C# grammar §13.9.2)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
public partial class WhileStatement : Statement

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

@ -27,7 +27,7 @@ @@ -27,7 +27,7 @@
namespace ICSharpCode.Decompiler.CSharp.Syntax
{
/// <summary>
/// yield break;
/// <c>yield_statement : 'yield' 'return' expression ';' | 'yield' 'break' ';' ;</c> (C# grammar §13.15)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
public partial class YieldBreakStatement : Statement

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

@ -27,7 +27,7 @@ @@ -27,7 +27,7 @@
namespace ICSharpCode.Decompiler.CSharp.Syntax
{
/// <summary>
/// yield return Expression;
/// <c>yield_statement : 'yield' 'return' expression ';' | 'yield' 'break' ';' ;</c> (C# grammar §13.15)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
public partial class YieldReturnStatement : Statement

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

@ -30,6 +30,9 @@ using ICSharpCode.Decompiler.Util; @@ -30,6 +30,9 @@ using ICSharpCode.Decompiler.Util;
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)]
public partial class SyntaxTree : AstNode
{

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

@ -20,6 +20,9 @@ using ICSharpCode.Decompiler.CSharp.Syntax.PatternMatching; @@ -20,6 +20,9 @@ using ICSharpCode.Decompiler.CSharp.Syntax.PatternMatching;
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)]
public partial class TupleAstType : AstType
{
@ -34,6 +37,9 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -34,6 +37,9 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
}
}
/// <summary>
/// <c>tuple_type_element : type identifier? ;</c> (C# grammar §8.3.1)
/// </summary>
[DecompilerAstNode(hasNullNode: true)]
public partial class TupleTypeElement : AstNode
{

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

@ -28,6 +28,10 @@ using ICSharpCode.Decompiler.TypeSystem; @@ -28,6 +28,10 @@ using ICSharpCode.Decompiler.TypeSystem;
namespace ICSharpCode.Decompiler.CSharp.Syntax
{
/// <summary>
/// <c>constructor_declaration : attributes? constructor_modifier* constructor_declarator constructor_body ;</c> (C# grammar §15.11.1)
/// <c>static_constructor_declaration : attributes? static_constructor_modifiers identifier '(' ')' static_constructor_body ;</c> (C# grammar §15.12)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
public partial class ConstructorDeclaration : EntityDeclaration
{
@ -67,6 +71,9 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -67,6 +71,9 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
This
}
/// <summary>
/// <c>constructor_initializer : ':' 'base' '(' argument_list? ')' | ':' 'this' '(' argument_list? ')' ;</c> (C# grammar §15.11.1)
/// </summary>
[DecompilerAstNode(hasNullNode: true)]
public partial class ConstructorInitializer : AstNode
{

3
ICSharpCode.Decompiler/CSharp/Syntax/TypeMembers/DestructorDeclaration.cs

@ -28,6 +28,9 @@ using ICSharpCode.Decompiler.TypeSystem; @@ -28,6 +28,9 @@ using ICSharpCode.Decompiler.TypeSystem;
namespace ICSharpCode.Decompiler.CSharp.Syntax
{
/// <summary>
/// <c>finalizer_declaration : attributes? '~' identifier '(' ')' finalizer_body | attributes? 'extern' unsafe_modifier? '~' identifier '(' ')' finalizer_body | attributes? unsafe_modifier 'extern'? '~' identifier '(' ')' finalizer_body ;</c> (C# grammar §15.13)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
public partial class DestructorDeclaration : EntityDeclaration
{

3
ICSharpCode.Decompiler/CSharp/Syntax/TypeMembers/EnumMemberDeclaration.cs

@ -28,6 +28,9 @@ using ICSharpCode.Decompiler.TypeSystem; @@ -28,6 +28,9 @@ using ICSharpCode.Decompiler.TypeSystem;
namespace ICSharpCode.Decompiler.CSharp.Syntax
{
/// <summary>
/// <c>enum_member_declaration : attributes? identifier ('=' constant_expression)? ;</c> (C# grammar §20.4)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
public partial class EnumMemberDeclaration : EntityDeclaration
{

6
ICSharpCode.Decompiler/CSharp/Syntax/TypeMembers/EventDeclaration.cs

@ -31,6 +31,9 @@ using ICSharpCode.Decompiler.TypeSystem; @@ -31,6 +31,9 @@ using ICSharpCode.Decompiler.TypeSystem;
namespace ICSharpCode.Decompiler.CSharp.Syntax
{
/// <summary>
/// <c>event_declaration : attributes? event_modifier* 'event' type variable_declarators ';' | attributes? event_modifier* 'event' type member_name '{' event_accessor_declarations '}' ;</c> (C# grammar §15.8.1)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
public partial class EventDeclaration : EntityDeclaration
{
@ -71,6 +74,9 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -71,6 +74,9 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
}
}
/// <summary>
/// <c>event_declaration : attributes? event_modifier* 'event' type variable_declarators ';' | attributes? event_modifier* 'event' type member_name '{' event_accessor_declarations '}' ;</c> (C# grammar §15.8.1)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
public partial class CustomEventDeclaration : EntityDeclaration
{

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

@ -20,6 +20,10 @@ using ICSharpCode.Decompiler.TypeSystem; @@ -20,6 +20,10 @@ using ICSharpCode.Decompiler.TypeSystem;
namespace ICSharpCode.Decompiler.CSharp.Syntax
{
/// <summary>
/// Not present in this revision of the C# specification grammar: C# 14 extension blocks ('extension(receiver) { members }').
/// <c>extension_declaration : 'extension' type_parameter_list? '(' parameter_list? ')' type_parameter_constraints_clause* '{' class_member_declaration* '}' ;</c>
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
public partial class ExtensionDeclaration : EntityDeclaration
{

3
ICSharpCode.Decompiler/CSharp/Syntax/TypeMembers/FieldDeclaration.cs

@ -31,6 +31,9 @@ using ICSharpCode.Decompiler.TypeSystem; @@ -31,6 +31,9 @@ using ICSharpCode.Decompiler.TypeSystem;
namespace ICSharpCode.Decompiler.CSharp.Syntax
{
/// <summary>
/// <c>field_declaration : attributes? field_modifier* type variable_declarators ';' ;</c> (C# grammar §15.5.1)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
public partial class FieldDeclaration : EntityDeclaration
{

3
ICSharpCode.Decompiler/CSharp/Syntax/TypeMembers/FixedFieldDeclaration.cs

@ -27,6 +27,9 @@ using ICSharpCode.Decompiler.TypeSystem; @@ -27,6 +27,9 @@ using ICSharpCode.Decompiler.TypeSystem;
namespace ICSharpCode.Decompiler.CSharp.Syntax
{
/// <summary>
/// <c>fixed_size_buffer_declaration : attributes? fixed_size_buffer_modifier* 'fixed' buffer_element_type fixed_size_buffer_declarators ';' ;</c> (C# grammar §24.8.2)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
public partial class FixedFieldDeclaration : EntityDeclaration
{

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

@ -27,7 +27,7 @@ @@ -27,7 +27,7 @@
namespace ICSharpCode.Decompiler.CSharp.Syntax
{
/// <summary>
/// Name [ CountExpression ]
/// <c>fixed_size_buffer_declarator : identifier '[' constant_expression ']' ;</c> (C# grammar §24.8.2)
/// </summary>
[DecompilerAstNode(hasNullNode: false)]
public partial class FixedVariableInitializer : AstNode

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

Loading…
Cancel
Save