-
Notifications
You must be signed in to change notification settings - Fork 85
/
suiteType.java
73 lines (65 loc) · 2.13 KB
/
suiteType.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
// Autogenerated AST node
package org.python.pydev.parser.jython.ast;
import org.python.pydev.parser.jython.SimpleNode;
public final class suiteType extends SimpleNode {
public stmtType[] body;
public suiteType(stmtType[] body) {
this.body = body;
}
public suiteType(stmtType[] body, SimpleNode parent) {
this(body);
this.beginLine = parent.beginLine;
this.beginColumn = parent.beginColumn;
}
public suiteType createCopy() {
stmtType[] new0;
if(this.body != null){
new0 = new stmtType[this.body.length];
for(int i=0;i<this.body.length;i++){
new0[i] = (stmtType) (this.body[i] != null? this.body[i].createCopy():null);
}
}else{
new0 = this.body;
}
suiteType temp = new suiteType(new0);
temp.beginLine = this.beginLine;
temp.beginColumn = this.beginColumn;
if(this.specialsBefore != null){
for(Object o:this.specialsBefore){
if(o instanceof commentType){
commentType commentType = (commentType) o;
temp.getSpecialsBefore().add(commentType.createCopy());
}
}
}
if(this.specialsAfter != null){
for(Object o:this.specialsAfter){
if(o instanceof commentType){
commentType commentType = (commentType) o;
temp.getSpecialsAfter().add(commentType.createCopy());
}
}
}
return temp;
}
public String toString() {
StringBuffer sb = new StringBuffer("suite[");
sb.append("body=");
sb.append(dumpThis(this.body));
sb.append("]");
return sb.toString();
}
public Object accept(VisitorIF visitor) throws Exception {
traverse(visitor);
return null;
}
public void traverse(VisitorIF visitor) throws Exception {
if (body != null) {
for (int i = 0; i < body.length; i++) {
if (body[i] != null){
body[i].accept(visitor);
}
}
}
}
}