digit-parser ( -- parser ) (original) (raw)

digit-parser ( -- parser )

Vocabulary
peg.parsers

Inputs
None

Outputs

parser a parser

Word description
Returns a parser that matches a single digit as defined by the digit? word.

See also
integer-parser

Definition

USING: math.parser peg unicode ;

IN: peg.parsers

: digit-parser ( -- parser )
[ digit? ] satisfy [ digit> ] action ;