| 25492 | } |
| 25493 | |
| 25494 | func (p *parser) incChoiceAltCnt(ch *choiceExpr, altI int) { |
| 25495 | choiceIdent := fmt.Sprintf("%s %d:%d", p.rstack[len(p.rstack)-1].name, ch.pos.line, ch.pos.col) |
| 25496 | m := p.ChoiceAltCnt[choiceIdent] |
| 25497 | if m == nil { |
| 25498 | m = make(map[string]int) |
| 25499 | p.ChoiceAltCnt[choiceIdent] = m |
| 25500 | } |
| 25501 | // We increment altI by 1, so the keys do not start at 0 |
| 25502 | alt := strconv.Itoa(altI + 1) |
| 25503 | if altI == choiceNoMatch { |
| 25504 | alt = p.choiceNoMatch |
| 25505 | } |
| 25506 | m[alt]++ |
| 25507 | } |
| 25508 | |
| 25509 | func (p *parser) parseChoiceExpr(ch *choiceExpr) (any, bool) { |
| 25510 | if p.debug { |