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
Tokens are returned out of order in function invocations or declarations with args, where the brackets are returned first, then the args themselves. Adding types to variables results in this behavior too, where colon delimiter is returned first, then the type and identifier.
I'm trying to use full_moon for syntax highlighting in a REPL using rustyline, and the formatting ends up like so.
I'm also trying to do syntax highlighting. Failing this function, what's the best way to iterate tokens in-order for this purpose? I overrode visit_token in a custom visitor class, but the results are ostensibly pre-order. Is overriding every leaf-type-node on the visitor struct my best bet?
Tokens are returned out of order in function invocations or declarations with args, where the brackets are returned first, then the args themselves. Adding types to variables results in this behavior too, where colon delimiter is returned first, then the type and identifier.
I'm trying to use
full_moon
for syntax highlighting in a REPL usingrustyline
, and the formatting ends up like so.Reproducible Example
Input:
Parsed Output:
The code which parses the input using
full_moon
looks like this:The text was updated successfully, but these errors were encountered: