MCPcopy Index your code
hub / github.com/perkeep/perkeep / parseGroup

Method parseGroup

pkg/search/expr.go:153–171  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

151}
152
153func (p *parser) parseGroup() (c *Constraint, err error) {
154 i := p.next()
155 switch i.typ {
156 case tokenOpen:
157 c, err = p.parseExp()
158 if err != nil {
159 return
160 }
161 if p.peek().typ == tokenClose {
162 p.next()
163 return
164 } else {
165 err = newParseExpError(noMatchingClosing, *i)
166 return
167 }
168 }
169 err = newParseExpError("internal: do not call parseGroup when not on a '('", *i)
170 return
171}
172
173func (p *parser) parseOrRHS(lhs *Constraint) (c *Constraint, err error) {
174 var rhs *Constraint

Callers 2

parseOperandMethod · 0.95
TestParseGroupFunction · 0.80

Calls 4

nextMethod · 0.95
parseExpMethod · 0.95
peekMethod · 0.95
newParseExpErrorFunction · 0.85

Tested by 1

TestParseGroupFunction · 0.64