visitSequence method

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

Implementation

@override
void visitSequence(SequenceExpression node) {
  node.visitChildren(this);
  final expressions = node.expressions;
  var count = 0;
  var skip = false;
  for (var i = 0; i < expressions.length; i++) {
    final child = expressions[i];
    if (!skip) {
      if (child.isSuccessful) {
        count++;
      } else {
        skip = true;
      }
    }
  }

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