# Discussion: Adding grammar information to Procedural Macros for proper custom syntax support in the toolchain

**URL:** <https://internals.rust-lang.org/t/discussion-adding-grammar-information-to-procedural-macros-for-proper-custom-syntax-support-in-the-toolchain/21496>\
**Category:** tools and infrastructure\
**Created:** [September 6, 2024, 11:12am UTC](https://internals.rust-lang.org/t/discussion-adding-grammar-information-to-procedural-macros-for-proper-custom-syntax-support-in-the-toolchain/21496 "2024-09-06T11:12:52Z")\
**Posts on this page:** 1\
**Showing post:** 11

<div class="post-metadata">

**Author:** ![endsofthreads](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/endsofthreads/32/1769_2.png) [@endsofthreads](https://internals.rust-lang.org/u/endsofthreads)\
**Post date:** [September 8, 2024, 4:01pm UTC](https://internals.rust-lang.org/t/discussion-adding-grammar-information-to-procedural-macros-for-proper-custom-syntax-support-in-the-toolchain/21496/11 "2024-09-08T16:01:14Z")

</div>

I'll cite what Lukas said [on this forum](https://internals.rust-lang.org/t/how-can-we-improve-proc-macro-without-dependencies/19996/4) and [rust-lang/rust-analyzer#15452](https://github.com/rust-lang/rust-analyzer/discussions/15452#discussioncomment-6713008): proc macros that don't consume inputs and avoiding erroring out would go a _long_ way in making rust-analyzer behave nicely in the face of custom syntax.

For function-like, JSX-style macros—which seem to be the majority of function-like macros where the lack of tooling support is most acutely felt?—I'm not confident in any general solution that I might propose.

---

_[View the full topic](https://internals.rust-lang.org/t/discussion-adding-grammar-information-to-procedural-macros-for-proper-custom-syntax-support-in-the-toolchain/21496)._
