Skip to main content

render_grammar_semantics_json

Function render_grammar_semantics_json 

Source
pub fn render_grammar_semantics_json() -> String
Expand 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.