Skip to content
  • David Thompson's avatar
    Fix problems when parsing plural units with a prefix. · 54cae9a1
    David Thompson authored
    + In the `unit_kw` grammar object, test for a prior match
      properly when looking for prefixes by n-gram (it was
      testing whether a unit had been detected).
    + When a match is found in `System::evaluateUnitPrefixToken()`,
      stop iterating so the iterator is left in a valid state.
    + Prefixes should never have a plural form.
    + Add a `Unit::multiplier()` method for regression testing purposes.
    + Add regression tests.
    + Add a feature to the `unit-converter` utility program: when
      passed a measurement and unit on the command line, perform
      the conversion as specified and exit rather than processing
      user input.