code: func (p *parser) path(t *Token) (Pattern, Error) {
  	// extract the sequence of tokens for this path
  	_tokens, _err := p.sequence(t)
  	if _err != nil {
  		return nil, _err
  	}
  
  	// remove trailing whitespace tokens
  	_length := len(_tokens)
  	for _length > 0 {
  		// if we have a non-whitespace token, we can stop
  		_length--
  		if _tokens[_length].Type != WHITESPACE {
  			break
  		}
  
  		// otherwise, truncate the token list
  		_tokens = _tokens[:_length]
  	}
  
  	// return the Pattern instance
  	return NewPattern(_tokens), nil
  }
docs: // path attempts to build a well-formed .gitignore Pattern representing a path
  // specification, starting with the Token t. If the sequence of tokens returned
  // by the Lexer does not represent a valid Pattern, path returns an Error.
  // Trailing whitespace is dropped from the sequence of pattern tokens.