01: //
02: // Generated by JTB 1.2.1
03: //
04:
05: package oscript.syntaxtree;
06:
07: /**
08: * Grammar production:
09: * <PRE>
10:
11: * f0 -> Permissions(true)
12: * f1 -> "function"
13: * f2 -> <IDENTIFIER>
14: * f3 -> "("
15: * f4 -> ( Arglist() )?
16: * f5 -> ")"
17: * f6 -> ( "extends" PrimaryExpressionWithTrailingFxnCallExpList() FunctionCallExpressionList() )?
18: * f7 -> "{"
19: * f8 -> Program(true)
20: * f9 -> "}"
21: * </PRE>
22: */
23: public class FunctionDeclaration implements Node {
24:
25: /* Cache fields:
26: */
27: public Node translated;
28:
29: /* Parser fields:
30: */
31: public boolean hasVarInScope = true; // assume the worst
32: public boolean hasFxnInScope = true; // assume the worst
33:
34: /* Regular JTB fields:
35: */
36: public Permissions f0;
37: public NodeToken f1;
38: public NodeToken f2;
39: public NodeToken f3;
40: public NodeOptional f4;
41: public NodeToken f5;
42: public NodeOptional f6;
43: public NodeToken f7;
44: public Program f8;
45: public NodeToken f9;
46:
47: public FunctionDeclaration(Permissions n0, NodeToken n1,
48: NodeToken n2, NodeToken n3, NodeOptional n4, NodeToken n5,
49: NodeOptional n6, NodeToken n7, Program n8, NodeToken n9,
50: boolean hasVarInScope, boolean hasFxnInScope) {
51: f0 = n0;
52: f1 = n1;
53: f2 = n2;
54: f3 = n3;
55: f4 = n4;
56: f5 = n5;
57: f6 = n6;
58: f7 = n7;
59: f8 = n8;
60: f9 = n9;
61: this .hasVarInScope = hasVarInScope;
62: this .hasFxnInScope = hasFxnInScope;
63: }
64:
65: public FunctionDeclaration(Permissions n0, NodeToken n1,
66: NodeOptional n2, NodeOptional n3, Program n4) {
67: f0 = n0;
68: f1 = new NodeToken("function");
69: f2 = n1;
70: f3 = new NodeToken("(");
71: f4 = n2;
72: f5 = new NodeToken(")");
73: f6 = n3;
74: f7 = new NodeToken("{");
75: f8 = n4;
76: f9 = 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: }
|