visitSequence method

  1. @override
void visitSequence(
  1. SequenceExpression node
)
override

Implementation

@override
void visitSequence(SequenceExpression node) {
  final expressions = node.expressions;
  final length = expressions.length;
  var skip = false;
  for (var i = 0; i < length; i++) {
    final child = expressions[i];
    child.accept(this);
    if (!skip && !child.isOptional) {
      _addTerminals(node, child.startTerminals);
    }

    if (!child.isOptional) {
      skip = true;
    }
  }
}