01: // Autogenerated AST node
02: package org.python.parser.ast;
03:
04: import org.python.parser.SimpleNode;
05: import java.io.DataOutputStream;
06: import java.io.IOException;
07:
08: public class excepthandlerType extends SimpleNode {
09: public exprType type;
10: public exprType name;
11: public stmtType[] body;
12:
13: public excepthandlerType(exprType type, exprType name,
14: stmtType[] body) {
15: this .type = type;
16: this .name = name;
17: this .body = body;
18: }
19:
20: public excepthandlerType(exprType type, exprType name,
21: stmtType[] body, SimpleNode parent) {
22: this (type, name, body);
23: this .beginLine = parent.beginLine;
24: this .beginColumn = parent.beginColumn;
25: }
26:
27: public String toString() {
28: StringBuffer sb = new StringBuffer("excepthandler[");
29: sb.append("type=");
30: sb.append(dumpThis(this .type));
31: sb.append(", ");
32: sb.append("name=");
33: sb.append(dumpThis(this .name));
34: sb.append(", ");
35: sb.append("body=");
36: sb.append(dumpThis(this .body));
37: sb.append("]");
38: return sb.toString();
39: }
40:
41: public void pickle(DataOutputStream ostream) throws IOException {
42: pickleThis(49, ostream);
43: pickleThis(this .type, ostream);
44: pickleThis(this .name, ostream);
45: pickleThis(this .body, ostream);
46: }
47:
48: public Object accept(VisitorIF visitor) throws Exception {
49: traverse(visitor);
50: return null;
51: }
52:
53: public void traverse(VisitorIF visitor) throws Exception {
54: if (type != null)
55: type.accept(visitor);
56: if (name != null)
57: name.accept(visitor);
58: if (body != null) {
59: for (int i = 0; i < body.length; i++) {
60: if (body[i] != null)
61: body[i].accept(visitor);
62: }
63: }
64: }
65:
66: }
|