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

Find a better metavariable syntax in documentation #14

Open
osa1 opened this issue Oct 12, 2021 · 0 comments
Open

Find a better metavariable syntax in documentation #14

osa1 opened this issue Oct 12, 2021 · 0 comments
Labels
documentation Improvements or additions to documentation

Comments

@osa1
Copy link
Owner

osa1 commented Oct 12, 2021

In the regex section we use <regex> syntax for metavariable "regex", but that syntax does not look great in the next section when we show Rust code. For example, we say things like:

If lexer is declared as Lexer -> Token;
...
LexerAction<Token>

Ideally we should indicate that Lexer in LexerAction is the user-specified lexer name, and Token is the return type (RHS of the arrow).

Some options:

  • Keep using <...>: <Lexer>Action<<Token>>. I think double angle brackets around Token don't look good.
  • Use $(...): $(Lexer)Action<$(Token)>. I like this better, because it looks somewhat similar to Rust macro syntax for splicing. (though you can't generate new symbols using this syntax in Rust, I think).
  • Other ideas?
@osa1 osa1 added the documentation Improvements or additions to documentation label Oct 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant