code: func (l *lexer) pattern() ([]rune, Error) {
  	// read until we hit the first whitespace/end of line/eof rune
  	_pattern := make([]rune, 0, 1)
  
  	// loop until there's nothing more to do
  	for {
  		_r, _err := l.read()
  		if _err != nil {
  			return _pattern, _err
  		}
  
  		// what is the next rune?
  		switch _r {
  		// whitespace, newline, end of file, separator
  		//		- this is the end of the pattern
  		case _SPACE:
  			fallthrough
  		case _TAB:
  			fallthrough
  		case _CR:
  			fallthrough
  		case _NEWLINE:
  			fallthrough
  		case _SEPARATOR:
  			fallthrough
  		case _EOF:
  			// return what we have
  			l.unread(_r)
  			return _pattern, nil
  
  		// a wildcard is the end of the pattern if it is part of any '**'
  		case _WILDCARD:
  			_next, _err := l.peek()
  			if _err != nil {
  				return _pattern, _err
  			} else if _next == _WILDCARD {
  				l.unread(_r)
  				return _pattern, _err
  			} else {
  				_pattern = append(_pattern, _r)
  			}
  
  		// escape sequence - consume the next rune
  		case _ESCAPE:
  			_escape, _err := l.escape()
  			if _err != nil {
  				return _pattern, _err
  			}
  
  			// add the escape sequence as part of the pattern
  			_pattern = append(_pattern, _escape...)
  
  		// any other character, we add to the pattern
  		default:
  			_pattern = append(_pattern, _r)
  		}
  	}
  }
docs: // pattern returns all runes representing a file or path pattern, delimited
  // either by unescaped whitespace, a path separator '/' or enf of file. An
  // error is returned if a problem is encountered reading from the stream.