code: func (p *parser) parseSimpleSelectorSequence() (Selector, error) {
  	var result Selector
  
  	if p.i >= len(p.s) {
  		return nil, errors.New("expected selector, found EOF instead")
  	}
  
  	switch p.s[p.i] {
  	case '*':
  		// It's the universal selector. Just skip over it, since it doesn't affect the meaning.
  		p.i++
  	case '#', '.', '[', ':':
  		// There's no type selector. Wait to process the other till the main loop.
  	default:
  		r, err := p.parseTypeSelector()
  		if err != nil {
  			return nil, err
  		}
  		result = r
  	}
  
  loop:
  	for p.i < len(p.s) {
  		var ns Selector
  		var err error
  		switch p.s[p.i] {
  		case '#':
  			ns, err = p.parseIDSelector()
  		case '.':
  			ns, err = p.parseClassSelector()
  		case '[':
  			ns, err = p.parseAttributeSelector()
  		case ':':
  			ns, err = p.parsePseudoclassSelector()
  		default:
  			break loop
  		}
  		if err != nil {
  			return nil, err
  		}
  		if result == nil {
  			result = ns
  		} else {
  			result = intersectionSelector(result, ns)
  		}
  	}
  
  	if result == nil {
  		result = func(n *html.Node) bool {
  			return n.Type == html.ElementNode
  		}
  	}
  
  	return result, nil
  }
docs: // parseSimpleSelectorSequence parses a selector sequence that applies to
  // a single element.