1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
//! # Tweld
//! [](https://crates.io/crates/tweld)
//! [](https://docs.rs/tweld)
//! [](https://choosealicense.com/licenses/)
//! [](https://github.com/marcelo-ferraz/tweld/actions/workflows/ci.yml)
//!
//! > *You can read it as tiny-weld, token-weld, or just tweld. The important thing is that it compiles.*
//!
//! Tweld is a procedural macro toolkit and naming DSL for Rust. It lets you dynamically generate, modify, and compose identifiers directly in your source code using a clean `@[]` syntax — because sometimes the identifier you need doesn't quite exist yet, and writing a full proc-macro just to rename a function feels like bringing a freight train to post a letter.
//! One can only hope the syntax is clean and intuitive enough.
//!
//! ```rust,ignore
//! weld!("## @[(the idea | title)]");
//! ```
//!
//! The name comes from the idea of fusing tokens together. It started as a tool for writing macros for macros (which sounds recursive, because it is), and then grew somewhat beyond its original remit.
//! See [`weld!`] for full documentation.
extern crate proc_macro;
use TokenStream;
use TokenStream as TokenStream2;
use cratescan_tokens;