code: func (p *parser) sequence(t *Token) ([]*Token, Error) {
  	// extract the sequence of tokens for a valid path
  	//      - this excludes the negation token, which is handled as
  	//        a special case before sequence() is called
  	switch t.Type {
  	// the path starts with a separator
  	case SEPARATOR:
  		return p.separator(t)
  
  	// the path starts with the "any" pattern ("**")
  	case ANY:
  		return p.any(t)
  
  	// the path starts with whitespace, wildcard or a pattern
  	case WHITESPACE:
  		fallthrough
  	case PATTERN:
  		return p.pattern(t)
  	}
  
  	// otherwise, we have an invalid specification
  	p.undo(t)
  	return nil, p.err(InvalidPatternError)
  }
docs: // sequence attempts to extract a well-formed Token sequence from the Lexer
  // representing a .gitignore Pattern. sequence returns an Error if the
  // retrieved sequence of tokens does not represent a valid Pattern.