Skip to content

Implement Token! macro for syntax kinds, a-la syn #1248

Closed
@matklad

Description

@matklad

Syn has a lovely Token! macro for defining tokens without naming them: Token![,]:

https://docs.rs/syn/0.15.33/syn/macro.Token.html

We should add a similar macro for our SyntaxKind, to make code like this more readable:

https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ra_ide_api/src/extend_selection.rs#L137-L138

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions