GrammarToken constructor

GrammarToken(
  1. String type,
  2. RegExp pattern, {
  3. bool lookbehind = false,
  4. bool greedy = false,
  5. String? alias,
  6. Grammar inside()?,
})

One rule of a Grammar: a pattern whose matches are tagged with type (and optionally re-tagged via alias), with optional nested highlighting via inside.

Implementation

GrammarToken(
  this.type,
  this.pattern, {
  this.lookbehind = false,
  this.greedy = false,
  this.alias,
  Grammar Function()? inside,
}) : _inside = inside;