()
| 444 | } |
| 445 | |
| 446 | func (m *FilterQLParser) parseLimit() (int, error) { |
| 447 | if m.Cur().T != lex.TokenLimit { |
| 448 | return 0, nil |
| 449 | } |
| 450 | m.Next() |
| 451 | if m.Cur().T != lex.TokenInteger { |
| 452 | return 0, fmt.Errorf("Limit must be an integer %v", m.Cur()) |
| 453 | } |
| 454 | iv, err := strconv.Atoi(m.Next().V) |
| 455 | if err != nil { |
| 456 | return 0, fmt.Errorf("Could not convert limit to integer %v", m.Cur().V) |
| 457 | } |
| 458 | |
| 459 | return int(iv), nil |
| 460 | } |
| 461 | |
| 462 | func (m *FilterQLParser) parseAlias() (string, error) { |
| 463 | if m.Cur().T != lex.TokenAlias { |
no test coverage detected