01: //
02: // Generated by JTB 1.2.1
03: //
04:
05: package oscript.syntaxtree;
06:
07: /**
08: * Grammar production:
09: * <PRE>
10:
11: * f0 -> "function"
12: * f1 -> "("
13: * f2 -> ( Arglist() )?
14: * f3 -> ")"
15: * f4 -> ( "extends" PrimaryExpressionWithTrailingFxnCallExpList() FunctionCallExpressionList() )?
16: * f5 -> "{"
17: * f6 -> Program(true)
18: * f7 -> "}"
19: * </PRE>
20: */
21: public class FunctionPrimaryPrefix implements Node {
22:
23: /* Translator fields:
24: */
25: public static final int ANON_FXN_ID = oscript.data.Symbol
26: .getSymbol("anon").getId();
27: public int id = ANON_FXN_ID;
28:
29: /* Cache fields:
30: */
31: public boolean commentParsed = false;
32: public oscript.data.Value comment;
33: public oscript.data.Function.FunctionData fd;
34:
35: /* Parser fields:
36: */
37: public boolean hasVarInScope = true; // assume the worst
38: public boolean hasFxnInScope = true; // assume the worst
39:
40: /* Regular JTB fields:
41: */
42: public NodeToken f0;
43: public NodeToken f1;
44: public NodeOptional f2;
45: public NodeToken f3;
46: public NodeOptional f4;
47: public NodeToken f5;
48: public Program f6;
49: public NodeToken f7;
50:
51: public FunctionPrimaryPrefix(NodeToken n0, NodeToken n1,
52: NodeOptional n2, NodeToken n3, NodeOptional n4,
53: NodeToken n5, Program n6, NodeToken n7,
54: boolean hasVarInScope, boolean hasFxnInScope) {
55: f0 = n0;
56: f1 = n1;
57: f2 = n2;
58: f3 = n3;
59: f4 = n4;
60: f5 = n5;
61: f6 = n6;
62: f7 = n7;
63: this .hasVarInScope = hasVarInScope;
64: this .hasFxnInScope = hasFxnInScope;
65: }
66:
67: public FunctionPrimaryPrefix(NodeOptional n0, NodeOptional n1,
68: Program n2) {
69: f0 = new NodeToken("function");
70: f1 = new NodeToken("(");
71: f2 = n0;
72: f3 = new NodeToken(")");
73: f4 = n1;
74: f5 = new NodeToken("{");
75: f6 = n2;
76: f7 = new NodeToken("}");
77: }
78:
79: public void accept(oscript.visitor.Visitor v) {
80: v.visit(this );
81: }
82:
83: public Object accept(oscript.visitor.ObjectVisitor v, Object argu) {
84: return v.visit(this, argu);
85: }
86: }
|