public Function(Node locator, List<Node> args, Node body, List<Node> defaults,
                    Name vararg, Name kwarg, List<Node> afterRest, Name blockarg,
                    Str docstring, String file, int start, int end)
    {
        super(file, start, end);
        if (locator != null) {
            this.locator = locator;
        } else {
            isLamba = true;
            String fn = genLambdaName();
            this.locator = new Name(fn, file, -1, -1);
            addChildren(this.locator);
        }

        if (this.locator instanceof Attribute) {
            this.name = ((Attribute) this.locator).attr;
        } else if (this.locator instanceof Name) {
            this.name = (Name) this.locator;
        }

        this.args = args;
        this.body = body;
        this.defaults = defaults;
        this.vararg = vararg;
        this.kwarg = kwarg;
        this.afterRest = afterRest;
        this.blockarg = blockarg;
        this.docstring = docstring;
        addChildren(args);
        addChildren(defaults);
        addChildren(afterRest);
        addChildren(locator, body, vararg, kwarg, blockarg);
    }