UNPKG

@thi.ng/parse

Version:

Purely functional parser combinators & AST generation for generic inputs

9 lines (8 loc) 200 B
import { oneOrMore } from "../combinators/repeat.js"; import { range } from "../prims/range.js"; const DIGIT = range("0", "9", "digit"); const DIGITS = oneOrMore(DIGIT); export { DIGIT, DIGITS };