()
| 322 | } |
| 323 | |
| 324 | func (t *parser) keyIndex() (int, error) { |
| 325 | // First, get the key. |
| 326 | stop := runeSet([]rune{']'}) |
| 327 | v, _, err := runesUntil(t.sc, stop) |
| 328 | if err != nil { |
| 329 | return 0, err |
| 330 | } |
| 331 | // v should be the index |
| 332 | return strconv.Atoi(string(v)) |
| 333 | |
| 334 | } |
| 335 | |
| 336 | func (t *parser) listItem(list []any, i, nestedNameLevel int) ([]any, error) { |
| 337 | if i < 0 { |
no test coverage detected