Package org.python.indexer.types

Examples of org.python.indexer.types.NType.asModuleType()


    public NType resolve(Scope s) throws Exception {
        Scope scope = s.getScopeSymtab();
        for (NAlias a : aliases) {
            NType modtype = resolveExpr(a, s);
            if (modtype.isModuleType()) {
                importName(scope, a, modtype.asModuleType());
            }
        }
        return getType();
    }
View Full Code Here


     */
    private void resolveExportedNames() throws Exception {
        NModuleType mtype = null;
        NType thisType = getType();
        if (thisType.isModuleType()) {
            mtype = thisType.asModuleType();
        } else if (thisType.isUnionType()) {
            for (NType u : thisType.asUnionType().getTypes()) {
                if (u.isModuleType()) {
                    mtype = u.asModuleType();
                    break;
View Full Code Here

     *     describing what is known about the binding's source.
     */
    public String getFirstFile() {
        NType bt = getType();
        if (bt instanceof NModuleType) {
            String file = bt.asModuleType().getFile();
            return file != null ? file : "<built-in module>";
        }
        if (defs != null) {
            for (Def def : defs) {
                String file = def.getFile();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.