private Varnode getVarnodeLocation() {
		Varnode var = null;

		if (currentLocation instanceof DecompilerLocation) {
			DecompilerLocation dloc;

			// get the Varnode under the cursor
			dloc = (DecompilerLocation) currentLocation;
			ClangToken tokenAtCursor = dloc.getToken();
			var = DecompilerUtils.getVarnodeRef(tokenAtCursor);
			// fixupParams(dloc.getDecompile(), currentLocation.getAddress());
			if (tokenAtCursor == null) {
				println("****   please put the cursor on a variable in the decompiler!");
				return null;
			}
			lastResults = dloc.getDecompile();
		}
		else {
			// if we don't have one, make one, and map variable to a varnode
			HighSymbol highVar = computeVariableLocation(currentProgram, currentLocation);
			if (highVar != null) {
				var = highVar.getHighVariable().getRepresentative();
			}
			else {
				return null;
			}
		}
		return var;
	}
Try to locate the Varnode that represents the variable in the listing or
decompiler. In the decompiler this could be a local/parameter at any
point in the decompiler. In the listing, it must be a parameter variable.

@return the varnode
Ghidra/Features/Decompiler/ghidra_scripts/ShowConstantUse.java