code: function findOutOfScopeLocations(
    sourceId: string,
    position: AstPosition
  ): AstLocation[] {
    const { functions, comments } = findSymbols(sourceId);
    const commentLocations = comments.map(c => c.location);
    let locations = functions
      .map(getLocation)
      .concat(commentLocations)
      .sort(sortByStart);
    // Must remove inner locations then filter, otherwise,
    // we will mis-judge in-scope inner locations as out of scope.
    locations = removeInnerLocations(locations, position).filter(
      loc => !containsPosition(loc, position)
    );
    return removeOverlaps(locations);
  }
docs: Returns an array of locations that are considered out of scope for the given
  location.