KickJava   Java API By Example, From Geeks To Geeks.

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


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 Name extends exprType implements expr_contextType {
8     public String JavaDoc id;
9     public int ctx;
10
11     public Name(String JavaDoc id, int ctx) {
12         this.id = id;
13         this.ctx = ctx;
14     }
15
16     public Name(String JavaDoc id, int ctx, SimpleNode parent) {
17         this(id, ctx);
18         this.beginLine = parent.beginLine;
19         this.beginColumn = parent.beginColumn;
20     }
21
22     public String JavaDoc toString() {
23         StringBuffer JavaDoc sb = new StringBuffer JavaDoc("Name[");
24         sb.append("id=");
25         sb.append(dumpThis(this.id));
26         sb.append(", ");
27         sb.append("ctx=");
28         sb.append(dumpThis(this.ctx,
29         expr_contextType.expr_contextTypeNames));
30         sb.append("]");
31         return sb.toString();
32     }
33
34     public void pickle(DataOutputStream JavaDoc ostream) throws IOException JavaDoc {
35         pickleThis(41, ostream);
36         pickleThis(this.id, ostream);
37         pickleThis(this.ctx, ostream);
38     }
39
40     public Object JavaDoc accept(VisitorIF visitor) throws Exception JavaDoc {
41         return visitor.visitName(this);
42     }
43
44     public void traverse(VisitorIF visitor) throws Exception JavaDoc {
45     }
46
47 }
48
Popular Tags