docopt / docopt.c

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

Example not working #46

Open andreas-jonsson opened 2 years ago

andreas-jonsson commented 2 years ago

Generating code using the "Naval Fate" example produces broken header. Line 97 & 98.

struct DocoptArgs {

    /* commands */
    size_t create;
    size_t mine;
    size_t move;
    size_t remove;
    size_t set;
    size_t ship;
    size_t shoot;
    /* arguments */
    char *name;
{indent}char *x;
{indent}char *y;
    /* options without arguments */
    size_t drifting;
    size_t help;
    size_t moored;
    size_t version;
    /* options with arguments */
    char *speed;
    /* special */
    const char *usage_pattern;
    const char *help_message[16];
};

I'm running Python 3.10.0