(source []string, err errorType)
| 485 | } |
| 486 | |
| 487 | func newTokenList(source []string, err errorType) *tokenList { |
| 488 | errorFunc := newError |
| 489 | if err == errorUser { |
| 490 | errorFunc = newUserError |
| 491 | } else if err == errorLanguage { |
| 492 | errorFunc = newLanguageError |
| 493 | } |
| 494 | return &tokenList{source, errorFunc, err} |
| 495 | } |
| 496 | |
| 497 | func tokenListFromString(source string) *tokenList { |
| 498 | return newTokenList(strings.Fields(source), errorUser) |
no outgoing calls
no test coverage detected