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

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


    protected void onVisitCallFunc(final Call callNode) throws Exception {
        if (!analyzeArgumentsMismatch) {
            super.onVisitCallFunc(callNode);
        } else {
            if (callNode.func instanceof Name) {
                Name name = (Name) callNode.func;
                startRecordFound();
                visitName(name);

                //Check if the name was actually found in some way...
                TokenFoundStructure found = popFound();
View Full Code Here


        duplicates = req.duplicates;
    }

    @Override
    protected SimpleNode getEditNode() {
        exprType variable = new Name(variableName, expr_contextType.Store, false);
        exprType[] target = { variable };

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

        this.variableName = req.variableName;
    }

    @Override
    protected SimpleNode getEditNode() {
        Name name = new Name(variableName, expr_contextType.Load, false);
        return name;
    }
View Full Code Here

        this.variableName = req.variableName;
    }

    @Override
    protected SimpleNode getEditNode() {
        Name name = new Name(variableName, expr_contextType.Load, false);
        return name;
    }
View Full Code Here

                if (node.args.args.length > 0) {
                    exprType arg = node.args.args[0];

                    if (arg instanceof Name) {
                        Name n = (Name) arg;

                        if (n.id.equals("self")) {
                            startsWithSelf = true;
                        } else if (n.id.equals("cls")) {
                            startsWithCls = true;
View Full Code Here

            throw new RuntimeException(e);
        }

        List<Name> variables = visitor.getVariables();

        Name selectedVariable = findSelectedVariable(selection, variables);

        if (selectedVariable == null) {
            status.addFatalError(Messages.validationNoNameSelected);
            return status;
        }
View Full Code Here

                        NameTok n = (NameTok) ast;
                        if (n.ctx == NameTok.KwArg || n.ctx == NameTok.VarArg || n.ctx == NameTok.KeywordName) {
                            type = IAnalysisPreferences.TYPE_UNUSED_PARAMETER;
                        }
                    } else if (ast instanceof Name) {
                        Name n = (Name) ast;
                        if (n.ctx == Name.Param || n.ctx == Name.KwOnlyParam) {
                            type = IAnalysisPreferences.TYPE_UNUSED_PARAMETER;
                        }
                    }
                }
View Full Code Here

            IASTNodeAdapter<? extends SimpleNode> parentScopeAdapter = scopeAdapter.getParent();
            while (parentScopeAdapter instanceof FunctionDefAdapter) {
                parentScopeAdapter = parentScopeAdapter.getParent();
            }
            if (parentScopeAdapter instanceof IClassDefAdapter) {
                argsList.add(new Name("self", Name.Load, false));
            }
        }
        for (String variable : this.parameters) {
            argsList.add(new Name(variable, Name.Param, false));
        }
        return argsList;
    }
View Full Code Here

    }

    private void addReturnValue(List<stmtType> body) {
        List<exprType> returnList = new ArrayList<exprType>();
        for (String variable : this.returnVariables) {
            returnList.add(new Name(variable, Name.Load, false));
        }

        exprType returnValue = null;
        if (returnList.size() == 1) {
            returnValue = returnList.get(0);
View Full Code Here

        if (returnVariables.size() == 0) {
            return methodCall;
        } else {
            List<exprType> returnExpr = new ArrayList<exprType>();
            for (String returnVar : returnVariables) {
                returnExpr.add(new Name(returnVar, Name.Store, false));
            }

            exprType[] expr = returnExpr.toArray(new exprType[0]);
            if (expr.length > 1) {
                expr = new exprType[] { new Tuple(expr, Tuple.Load, false) };
View Full Code Here

TOP

Related Classes of org.python.pydev.parser.jython.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.