token method

Parser<String> token(
  1. String string
)

Implementation

Parser<String> token(String string) {
  if (_isKeyword.accept(string)) {
    _keywords.add(string);
    return string
        .toParser(message: '"$string" expected', ignoreCase: true)
        .skip(after: word().not())
        .trim(ref0(spacer));
  }
  return string.toParser(message: '"$string" expected').trim(ref0(spacer));
}