digit function

Parser<String> digit (
  1. [String message = 'digit expected']
)

Returns a parser that accepts any digit character.

Implementation

Parser<String> digit([String message = 'digit expected']) {
  return CharacterParser(const DigitCharPredicate(), message);
}