Package org.python.core

Examples of org.python.core.ArgParser


        this(TYPE);
    }
    @ExposedNew
    @ExposedMethod
    public void FunctionDef___init__(PyObject[] args, String[] keywords) {
        ArgParser ap = new ArgParser("FunctionDef", args, keywords, new String[]
            {"name", "args", "body", "decorator_list", "lineno", "col_offset"}, 4, true);
        setName(ap.getPyObject(0, Py.None));
        setArgs(ap.getPyObject(1, Py.None));
        setBody(ap.getPyObject(2, Py.None));
        setDecorator_list(ap.getPyObject(3, Py.None));
        int lin = ap.getInt(4, -1);
        if (lin != -1) {
            setLineno(lin);
        }

        int col = ap.getInt(5, -1);
        if (col != -1) {
            setLineno(col);
        }

    }
View Full Code Here


        this(TYPE);
    }
    @ExposedNew
    @ExposedMethod
    public void UnaryOp___init__(PyObject[] args, String[] keywords) {
        ArgParser ap = new ArgParser("UnaryOp", args, keywords, new String[]
            {"op", "operand", "lineno", "col_offset"}, 2, true);
        setOp(ap.getPyObject(0, Py.None));
        setOperand(ap.getPyObject(1, Py.None));
        int lin = ap.getInt(2, -1);
        if (lin != -1) {
            setLineno(lin);
        }

        int col = ap.getInt(3, -1);
        if (col != -1) {
            setLineno(col);
        }

    }
View Full Code Here

        this(TYPE);
    }
    @ExposedNew
    @ExposedMethod
    public void Yield___init__(PyObject[] args, String[] keywords) {
        ArgParser ap = new ArgParser("Yield", args, keywords, new String[]
            {"value", "lineno", "col_offset"}, 1, true);
        setValue(ap.getPyObject(0, Py.None));
        int lin = ap.getInt(1, -1);
        if (lin != -1) {
            setLineno(lin);
        }

        int col = ap.getInt(2, -1);
        if (col != -1) {
            setLineno(col);
        }

    }
View Full Code Here

        super(subType);
    }
    @ExposedNew
    @ExposedMethod
    public void Pass___init__(PyObject[] args, String[] keywords) {
        ArgParser ap = new ArgParser("Pass", args, keywords, new String[]
            {"lineno", "col_offset"}, 0, true);
        int lin = ap.getInt(0, -1);
        if (lin != -1) {
            setLineno(lin);
        }

        int col = ap.getInt(1, -1);
        if (col != -1) {
            setLineno(col);
        }

    }
View Full Code Here

        this(TYPE);
    }
    @ExposedNew
    @ExposedMethod
    public void Assert___init__(PyObject[] args, String[] keywords) {
        ArgParser ap = new ArgParser("Assert", args, keywords, new String[]
            {"test", "msg", "lineno", "col_offset"}, 2, true);
        setTest(ap.getPyObject(0, Py.None));
        setMsg(ap.getPyObject(1, Py.None));
        int lin = ap.getInt(2, -1);
        if (lin != -1) {
            setLineno(lin);
        }

        int col = ap.getInt(3, -1);
        if (col != -1) {
            setLineno(col);
        }

    }
View Full Code Here

        this(TYPE);
    }
    @ExposedNew
    @ExposedMethod
    public void Assign___init__(PyObject[] args, String[] keywords) {
        ArgParser ap = new ArgParser("Assign", args, keywords, new String[]
            {"targets", "value", "lineno", "col_offset"}, 2, true);
        setTargets(ap.getPyObject(0, Py.None));
        setValue(ap.getPyObject(1, Py.None));
        int lin = ap.getInt(2, -1);
        if (lin != -1) {
            setLineno(lin);
        }

        int col = ap.getInt(3, -1);
        if (col != -1) {
            setLineno(col);
        }

    }
View Full Code Here

        this(TYPE);
    }
    @ExposedNew
    @ExposedMethod
    public void List___init__(PyObject[] args, String[] keywords) {
        ArgParser ap = new ArgParser("List", args, keywords, new String[]
            {"elts", "ctx", "lineno", "col_offset"}, 2, true);
        setElts(ap.getPyObject(0, Py.None));
        setCtx(ap.getPyObject(1, Py.None));
        int lin = ap.getInt(2, -1);
        if (lin != -1) {
            setLineno(lin);
        }

        int col = ap.getInt(3, -1);
        if (col != -1) {
            setLineno(col);
        }

    }
View Full Code Here

        this(TYPE);
    }
    @ExposedNew
    @ExposedMethod
    public void Return___init__(PyObject[] args, String[] keywords) {
        ArgParser ap = new ArgParser("Return", args, keywords, new String[]
            {"value", "lineno", "col_offset"}, 1, true);
        setValue(ap.getPyObject(0, Py.None));
        int lin = ap.getInt(1, -1);
        if (lin != -1) {
            setLineno(lin);
        }

        int col = ap.getInt(2, -1);
        if (col != -1) {
            setLineno(col);
        }

    }
View Full Code Here

    }

    @ExposedNew
    static PyObject struct_time_new(PyNewWrapper wrapper, boolean init, PyType subtype,
                                    PyObject[] args, String[] keywords) {
        ArgParser ap = new ArgParser("struct_time", args, keywords, new String[] {"tuple"}, 1);
        PyObject obj = ap.getPyObject(0);
        if (obj instanceof PyTuple) {
            if (obj.__len__() != 9) {
                throw Py.TypeError("time.struct_time() takes a 9-sequence (1-sequence given)");
            }
            // tuples are immutable, so we can just use its underlying array
View Full Code Here

        this(TYPE);
    }
    @ExposedNew
    @ExposedMethod
    public void Lambda___init__(PyObject[] args, String[] keywords) {
        ArgParser ap = new ArgParser("Lambda", args, keywords, new String[]
            {"args", "body", "lineno", "col_offset"}, 2, true);
        setArgs(ap.getPyObject(0, Py.None));
        setBody(ap.getPyObject(1, Py.None));
        int lin = ap.getInt(2, -1);
        if (lin != -1) {
            setLineno(lin);
        }

        int col = ap.getInt(3, -1);
        if (col != -1) {
            setLineno(col);
        }

    }
View Full Code Here

TOP

Related Classes of org.python.core.ArgParser

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.