getCurrentDocument method

DocumentNode getCurrentDocument()

Gets the currently parseable document

Implementation

DocumentNode getCurrentDocument() {
  if (_cachedDocument == null) {
    final text = _tokenizer.getCurrentText();
    if (text.isNotEmpty) {
      _cachedDocument = _fullParse(text);
    }
  }
  return _cachedDocument ?? DocumentNode([]);
}