I tried dealing with lists in the same way as with other more basic tags
but came to the conclusion that this is most likely not feasible in the same
way that it is not feasible for compounds. It would require a mini-parser
that can deal with all sorts of tags (including nested lists and compounds).
Instead, an approach more similar to the recursion for compound tags will
be used (using its own function to deal with the missing tag headers ofc).
Idk why I did that in the first place. Probably bc hpp looks stupid.
But having a + in a file name bugs me just as much. And other ppl as well.
So I changed it.
I renamed "unpositional arguments" to "options" and "positional arguments" to "arguments".
This is intended to make the code more readable and easier to type out.
The parser used to rely on the next iteration of the loop to detect
if an unpositional argument was missing its value, this has now been
fixed by adding an additional check on unpositional arguments waiting
for a value that detects if the end of the loop has been reached
- argumentWaitingForValue was never reset after the value had been retrieved
- made it so the ArgumentsParser constructor can accept const char**
- correct usage of substr() and actually use the correct position in the first place
- fix a typo where I tried to dereference `this` with `-` instead of `->`
test/nbt_helpers: add a headline to output
Build system: remove comma from array that I added bc I thought it was correct sytax, it wasn't
lib/cli: change argument order of PositionalArgument constructor to fit in with Flag and UnpositionalArgument
lib/cli: properly define what is private and what is public in the ArgumentsParser class
This should be all functionality that is needed for now.
The next step is building unit tests to check that everything works correctly.
Who am I kidding? There will most certainly be bugs in there given that this
code has been typed out without ever being run.
This allows ErrorOr<T> to be used for bool, as there would be conflicting
constructors otherwise.
Also, we have ErrorCodes::UNKNOWN now so, instead of `ErrorOr<T>(true)`,
`ErrorOr<T>(true, ErrorCodes::UNKNOWN)` can be used.