MCPcopy Create free account
hub / github.com/dim-an/cod / makeUsageLexer

Function makeUsageLexer

parse_doc/argparse.go:35–43  ·  view source on GitHub ↗
(usage []string)

Source from the content-addressed store, hash-verified

33}
34
35func makeUsageLexer(usage []string) usageLexer {
36 cur := strings.SplitAfterN(usage[0], "usage:", 2)[1]
37 res := usageLexer{
38 curLine: cur,
39 restLines: usage[1:],
40 valid: true,
41 }
42 return res
43}
44
45var tokenRe = regexp.MustCompile("^[-_/.a-zA-Z0-9]+")
46

Callers 1

ParseMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected