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