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 Print extends stmtType {
09: public exprType dest;
10: public exprType[] values;
11: public boolean nl;
12:
13: public Print(exprType dest, exprType[] values, boolean nl) {
14: this .dest = dest;
15: this .values = values;
16: this .nl = nl;
17: }
18:
19: public Print(exprType dest, exprType[] values, boolean nl,
20: SimpleNode parent) {
21: this (dest, values, nl);
22: this .beginLine = parent.beginLine;
23: this .beginColumn = parent.beginColumn;
24: }
25:
26: public String toString() {
27: StringBuffer sb = new StringBuffer("Print[");
28: sb.append("dest=");
29: sb.append(dumpThis(this .dest));
30: sb.append(", ");
31: sb.append("values=");
32: sb.append(dumpThis(this .values));
33: sb.append(", ");
34: sb.append("nl=");
35: sb.append(dumpThis(this .nl));
36: sb.append("]");
37: return sb.toString();
38: }
39:
40: public void pickle(DataOutputStream ostream) throws IOException {
41: pickleThis(12, ostream);
42: pickleThis(this .dest, ostream);
43: pickleThis(this .values, ostream);
44: pickleThis(this .nl, ostream);
45: }
46:
47: public Object accept(VisitorIF visitor) throws Exception {
48: return visitor.visitPrint(this );
49: }
50:
51: public void traverse(VisitorIF visitor) throws Exception {
52: if (dest != null)
53: dest.accept(visitor);
54: if (values != null) {
55: for (int i = 0; i < values.length; i++) {
56: if (values[i] != null)
57: values[i].accept(visitor);
58: }
59: }
60: }
61:
62: }
|