code: function getChainHeadToken (node) {
      const type = node.type
      while (node.parent.type === type) {
        node = node.parent
      }
      return tokenStore.getFirstToken(node)
    }
docs: Find the head of chaining nodes.
  @param {Node} node The start node to find the head.
  @returns {Token} The head token of the chain.