Skip to content

Commit e4196e8

Browse files
committed
Fix Word converter warnings
These are almost all just line breaks in either grammar or C# code
1 parent c3028bc commit e4196e8

File tree

9 files changed

+75
-39
lines changed

9 files changed

+75
-39
lines changed

standard/classes.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1906,7 +1906,8 @@ A ***method*** is a member that implements a computation or action that can be p
19061906
```ANTLR
19071907
method_declaration
19081908
: attributes? method_modifiers return_type method_header method_body
1909-
| attributes? ref_method_modifiers ref_kind ref_return_type method_header ref_method_body
1909+
| attributes? ref_method_modifiers ref_kind ref_return_type method_header
1910+
ref_method_body
19101911
;
19111912
19121913
method_modifiers
@@ -1924,7 +1925,8 @@ ref_method_modifiers
19241925
19251926
method_header
19261927
: member_name '(' formal_parameter_list? ')'
1927-
| member_name type_parameter_list '(' formal_parameter_list? ')' type_parameter_constraints_clause*
1928+
| member_name type_parameter_list '(' formal_parameter_list? ')'
1929+
type_parameter_constraints_clause*
19281930
;
19291931
19301932
method_modifier
@@ -3281,8 +3283,8 @@ A get accessor for a ref-valued property corresponds to a parameterless method w
32813283
> {
32823284
> field = 10;
32833285
> Console.WriteLine(Property); // Prints 10
3284-
> Property = 20; // This invokes the getter, then assigns via the
3285-
> // resulting variable reference
3286+
> Property = 20; // This invokes the getter, then assigns
3287+
> // via the resulting variable reference
32863288
> Console.WriteLine(field); // Prints 20
32873289
> }
32883290
> }

standard/delegates.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,14 @@ A *delegate_declaration* is a *type_declaration* ([§14.7](namespaces.md#147-typ
1313
```ANTLR
1414
delegate_declaration
1515
: attributes? delegate_modifier* 'delegate' return_type delegate_header
16-
| attributes? delegate_modifier* 'delegate' ref_kind ref_return_type delegate_header
16+
| attributes? delegate_modifier* 'delegate' ref_kind ref_return_type
17+
delegate_header
1718
;
1819
1920
delegate_header
2021
: identifier '(' formal_parameter_list? ')' ';'
21-
| identifier variant_type_parameter_list '(' formal_parameter_list? ')' type_parameter_constraints_clause* ';'
22+
| identifier variant_type_parameter_list '(' formal_parameter_list? ')'
23+
type_parameter_constraints_clause* ';'
2224
;
2325
2426
delegate_modifier

standard/expressions.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3129,7 +3129,8 @@ The safe context rules for a stack allocation expression are described in [§16.
31293129
```ANTLR
31303130
stackalloc_expression
31313131
: 'stackalloc' unmanaged_type '[' expression ']'
3132-
| 'stackalloc' unmanaged_type? '[' constant_expression? ']' stackalloc_initializer
3132+
| 'stackalloc' unmanaged_type? '[' constant_expression? ']'
3133+
stackalloc_initializer
31333134
;
31343135
31353136
stackalloc_initializer
@@ -3149,7 +3150,7 @@ stackalloc_element_initializer
31493150
A *stackalloc_expression* is only permitted in two contexts:
31503151

31513152
1. The initializing *expression*, `E`, of a *local_variable_declaration* ([§13.6.2](statements.md#1362-local-variable-declarations)); and
3152-
2. The right operand *expression*, `E`, of a simple assignment ([$12.21.2](expressions.md#12212-simple-assignment)) which itself occurs as a *expression_statement* ([§13.7](statements.md#137-expression-statements))
3153+
2. The right operand *expression*, `E`, of a simple assignment ([§12.21.2](expressions.md#12212-simple-assignment)) which itself occurs as a *expression_statement* ([§13.7](statements.md#137-expression-statements))
31533154

31543155
In both contexts the *stackalloc_expression* is only permitted to occur as:
31553156

@@ -4792,7 +4793,8 @@ The `?:` operator is called the conditional operator. It is at times also calle
47924793
conditional_expression
47934794
: null_coalescing_expression
47944795
| null_coalescing_expression '?' expression ':' expression
4795-
| null_coalescing_expression '?' 'ref' variable_reference ':' 'ref' variable_reference
4796+
| null_coalescing_expression '?' 'ref' variable_reference ':'
4797+
'ref' variable_reference
47964798
;
47974799
```
47984800

standard/grammar.md

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1141,7 +1141,8 @@ default_literal
11411141
// Source: §12.8.21 Stack allocation
11421142
stackalloc_expression
11431143
: 'stackalloc' unmanaged_type '[' expression ']'
1144-
| 'stackalloc' unmanaged_type? '[' constant_expression? ']' stackalloc_initializer
1144+
| 'stackalloc' unmanaged_type? '[' constant_expression? ']'
1145+
stackalloc_initializer
11451146
;
11461147
11471148
stackalloc_initializer
@@ -1299,7 +1300,8 @@ local_variable_type
12991300
conditional_expression
13001301
: null_coalescing_expression
13011302
| null_coalescing_expression '?' expression ':' expression
1302-
| null_coalescing_expression '?' 'ref' variable_reference ':' 'ref' variable_reference
1303+
| null_coalescing_expression '?' 'ref' variable_reference ':'
1304+
'ref' variable_reference
13031305
;
13041306
13051307
// Source: §12.19.1 General
@@ -1542,7 +1544,8 @@ explicitly_typed_local_variable_declaration
15421544
;
15431545
15441546
explicitly_typed_local_variable_declarators
1545-
: explicitly_typed_local_variable_declarator (',' explicitly_typed_local_variable_declarator)*
1547+
: explicitly_typed_local_variable_declarator
1548+
(',' explicitly_typed_local_variable_declarator)*
15461549
;
15471550
15481551
explicitly_typed_local_variable_declarator
@@ -1582,13 +1585,16 @@ constant_declarator
15821585
15831586
// Source: §13.6.4 Local function declarations
15841587
local_function_declaration
1585-
: local_function_modifier* return_type local_function_header local_function_body
1586-
| ref_local_function_modifier* ref_kind ref_return_type local_function_header ref_local_function_body
1588+
: local_function_modifier* return_type local_function_header
1589+
local_function_body
1590+
| ref_local_function_modifier* ref_kind ref_return_type
1591+
local_function_header ref_local_function_body
15871592
;
15881593
15891594
local_function_header
15901595
: identifier '(' formal_parameter_list? ')'
1591-
| identifier type_parameter_list '(' formal_parameter_list? ')' type_parameter_constraints_clause*
1596+
| identifier type_parameter_list '(' formal_parameter_list? ')'
1597+
type_parameter_constraints_clause*
15921598
;
15931599
15941600
local_function_modifier
@@ -2017,7 +2023,8 @@ variable_declarator
20172023
// Source: §15.6.1 General
20182024
method_declaration
20192025
: attributes? method_modifiers return_type method_header method_body
2020-
| attributes? ref_method_modifiers ref_kind ref_return_type method_header ref_method_body
2026+
| attributes? ref_method_modifiers ref_kind ref_return_type method_header
2027+
ref_method_body
20212028
;
20222029
20232030
method_modifiers
@@ -2035,7 +2042,8 @@ ref_method_modifiers
20352042
20362043
method_header
20372044
: member_name '(' formal_parameter_list? ')'
2038-
| member_name type_parameter_list '(' formal_parameter_list? ')' type_parameter_constraints_clause*
2045+
| member_name type_parameter_list '(' formal_parameter_list? ')'
2046+
type_parameter_constraints_clause*
20392047
;
20402048
20412049
method_modifier
@@ -2496,7 +2504,8 @@ interface_method_declaration
24962504
24972505
interface_method_header
24982506
: identifier '(' formal_parameter_list? ')' ';'
2499-
| identifier type_parameter_list '(' formal_parameter_list? ')' type_parameter_constraints_clause* ';'
2507+
| identifier type_parameter_list '(' formal_parameter_list? ')'
2508+
type_parameter_constraints_clause* ';'
25002509
;
25012510
25022511
// Source: §18.4.3 Interface properties
@@ -2570,12 +2579,14 @@ enum_member_declaration
25702579
// Source: §20.2 Delegate declarations
25712580
delegate_declaration
25722581
: attributes? delegate_modifier* 'delegate' return_type delegate_header
2573-
| attributes? delegate_modifier* 'delegate' ref_kind ref_return_type delegate_header
2582+
| attributes? delegate_modifier* 'delegate' ref_kind ref_return_type
2583+
delegate_header
25742584
;
25752585
25762586
delegate_header
25772587
: identifier '(' formal_parameter_list? ')' ';'
2578-
| identifier variant_type_parameter_list '(' formal_parameter_list? ')' type_parameter_constraints_clause* ';'
2588+
| identifier variant_type_parameter_list '(' formal_parameter_list? ')'
2589+
type_parameter_constraints_clause* ';'
25792590
;
25802591
25812592
delegate_modifier

standard/interfaces.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,8 @@ interface_method_declaration
260260
261261
interface_method_header
262262
: identifier '(' formal_parameter_list? ')' ';'
263-
| identifier type_parameter_list '(' formal_parameter_list? ')' type_parameter_constraints_clause* ';'
263+
| identifier type_parameter_list '(' formal_parameter_list? ')'
264+
type_parameter_constraints_clause* ';'
264265
;
265266
```
266267

standard/patterns.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,9 +172,11 @@ A set of patterns `Q` is *exhaustive* for a type `T` if any of the following con
172172
> static void M(byte b)
173173
> {
174174
> switch (b) {
175-
> case 0: case 1: case 2: case 3: ... // handle every specific value of byte
175+
> case 0: case 1: case 2: ... // handle every specific value of byte
176176
> break;
177-
> case byte other: // error: the pattern 'byte other' is subsumed by the (exhaustive) previous cases
177+
> // error: the pattern 'byte other' is subsumed by the (exhaustive)
178+
> // previous cases
179+
> case byte other:
178180
> break;
179181
> }
180182
> }

standard/standard-library.md

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,8 @@ namespace System
291291
public T4 Item4;
292292
public T5 Item5;
293293
public T6 Item6;
294-
public ValueTuple(T1 item1, T2 item2, T3 item3, T4 item4, T5 item5, T6 item6);
294+
public ValueTuple(T1 item1, T2 item2, T3 item3, T4 item4, T5 item5,
295+
T6 item6);
295296
}
296297
public struct ValueTuple<T1, T2, T3, T4, T5, T6, T7>
297298
{
@@ -302,7 +303,8 @@ namespace System
302303
public T5 Item5;
303304
public T6 Item6;
304305
public T7 Item7;
305-
public ValueTuple(T1 item1, T2 item2, T3 item3, T4 item4, T5 item5, T6 item6, T7 item7);
306+
public ValueTuple(T1 item1, T2 item2, T3 item3, T4 item4, T5 item5,
307+
T6 item6, T7 item7);
306308
}
307309
public struct ValueTuple<T1, T2, T3, T4, T5, T6, T7, TRest>
308310
{
@@ -314,7 +316,8 @@ namespace System
314316
public T6 Item6;
315317
public T7 Item7;
316318
public TRest Rest;
317-
public ValueTuple(T1 item1, T2 item2, T3 item3, T4 item4, T5 item5, T6 item6, T7 item7, TRest rest);
319+
public ValueTuple(T1 item1, T2 item2, T3 item3, T4 item4, T5 item5,
320+
T6 item6, T7 item7, TRest rest);
318321
}
319322

320323
public abstract class ValueType
@@ -509,25 +512,29 @@ namespace System.Runtime.CompilerServices
509512
void OnCompleted(Action continuation);
510513
}
511514

512-
public readonly struct TaskAwaiter : ICriticalNotifyCompletion, INotifyCompletion
515+
public readonly struct TaskAwaiter : ICriticalNotifyCompletion,
516+
INotifyCompletion
513517
{
514518
public bool IsCompleted { get; }
515519
public void GetResult();
516520
}
517521

518-
public readonly struct TaskAwaiter<TResult> : ICriticalNotifyCompletion, INotifyCompletion
522+
public readonly struct TaskAwaiter<TResult> : ICriticalNotifyCompletion,
523+
INotifyCompletion
519524
{
520525
public bool IsCompleted { get; }
521526
public TResult GetResult();
522527
}
523528

524-
public readonly struct ValueTaskAwaiter : ICriticalNotifyCompletion, INotifyCompletion
529+
public readonly struct ValueTaskAwaiter : ICriticalNotifyCompletion,
530+
INotifyCompletion
525531
{
526532
public bool IsCompleted { get; }
527533
public void GetResult();
528534
}
529535

530-
public readonly struct ValueTaskAwaiter<TResult> : ICriticalNotifyCompletion, INotifyCompletion
536+
public readonly struct ValueTaskAwaiter<TResult>
537+
: ICriticalNotifyCompletion, INotifyCompletion
531538
{
532539
public bool IsCompleted { get; }
533540
public TResult GetResult();
@@ -549,9 +556,11 @@ namespace System.Threading.Tasks
549556
{
550557
public System.Runtime.CompilerServices.ValueTaskAwaiter GetAwaiter();
551558
}
552-
public readonly struct ValueTask<TResult> : System.IEquatable<ValueTask<TResult>>
559+
public readonly struct ValueTask<TResult>
560+
: System.IEquatable<ValueTask<TResult>>
553561
{
554-
public new System.Runtime.CompilerServices.ValueTaskAwaiter<TResult> GetAwaiter();
562+
public new System.Runtime.CompilerServices.ValueTaskAwaiter<TResult>
563+
GetAwaiter();
555564
}
556565
}
557566
```

standard/statements.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,8 @@ explicitly_typed_local_variable_declaration
413413
;
414414
415415
explicitly_typed_local_variable_declarators
416-
: explicitly_typed_local_variable_declarator (',' explicitly_typed_local_variable_declarator)*
416+
: explicitly_typed_local_variable_declarator
417+
(',' explicitly_typed_local_variable_declarator)*
417418
;
418419
419420
explicitly_typed_local_variable_declarator
@@ -486,13 +487,16 @@ A *local_function_declaration* declares a local function.
486487

487488
```ANTLR
488489
local_function_declaration
489-
: local_function_modifier* return_type local_function_header local_function_body
490-
| ref_local_function_modifier* ref_kind ref_return_type local_function_header ref_local_function_body
490+
: local_function_modifier* return_type local_function_header
491+
local_function_body
492+
| ref_local_function_modifier* ref_kind ref_return_type
493+
local_function_header ref_local_function_body
491494
;
492495
493496
local_function_header
494497
: identifier '(' formal_parameter_list? ')'
495-
| identifier type_parameter_list '(' formal_parameter_list? ')' type_parameter_constraints_clause*
498+
| identifier type_parameter_list '(' formal_parameter_list? ')'
499+
type_parameter_constraints_clause*
496500
;
497501
498502
local_function_modifier

standard/variables.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1114,13 +1114,16 @@ These values form a nesting relationship from narrowest (declaration-block) to w
11141114
> {
11151115
> int v3 = 6;
11161116
>
1117-
> // context of r2 is declaration-block, ref safe context of p is function-member
1117+
> // context of r2 is declaration-block,
1118+
> // ref safe context of p is function-member
11181119
> ref int r2 = ref p;
11191120
>
1120-
> // context of r3 is declaration-block, ref safe context of v3 is declaration-block
1121+
> // context of r3 is declaration-block,
1122+
> // ref safe context of v3 is declaration-block
11211123
> ref int r3 = ref v3;
11221124
>
1123-
> // context of r4 is declaration-block, ref safe context of arr[v3] is caller-context
1125+
> // context of r4 is declaration-block,
1126+
> // ref safe context of arr[v3] is caller-context
11241127
> ref int r4 = ref arr[v3];
11251128
> }
11261129
> }

0 commit comments

Comments
 (0)