73 }
74
75 /**
76 * Constructor
77 *
78 * @param lineNumber The line number of header
79 * @param token The for token
80 * @param finish The last character of the for node
81 * @param body The body of the for node
82 * @param flags The flags
83 * @param init The initial expression
84 * @param test The test expression
85 * @param modify The modify expression
86 */
87 public ForNode(final int lineNumber, final long token, final int finish, final Block body, final int flags, final Expression init, final JoinPredecessorExpression test, final JoinPredecessorExpression modify) {
88 super(lineNumber, token, finish, body, test, false);
89 this.flags = flags;
90 this.init = init;
91 this.modify = modify;
92 this.iterator = null;
93
94 }
95
96 private ForNode(final ForNode forNode, final Expression init, final JoinPredecessorExpression test,
97 final Block body, final JoinPredecessorExpression modify, final int flags,
98 final boolean controlFlowEscapes, final LocalVariableConversion conversion, final Symbol iterator) {
99 super(forNode, test, body, controlFlowEscapes, conversion);
100 this.init = init;
101 this.modify = modify;
102 this.flags = flags;
103 this.iterator = iterator;
104 }
105
106 @Override
107 public Node ensureUniqueLabels(final LexicalContext lc) {
108 return Node.replaceInLexicalContext(lc, this, new ForNode(this, init, test, body, modify, flags, controlFlowEscapes, conversion, iterator));
109 }
110
111 @Override
112 public Node accept(final LexicalContext lc, final NodeVisitor<? extends LexicalContext> visitor) {
113 if (visitor.enterForNode(this)) {
|
73 }
74
75 /**
76 * Constructor
77 *
78 * @param lineNumber The line number of header
79 * @param token The for token
80 * @param finish The last character of the for node
81 * @param body The body of the for node
82 * @param flags The flags
83 * @param init The initial expression
84 * @param test The test expression
85 * @param modify The modify expression
86 */
87 public ForNode(final int lineNumber, final long token, final int finish, final Block body, final int flags, final Expression init, final JoinPredecessorExpression test, final JoinPredecessorExpression modify) {
88 super(lineNumber, token, finish, body, test, false);
89 this.flags = flags;
90 this.init = init;
91 this.modify = modify;
92 this.iterator = null;
93 }
94
95 private ForNode(final ForNode forNode, final Expression init, final JoinPredecessorExpression test,
96 final Block body, final JoinPredecessorExpression modify, final int flags,
97 final boolean controlFlowEscapes, final LocalVariableConversion conversion, final Symbol iterator) {
98 super(forNode, test, body, controlFlowEscapes, conversion);
99 this.init = init;
100 this.modify = modify;
101 this.flags = flags;
102 this.iterator = iterator;
103 }
104
105 @Override
106 public Node ensureUniqueLabels(final LexicalContext lc) {
107 return Node.replaceInLexicalContext(lc, this, new ForNode(this, init, test, body, modify, flags, controlFlowEscapes, conversion, iterator));
108 }
109
110 @Override
111 public Node accept(final LexicalContext lc, final NodeVisitor<? extends LexicalContext> visitor) {
112 if (visitor.enterForNode(this)) {
|