Is there any plan on having quasi-quoting for libsyntax? It'd be useful both for codegen within the compiler (example) and compiler plugins. Right now, one either constructs the AST item manually or creates it from a string using
parse_* (but really just dumping it into a file because the spans are all wrong). Ideally, this would be done using existing quasi-quoting machinery.
"Why not just use the normal
quote?", you ask. Unfortunately (but with good reason) the conversion from
syntax::tokenstream::TokenStream is private, so there'd need to be a special
quote for libsyntax to avoid re-parsing the stream.
My hunch is that it'll be a long time before this happens (if ever), but I was wondering if it's on the roadmap. In any case, I'd like to express support to any existing efforts!