Krzysztof Wiśniewski
Krzysztof Wiśniewski
I also "fixed" some of the funny combinations of optionals one may want to create, with optionals in the middle of argument list.
Good point, this is doable, but programmer must make sure that field names in struct overlap with what's described by the union field name, otherwise the message will make no...

@archbirdplus What do you think?

Isn't that convenience change? You can add that at any time since it relaxes requirements, doesn't impose new ones. Requires another recursive walk to determine all the possible combinations of...
Different counterargument could be that you have to call those union and struct fields something readable and unambiguous, so full command signature and names of arguments are perfect for that.
Do you distinguish between optional and mandatory arguments with `` and `[]`? Mind that now there are only two branches in parsing, one with `x, y, optional z` and one...
Two things, IMO `` and `/` should be parts of parameter names and commandName, so parser remains generic enough so it can be used for command line parameters, eg. for...
~~TODO: use toOwnedSlice~~ ~~TODO: use std.mem.concat~~