use of org.yinwang.pysonar.types.ModuleType in project pysonar2 by yinwang0.
the class Binding method getFirstFile.
@NotNull
public String getFirstFile() {
Type bt = type;
if (bt instanceof ModuleType) {
String file = bt.asModuleType().file;
return file != null ? file : "<built-in module>";
}
String file = getFile();
if (file != null) {
return file;
}
return "<built-in binding>";
}
use of org.yinwang.pysonar.types.ModuleType in project pysonar2 by yinwang0.
the class TypeInferencer method visit.
@NotNull
@Override
public Type visit(Module node, State s) {
ModuleType mt = new ModuleType(node.name, node.file, Analyzer.self.globaltable);
s.insert($.moduleQname(node.file), node, mt, MODULE);
if (node.body != null) {
visit(node.body, mt.table);
}
return mt;
}
Aggregations