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 Assert extends stmtType {
09: public exprType test;
10: public exprType msg;
11:
12: public Assert(exprType test, exprType msg) {
13: this .test = test;
14: this .msg = msg;
15: }
16:
17: public Assert(exprType test, exprType msg, SimpleNode parent) {
18: this (test, msg);
19: this .beginLine = parent.beginLine;
20: this .beginColumn = parent.beginColumn;
21: }
22:
23: public String toString() {
24: StringBuffer sb = new StringBuffer("Assert[");
25: sb.append("test=");
26: sb.append(dumpThis(this .test));
27: sb.append(", ");
28: sb.append("msg=");
29: sb.append(dumpThis(this .msg));
30: sb.append("]");
31: return sb.toString();
32: }
33:
34: public void pickle(DataOutputStream ostream) throws IOException {
35: pickleThis(19, ostream);
36: pickleThis(this .test, ostream);
37: pickleThis(this .msg, ostream);
38: }
39:
40: public Object accept(VisitorIF visitor) throws Exception {
41: return visitor.visitAssert(this );
42: }
43:
44: public void traverse(VisitorIF visitor) throws Exception {
45: if (test != null)
46: test.accept(visitor);
47: if (msg != null)
48: msg.accept(visitor);
49: }
50:
51: }
|