rome_diagnostics_categories

Crates.iorome_diagnostics_categories
lib.rsrome_diagnostics_categories
version0.0.1
sourcesrc
created_at2023-04-04 08:49:41.570761
updated_at2023-04-04 08:49:41.570761
descriptionDiagnostic categories for rome_diagnostics. It exposes a macro that emits compile-time errors for extranous categories.
homepage
repositoryhttps://github.com/rome/tools
max_upload_size
id829993
size23,792
Emanuele Stoppa (ematipico)

documentation

https://rustdocs.rome.tools/rome_diagnostics/index.html

README

rome_diagnostics_categories

This crate contains a static registry of all the diagnostic categories used throughout the Rome codebase

Code Generation

The list of categories is defined in src/categories.rs using the define_dategories! macro, but instead of relying on conventional Rust macro expansion this crate instead uses a build script (in build.rs) to control how the code resulting from the macro is generated.

Specifically this lets us generate new identifiers, which is something plain Rust macros cannot do, without having to use full-blown procedural macros, which would require creating and building yet another crate.

Commit count: 4306

cargo fmt