Examples of NAlias


Examples of org.python.indexer.ast.NAlias

    // Make sure node types all have NType None when constructed,
    // to ensure that no nodes are relying on a particular type when being
    // resolved (since deserialization won't call the constructor).
    public void testConstructedTypes() throws Exception {
        assertNoneType(new NAlias(null, null, null));
        assertNoneType(new NAssert(null, null));
        assertNoneType(new NAssign(null, null));
        assertNoneType(new NAttribute(new NStr(), new NName("")));
        assertNoneType(new NAugAssign(null, null, null));
        assertNoneType(new NBinOp(null, null, null));
View Full Code Here

Examples of org.python.indexer.ast.NAlias

    @Override
    public Object visitImport(Import n) throws Exception {
        List<NAlias> aliases = new ArrayList<NAlias>(n.getInternalNames().size());
        for (alias e : n.getInternalNames()) {
            aliases.add(new NAlias(e.getInternalName(),
                                   convertQname(e.getInternalNameNodes()),
                                   (NName)convExpr(e.getInternalAsnameNode()),
                                   start(e), stop(e)));
        }
        return new NImport(aliases, start(n), stop(n));
View Full Code Here

Examples of org.python.indexer.ast.NAlias

    @Override
    public Object visitImportFrom(ImportFrom n) throws Exception {
        List<NAlias> aliases = new ArrayList<NAlias>(n.getInternalNames().size());
        for (alias e : n.getInternalNames()) {
            aliases.add(new NAlias(e.getInternalName(),
                                   convertQname(e.getInternalNameNodes()),
                                   (NName)convExpr(e.getInternalAsnameNode()),
                                   start(e), stop(e)));
        }
        return new NImportFrom(n.getInternalModule(),
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.