pub fn render_grammar_semantics_json() -> StringExpand description
Invert the registry into a { "<rule>": [ { code, summary }, … ], … } map,
serialised as pretty JSON with sorted keys and sorted codes. Only rules with
at least one diagnostic appear. This is the generator behind
docs/grammar-semantics.json, which the {{#grammar-semantics <rule>}}
preprocessor directive consumes.