From de31b33909d5b2b7e5eda637ee8c5e1837d8ce77 Mon Sep 17 00:00:00 2001 From: Joakim Soderberg Date: Mon, 17 Jun 2019 15:17:30 +0200 Subject: [PATCH] Add support for variable prefix 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. --- docopt_c.py | 44 ++++++++++++++++++++++++++------------------ 1 file changed, 26 insertions(+), 18 deletions(-) diff --git a/docopt_c.py b/docopt_c.py index c317e68..69a8663 100755 --- a/docopt_c.py +++ b/docopt_c.py @@ -18,6 +18,12 @@ -t, --template=