You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
The text was updated successfully, but these errors were encountered:
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:Ideally we should indicate that
Lexer
inLexerAction
is the user-specified lexer name, andToken
is the return type (RHS of the arrow).Some options:
<...>
:<Lexer>Action<<Token>>
. I think double angle brackets aroundToken
don't look good.$(...)
:$(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).The text was updated successfully, but these errors were encountered: