unsignedNumber method

Parser<num> unsignedNumber()

Implementation

Parser<num> unsignedNumber() =>
    seq3(
          digit().plus(),
          seq2(char('.'), digit().plus()).optional(),
          seq3(
            pattern('eE'),
            pattern('+-').optional(),
            digit().plus(),
          ).optional(),
        )
        .flatten(message: 'unsigned number expected')
        .map(num.parse)
        .trim(ref0(spacer));