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

Method Next

parse_doc/argparse.go:62–80  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

60}
61
62func (l *usageLexer) Next() bool {
63 l.skipSpaces()
64 if !l.valid {
65 return false
66 }
67 switch l.curLine[0] {
68 case '{', '}', '|', '[', ']', ',':
69 l.cutToken(1, true)
70 return true
71 }
72
73 t := tokenRe.FindString(l.curLine)
74 if len(t) > 0 {
75 l.cutToken(len(t), false)
76 return true
77 }
78 l.abort(fmt.Errorf("cannot tokenize: %v", l.curLine))
79 return false
80}
81
82func (l *usageLexer) Token() string {
83 return l.curToken

Callers 4

ListCommandsMethod · 0.80
GetAllCompletionsMethod · 0.80
parseArgparseUsageFunction · 0.80

Calls 3

skipSpacesMethod · 0.95
cutTokenMethod · 0.95
abortMethod · 0.95

Tested by

no test coverage detected