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