lukaslueg / macro_railroad

A library to generate syntax diagrams for Rust macros.
MIT License
529 stars 11 forks source link

Hotwire `CodeSpan` to diagram-elements #10

Open lukaslueg opened 5 years ago

lukaslueg commented 5 years ago

It would be extremely useful to bidirectionally map span information to diagram elements so that

This requires us to acquire, collect and map CodeSpan-information up to the point where we generate a diagram. The code to add custom data-attributes to an SVG-element is already in place. In addition to a diagram, we also give back some form of code-map. Some JS-code can then control the blinkenlights via CSS-rules regarding the affected SVG-nodes.