uid / snapdown

Draw snapshot diagrams with plain text
MIT License
3 stars 0 forks source link

Self-references / disambiguation #10

Closed dwhatley19 closed 4 years ago

dwhatley19 commented 4 years ago

This Snapdown text:

a -> ((A b -> 5))
b -> b

currently produces this diagram:

Screen Shot 2020-08-02 at 2 18 17 PM

Direct link: https://web.mit.edu/dwhatley/www/snapdown/web/production.html#a%20-%3E%20((A%20b%20-%3E%205))%0Ab%20-%3E%20b

We should have some way to disambiguate between the two b references, so that the second b variable can actually point to the b field within the A node. Example:

a -> ((A b#1 -> 5))
b -> b#1
dwhatley19 commented 4 years ago

References such as b#1 are now parseable and work correctly. #15 outlines the remaining name disambiguation issue.