add functions to find the node and token corresponding to a diagnostic