MCPcopy
hub / github.com/cortesi/modd / collect

Method collect

conf/parse.go:72–83  ·  view source on GitHub ↗
(types ...itemType)

Source from the content-addressed store, hash-verified

70}
71
72func (p *parser) collect(types ...itemType) []item {
73 itms := []item{}
74 for {
75 nxt := p.peek()
76 if anyType(nxt.typ, types) {
77 itms = append(itms, p.next())
78 } else {
79 break
80 }
81 }
82 return itms
83}
84
85func (p *parser) collectValues(types ...itemType) []string {
86 items := p.collect(types...)

Callers 2

collectValuesMethod · 0.95
collectPatternsMethod · 0.95

Calls 3

peekMethod · 0.95
nextMethod · 0.95
anyTypeFunction · 0.85

Tested by

no test coverage detected