Package org.python.parser.ast

Examples of org.python.parser.ast.Name


            }
            code.invokespecial(mrefs.PyFunction_closure_init);

        }

        set(new Name(node.name, Name.Store, node));
        return null;
    }
View Full Code Here


                    mrefs.importOne = code.pool.Methodref("org/python/core/imp", "importOne", "(" + $str + $pyFrame
                            + ")" + $pyObj);
                }
                code.invokestatic(mrefs.importOne);
            }
            set(new Name(asname, Name.Store, node));
        }
        return null;
    }
View Full Code Here

            int tmp = storeTop();
            for (int i = 0; i < node.names.length; i++) {
                code.aload(tmp);
                code.iconst(i);
                code.aaload();
                set(new Name(asnames[i], Name.Store, node));
            }
            code.freeLocal(tmp);
        } else {
            loadFrame();
            if (mrefs.importAll == 0) {
View Full Code Here

        }
        code.invokevirtual(mrefs.getattr);

        String tmp_append = "_[" + (++list_comprehension_count) + "]";

        set(new Name(tmp_append, Name.Store, node));

        stmtType n = new Expr(new Call(new Name(tmp_append, Name.Load, node), new exprType[] { node.elt },
                new keywordType[0], null, null, node), node);

        for (int i = node.generators.length - 1; i >= 0; i--) {
            listcompType lc = node.generators[i];
            for (int j = lc.ifs.length - 1; j >= 0; j--) {
                n = new If(lc.ifs[j], new stmtType[] { n }, null, lc.ifs[j]);
            }
            n = new For(lc.target, lc.iter, new stmtType[] { n }, null, lc);
        }
        visit(n);
        visit(new Delete(new exprType[] { new Name(tmp_append, Name.Del) }));

        return null;
    }
View Full Code Here

            }
            code.invokestatic(mrefs.makeClass_closure);
        }

        //Assign this new class to the given name
        set(new Name(node.name, Name.Store, node));
        return null;
    }
View Full Code Here

    public void visitArgs(argumentsType args) throws Exception {
        for (int i = 0; i < args.args.length; i++) {
            String name = (String) visit(args.args[i]);
            names.addElement(name);
            if (args.args[i] instanceof Tuple) {
                Assign ass = new Assign(new exprType[] { args.args[i] }, new Name(name, Name.Load, args.args[i]),
                        args.args[i]);
                init_code.addElement(ass);
            }
        }
        if (args.vararg != null) {
View Full Code Here

TOP

Related Classes of org.python.parser.ast.Name

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.