visitOrderedChoice<E> method

  1. @override
void visitOrderedChoice<E>(
  1. OrderedChoiceExpression<E> node
)
override

Implementation

@override
void visitOrderedChoice<E>(OrderedChoiceExpression<E> node) {
  if (!_processed.add(node)) {
    return;
  }

  final expressions = node.expressions;
  if (expressions.isEmpty) {
    throw StateError('Ordered choice does not contain any expression: $node');
  }

  for (var i = 0; i < expressions.length; i++) {
    final child = expressions[i];
    child.accept(this);
  }
}