Package org.python.indexer.ast

Examples of org.python.indexer.ast.NUrl


        assertNoneType(new NSubscript(null, null));
        assertNoneType(new NTryExcept(null, null, null));
        assertNoneType(new NTryFinally(null, null));
        assertNoneType(new NTuple(null));
        assertNoneType(new NUnaryOp(null, null));
        assertNoneType(new NUrl(""));
        assertNoneType(new NWhile(null, null, null));
        assertNoneType(new NWith(null, null, null));
        assertNoneType(new NYield(null));
    }
View Full Code Here


            return nmt;
        }

        // Put it in the cache now to prevent circular import from recursing.
        NModuleType mod = new NModuleType(Util.moduleNameFor(file), file, globaltable);
        moduleTable.put(file, new NUrl("file://" + file), mod, NBinding.Kind.MODULE);

        try {
            NModule ast = null;
            if (contents != null) {
                ast = getAstForFile(file, contents);
View Full Code Here

    public static NUrl newLibUrl(String path) {
        if (!path.endsWith(".html")) {
            path += ".html";
        }
        return new NUrl(LIBRARY_URL + path);
    }
View Full Code Here

        }
        return new NUrl(LIBRARY_URL + path);
    }

    public static NUrl newRefUrl(String path) {
        return new NUrl(REFERENCE_URL + path);
    }
View Full Code Here

    public static NUrl newRefUrl(String path) {
        return new NUrl(REFERENCE_URL + path);
    }

    public static NUrl newDataModelUrl(String path) {
        return new NUrl(DATAMODEL_URL + path);
    }
View Full Code Here

    public static NUrl newDataModelUrl(String path) {
        return new NUrl(DATAMODEL_URL + path);
    }

    public static NUrl newTutUrl(String path) {
        return new NUrl(TUTORIAL_URL + path);
    }
View Full Code Here

    void buildFunctionType() {
        Scope t = BaseFunction.getTable();

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

        NBinding b = synthetic(t, "func_closure", new NUrl(DATAMODEL_URL), newTuple(), ATTRIBUTE);
        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

    // so we can remove the per-instance attributes from NClassDef.
    void buildClassType() {
        Scope t = BaseClass.getTable();

        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

Related Classes of org.python.indexer.ast.NUrl

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.