parseError method

void parseError(
  1. SourceSpan? span,
  2. String errorcode, [
  3. Map<String, Object?>? datavars = const {}
])

Implementation

void parseError(SourceSpan? span, String errorcode,
    [Map<String, Object?>? datavars = const {}]) {
  if (!generateSpans && span == null) {
    span = _lastSpan;
  }

  final err = ParseError(errorcode, span, datavars);
  errors.add(err);
  if (strict) throw err;
}