Package org.python.indexer.types

Examples of org.python.indexer.types.NFuncType


    @Override
    protected void bindNames(Scope s) throws Exception {
        Scope owner = s.getScopeSymtab()// enclosing class, function or module

        setType(new NFuncType());
        Scope funcTable = new Scope(s.getEnclosingLexicalScope(), Scope.Type.FUNCTION);
        getType().setTable(funcTable);
        funcTable.setPath(owner.extendPath(getBindingName(owner)));

        // If we already defined this function in this scope, don't try it again.
View Full Code Here


            return setType(ft.asFuncType().getReturnType().follow());
        }

        if (ft.isUnknownType()) {
            NUnknownType to = new NUnknownType();
            NFuncType at = new NFuncType(to);
            NUnionType.union(ft, at);
            return setType(to);
        }

        addWarning("calling non-function " + ft);
View Full Code Here

    NClassType newException(String name, Scope t) {
        return newClass(name, t, BaseException);
    }

    NFuncType newFunc() {
        NFuncType t = new NFuncType();
        nativeTypes.add(t);
        return t;
    }
View Full Code Here

        nativeTypes.add(t);
        return t;
    }

    NFuncType newFunc(NType type) {
        NFuncType t = new NFuncType(type);
        nativeTypes.add(t);
        return t;
    }
View Full Code Here

        synthetic(t, "func_dict", new NUrl(DATAMODEL_URL),
                new NDictType(BaseStr, new NUnknownType()), ATTRIBUTE);

        // Assume any function can become a method, for simplicity.
        for (String s : list("__func__", "im_func")) {
            synthetic(t, s, new NUrl(DATAMODEL_URL), new NFuncType(), METHOD);
        }
    }
View Full Code Here

TOP

Related Classes of org.python.indexer.types.NFuncType

Copyright © 2018 www.massapicom. 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.