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