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