arch_condition := '{' arch '}' |
()
| 206 | |
| 207 | // arch_condition := '{' arch '}' | |
| 208 | func (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 | } |