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