Examples of argumentsType


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

                        }
                    } else {
                        useAnyArgs = true;
                    }

                    argumentsType functionArguments = new argumentsType(arguments.toArray(new exprType[0]), null, null,
                            null, null, null, null, null, null, null);
                    if (useAnyArgs) {
                        Name name = new Name("self", Name.Store, false);
                        name.addSpecial(new SpecialStr(",", -1, -1), true);
                        functionArguments.args = new exprType[] { name };
View Full Code Here

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

    public boolean hasOnlySelf() {
        return getSelfFilteredArgs().size() == 0 && (!(hasVarArg())) && (!(hasKwArg()));
    }

    public String getSignature() {
        argumentsType astNode = this.getASTNode().createCopy();
        AdapterPrefs adapterPrefs = new AdapterPrefs(getModule().getEndLineDelimiter(), this.getModule().nature);
        String ret = StringUtils.replaceNewLines(Rewriter.createSourceFromAST(astNode, true, adapterPrefs), "");
        return ret;
    }
View Full Code Here

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

            SimpleNode element = iter.next();

            stmtType[] body = null;
            if (element instanceof FunctionDef) {
                FunctionDef f = (FunctionDef) element;
                final argumentsType args = f.args;

                for (int i = 0; i < args.args.length; i++) {
                    String s = NodeUtils.getRepresentationString(args.args[i]);
                    comps.add(new SourceToken(args.args[i], s, "", "", "", IToken.TYPE_PARAM));
                }
View Full Code Here

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

    public Object visitFunctionDef(FunctionDef node) throws Exception {
        unhandled_node(node);
        addToNamesToIgnore(node, false, true);

        AbstractScopeAnalyzerVisitor visitor = this;
        argumentsType args = node.args;

        //visit the defaults first (before starting the scope, because this is where the load of variables from other scopes happens)
        if (args.defaults != null) {
            for (exprType expr : args.defaults) {
                if (expr != null) {
View Full Code Here

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

     */
    public Object visitLambda(org.python.pydev.parser.jython.ast.Lambda node) throws Exception {
        unhandled_node(node);

        AbstractScopeAnalyzerVisitor visitor = this;
        argumentsType args = node.args;

        //visit the defaults first (before starting the scope, because this is where the load of variables from other scopes happens)
        if (args.defaults != null) {
            for (exprType expr : args.defaults) {
                if (expr != null) {
View Full Code Here

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

        return name;
    }

    public FunctionDef createSetterFunctionDef(String accessorName, String attributeName) {
        NameTok functionName = new NameTok(accessorName, NameTok.FunctionName);
        argumentsType args = createArguments(true, "value");
        stmtType[] body = createSetterBody(attributeName);

        return new FunctionDef(functionName, args, body, null, null);
    }
View Full Code Here

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

        for (String s : simpleParams) {
            params.add(new Name(s, Name.Param, false));
        }

        return new argumentsType(params.toArray(new exprType[params.size()]), null, null, null, null, null, null, null,
                null, null);
    }
View Full Code Here

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

                    break;
                }
            }
        }

        argumentsType args = functionDef.args.createCopy(false);
        List<exprType> params = new ArrayList<exprType>();
        for (exprType expr : args.args) { //note: self should be there already!
            params.add((exprType) expr);
        }
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.