function gen() {
        var args = [],
            i = 0;
        for (; i < arguments.length;)
            args.push(arguments[i++]);
        var line = sprintf.apply(null, args);
        var level = indent;
        if (src.length) {
            var prev = src[src.length - 1];

            // block open or one time branch
            if (blockOpenRe.test(prev))
                level = ++indent; // keep
            else if (branchRe.test(prev))
                ++level; // once

            // casing
            if (casingRe.test(prev) && !casingRe.test(line)) {
                level = ++indent;
                inCase = true;
            } else if (inCase && breakRe.test(prev)) {
                level = --indent;
                inCase = false;
            }

            // block close
            if (blockCloseRe.test(line))
                level = --indent;
        }
        for (i = 0; i < level; ++i)
            line = "\t" + line;
        src.push(line);
        return gen;
    }
A codegen instance as returned by {@link codegen}, that also is a sprintf-like appender function.
@typedef Codegen
@type {function}
@param {string} format Format string
@param {...*} args Replacements
@returns {Codegen} Itself
@property {function(string=):string} str Stringifies the so far generated function source.
@property {function(string=, Object=):function} eof Ends generation and builds the function whilst applying a scope.