KeywordRule constructor

const KeywordRule(
  1. Map<String, List<String>> keywords, {
  2. String word = r'(?<!\w)[A-Za-z_]\w*',
  3. List<TokenRule> otherwise = const [],
})

Creates a keyword rule.

Implementation

const KeywordRule(
  this.keywords, {
  this.word = r'(?<!\w)[A-Za-z_]\w*',
  this.otherwise = const [],
});