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

Support creation of non-terminals with type aliases #4

Open
shadaj opened this issue Aug 23, 2022 · 0 comments
Open

Support creation of non-terminals with type aliases #4

shadaj opened this issue Aug 23, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@shadaj
Copy link
Member

shadaj commented Aug 23, 2022

This is helpful for things like identifiers, where we only have a single field in the struct but want to share a common leaf definition. Ideally we could support:

#[rust_sitter::leaf(...)]
type Ident = String;

so that users can interact directly with the string. This is a bit tricky though, since we can't add an impl for the type alias.

@shadaj shadaj added the enhancement New feature or request label Aug 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant