Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automated Section renumber and grammar extraction #1234

Merged
merged 1 commit into from
Dec 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
[create-pull-request] automated change
  • Loading branch information
jskeet authored Dec 11, 2024
commit fa39d7b93cec0f69cb2d50b93058f15928960553
2 changes: 1 addition & 1 deletion standard/expressions.md
Original file line number Diff line number Diff line change
Expand Up @@ -2158,8 +2158,8 @@
A *null_conditional_invocation_expression* is syntactically either a *null_conditional_member_access* ([§12.8.8](expressions.md#1288-null-conditional-member-access)) or *null_conditional_element_access* ([§12.8.13](expressions.md#12813-null-conditional-element-access)) where the final *dependent_access* is an invocation expression ([§12.8.10](expressions.md#12810-invocation-expressions)).

A *null_conditional_invocation_expression* occurs within the context of a *statement_expression* ([§13.7](statements.md#137-expression-statements)), *anonymous_function_body* ([§12.19.1](expressions.md#12191-general)), or *method_body* ([§15.6.1](classes.md#1561-general)).

Check warning on line 2161 in standard/expressions.md

View workflow job for this annotation

GitHub Actions / Markdown to Word Converter

standard/expressions.md#L2161

MDC032::Line length 84 > maximum 81
Unlike the syntactically equivalent *null_conditional_member_access* or *null_conditional_element_access*, a *null_conditional_invocation_expression* may be classified as nothing.

Check warning on line 2162 in standard/expressions.md

View workflow job for this annotation

GitHub Actions / Markdown to Word Converter

standard/expressions.md#L2162

MDC032::Line length 85 > maximum 81

```ANTLR
null_conditional_invocation_expression
Expand Down Expand Up @@ -3266,7 +3266,7 @@
- one of the following value types: `sbyte`, `byte`, `short`, `ushort`, `int`, `uint`, `long`, `ulong`, `char`, `float`, `double`, `decimal`, `bool,`; or
- any enumeration type.

### 12.8.22 Stack allocation

Check warning on line 3269 in standard/expressions.md

View workflow job for this annotation

GitHub Actions / Markdown to Word Converter

standard/expressions.md#L3269

MDC032::Line length 86 > maximum 81

A stack allocation expression allocates a block of memory from the execution stack. The ***execution stack*** is an area of memory where local variables are stored. The execution stack is not part of the managed heap. The memory used for local variable storage is automatically recovered when the current function returns.

Expand Down Expand Up @@ -3305,7 +3305,7 @@

Each *stackalloc_element_initializer* shall have an implicit conversion to *unmanaged_type* ([§10.2](conversions.md#102-implicit-conversions)). The *stackalloc_element_initializer*s initialize elements in the allocated memory in increasing order, starting with the element at index zero. In the absence of a *stackalloc_initializer*, the content of the newly allocated memory is undefined.

If a *stackalloc_expression* occurs directly as the initializing expression of a *local_variable_declaration* ([§13.6.2](statements.md#1362-local-variable-declarations)), where the *local_variable_type* is either a pointer type ([§23.3](unsafe-code.md#233-pointer-types)) or inferred (`var`), then the result of the *stackalloc_expression* is a pointer of type `T*` (§23.9). In this case the *stackalloc_expression* must appear in unsafe code. Otherwise the result of a *stackalloc_expression* is an instance of type `Span<T>`, where `T` is the *unmanaged_type*:
If a *stackalloc_expression* occurs directly as the initializing expression of a *local_variable_declaration* ([§13.6.2](statements.md#1362-local-variable-declarations)), where the *local_variable_type* is either a pointer type ([§23.3](unsafe-code.md#233-pointer-types)) or inferred (`var`), then the result of the *stackalloc_expression* is a pointer of type `T*` ([§23.9](unsafe-code.md#239-stack-allocation)). In this case the *stackalloc_expression* must appear in unsafe code. Otherwise the result of a *stackalloc_expression* is an instance of type `Span<T>`, where `T` is the *unmanaged_type*:

- `Span<T>` ([§C.3](standard-library.md#c3-standard-library-types-not-defined-in-isoiec-23271)) is a ref struct type ([§16.2.3](structs.md#1623-ref-modifier)), which presents a block of memory, here the block allocated by the *stackalloc_expression*, as an indexable collection of typed (`T`) items.
- The result’s `Length` property returns the number of items allocated.
Expand Down
7 changes: 3 additions & 4 deletions standard/grammar.md
Original file line number Diff line number Diff line change
Expand Up @@ -525,12 +525,12 @@
;

fragment PP_Compilation_Unit_Name
: '"' PP_Compilation_Unit_Name_Character+ '"'
: '"' PP_Compilation_Unit_Name_Character* '"'
;

fragment PP_Compilation_Unit_Name_Character
// Any Input_Character except "
: ~('\u000D' | '\u000A' | '\u0085' | '\u2028' | '\u2029' | '#')
: ~('\u000D' | '\u000A' | '\u0085' | '\u2028' | '\u2029' | '"')
;

// Source: §6.5.9 Nullable directive
Expand Down Expand Up @@ -1004,8 +1004,8 @@
: primary_expression '(' argument_list? ')'
;

// Source: §12.8.11 Null Conditional Invocation Expression

Check warning on line 1007 in standard/grammar.md

View workflow job for this annotation

GitHub Actions / Markdown to Word Converter

standard/grammar.md#L1007

MDC032::Line length 84 > maximum 81
null_conditional_invocation_expression

Check warning on line 1008 in standard/grammar.md

View workflow job for this annotation

GitHub Actions / Markdown to Word Converter

standard/grammar.md#L1008

MDC032::Line length 85 > maximum 81
: null_conditional_member_access null_forgiving_operator? '(' argument_list? ')'
| null_conditional_element_access null_forgiving_operator? '(' argument_list? ')'
;
Expand Down Expand Up @@ -1182,10 +1182,9 @@
;

// Source: §12.8.22 Stack allocation
stackalloc_expression

Check warning on line 1185 in standard/grammar.md

View workflow job for this annotation

GitHub Actions / Markdown to Word Converter

standard/grammar.md#L1185

MDC032::Line length 86 > maximum 81
: 'stackalloc' unmanaged_type '[' expression ']'
| 'stackalloc' unmanaged_type? '[' constant_expression? ']'
stackalloc_initializer
| 'stackalloc' unmanaged_type? '[' constant_expression? ']' stackalloc_initializer
;

stackalloc_initializer
Expand Down Expand Up @@ -1977,7 +1976,7 @@
type_parameter_constraints_clause
: 'where' type_parameter ':' type_parameter_constraints
;

Check warning on line 1979 in standard/grammar.md

View workflow job for this annotation

GitHub Actions / Markdown to Word Converter

standard/grammar.md#L1979

MDC032::Line length 83 > maximum 81
type_parameter_constraints
: primary_constraint (',' secondary_constraints)? (',' constructor_constraint)?
| secondary_constraints (',' constructor_constraint)?
Expand Down Expand Up @@ -2340,7 +2339,7 @@
logical_negation_operator
: '!'
;

Check warning on line 2342 in standard/grammar.md

View workflow job for this annotation

GitHub Actions / Markdown to Word Converter

standard/grammar.md#L2342

MDC032::Line length 82 > maximum 81
overloadable_unary_operator
: '+' | '-' | logical_negation_operator | '~' | '++' | '--' | 'true' | 'false'
;
Expand Down
Loading