Version 0.2.0
Pre-release
Pre-release
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 toParentElementGetter
. - Default
help
andversion
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
andgetCommand
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
ArgumentType
s. - Separated unrelated code into separate libraries (#14):
- For misc utilities (https://github.com/DarviL82/java-utils). This change removes the next classes from the project:
LoopPool
ModifyRecord
MultiComparator
Pair
Random
Range
UtlReflection
UtlString
- For terminal text formatting (https://github.com/DarviL82/java-terminal-text-formatter). This change removes the next classes from the project:
Color
FormatOption
TextFormatter
- For misc utilities (https://github.com/DarviL82/java-utils). This change removes the next classes from the project:
- Refactors:
Tokenizer
,Parser
andErrorHandler
(now calledErrorsCollector
) (#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.