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