Typing the AST not upwards
I want to use typing rules for typing siblings in an AST, not simply a node by its children.
Use case:
Edge(node1, edge, node2)
Edge(LeftHand(node1, edge), node2)
The second case I can have a type rule for LeftHand and use it to do something with node2 or the Edge as a whole.
But I’d rather have the possibility to do the same with the first AST.
Is there a theoretical reason to only support upwards typing as opposed to typing rules for sibblings or downwards?
Submitted by Daco Harkes on 29 November 2014 at 18:16
Log in to post comments