function nodeToVElementMatcher(selector) {
  switch (selector.type) {
    case 'attribute': {
      return attributeNodeToVElementMatcher(selector)
    }
    case 'class': {
      return classNameNodeToVElementMatcher(selector)
    }
    case 'id': {
      return identifierNodeToVElementMatcher(selector)
    }
    case 'tag': {
      return tagNodeToVElementMatcher(selector)
    }
    case 'universal': {
      return universalNodeToVElementMatcher(selector)
    }
    case 'pseudo': {
      return pseudoNodeToVElementMatcher(selector)
    }
    case 'nesting': {
      throw new SelectorError('Unsupported nesting selector.')
    }
    case 'string': {
      throw new SelectorError(`Unknown selector: ${selector.value}.`)
    }
    default: {
      throw new SelectorError(
        `Unknown selector: ${/** @type {any}*/ (selector).value}.`
      )
    }
  }
}
Convert node to VElementMatcher
@param {Exclude<parser.Node, {type:'combinator'|'comment'|'root'|'selector'}>} selector
@returns {VElementMatcher}