UNPKG

clarity-pattern-parser

Version:

Parsing Library for Typescript and Javascript.

11 lines (9 loc) 319 B
import { Sequence } from "../../patterns/Sequence"; import { Literal } from "../../patterns/Literal"; import { Regex } from "../../patterns/Regex"; const period = new Literal("period", "."); const digit = new Regex("digit", "\\d+"); const fraction = new Sequence("fraction", [period, digit]); export { fraction };