This crate provides the
quote! macro for turning Rust syntax tree data
structures into tokens of source code.
The idea of quasi-quoting is that we write code that we treat as data.
quote! macro, we can write what looks like code to our text
editor or IDE. We get all the benefits of the editor's brace matching,
syntax highlighting, indentation, and maybe autocompletion. But rather than
compiling that as code into the current crate, we can treat it as data, pass
it around, mutate it, and eventually hand it back to the compiler as tokens
to compile into the macro caller's crate.
This crate is motivated by the procedural macro use case, but is a general-purpose Rust quasi-quoting library and is not specific to procedural macros.
[dependencies] squote = "1.0"
Formatting macro for constructing
The whole point.
A literal of some sort
A stream of tokens
A delimiter around a block of code
Types that can be interpolated inside a