function findSelfOrAncestor(node, match) {
			let currentNode = node;

			while (currentNode && !match(currentNode)) {
				currentNode = currentNode.parent;
			}
			return currentNode;
		}
Searches from the current node through its ancestry to find a matching node.
@param {ASTNode} node a node to get.
@param {(node: ASTNode) => boolean} match a callback that checks whether or not the node verifies its condition or not.
@returns {ASTNode|null} the matching node.