Examples of argumentsType


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

    }

    @Override
    protected SimpleNode getEditNode() {
        NameTok functionName = new NameTok(accessorName, NameTok.FunctionName);
        argumentsType args = createArguments();
        stmtType[] body = createBody();

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

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

        return new FunctionDef(functionName, args, body, null, null);
    }

    private argumentsType createArguments() {
        exprType[] params = new exprType[] { new Name(NodeHelper.KEYWORD_SELF, Name.Param, false) };
        return new argumentsType(params, null, null, null, null, null, null, null, null, null);
    }
View Full Code Here

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

                    stack.popNode();
                    actualReturnAnnotation = (exprType) ((FuncDefReturnAnn) funcDefReturnAnn).node;
                    arity--;
                    addSpecialsAndClearOriginal(funcDefReturnAnn, actualReturnAnnotation);
                }
                argumentsType arguments = makeArguments(arity - 1);
                NameTok nameTok = makeName(NameTok.FunctionName);
                //decorator is always null at this point... it's decorated later on
                FunctionDef funcDef = new FunctionDef(nameTok, arguments, body, null, actualReturnAnnotation);
                addSpecialsAndClearOriginal(suite, funcDef);
                setParentForFuncOrClass(body, funcDef);
View Full Code Here

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

                parameter.getSpecialsAfter().addAll(node.specialsAfter);
            }

        }

        return new argumentsType(fpargs.toArray(new exprType[fpargs.size()]), varg, kwarg,
                fpargsDefaults.toArray(new exprType[fpargsDefaults.size()]),

                //new on Python 3.0
                kwonlyargs.toArray(new exprType[kwonlyargs.size()]),
                kwonlyargsDefaults.toArray(new exprType[kwonlyargsDefaults.size()]),
View Full Code Here

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

                throw new ParseException("Internal error (ClassCastException):" + e.getMessage() + "\n" + popped,
                        popped);
            }
        }
        Collections.reverse(list);//we get them in reverse order in the stack
        argumentsType arguments = __makeArguments((DefaultArg[]) list.toArray(new DefaultArg[0]), stararg, kwarg);
        arguments.varargannotation = varargannotation;
        arguments.kwargannotation = kwargannotation;
        return arguments;
    }
View Full Code Here

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

            return true;
        }
    }

    private FunctionDef createFunctionDef(int lastReturnedLine, NameTok nameTok, int matchedCol) {
        argumentsType args = new argumentsType(EMTPY_EXPR_TYPE, null, null, EMTPY_EXPR_TYPE, null, null, null, null,
                null, null);
        FunctionDef functionDef = new FunctionDef(nameTok, args, EMTPY_STMT_TYPE, EMTPY_DECORATORS_TYPE, null);
        functionDef.beginLine = lastReturnedLine + 1;
        functionDef.beginColumn = matchedCol + 1;
        return functionDef;
View Full Code Here

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

                //get the decorators
                //and clear them for the next call (they always must be before a function def)
                suite = (Suite) stack.popNode();
                body = suite.body;

                argumentsType arguments = makeArguments(stack.nodeArity() - 2);
                NameTok nameTok = makeName(NameTok.FunctionName);
                Decorators decs = (Decorators) stack.popNode();
                decoratorsType[] decsexp = decs.exp;
                FunctionDef funcDef = new FunctionDef(nameTok, arguments, body, decsexp, null);
                if (decs.exp.length == 0) {
View Full Code Here

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

        }

        // System.out.println("start "+ startofdefaults + " " + l);
        exprType[] newdefs = new exprType[def.length - startofdefaults];
        System.arraycopy(defaults, startofdefaults, newdefs, 0, newdefs.length);
        return new argumentsType(fpargs, varg, kwarg, newdefs, null, null, null, null, null, null);

    }
View Full Code Here

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

                return c;
            case JJTFUNCDEF:
                suite = (Suite) stack.popNode();
                body = suite.body;

                argumentsType arguments = makeArguments(stack.nodeArity() - 1);
                NameTok nameTok = makeName(NameTok.FunctionName);
                //decorator is always null at this point... it's decorated later on
                FunctionDef funcDef = new FunctionDef(nameTok, arguments, body, null, null);
                addSpecialsAndClearOriginal(suite, funcDef);
                setParentForFuncOrClass(body, funcDef);
View Full Code Here

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

        }

        // System.out.println("start "+ startofdefaults + " " + l);
        exprType[] newdefs = new exprType[def.length - startofdefaults];
        System.arraycopy(defaults, startofdefaults, newdefs, 0, newdefs.length);
        return new argumentsType(fpargs, varg, kwarg, newdefs, null, null, null, null, null, null);

    }
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.