C := '(' Query ')' | D
()
| 74 | |
| 75 | // C := '(' Query ')' | D |
| 76 | func (p *parser) C() deb.PackageQuery { |
| 77 | if p.input.Current().typ == itemLeftParen { |
| 78 | p.input.Consume() |
| 79 | q := p.Query() |
| 80 | if p.input.Current().typ != itemRightParen { |
| 81 | panic(fmt.Sprintf("unexpected token %s: expecting ')'", p.input.Current())) |
| 82 | } |
| 83 | p.input.Consume() |
| 84 | return q |
| 85 | } |
| 86 | return p.D() |
| 87 | } |
| 88 | |
| 89 | func operatorToRelation(operator itemType) int { |
| 90 | switch operator { |