KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > python > parser > ast > Lambda


1 // Autogenerated AST node
2
package org.python.parser.ast;
3 import org.python.parser.SimpleNode;
4 import java.io.DataOutputStream JavaDoc;
5 import java.io.IOException JavaDoc;
6
7 public class Lambda extends exprType {
8     public argumentsType args;
9     public exprType body;
10
11     public Lambda(argumentsType args, exprType body) {
12         this.args = args;
13         this.body = body;
14     }
15
16     public Lambda(argumentsType args, exprType body, SimpleNode parent) {
17         this(args, body);
18         this.beginLine = parent.beginLine;
19         this.beginColumn = parent.beginColumn;
20     }
21
22     public String JavaDoc toString() {
23         StringBuffer JavaDoc sb = new StringBuffer JavaDoc("Lambda[");
24         sb.append("args=");
25         sb.append(dumpThis(this.args));
26         sb.append(", ");
27         sb.append("body=");
28         sb.append(dumpThis(this.body));
29         sb.append("]");
30         return sb.toString();
31     }
32
33     public void pickle(DataOutputStream JavaDoc ostream) throws IOException JavaDoc {
34         pickleThis(31, ostream);
35         pickleThis(this.args, ostream);
36         pickleThis(this.body, ostream);
37     }
38
39     public Object JavaDoc accept(VisitorIF visitor) throws Exception JavaDoc {
40         return visitor.visitLambda(this);
41     }
42
43     public void traverse(VisitorIF visitor) throws Exception JavaDoc {
44         if (args != null)
45             args.accept(visitor);
46         if (body != null)
47             body.accept(visitor);
48     }
49
50 }
51
Popular Tags