I'm having some trouble implementing a parser. I want to record the position of every AST node, and there are two approaches I'm trying/have tried so far:
- Record the position of the node inside the node itself
- Have an externally stored map mapping each node in the file to its position