Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clashes with reserved keywords #34

Open
g2p opened this issue Dec 1, 2022 · 1 comment
Open

Clashes with reserved keywords #34

g2p opened this issue Dec 1, 2022 · 1 comment

Comments

@g2p
Copy link

g2p commented Dec 1, 2022

I can't have a flag called --in.

expected identifier, found keyword `in`

Trying r#in doesn't work either, at least within a subcommand, due to xflags generating subcommand__r#in which doesn't parse.

xflags::xflags! {
    cmd command {
        cmd subcommand {
            required --r#in in: PathBuf
        }
    }
}
@matklad
Copy link
Owner

matklad commented Dec 1, 2022

Clearly a bug, we should fix to automatically translate keywords into their raw form when generating code. The parser I think already correctly deals with it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants