} else if (astThis.node instanceof Import) {
aliasType[] imports = ((Import) astThis.node).names;
FastStringBuffer retVal = new FastStringBuffer();
for (int i = 0; i < imports.length; i++) {
aliasType aliasType = imports[i];
//as ...
if (aliasType.asname != null) {
retVal.append(((NameTok) aliasType.asname).id);
retVal.append(" = ");
}
retVal.append(((NameTok) aliasType.name).id);
retVal.append(", ");
}
//delete the last 2 chars
retVal.deleteLast();
retVal.deleteLast();
return retVal.toString();
} else if (astThis.node instanceof ImportFrom) {
// from wxPython.wx import *
ImportFrom importToken = (ImportFrom) astThis.node;
StringBuffer modules = new StringBuffer();
for (int i = 0; i < importToken.names.length; i++) {
aliasType aliasType = importToken.names[i];
//as ...
if (aliasType.asname != null) {
modules.append(((NameTok) aliasType.asname).id);
modules.append(" = ");