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

Method mustNext

conf/parse.go:55–61  ·  view source on GitHub ↗
(allowed ...itemType)

Source from the content-addressed store, hash-verified

53}
54
55func (p *parser) mustNext(allowed ...itemType) item {
56 nxt := p.next()
57 if !anyType(nxt.typ, allowed) {
58 p.errorf("invalid syntax")
59 }
60 return nxt
61}
62
63// peek returns but does not consume the next token.
64func (p *parser) peek() item {

Callers 1

parseBlockMethod · 0.95

Calls 3

nextMethod · 0.95
errorfMethod · 0.95
anyTypeFunction · 0.85

Tested by

no test coverage detected