~vil/pydev/upstream

« back to all changes in this revision

Viewing changes to org.python.pydev.parser/src/org/python/pydev/parser/jython/ast/Raise.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 Raise extends stmtType {
 
8
    public exprType type;
 
9
    public exprType inst;
 
10
    public exprType tback;
 
11
 
 
12
    public Raise(exprType type, exprType inst, exprType tback) {
 
13
        this.type = type;
 
14
        this.inst = inst;
 
15
        this.tback = tback;
 
16
    }
 
17
 
 
18
    public Raise(exprType type, exprType inst, exprType tback, SimpleNode
 
19
    parent) {
 
20
        this(type, inst, tback);
 
21
        this.beginLine = parent.beginLine;
 
22
        this.beginColumn = parent.beginColumn;
 
23
    }
 
24
 
 
25
    public String toString() {
 
26
        StringBuffer sb = new StringBuffer("Raise[");
 
27
        sb.append("type=");
 
28
        sb.append(dumpThis(this.type));
 
29
        sb.append(", ");
 
30
        sb.append("inst=");
 
31
        sb.append(dumpThis(this.inst));
 
32
        sb.append(", ");
 
33
        sb.append("tback=");
 
34
        sb.append(dumpThis(this.tback));
 
35
        sb.append("]");
 
36
        return sb.toString();
 
37
    }
 
38
 
 
39
    public void pickle(DataOutputStream ostream) throws IOException {
 
40
        pickleThis(18, ostream);
 
41
        pickleThis(this.type, ostream);
 
42
        pickleThis(this.inst, ostream);
 
43
        pickleThis(this.tback, ostream);
 
44
    }
 
45
 
 
46
    public Object accept(VisitorIF visitor) throws Exception {
 
47
        return visitor.visitRaise(this);
 
48
    }
 
49
 
 
50
    public void traverse(VisitorIF visitor) throws Exception {
 
51
        if (type != null)
 
52
            type.accept(visitor);
 
53
        if (inst != null)
 
54
            inst.accept(visitor);
 
55
        if (tback != null)
 
56
            tback.accept(visitor);
 
57
    }
 
58
 
 
59
}