numeral method

Parser<String> numeral()

Implementation

Parser<String> numeral() => (char('-').optional() &
        ((char('.') & digit().plus()) |
            (digit().plus() & (char('.') & digit().star()).optional())))
    .flatten();