I am not sure if I fully understand what the expected behavior for getSymbolAtLocation is. Given a node (let's say a reference variable). Would that function return the Symbol for the declaration variable or the reference variable?
My guess would be that it gives the reference variable. With which we can then do getSymbolAtLocation(node).getDeclarations(). Why would there be multiple declarations for a variable at a time.