|
112 | 112 | text_key = explicit_tag_key / search_key |
113 | 113 | text_value = quoted_value / in_value |
114 | 114 | quoted_value = ~r"\"((?:\\\"|[^\"])*)?\""s |
115 | | -numeric_in_list = open_bracket numeric_value (comma spaces numeric_value)* closed_bracket |
116 | | -text_in_list = open_bracket text_value (comma spaces text_value)* closed_bracket |
| 115 | +numeric_in_list = open_bracket numeric_value (spaces comma spaces numeric_value)* closed_bracket |
| 116 | +text_in_list = open_bracket text_value (spaces comma spaces text_value)* closed_bracket |
117 | 117 |
|
118 | 118 | # Formats |
119 | 119 | iso_8601_date_format = ~r"(\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{1,6})?)?(Z|([+-]\d{2}:\d{2}))?)(?=\s|\)|$)" |
@@ -407,7 +407,7 @@ def visit_boolean_filter(self, node, children): |
407 | 407 | def process_list(self, first, remaining): |
408 | 408 | return [ |
409 | 409 | first, |
410 | | - *[item[2] for item in remaining], |
| 410 | + *[item[3] for item in remaining], |
411 | 411 | ] |
412 | 412 |
|
413 | 413 | def visit_numeric_filter(self, node, children): |
@@ -622,9 +622,7 @@ def visit_text_filter(self, node, children): |
622 | 622 | def visit_text_in_filter(self, node, children): |
623 | 623 | (negation, search_key, _, search_value) = children |
624 | 624 | operator = "IN" |
625 | | - search_value = SearchValue( |
626 | | - self.process_list(search_value[1], [(_, _, val) for _, _, val in search_value[2]]) |
627 | | - ) |
| 625 | + search_value = SearchValue(self.process_list(search_value[1], search_value[2])) |
628 | 626 |
|
629 | 627 | operator = self.handle_negation(negation, operator) |
630 | 628 |
|
@@ -683,10 +681,7 @@ def visit_aggregate_key(self, node, children): |
683 | 681 | return AggregateKey(self.key_mappings_lookup.get(key, key)) |
684 | 682 |
|
685 | 683 | def visit_function_args(self, node, children): |
686 | | - args = [children[0]] |
687 | | - args.extend(v[3] for v in children[1]) |
688 | | - |
689 | | - return args |
| 684 | + return self.process_list(children[0], children[1]) |
690 | 685 |
|
691 | 686 | def visit_search_value(self, node, children): |
692 | 687 | return SearchValue(children[0]) |
|
0 commit comments