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