01: //
02: // Generated by JTB 1.2.1
03: //
04:
05: package oscript.syntaxtree;
06:
07: /**
08: * Represents a grammar choice, e.g. ( A | B )
09: */
10: public class NodeChoice implements Node {
11: public NodeChoice(Node node) {
12: this (node, -1);
13: }
14:
15: public NodeChoice(Node node, int whichChoice) {
16: choice = node;
17: which = whichChoice;
18: }
19:
20: public void accept(oscript.visitor.Visitor v) {
21: choice.accept(v);
22: }
23:
24: public Object accept(oscript.visitor.ObjectVisitor v, Object argu) {
25: return choice.accept(v, argu);
26: }
27:
28: public Node choice;
29: public int which;
30: }
|