~vil/pydev/upstream

« back to all changes in this revision

Viewing changes to org.python.pydev.parser/src/org/python/pydev/parser/jython/ast/suiteType.java

  • Committer: Vladimír Lapáček
  • Date: 2006-08-30 18:38:44 UTC
  • Revision ID: vladimir.lapacek@gmail.com-20060830183844-f4d82c1239a7770a
Initial import of upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// Autogenerated AST node
 
2
package org.python.pydev.parser.jython.ast;
 
3
import org.python.pydev.parser.jython.SimpleNode;
 
4
import java.io.DataOutputStream;
 
5
import java.io.IOException;
 
6
 
 
7
public class suiteType extends SimpleNode {
 
8
    public stmtType[] body;
 
9
 
 
10
    public suiteType(stmtType[] body) {
 
11
        this.body = body;
 
12
    }
 
13
 
 
14
    public suiteType(stmtType[] body, SimpleNode parent) {
 
15
        this(body);
 
16
        this.beginLine = parent.beginLine;
 
17
        this.beginColumn = parent.beginColumn;
 
18
    }
 
19
 
 
20
    public String toString() {
 
21
        StringBuffer sb = new StringBuffer("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 ostream) throws IOException {
 
29
        pickleThis(6, ostream);
 
30
        pickleThis(this.body, ostream);
 
31
    }
 
32
 
 
33
    public Object accept(VisitorIF visitor) throws Exception {
 
34
        traverse(visitor);
 
35
        return null;
 
36
    }
 
37
 
 
38
    public void traverse(VisitorIF visitor) throws Exception {
 
39
        if (body != null) {
 
40
            for (int i = 0; i < body.length; i++) {
 
41
                if (body[i] != null)
 
42
                    body[i].accept(visitor);
 
43
            }
 
44
        }
 
45
    }
 
46
 
 
47
}