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

Custom keywords #481

Merged
merged 2 commits into from
Sep 6, 2018
Merged

Custom keywords #481

merged 2 commits into from
Sep 6, 2018

Commits on Sep 4, 2018

  1. Prototype for support of custom keywords

    First prototype for support of custom keywords with syn's new parsing
    API. Documentation and tests aren't present for now as I'm mainly
    reaching for feedback.
    
    This patch introduces a new Keyword trait, a new macro custom_keyword!
    and exposes the existing TokenMarker enum. The Keyword trait
    automatically implements the Token trait, making it possible to peek on
    custom keywords (this is why I had to make TokenMarker public).
    
    The custom macro generates a structure storing an Ident and implementing
    the Keyword and Parse traits. A function with the same name as the
    structure is also generated in order to use it like any predefined
    keyword.
    kureuil committed Sep 4, 2018
    Configuration menu
    Copy the full SHA
    c0beaf3 View commit details
    Browse the repository at this point in the history

Commits on Sep 6, 2018

  1. Custom keywords polish

    dtolnay committed Sep 6, 2018
    Configuration menu
    Copy the full SHA
    7fb11e7 View commit details
    Browse the repository at this point in the history