private Function<AbstractCodeWriter<?>, Object> parsePositionalArgumentGetter() {
            // Expand a positional argument: "$" 1*digit identifier
            if (relativeIndex > 0) {
                throw error("Cannot mix positional and relative arguments");
            }

            relativeIndex = -1;
            int startPosition = parser.position();
            parser.consumeWhile(Character::isDigit);
            int index = Integer.parseInt(parser.sliceFrom(startPosition)) - 1;

            if (index < 0 || index >= arguments.length) {
                throw error(String.format(
                        "Positional argument index %d out of range of provided %d arguments in format string",
                        index,
                        arguments.length));
            }

            Object value = getPositionalArgument(index);
            return w -> value;
        }
A BlockOperation that repeats a template for each value referenced by the block. Each iteration pushes
a state to the writer that includes key, value, key.first, and key.last context properties. The name
of the context property can be customized in the template.
smithy-utils/src/main/java/software/amazon/smithy/utils/CodeFormatter.java