This repository has been archived by the owner on Nov 12, 2023. It is now read-only.
XRBK macro: rewrite with chumsky
crate
#98
Labels
bug
Something isn't working
enhancement
New feature or request
task
An essential task for a planned milestone.
I believe it should be possible to use
chumsky
to interpret the tokens of a proc macro. I think thatchumsky
's API, with the use of parser combinators, can allow for much more concise code for XRBK macro with much faster prototyping/syntax changes. I also think it can allow for much easier recovery for errors (e.g. if a reply has no#[sequence]
attribute).My rough understanding from ~15 minutes of research is that
chumsky
can be used where:proc_macro::TokenTree
is the most basic form of token which is processed.compile_error!(...)
macro invocation (unresolved question: what happens if you generate the output which could be recovered as well as putting thecompile_error!(...)
in the place where the error is? could an IDE still provide suggestions for the other code in that case?).compile_error!(...)
invocation.The text was updated successfully, but these errors were encountered: