failAt method

bool failAt(
  1. int offset,
  2. ParseError error
)

Implementation

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

      if (errorCount < _errors.length) {
        _errors[errorCount++] = error;
      }
    }
  }

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

  return false;
}