characterLocation property

CharacterLocation characterLocation
override

Implementation

@override
CharacterLocation get characterLocation {
  if (!_characterLocationIsSet) {
    var lineInfo = compilationUnitElement.lineInfo;
    _characterLocationIsSet = true;
    assert(element.nameOffset >= 0,
        'Invalid location data for element: $fullyQualifiedName');
    assert(lineInfo != null,
        'No lineInfo data available for element: $fullyQualifiedName');
    if (element.nameOffset >= 0) {
      _characterLocation = lineInfo?.getLocation(element.nameOffset);
    }
  }
  return _characterLocation;
}