| 1 | |
package org.webslinger.ext.wiki.parser; |
| 2 | |
|
| 3 | |
public class WikiControlWhile extends SimpleNode implements ControlNode, ConditionNode, InlineContainer { |
| 4 | |
protected Node condition; |
| 5 | |
|
| 6 | |
public WikiControlWhile(int id) { |
| 7 | 0 | super(id); |
| 8 | 0 | } |
| 9 | |
|
| 10 | |
public WikiControlWhile(Wiki p, int id) { |
| 11 | 0 | super(p, id); |
| 12 | 0 | } |
| 13 | |
|
| 14 | |
public Object jjtAccept(WikiVisitor visitor, Object data) { |
| 15 | 0 | return visitor.visit(this, data); |
| 16 | |
} |
| 17 | |
|
| 18 | |
public void moveChildren() { |
| 19 | 0 | condition = (Node) children.remove(0); |
| 20 | 0 | } |
| 21 | |
|
| 22 | |
public Node getCondition() { |
| 23 | 0 | return condition; |
| 24 | |
} |
| 25 | |
|
| 26 | |
public String toString() { |
| 27 | 0 | return super.toString() + '(' + getCondition() + ')'; |
| 28 | |
} |
| 29 | |
} |