In libsyntax/ext, `expand.rs` and `base.rs` are the main parts of the
implementation (and `source_utils.rs` is a smaller one), and most of the
rest are implementations of existing syntax extensions. `bytes.rs` and `
env.rs` are simple ones, and `quote.rs` and `fmt.rs` are more complicated.

Note that macros are just a kind of syntax extension, so the way they are
invoked is the same: the user has to do `my_syntax_extension!(...)`; you
can't do, for example, something that walks the whole tree without wrapping
the whole thing in an invocation. I'm not sure what your requirements are
in that area.

Paul
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to