src/main/java/org/apache/sling/scripting/sightly/impl/plugin/ListPlugin.java [119:159]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                String itemVariable = decodeItemVariable();
                String loopStatusVar = Syntax.itemLoopStatusVariable(itemVariable);
                String indexVariable = compilerContext.generateVariable("index");
                stream.write(new Loop.Start(listVariable, itemVariable, indexVariable));
                stream.write(
                        new VariableBinding.Start(loopStatusVar, buildStatusObj(indexVariable, collectionSizeVar)));
                String stepConditionVariable = compilerContext.generateVariable("stepCondition");
                stream.write(new VariableBinding.Start(
                        stepConditionVariable,
                        beginAtIndexZero && stepOne
                                ? new NumericConstant(0)
                                : new BinaryOperation(
                                        BinaryOperator.REM,
                                        new BinaryOperation(
                                                BinaryOperator.SUB,
                                                new Identifier(indexVariable),
                                                new Identifier(beginVariable)),
                                        new Identifier(stepVariable))));
                String loopTraversalVariable = compilerContext.generateVariable("traversal");
                stream.write(new VariableBinding.Start(
                        loopTraversalVariable,
                        new BinaryOperation(
                                BinaryOperator.AND,
                                new BinaryOperation(
                                        BinaryOperator.AND,
                                        new BinaryOperation(
                                                BinaryOperator.GEQ,
                                                new Identifier(indexVariable),
                                                new Identifier(beginVariable)),
                                        new BinaryOperation(
                                                BinaryOperator.LEQ,
                                                new Identifier(indexVariable),
                                                new Identifier(endVariable))),
                                new BinaryOperation(
                                        BinaryOperator.EQ,
                                        new Identifier(stepConditionVariable),
                                        NumericConstant.ZERO))));
                stream.write(new Conditional.Start(loopTraversalVariable, true));
            }

            @Override
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



src/main/java/org/apache/sling/scripting/sightly/impl/plugin/RepeatPlugin.java [118:158]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                String itemVariable = decodeItemVariable();
                String loopStatusVar = Syntax.itemLoopStatusVariable(itemVariable);
                String indexVariable = compilerContext.generateVariable("index");
                stream.write(new Loop.Start(listVariable, itemVariable, indexVariable));
                stream.write(
                        new VariableBinding.Start(loopStatusVar, buildStatusObj(indexVariable, collectionSizeVar)));
                String stepConditionVariable = compilerContext.generateVariable("stepCondition");
                stream.write(new VariableBinding.Start(
                        stepConditionVariable,
                        beginAtIndexZero && stepOne
                                ? new NumericConstant(0)
                                : new BinaryOperation(
                                        BinaryOperator.REM,
                                        new BinaryOperation(
                                                BinaryOperator.SUB,
                                                new Identifier(indexVariable),
                                                new Identifier(beginVariable)),
                                        new Identifier(stepVariable))));
                String loopTraversalVariable = compilerContext.generateVariable("traversal");
                stream.write(new VariableBinding.Start(
                        loopTraversalVariable,
                        new BinaryOperation(
                                BinaryOperator.AND,
                                new BinaryOperation(
                                        BinaryOperator.AND,
                                        new BinaryOperation(
                                                BinaryOperator.GEQ,
                                                new Identifier(indexVariable),
                                                new Identifier(beginVariable)),
                                        new BinaryOperation(
                                                BinaryOperator.LEQ,
                                                new Identifier(indexVariable),
                                                new Identifier(endVariable))),
                                new BinaryOperation(
                                        BinaryOperator.EQ,
                                        new Identifier(stepConditionVariable),
                                        NumericConstant.ZERO))));
                stream.write(new Conditional.Start(loopTraversalVariable, true));
            }

            @Override
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



