is there a way to uniquely identify a SyntaxNode? i need to maintain a list of “already visited” syntaxnodes, and i don’t know how to identify them.
in other words: let’s assume every SyntaxNode has an “id” string-attribute that is different for every node in the tree. then i can just store the ids of nodes i already visited somewhere, so that next time i can skip that node while walking in the tree. but there is no such “id”… so, what is the best approach to achieve this?
i also looked at just storing the syntaxnodes itself, but it seems they are not guaranteed to be the same object always. (in other words, “n.parent.firstChild === n” does not hold for nodes with no siblings)