docopt / docopt.c

C-code generator for docopt language.
MIT License
318 stars 46 forks source link

Add support for variable prefix #42

Open JoakimSoderberg opened 5 years ago

JoakimSoderberg commented 5 years ago

It is currently not possible to use an option or command name that happesn to be a C keyword. So for example trying to have a command named "register" will fail with a compilation error.

This introduces support for setting a prefix for the variable names defined in the struct. So for example using prefix _ would mean you access the command via args._register instead.