This is similar to https://tree-sitter.github.io/tree-sitter/using-parsers#named-vs-anonymous-nodes.
We decided to leverage tree-sitter-like query to power our local binding analysis (#554) but for that, we need a way to name a child in the CST, not only in AST.
This means we have to thread the names from the new definition (DSL v2) and the node names to the parser and construct newly named nodes there. For now, we will start with naming every node; then, we can decide if we want to have some anonymous nodes a la tree-sitter (e.g. punctuation, keywords).
This is similar to https://tree-sitter.github.io/tree-sitter/using-parsers#named-vs-anonymous-nodes.
We decided to leverage tree-sitter-like query to power our local binding analysis (#554) but for that, we need a way to name a child in the CST, not only in AST.
This means we have to thread the names from the new definition (DSL v2) and the node names to the parser and construct newly named nodes there. For now, we will start with naming every node; then, we can decide if we want to have some anonymous nodes a la tree-sitter (e.g. punctuation, keywords).