30 |
30 |
31 /** |
31 /** |
32 * IR representation for CONTINUE statements. |
32 * IR representation for CONTINUE statements. |
33 */ |
33 */ |
34 @Immutable |
34 @Immutable |
35 public class ContinueNode extends Statement { |
35 public class ContinueNode extends JumpStatement { |
36 |
|
37 private IdentNode label; |
|
38 |
|
39 /** |
36 /** |
40 * Constructor |
37 * Constructor |
41 * |
38 * |
42 * @param lineNumber line number |
39 * @param lineNumber line number |
43 * @param token token |
40 * @param token token |
44 * @param finish finish |
41 * @param finish finish |
45 * @param label label for break or null if none |
42 * @param labelName label name for continue or null if none |
46 */ |
43 */ |
47 public ContinueNode(final int lineNumber, final long token, final int finish, final IdentNode label) { |
44 public ContinueNode(final int lineNumber, final long token, final int finish, final String labelName) { |
48 super(lineNumber, token, finish); |
45 super(lineNumber, token, finish, labelName); |
49 this.label = label; |
|
50 } |
46 } |
51 |
47 |
52 @Override |
48 private ContinueNode(final ContinueNode continueNode, final LocalVariableConversion conversion) { |
53 public boolean hasGoto() { |
49 super(continueNode, conversion); |
54 return true; |
|
55 } |
50 } |
56 |
51 |
57 @Override |
52 @Override |
58 public Node accept(final NodeVisitor<? extends LexicalContext> visitor) { |
53 public Node accept(final NodeVisitor<? extends LexicalContext> visitor) { |
59 if (visitor.enterContinueNode(this)) { |
54 if (visitor.enterContinueNode(this)) { |