Package org.python.pydev.parser.jython.ast

Examples of org.python.pydev.parser.jython.ast.Call


                            }
                        }

                        exprType expr = assign.value;
                        if (expr instanceof Call) {
                            Call call = (Call) expr;
                            if (call.args.length == 1) {
                                String argRep = NodeUtils.getRepresentationString(call.args[0]);
                                if (argRep != null && argRep.equals(funcName)) {
                                    String funcCall = NodeUtils.getRepresentationString(call.func);
View Full Code Here


    /**
     * Adds a special token to the current token that's in the top of the stack (the peeked token)
     * Considers that the token at the stack is a Call and adds it to its function.
     */
    public void addToPeekCallFunc(Object t, boolean after) {
        Call n = (Call) grammar.getJJTree().peekNode();
        addSpecial(n.func, t, after);
    }
View Full Code Here

            }

            //ok, it may be a staticmethod, let's check its value (should be a call)
            exprType expr = node.value;
            if (expr instanceof Call) {
                Call call = (Call) expr;
                if (call.args.length == 1) {
                    String argRep = NodeUtils.getRepresentationString(call.args[0]);
                    if (argRep != null && argRep.equals(rep)) {
                        String funcCall = NodeUtils.getRepresentationString(call.func);
View Full Code Here

    @Override
    protected SimpleNode getEditNode() {

        List<exprType> argsList = initCallArguments();
        Call methodCall = new Call(createCallAttribute(), argsList.toArray(new exprType[0]), null, null, null);

        return initSubstituteCall(methodCall);

    }
View Full Code Here

                if (init.getArguments().hasKwArg()) {
                    kwArg = new Name(KWARGS, Name.Load, false);
                }

                Call initCall = new Call(classInit, argExp, null, varArg, kwArg);
                return new Expr(initCall);
            }
        }
        return null;
    }
View Full Code Here

                        args.add(0, (exprType) node);
                    }
                }

                exprType func = (exprType) stack.popNode();
                Call c = new Call(func, args.toArray(new exprType[args.size()]),
                        keywords.toArray(new keywordType[keywords.size()]), starargs, kwargs);
                addSpecialsAndClearOriginal(n, c);
                return c;
            case JJTFUNCDEF:
                suite = (Suite) stack.popNode();
View Full Code Here

    }

    @Override
    protected SimpleNode getEditNode() {
        exprType[] target = new exprType[] { new Name(propertyName, Name.Store, false) };
        Call property = createPropertyCall();

        return new Assign(target, property);
    }
View Full Code Here

        return new Assign(target, property);
    }

    private Call createPropertyCall() {
        exprType[] args = createPropertyArguments();
        Call property = new Call(PROPERTY, args, null, null, null);
        return property;
    }
View Full Code Here

                        args.add(0, (exprType) node);
                    }
                }

                exprType func = (exprType) stack.popNode();
                Call c = new Call(func, args.toArray(new exprType[args.size()]),
                        keywords.toArray(new keywordType[keywords.size()]), starargs, kwargs);
                addSpecialsAndClearOriginal(n, c);
                return c;
            case JJTFUNCDEF_RETURN_ANNOTTATION:
                SimpleNode funcdefReturn = stack.popNode();
View Full Code Here

                                ast = module.body[module.body.length - 1];
                                if (ast instanceof Expr) {
                                    Expr expr = (Expr) ast;
                                    ast = expr.value;
                                    if (ast instanceof Call) {
                                        Call call = (Call) ast;
                                        String callRep = NodeUtils.getRepresentationString(call);
                                        if (callRep != null && callRep.equals("__bootstrap__")) {
                                            //ok, and now , the last thing is checking if there's a dll with the same name...
                                            final String modName = FullRepIterable.getLastPart(this.getName());
View Full Code Here

TOP

Related Classes of org.python.pydev.parser.jython.ast.Call

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.