This needs a bit of preparation, but it simplifies the handwritten parsing code down to approximately 10 lines, and slightly improves the error messages too. All the scaffolding will be shared by future uses of procedural macros.
Thanks to the author of the attrs crate, Aatif Syed, for accepting to lower his crate's minimum supported Rust version to 1.83. Paolo Paolo Bonzini (4): subprojects: update proc-macro2 and syn subprojects: add attrs crate rust: qemu-api-macros: support matching more than one error rust: qemu-api-macros: switch #[property] parsing to use combinators rust/Cargo.lock | 19 ++++- rust/meson.build | 2 + rust/qemu-api-macros/Cargo.toml | 1 + rust/qemu-api-macros/meson.build | 1 + rust/qemu-api-macros/src/lib.rs | 84 +++++++------------ rust/qemu-api-macros/src/tests.rs | 14 ++-- scripts/archive-source.sh | 2 +- scripts/make-release | 2 +- subprojects/.gitignore | 5 +- subprojects/attrs-0.2-rs.wrap | 7 ++ .../packagefiles/attrs-0.2-rs/meson.build | 32 +++++++ .../packagefiles/proc-macro2-1-rs/meson.build | 2 +- subprojects/packagefiles/syn-2-rs/meson.build | 2 +- subprojects/proc-macro2-1-rs.wrap | 8 +- subprojects/syn-2-rs.wrap | 8 +- 15 files changed, 111 insertions(+), 78 deletions(-) create mode 100644 subprojects/attrs-0.2-rs.wrap create mode 100644 subprojects/packagefiles/attrs-0.2-rs/meson.build -- 2.50.1