token method

Parser<Token<String>> token(
  1. Object input
)

Implementation

Parser<Token<String>> token(Object input) {
  if (input is Parser) {
    return input.cast<String>().token().trim(ref0(whitespaceOrComments));
  } else if (input is String) {
    return token(stringIgnoreCase(input));
  }
  throw ArgumentError.value(input, 'Invalid token parser');
}