failAllAt method

bool failAllAt(
  1. int offset,
  2. List<ParseError> errors
)

Implementation

@pragma('vm:prefer-inline')
@pragma('dart2js:tryInline')
bool failAllAt(int offset, List<ParseError> errors) {
  ok = false;
  if (!ignoreErrors || !isRecoverable) {
    if (offset >= failPos) {
      if (failPos < offset) {
        failPos = offset;
        errorCount = 0;
      }

      for (var i = 0; i < errors.length; i++) {
        if (errorCount < errors.length) {
          _errors[errorCount++] = errors[i];
        }
      }

      if (lastFailPos < offset) {
        lastFailPos = offset;
      }
    }
  }

  return false;
}