quantityLiteral top-level property

Parser<QuantityParser> quantityLiteral
final

Implementation

final Parser<QuantityParser> quantityLiteral =
    (NUMBER.flatten() & (char(' ') & unit)).map((value) {
  return QuantityParser(ValidatedQuantity(
      value: UcumDecimal.fromString(value[0]),
      unit: value.length > 1 ? value[1].last : null));
});