-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathGlobalVarDecl.java
58 lines (44 loc) · 1.75 KB
/
GlobalVarDecl.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
// generated with ast extension for cup
// version 0.8
// 1/1/2023 19:22:27
package askov.schoolprojects.compilerconstruction.mjcompiler.ast;
public class GlobalVarDecl extends Decl {
private ErrorProneGlobalVarDecl ErrorProneGlobalVarDecl;
public GlobalVarDecl (ErrorProneGlobalVarDecl ErrorProneGlobalVarDecl) {
this.ErrorProneGlobalVarDecl=ErrorProneGlobalVarDecl;
if(ErrorProneGlobalVarDecl!=null) ErrorProneGlobalVarDecl.setParent(this);
}
public ErrorProneGlobalVarDecl getErrorProneGlobalVarDecl() {
return ErrorProneGlobalVarDecl;
}
public void setErrorProneGlobalVarDecl(ErrorProneGlobalVarDecl ErrorProneGlobalVarDecl) {
this.ErrorProneGlobalVarDecl=ErrorProneGlobalVarDecl;
}
public void accept(Visitor visitor) {
visitor.visit(this);
}
public void childrenAccept(Visitor visitor) {
if(ErrorProneGlobalVarDecl!=null) ErrorProneGlobalVarDecl.accept(visitor);
}
public void traverseTopDown(Visitor visitor) {
accept(visitor);
if(ErrorProneGlobalVarDecl!=null) ErrorProneGlobalVarDecl.traverseTopDown(visitor);
}
public void traverseBottomUp(Visitor visitor) {
if(ErrorProneGlobalVarDecl!=null) ErrorProneGlobalVarDecl.traverseBottomUp(visitor);
accept(visitor);
}
public String toString(String tab) {
StringBuffer buffer=new StringBuffer();
buffer.append(tab);
buffer.append("GlobalVarDecl(\n");
if(ErrorProneGlobalVarDecl!=null)
buffer.append(ErrorProneGlobalVarDecl.toString(" "+tab));
else
buffer.append(tab+" null");
buffer.append("\n");
buffer.append(tab);
buffer.append(") [GlobalVarDecl]");
return buffer.toString();
}
}