code: func (p *parser) Parse() []Pattern {
  	// keep parsing until there's no more patterns
  	_patterns := make([]Pattern, 0)
  	for {
  		_pattern := p.Next()
  		if _pattern == nil {
  			return _patterns
  		}
  		_patterns = append(_patterns, _pattern)
  	}
  }
docs: // Parse returns all well-formed .gitignore Patterns contained within the
  // parser stream. Parsing will terminate at the end of the stream, or if
  // the parser error handler returns false.