(source string, options *patternList)
| 182 | } |
| 183 | |
| 184 | func parsePattern(source string, options *patternList) (*pattern, error) { |
| 185 | tokens := tokenListFromPattern(source) |
| 186 | result, err := parseExpr(tokens, options) |
| 187 | if err != nil { |
| 188 | return nil, err |
| 189 | } |
| 190 | if tokens.current() != nil { |
| 191 | return nil, tokens.errorFunc("unexpected ending: %s" + strings.Join(tokens.tokens, " ")) |
| 192 | } |
| 193 | return newRequired(result...), nil |
| 194 | } |
| 195 | |
| 196 | func parseArgv(tokens *tokenList, options *patternList, optionsFirst bool) (patternList, error) { |
| 197 | /* |