grammar property

Grammar get grammar

The grammar lines are tokenized with. Setting a different grammar drops every cached line, since states from another grammar can't be reused.

Implementation

Grammar get grammar => _grammar;
set grammar (Grammar value)

Implementation

set grammar(Grammar value) {
  if (identical(value, _grammar)) return;
  _grammar = value;
  _text = null;
  _lines = const [];
  _pending = null;
}