140
140
141
141
# the quoted variant is here to for backwards compatibility,
142
142
# and can be removed once we're sure it's no longer in use
143
- explicit_flag_key_unquoted = "flags" open_bracket escaped_key closed_bracket
144
- explicit_flag_key_quoted = "flags" open_bracket quoted_key closed_bracket
145
- explicit_flag_key = explicit_flag_key_unquoted / explicit_flag_key_quoted
146
- explicit_string_flag_key_unquoted = "flags" open_bracket escaped_key spaces comma spaces "string" closed_bracket
147
- explicit_string_flag_key_quoted = "flags" open_bracket quoted_key spaces comma spaces "string" closed_bracket
148
- explicit_string_flag_key = explicit_string_flag_key_unquoted / explicit_string_flag_key_quoted
149
- explicit_number_flag_key_unquoted = "flags" open_bracket escaped_key spaces comma spaces "number" closed_bracket
150
- explicit_number_flag_key_quoted = "flags" open_bracket quoted_key spaces comma spaces "number" closed_bracket
151
- explicit_number_flag_key = explicit_number_flag_key_unquoted / explicit_number_flag_key_quoted
143
+ explicit_flag_key = "flags" open_bracket escaped_key closed_bracket
144
+ explicit_string_flag_key = "flags" open_bracket escaped_key spaces comma spaces "string" closed_bracket
145
+ explicit_number_flag_key = "flags" open_bracket escaped_key spaces comma spaces "number" closed_bracket
152
146
153
147
explicit_tag_key = "tags" open_bracket escaped_key closed_bracket
154
148
explicit_string_tag_key = "tags" open_bracket escaped_key spaces comma spaces "string" closed_bracket
@@ -1408,19 +1402,7 @@ def visit_explicit_number_tag_key(
1408
1402
) -> SearchKey :
1409
1403
return SearchKey (f"tags[{ children [2 ]} ,number]" )
1410
1404
1411
- def visit_explicit_flag_key_unquoted (
1412
- self ,
1413
- node : Node ,
1414
- children : tuple [
1415
- Node , # "flags"
1416
- str , # [
1417
- str , # escaped_key
1418
- str , # ]
1419
- ],
1420
- ) -> SearchKey :
1421
- return SearchKey (f"flags[{ children [2 ]} ]" )
1422
-
1423
- def visit_explicit_flag_key_quoted (
1405
+ def visit_explicit_flag_key (
1424
1406
self ,
1425
1407
node : Node ,
1426
1408
children : tuple [
@@ -1432,30 +1414,7 @@ def visit_explicit_flag_key_quoted(
1432
1414
) -> SearchKey :
1433
1415
return SearchKey (f"flags[{ children [2 ]} ]" )
1434
1416
1435
- def visit_explicit_flag_key (
1436
- self ,
1437
- node : Node ,
1438
- children : tuple [SearchKey ],
1439
- ) -> SearchKey :
1440
- return children [0 ]
1441
-
1442
- def visit_explicit_string_flag_key_unquoted (
1443
- self ,
1444
- node : Node ,
1445
- children : tuple [
1446
- Node , # "flags"
1447
- str , # '['
1448
- str , # escaped_key
1449
- str , # ' '
1450
- Node , # ','
1451
- str , # ' '
1452
- Node , # "string"
1453
- str , # ']'
1454
- ],
1455
- ) -> SearchKey :
1456
- return SearchKey (f"flags[{ children [2 ]} ,string]" )
1457
-
1458
- def visit_explicit_string_flag_key_quoted (
1417
+ def visit_explicit_string_flag_key (
1459
1418
self ,
1460
1419
node : Node ,
1461
1420
children : tuple [
@@ -1471,30 +1430,7 @@ def visit_explicit_string_flag_key_quoted(
1471
1430
) -> SearchKey :
1472
1431
return SearchKey (f"flags[{ children [2 ]} ,string]" )
1473
1432
1474
- def visit_explicit_string_flag_key (
1475
- self ,
1476
- node : Node ,
1477
- children : tuple [SearchKey ],
1478
- ) -> SearchKey :
1479
- return children [0 ]
1480
-
1481
- def visit_explicit_number_flag_key_unquoted (
1482
- self ,
1483
- node : Node ,
1484
- children : tuple [
1485
- Node , # "flags"
1486
- str , # '['
1487
- str , # escaped_key
1488
- str , # ' '
1489
- Node , # ','
1490
- str , # ' '
1491
- Node , # "number"
1492
- str , # ']'
1493
- ],
1494
- ) -> SearchKey :
1495
- return SearchKey (f"flags[{ children [2 ]} ,number]" )
1496
-
1497
- def visit_explicit_number_flag_key_quoted (
1433
+ def visit_explicit_number_flag_key (
1498
1434
self ,
1499
1435
node : Node ,
1500
1436
children : tuple [
@@ -1510,13 +1446,6 @@ def visit_explicit_number_flag_key_quoted(
1510
1446
) -> SearchKey :
1511
1447
return SearchKey (f"flags[{ children [2 ]} ,number]" )
1512
1448
1513
- def visit_explicit_number_flag_key (
1514
- self ,
1515
- node : Node ,
1516
- children : tuple [SearchKey ],
1517
- ) -> SearchKey :
1518
- return children [0 ]
1519
-
1520
1449
def visit_aggregate_key (
1521
1450
self ,
1522
1451
node : Node ,
0 commit comments