MCPcopy Create free account
hub / github.com/docopt/docopt.go / newTokenList

Function newTokenList

docopt.go:487–495  ·  view source on GitHub ↗
(source []string, err errorType)

Source from the content-addressed store, hash-verified

485}
486
487func 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
497func tokenListFromString(source string) *tokenList {
498 return newTokenList(strings.Fields(source), errorUser)

Callers 3

parseFunction · 0.85
tokenListFromStringFunction · 0.85
tokenListFromPatternFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected