This library provides a call2
function that sits somewhere in-between syn
's parse2
and ParseBuffer::call
: It lets you conveniently apply a parser function to a proc-macro2
token stream, for example from a quote!
.
Please use cargo-edit to always add the latest version of this library:
cmd
cargo add call2-for-syn
```rust use { call2forsyn::call2, quote::quote, syn::{Ident, Token}, };
let (hello, world) = call2:: asserteq!(format!("{}", hello), "Hello");
asserteq!(format!("{}", world), "world");
``` Licensed under either of at your option. Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in the work by you, as defined in the Apache-2.0 license, shall be
dual licensed as above, without any additional terms or conditions. This includes the Rust version requirement specified above. Which versions are affected by features and patches can be determined from the respective headings in CHANGELOG.md.License
Contribution
Code of Conduct
Changelog
Versioning
call2-for-syn
strictly follows Semantic Versioning 2.0.0 with the following exceptions:
Consider it the global feature level.
Consider it the global patch level.
Earlier Rust versions may be compatible, but this can change with minor or patch releases.