diff options
author | bd-912 <bdunahu@colostate.edu> | 2024-03-27 23:20:35 -0600 |
---|---|---|
committer | bd-912 <bdunahu@colostate.edu> | 2024-03-27 23:20:35 -0600 |
commit | 835e614e1e2531db3dc7dbe027de122a9fa0b78f (patch) | |
tree | c850ac64341cd8ceb56de23f71219c89b7bc3317 /syntaxtree/MethodDeclaration.java | |
parent | b01fe1e8e5541d6c11f905d7fbb949d747f29230 (diff) |
Reorder generated files
Diffstat (limited to 'syntaxtree/MethodDeclaration.java')
-rw-r--r-- | syntaxtree/MethodDeclaration.java | 83 |
1 files changed, 83 insertions, 0 deletions
diff --git a/syntaxtree/MethodDeclaration.java b/syntaxtree/MethodDeclaration.java new file mode 100644 index 0000000..03a4d76 --- /dev/null +++ b/syntaxtree/MethodDeclaration.java @@ -0,0 +1,83 @@ +// +// Generated by JTB 1.3.2 +// + +package syntaxtree; + +/** + * Grammar production: + * f0 -> "public" + * f1 -> Type() + * f2 -> Identifier() + * f3 -> "(" + * f4 -> ( FormalParameterList() )? + * f5 -> ")" + * f6 -> "{" + * f7 -> ( VarDeclaration() )* + * f8 -> ( Statement() )* + * f9 -> "return" + * f10 -> Expression() + * f11 -> ";" + * f12 -> "}" + */ +public class MethodDeclaration implements Node { + public NodeToken f0; + public Type f1; + public Identifier f2; + public NodeToken f3; + public NodeOptional f4; + public NodeToken f5; + public NodeToken f6; + public NodeListOptional f7; + public NodeListOptional f8; + public NodeToken f9; + public Expression f10; + public NodeToken f11; + public NodeToken f12; + + public MethodDeclaration(NodeToken n0, Type n1, Identifier n2, NodeToken n3, NodeOptional n4, NodeToken n5, NodeToken n6, NodeListOptional n7, NodeListOptional n8, NodeToken n9, Expression n10, NodeToken n11, NodeToken n12) { + f0 = n0; + f1 = n1; + f2 = n2; + f3 = n3; + f4 = n4; + f5 = n5; + f6 = n6; + f7 = n7; + f8 = n8; + f9 = n9; + f10 = n10; + f11 = n11; + f12 = n12; + } + + public MethodDeclaration(Type n0, Identifier n1, NodeOptional n2, NodeListOptional n3, NodeListOptional n4, Expression n5) { + f0 = new NodeToken("public"); + f1 = n0; + f2 = n1; + f3 = new NodeToken("("); + f4 = n2; + f5 = new NodeToken(")"); + f6 = new NodeToken("{"); + f7 = n3; + f8 = n4; + f9 = new NodeToken("return"); + f10 = n5; + f11 = new NodeToken(";"); + f12 = new NodeToken("}"); + } + + public void accept(visitor.Visitor v) { + v.visit(this); + } + public <R,A> R accept(visitor.GJVisitor<R,A> v, A argu) { + return v.visit(this,argu); + } + public <R> R accept(visitor.GJNoArguVisitor<R> v) { + return v.visit(this); + } + public <A> void accept(visitor.GJVoidVisitor<A> v, A argu) { + v.visit(this,argu); + } +} + |