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

Method next

conf/parse.go:33–44  ·  view source on GitHub ↗

next returns the next token.

()

Source from the content-addressed store, hash-verified

31
32// next returns the next token.
33func (p *parser) next() item {
34 if p.peekItem != nil {
35 itm := *p.peekItem
36 p.peekItem = nil
37 return itm
38 }
39 nxt := p.lex.nextSignificantItem()
40 if nxt.typ == itemError {
41 p.errorf("%s", nxt.val)
42 }
43 return nxt
44}
45
46func anyType(t itemType, allowed []itemType) bool {
47 for _, i := range allowed {

Callers 4

mustNextMethod · 0.95
collectMethod · 0.95
parseVariableMethod · 0.95
parseBlockMethod · 0.95

Calls 2

errorfMethod · 0.95
nextSignificantItemMethod · 0.80

Tested by

no test coverage detected