clue / commander

Finally a sane way to register available commands and arguments and match your command line in PHP
MIT License
168 stars 8 forks source link

Support preset option values #17

Closed clue closed 7 years ago

clue commented 7 years ago

Option values now accept any kind of token, which means they no longer simply accept any value. It is now possible to pass an alternative group to limit this to a preset of valid option values.

The tokenizer/parser has been updated to properly recurse into option values and now accepts whitespace and optional parentheses as expected.

The tokenizer/parser has also been updated to use an argument token if you still want to accept any value. This means we now share quite a bit of code between these, which is also a necessary preparation for #13.

Closes #6.