grammars: uniform use of int for min & max

This commit is contained in:
Olivier Chafik 2024-04-12 16:47:44 +01:00
parent 9d9b5a34f6
commit 6b5518c9da

View file

@ -153,7 +153,7 @@ namespace grammar_parser {
size_t last_sym_start = out_elements.size(); size_t last_sym_start = out_elements.size();
const char * pos = src; const char * pos = src;
auto handle_repetitions = [&](size_t min_times, int max_times) { auto handle_repetitions = [&](int min_times, int max_times) {
if (last_sym_start == out_elements.size()) { if (last_sym_start == out_elements.size()) {
throw std::runtime_error(std::string("expecting preceding item to */+/?/{ at ") + pos); throw std::runtime_error(std::string("expecting preceding item to */+/?/{ at ") + pos);