Examples of NDictType


Examples of org.python.indexer.types.NDictType

        }
        if (varargs != null) {
            param.bind(funcTable, varargs, new NListType());
        }
        if (kwargs != null) {
            param.bind(funcTable, kwargs, new NDictType());
        }
    }
View Full Code Here

Examples of org.python.indexer.types.NDictType

        Builtins builtins = Indexer.idx.builtins;
        addSpecialAttribute("__bases__", new NTupleType(baseTypes));
        addSpecialAttribute("__name__", builtins.BaseStr);
        addSpecialAttribute("__module__", builtins.BaseStr);
        addSpecialAttribute("__doc__", builtins.BaseStr);
        addSpecialAttribute("__dict__", new NDictType(builtins.BaseStr, new NUnknownType()));

        resolveExpr(body, getTable());
        return getType();
    }
View Full Code Here

Examples of org.python.indexer.types.NDictType

    @Override
    public NType resolve(Scope s) throws Exception {
        NType keyType = resolveListAsUnion(keys, s);
        NType valType = resolveListAsUnion(values, s);
        return setType(new NDictType(keyType, valType));
    }
View Full Code Here

Examples of org.python.indexer.types.NDictType

        nativeTypes.add(t);
        return t;
    }

    NDictType newDict(NType ktype, NType vtype) {
        NDictType t = new NDictType(ktype, vtype);
        nativeTypes.add(t);
        return t;
    }
View Full Code Here

Examples of org.python.indexer.types.NDictType

        b.markReadOnly();

        synthetic(t, "func_code", new NUrl(DATAMODEL_URL), unknown(), ATTRIBUTE);
        synthetic(t, "func_defaults", new NUrl(DATAMODEL_URL), newTuple(), ATTRIBUTE);
        synthetic(t, "func_globals", new NUrl(DATAMODEL_URL),
                new NDictType(BaseStr, new NUnknownType()), ATTRIBUTE);
        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

Examples of org.python.indexer.types.NDictType

        for (String s : list("__name__", "__doc__", "__module__")) {
            synthetic(t, s, new NUrl(DATAMODEL_URL), BaseStr, ATTRIBUTE);
        }

        synthetic(t, "__dict__", new NUrl(DATAMODEL_URL),
                  new NDictType(BaseStr, unknown()), ATTRIBUTE);
    }
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.