span property Null safety

FileSpan span
override

Implementation

@override
FileSpan get span {
  var openingTag = attributes
      .fold<FileSpan>(
          lt.span.expand(tagName.span), (out, a) => out.expand(a.span))
      .expand(gt.span);

  if (gt2 == null) return openingTag;

  return children
      .fold<FileSpan>(openingTag, (out, c) => out.expand(c.span))
      .expand(lt2.span)
      .expand(slash.span)
      .expand(tagName2.span)
      .expand(gt2!.span);
}