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 Slice extends sliceType {
09: public exprType lower;
10: public exprType upper;
11: public exprType step;
12:
13: public Slice(exprType lower, exprType upper, exprType step) {
14: this .lower = lower;
15: this .upper = upper;
16: this .step = step;
17: }
18:
19: public Slice(exprType lower, exprType upper, exprType step,
20: SimpleNode parent) {
21: this (lower, upper, step);
22: this .beginLine = parent.beginLine;
23: this .beginColumn = parent.beginColumn;
24: }
25:
26: public String toString() {
27: StringBuffer sb = new StringBuffer("Slice[");
28: sb.append("lower=");
29: sb.append(dumpThis(this .lower));
30: sb.append(", ");
31: sb.append("upper=");
32: sb.append(dumpThis(this .upper));
33: sb.append(", ");
34: sb.append("step=");
35: sb.append(dumpThis(this .step));
36: sb.append("]");
37: return sb.toString();
38: }
39:
40: public void pickle(DataOutputStream ostream) throws IOException {
41: pickleThis(45, ostream);
42: pickleThis(this .lower, ostream);
43: pickleThis(this .upper, ostream);
44: pickleThis(this .step, ostream);
45: }
46:
47: public Object accept(VisitorIF visitor) throws Exception {
48: return visitor.visitSlice(this );
49: }
50:
51: public void traverse(VisitorIF visitor) throws Exception {
52: if (lower != null)
53: lower.accept(visitor);
54: if (upper != null)
55: upper.accept(visitor);
56: if (step != null)
57: step.accept(visitor);
58: }
59:
60: }
|