Closed roife closed 1 month ago
The syntax is not concretely defined, and it's likely subject to change - we can add it once there is a more proper specification
However, this syntax is already being widely used in rustc (for example in https://github.com/rust-lang/rust/blob/9afe7136958edaa403f0b0eb00f0353c125b7352/compiler/rustc_driver_impl/src/lib.rs). When treesit parses this file, it generates a bunch of errors, causing the entire file to fail to highlight correctly.
fix #45
This PR rename the former
macro_definition
(macro_rules!
) tomacro_rules
, and reusemacro_definition
for the newmacro
syntax.Tests are copied from the RFC: https://github.com/rust-lang/rfcs/blob/master/text/1584-macros.md.