// Autogenerated AST node package org.python.parser.ast; import org.python.parser.SimpleNode; import java.io.DataOutputStream; import java.io.IOException; public class Attribute extends exprType implements expr_contextType { public exprType value; public String attr; public int ctx; public Attribute(exprType value, String attr, int ctx) { this.value = value; this.attr = attr; this.ctx = ctx; } public Attribute(exprType value, String attr, int ctx, SimpleNode parent) { this(value, attr, ctx); this.beginLine = parent.beginLine; this.beginColumn = parent.beginColumn; } public String toString() { StringBuffer sb = new StringBuffer("Attribute["); sb.append("value="); sb.append(dumpThis(this.value)); sb.append(", "); sb.append("attr="); sb.append(dumpThis(this.attr)); sb.append(", "); sb.append("ctx="); sb.append(dumpThis(this.ctx, expr_contextType.expr_contextTypeNames)); sb.append("]"); return sb.toString(); } public void pickle(DataOutputStream ostream) throws IOException { pickleThis(39, ostream); pickleThis(this.value, ostream); pickleThis(this.attr, ostream); pickleThis(this.ctx, ostream); } public Object accept(VisitorIF visitor) throws Exception { return visitor.visitAttribute(this); } public void traverse(VisitorIF visitor) throws Exception { if (value != null) value.accept(visitor); } }