KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > python > parser > ast > Suite


1 // Autogenerated AST node
2
package org.python.parser.ast;
3 import org.python.parser.SimpleNode;
4 import java.io.DataOutputStream JavaDoc;
5 import java.io.IOException JavaDoc;
6
7 public class Suite extends modType {
8     public stmtType[] body;
9
10     public Suite(stmtType[] body) {
11         this.body = body;
12     }
13
14     public Suite(stmtType[] body, SimpleNode parent) {
15         this(body);
16         this.beginLine = parent.beginLine;
17         this.beginColumn = parent.beginColumn;
18     }
19
20     public String JavaDoc toString() {
21         StringBuffer JavaDoc sb = new StringBuffer JavaDoc("Suite[");
22         sb.append("body=");
23         sb.append(dumpThis(this.body));
24         sb.append("]");
25         return sb.toString();
26     }
27
28     public void pickle(DataOutputStream JavaDoc ostream) throws IOException JavaDoc {
29         pickleThis(4, ostream);
30         pickleThis(this.body, ostream);
31     }
32
33     public Object JavaDoc accept(VisitorIF visitor) throws Exception JavaDoc {
34         return visitor.visitSuite(this);
35     }
36
37     public void traverse(VisitorIF visitor) throws Exception JavaDoc {
38         if (body != null) {
39             for (int i = 0; i < body.length; i++) {
40                 if (body[i] != null)
41                     body[i].accept(visitor);
42             }
43         }
44     }
45
46 }
47
Popular Tags