Skip to content

Version 0.2.0

Pre-release
Pre-release
Compare
Choose a tag to compare
@darvil82 darvil82 released this 14 Dec 00:54
· 469 commits to main since this release
00dce43

Now available on a repsy repository!

Lanat may now be installed by adding the corresponding repository and dependency, as explained in the README.md. (The github package is still available)

Features

  • Add default isRoot method to ParentElementGetter.
  • Default help and version arguments now close the program when used.
  • Make errors of description tags more clear.
  • Add SpaceRequired error when tokenizing. Thrown when two tokens require a space between them.
  • Tokenizer error formatter now properly highlights input characters. For instance; a string left open is now correctly highlighted from the start of the string open char to the end of the input.

Fixes

  • Errors not being properly cleared up when resetting.
  • CommandAdder hasCommand and getCommand methods not returning a sub-command in some cases.
  • Possible to set invalid names to description tags.
  • Tokenizer errors not properly highlighting the errors in some cases.
  • Possible to register an argument subtype that was already registered to another argument type.
  • Errors dispatched to parent argument types being saved on both the parent and child.
  • Parsing occurring even if tokenization failed (again).
  • Errors not being cached after the first call to ArgumentParser#getErrors.
  • Unnecessary checks in error handling methods of Argument.
  • Tuple characters changes not being reflected on the tokenization state.
  • Tokenization not being skipped when a blank string is passed.
  • Strings allowing no spaces after or before them.
  • Tuples allowing no spaces after them.
  • Tokenizer not recognizing other whitespace characters than space.
  • Checking for similar arguments being done on the tokenization state (rather than parse).
  • TryParseArgumentType throwing an incorrect message for an error.

Misc

  • Add lots of javadocs.
  • Remove Argument#isHelpArgument.
  • Small tweaks to some ArgumentTypes.
  • Separated unrelated code into separate libraries (#14):
  • Refactors:
    • Tokenizer, Parser and ErrorHandler (now called ErrorsCollector) (#13). Handling of errors no longer uses reflection. Error handling is now more flexible and simple.
      • Parsing of sub-commands has been greatly improved. Removed ugly/unclear code.
    • Eror formatters may now format the output differently according to the kind of input, being the input text or the parsed tokens. Formatters now have access to contexts at the moment of handling an error, which can provide more data and information about the current error.
  • Remove dead code.
  • Simplified the way of getting the forward value internally.