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