visitOrderedChoice method

  1. @override
void visitOrderedChoice(
  1. OrderedChoiceExpression node
)
override

Implementation

@override
void visitOrderedChoice(OrderedChoiceExpression node) {
  node.visitChildren(this);
  final expressions = node.expressions;
  var count = 0;
  for (var i = 0; i < expressions.length; i++) {
    final child = expressions[i];
    if (child.isSuccessful) {
      count++;
    }
  }

  if (count == expressions.length) {
    _setIsSuccessful(node, true);
  }
}