# attribute macros in rust-analyzer
## Constraints
* no changes to the syntax
* derive, cfg and custom attributes processing should share as much code as possible
* should we treat all `#[attributes]` as macros?
* the interface for attribute expansion must be token trees
* Token trees should be easier to play with
* Needs quote!() analogue
* attribute expansion must be incremenal
## Misc
Note that rustc itself is a not-ideal model here, as it uses tree model, and not token stream model, for build in macros.
This hopefully will change.