MCPcopy Create free account
hub / github.com/aptly-dev/aptly / ArchCondition

Method ArchCondition

query/syntax.go:208–226  ·  view source on GitHub ↗

arch_condition := '{' arch '}' |

()

Source from the content-addressed store, hash-verified

206
207// arch_condition := '{' arch '}' |
208func (p *parser) ArchCondition() (arch string) {
209 if p.input.Current().typ != itemLeftCurly {
210 return
211 }
212 p.input.Consume()
213
214 if p.input.Current().typ != itemString {
215 panic(fmt.Sprintf("unexpected token %s: expecting architecture", p.input.Current()))
216 }
217 arch = p.input.Current().val
218 p.input.Consume()
219
220 if p.input.Current().typ != itemRightCurly {
221 panic(fmt.Sprintf("unexpected token %s: expecting '}'", p.input.Current()))
222 }
223 p.input.Consume()
224
225 return
226}

Callers 1

DMethod · 0.95

Calls 2

CurrentMethod · 0.80
ConsumeMethod · 0.80

Tested by

no test coverage detected