visitOrderedChoice<E> method

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

Implementation

@override
Expression visitOrderedChoice<E>(OrderedChoiceExpression<E> node) {
  if (_processed.containsKey(node)) {
    return _processed[node]!;
  }

  final choice = OrderedChoiceExpression<E>();
  _processed[node] = choice;
  final expressions = choice.expressions;
  for (final expression in node.expressions) {
    final result = expression.accept(this) as SequenceExpression<E>;
    expressions.add(result);
  }

  return choice;
}