File tree Expand file tree Collapse file tree 1 file changed +25
-7
lines changed Expand file tree Collapse file tree 1 file changed +25
-7
lines changed Original file line number Diff line number Diff line change @@ -9617,24 +9617,42 @@ class LabeledStatement extends Statement {
9617
9617
9618
9618
/// Breaks out of an enclosing [LabeledStatement] .
9619
9619
///
9620
- /// Both `break` and loop `continue` statements are translated into this node.
9620
+ /// Both `break` and `continue` statements are translated into this node.
9621
9621
///
9622
- /// For example, the following loop with a `continue` will be desugared :
9622
+ /// Example `break` desugaring :
9623
9623
///
9624
- /// while(x) {
9624
+ /// while (x) {
9625
+ /// if (y) break;
9626
+ /// BODY
9627
+ /// }
9628
+ ///
9629
+ /// ==>
9630
+ ///
9631
+ /// L: while (x) {
9632
+ /// if (y) break L;
9633
+ /// BODY
9634
+ /// }
9635
+ ///
9636
+ /// Example `continue` desugaring:
9637
+ ///
9638
+ /// while (x) {
9625
9639
/// if (y) continue;
9626
- /// BODY'
9640
+ /// BODY
9627
9641
/// }
9628
9642
///
9629
9643
/// ==>
9630
9644
///
9631
- /// while(x) {
9645
+ /// while (x) {
9632
9646
/// L: {
9633
9647
/// if (y) break L;
9634
- /// BODY'
9648
+ /// BODY
9635
9649
/// }
9636
9650
/// }
9637
- //
9651
+ ///
9652
+ /// Note: Compiler-generated [LabeledStatement] s for [WhileStatement] s and
9653
+ /// [ForStatement] s are only generated when needed. If there isn't a `break` or
9654
+ /// `continue` in a loop, the kernel for the loop won't have a generated
9655
+ /// [LabeledStatement] .
9638
9656
class BreakStatement extends Statement {
9639
9657
LabeledStatement target;
9640
9658
You can’t perform that action at this time.
0 commit comments