canParse static method

bool canParse(
  1. Object? obj
)

Implementation

static bool canParse(Object? obj) {
  if (obj is! Map<String, dynamic>) {
    return false;
  }
  if (obj['column'] is! int?) {
    return false;
  }
  if (obj['endColumn'] is! int?) {
    return false;
  }
  if (obj['endLine'] is! int?) {
    return false;
  }
  if (obj['line'] is! int) {
    return false;
  }
  if (!Source.canParse(obj['source'])) {
    return false;
  }
  return true;
}