if (elementType.isLast(index)) {
//matches == 0 reaches this stage only if all sequence elements are optional
ParseResultType resultType = matches == 0 ? ParseResultType.NO_MATCH : ParseResultType.FULL_MATCH;
return stepOut(marker, depth, resultType, matchedTokens, node, context);
}
node.incrementIndex(builder.getCurrentOffset());
}
}
return stepOut(marker, depth, ParseResultType.NO_MATCH, matchedTokens, node, context);
}