From Jason Turner

[gram.stmt]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpt5a65_uj/{from.md → to.md} +19 -13
tmp/tmpt5a65_uj/{from.md → to.md} RENAMED
@@ -21,12 +21,12 @@ condition:
21
  ```
22
 
23
  ``` bnf
24
  labeled-statement:
25
  attribute-specifier-seqₒₚₜ identifier ':' statement
26
- attribute-specifier-seqₒₚₜ 'case' constant-expression ':' statement
27
- attribute-specifier-seqₒₚₜ 'default :' statement
28
  ```
29
 
30
  ``` bnf
31
  expression-statement:
32
  expressionₒₚₜ ';'
@@ -43,21 +43,21 @@ statement-seq:
43
  statement-seq statement
44
  ```
45
 
46
  ``` bnf
47
  selection-statement:
48
- 'if constexprₒₚₜ (' init-statementₒₚₜ condition ')' statement
49
- 'if constexprₒₚₜ (' init-statementₒₚₜ condition ')' statement 'else' statement
50
- 'switch (' init-statementₒₚₜ condition ')' statement
51
  ```
52
 
53
  ``` bnf
54
  iteration-statement:
55
- 'while (' condition ')' statement
56
- 'do' statement 'while (' expression ') ;'
57
- 'for (' init-statement conditionₒₚₜ ';' expressionₒₚₜ ')' statement
58
- 'for (' for-range-declaration ':' for-range-initializer ')' statement
59
  ```
60
 
61
  ``` bnf
62
  for-range-declaration:
63
  attribute-specifier-seqₒₚₜ decl-specifier-seq declarator
@@ -69,14 +69,20 @@ for-range-initializer:
69
  expr-or-braced-init-list
70
  ```
71
 
72
  ``` bnf
73
  jump-statement:
74
- 'break ;'
75
- 'continue ;'
76
- 'return' expr-or-braced-init-listₒₚₜ ';'
77
- 'goto' identifier ';'
 
 
 
 
 
 
78
  ```
79
 
80
  ``` bnf
81
  declaration-statement:
82
  block-declaration
 
21
  ```
22
 
23
  ``` bnf
24
  labeled-statement:
25
  attribute-specifier-seqₒₚₜ identifier ':' statement
26
+ attribute-specifier-seqₒₚₜ case constant-expression ':' statement
27
+ attribute-specifier-seqₒₚₜ default ':' statement
28
  ```
29
 
30
  ``` bnf
31
  expression-statement:
32
  expressionₒₚₜ ';'
 
43
  statement-seq statement
44
  ```
45
 
46
  ``` bnf
47
  selection-statement:
48
+ if constexprₒₚₜ '(' init-statementₒₚₜ condition ')' statement
49
+ if constexprₒₚₜ '(' init-statementₒₚₜ condition ')' statement else statement
50
+ switch '(' init-statementₒₚₜ condition ')' statement
51
  ```
52
 
53
  ``` bnf
54
  iteration-statement:
55
+ while '(' condition ')' statement
56
+ do statement while '(' expression ')' ';'
57
+ for '(' init-statement conditionₒₚₜ ';' expressionₒₚₜ ')' statement
58
+ for '(' init-statementₒₚₜ for-range-declaration ':' for-range-initializer ')' statement
59
  ```
60
 
61
  ``` bnf
62
  for-range-declaration:
63
  attribute-specifier-seqₒₚₜ decl-specifier-seq declarator
 
69
  expr-or-braced-init-list
70
  ```
71
 
72
  ``` bnf
73
  jump-statement:
74
+ break ';'
75
+ continue ';'
76
+ return expr-or-braced-init-listₒₚₜ ';'
77
+ coroutine-return-statement
78
+ goto identifier ';'
79
+ ```
80
+
81
+ ``` bnf
82
+ coroutine-return-statement:
83
+ 'co_return' expr-or-braced-init-listₒₚₜ ';'
84
  ```
85
 
86
  ``` bnf
87
  declaration-statement:
88
  block-declaration