documentOffset property

int get documentOffset

Offset in characters of this node in the document.

Implementation

int get documentOffset {
  if (parent == null) {
    return offset;
  }
  final parentOffset = (parent is! Root) ? parent!.documentOffset : 0;
  return parentOffset + offset;
}