multilingualprogramming 0.2.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. multilingualprogramming/__init__.py +74 -0
  2. multilingualprogramming/__main__.py +194 -0
  3. multilingualprogramming/codegen/__init__.py +12 -0
  4. multilingualprogramming/codegen/executor.py +215 -0
  5. multilingualprogramming/codegen/python_generator.py +592 -0
  6. multilingualprogramming/codegen/repl.py +489 -0
  7. multilingualprogramming/codegen/runtime_builtins.py +308 -0
  8. multilingualprogramming/core/__init__.py +12 -0
  9. multilingualprogramming/core/ir.py +29 -0
  10. multilingualprogramming/core/lowering.py +24 -0
  11. multilingualprogramming/datetime/__init__.py +11 -0
  12. multilingualprogramming/datetime/date_parser.py +190 -0
  13. multilingualprogramming/datetime/mp_date.py +210 -0
  14. multilingualprogramming/datetime/mp_datetime.py +153 -0
  15. multilingualprogramming/datetime/mp_time.py +147 -0
  16. multilingualprogramming/datetime/resource_loader.py +18 -0
  17. multilingualprogramming/exceptions.py +158 -0
  18. multilingualprogramming/imports.py +150 -0
  19. multilingualprogramming/keyword/__init__.py +13 -0
  20. multilingualprogramming/keyword/keyword_registry.py +249 -0
  21. multilingualprogramming/keyword/keyword_validator.py +59 -0
  22. multilingualprogramming/keyword/language_pack_validator.py +110 -0
  23. multilingualprogramming/lexer/__init__.py +11 -0
  24. multilingualprogramming/lexer/lexer.py +570 -0
  25. multilingualprogramming/lexer/source_reader.py +91 -0
  26. multilingualprogramming/lexer/token.py +54 -0
  27. multilingualprogramming/lexer/token_types.py +38 -0
  28. multilingualprogramming/numeral/__init__.py +11 -0
  29. multilingualprogramming/numeral/abstract_numeral.py +232 -0
  30. multilingualprogramming/numeral/complex_numeral.py +190 -0
  31. multilingualprogramming/numeral/fraction_numeral.py +165 -0
  32. multilingualprogramming/numeral/mp_numeral.py +243 -0
  33. multilingualprogramming/numeral/numeral_converter.py +151 -0
  34. multilingualprogramming/numeral/roman_numeral.py +301 -0
  35. multilingualprogramming/numeral/unicode_numeral.py +292 -0
  36. multilingualprogramming/parser/__init__.py +28 -0
  37. multilingualprogramming/parser/ast_nodes.py +459 -0
  38. multilingualprogramming/parser/ast_printer.py +677 -0
  39. multilingualprogramming/parser/error_messages.py +75 -0
  40. multilingualprogramming/parser/parser.py +1796 -0
  41. multilingualprogramming/parser/semantic_analyzer.py +689 -0
  42. multilingualprogramming/parser/surface_normalizer.py +282 -0
  43. multilingualprogramming/resources/datetime/eras.json +23 -0
  44. multilingualprogramming/resources/datetime/formats.json +32 -0
  45. multilingualprogramming/resources/datetime/months.json +150 -0
  46. multilingualprogramming/resources/datetime/weekdays.json +90 -0
  47. multilingualprogramming/resources/parser/error_messages.json +310 -0
  48. multilingualprogramming/resources/repl/commands.json +636 -0
  49. multilingualprogramming/resources/usm/builtins_aliases.json +731 -0
  50. multilingualprogramming/resources/usm/keywords.json +1063 -0
  51. multilingualprogramming/resources/usm/operators.json +532 -0
  52. multilingualprogramming/resources/usm/schema.json +34 -0
  53. multilingualprogramming/resources/usm/surface_patterns.json +1523 -0
  54. multilingualprogramming/unicode_string.py +140 -0
  55. multilingualprogramming/version.py +9 -0
  56. multilingualprogramming-0.2.0.dist-info/METADATA +350 -0
  57. multilingualprogramming-0.2.0.dist-info/RECORD +61 -0
  58. multilingualprogramming-0.2.0.dist-info/WHEEL +5 -0
  59. multilingualprogramming-0.2.0.dist-info/entry_points.txt +3 -0
  60. multilingualprogramming-0.2.0.dist-info/licenses/LICENSE +674 -0
  61. multilingualprogramming-0.2.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,1523 @@
1
+ {
2
+ "version": "1.0",
3
+ "description": "Declarative surface syntax normalization patterns",
4
+ "templates": {
5
+ "for_iterable_first": [
6
+ {
7
+ "kind": "keyword",
8
+ "concept": "LOOP_FOR"
9
+ },
10
+ {
11
+ "kind": "identifier_slot",
12
+ "slot": "target"
13
+ },
14
+ {
15
+ "kind": "keyword",
16
+ "concept": "IN"
17
+ },
18
+ {
19
+ "kind": "expr_slot",
20
+ "slot": "iterable"
21
+ },
22
+ {
23
+ "kind": "delimiter",
24
+ "value": ":"
25
+ }
26
+ ],
27
+ "while_condition_first": [
28
+ {
29
+ "kind": "keyword",
30
+ "concept": "LOOP_WHILE"
31
+ },
32
+ {
33
+ "kind": "expr_slot",
34
+ "slot": "condition"
35
+ },
36
+ {
37
+ "kind": "delimiter",
38
+ "value": ":"
39
+ }
40
+ ],
41
+ "if_condition_first": [
42
+ {
43
+ "kind": "keyword",
44
+ "concept": "COND_IF"
45
+ },
46
+ {
47
+ "kind": "expr_slot",
48
+ "slot": "condition"
49
+ },
50
+ {
51
+ "kind": "delimiter",
52
+ "value": ":"
53
+ }
54
+ ],
55
+ "with_expr_first": [
56
+ {
57
+ "kind": "keyword",
58
+ "concept": "WITH"
59
+ },
60
+ {
61
+ "kind": "expr_slot",
62
+ "slot": "context"
63
+ },
64
+ {
65
+ "kind": "delimiter",
66
+ "value": ":"
67
+ }
68
+ ]
69
+ },
70
+ "patterns": [
71
+ {
72
+ "name": "ja_for_iterable_first",
73
+ "language": "ja",
74
+ "normalize_template": "for_iterable_first",
75
+ "pattern": [
76
+ {
77
+ "kind": "expr",
78
+ "slot": "iterable"
79
+ },
80
+ {
81
+ "kind": "literal",
82
+ "value": "内の"
83
+ },
84
+ {
85
+ "kind": "literal",
86
+ "value": "各"
87
+ },
88
+ {
89
+ "kind": "identifier",
90
+ "slot": "target"
91
+ },
92
+ {
93
+ "kind": "literal",
94
+ "value": "に対して"
95
+ },
96
+ {
97
+ "kind": "delimiter",
98
+ "value": ":"
99
+ }
100
+ ]
101
+ },
102
+ {
103
+ "name": "ar_for_iterable_first",
104
+ "language": "ar",
105
+ "normalize_template": "for_iterable_first",
106
+ "pattern": [
107
+ {
108
+ "kind": "expr",
109
+ "slot": "iterable"
110
+ },
111
+ {
112
+ "kind": "literal",
113
+ "value": "ضمن"
114
+ },
115
+ {
116
+ "kind": "keyword",
117
+ "concept": "LOOP_FOR"
118
+ },
119
+ {
120
+ "kind": "identifier",
121
+ "slot": "target"
122
+ },
123
+ {
124
+ "kind": "delimiter",
125
+ "value": ":"
126
+ }
127
+ ]
128
+ },
129
+ {
130
+ "name": "es_for_iterable_first",
131
+ "language": "es",
132
+ "normalize_template": "for_iterable_first",
133
+ "pattern": [
134
+ {
135
+ "kind": "expr",
136
+ "slot": "iterable"
137
+ },
138
+ {
139
+ "kind": "keyword",
140
+ "concept": "LOOP_FOR"
141
+ },
142
+ {
143
+ "kind": "identifier",
144
+ "slot": "target"
145
+ },
146
+ {
147
+ "kind": "delimiter",
148
+ "value": ":"
149
+ }
150
+ ]
151
+ },
152
+ {
153
+ "name": "pt_for_iterable_first",
154
+ "language": "pt",
155
+ "normalize_template": "for_iterable_first",
156
+ "pattern": [
157
+ {
158
+ "kind": "expr",
159
+ "slot": "iterable"
160
+ },
161
+ {
162
+ "kind": "keyword",
163
+ "concept": "LOOP_FOR"
164
+ },
165
+ {
166
+ "kind": "identifier",
167
+ "slot": "target"
168
+ },
169
+ {
170
+ "kind": "delimiter",
171
+ "value": ":"
172
+ }
173
+ ]
174
+ },
175
+ {
176
+ "name": "ja_while_condition_first",
177
+ "language": "ja",
178
+ "normalize_template": "while_condition_first",
179
+ "pattern": [
180
+ {
181
+ "kind": "expr",
182
+ "slot": "condition"
183
+ },
184
+ {
185
+ "kind": "keyword",
186
+ "concept": "LOOP_WHILE"
187
+ },
188
+ {
189
+ "kind": "delimiter",
190
+ "value": ":"
191
+ }
192
+ ]
193
+ },
194
+ {
195
+ "name": "ar_while_condition_first",
196
+ "language": "ar",
197
+ "normalize_template": "while_condition_first",
198
+ "pattern": [
199
+ {
200
+ "kind": "expr",
201
+ "slot": "condition"
202
+ },
203
+ {
204
+ "kind": "keyword",
205
+ "concept": "LOOP_WHILE"
206
+ },
207
+ {
208
+ "kind": "delimiter",
209
+ "value": ":"
210
+ }
211
+ ]
212
+ },
213
+ {
214
+ "name": "ja_if_condition_first",
215
+ "language": "ja",
216
+ "normalize_template": "if_condition_first",
217
+ "pattern": [
218
+ {
219
+ "kind": "expr",
220
+ "slot": "condition"
221
+ },
222
+ {
223
+ "kind": "keyword",
224
+ "concept": "COND_IF"
225
+ },
226
+ {
227
+ "kind": "delimiter",
228
+ "value": ":"
229
+ }
230
+ ]
231
+ },
232
+ {
233
+ "name": "ar_if_condition_first",
234
+ "language": "ar",
235
+ "normalize_template": "if_condition_first",
236
+ "pattern": [
237
+ {
238
+ "kind": "expr",
239
+ "slot": "condition"
240
+ },
241
+ {
242
+ "kind": "keyword",
243
+ "concept": "COND_IF"
244
+ },
245
+ {
246
+ "kind": "delimiter",
247
+ "value": ":"
248
+ }
249
+ ]
250
+ },
251
+ {
252
+ "name": "ja_with_expr_first",
253
+ "language": "ja",
254
+ "normalize_template": "with_expr_first",
255
+ "pattern": [
256
+ {
257
+ "kind": "expr",
258
+ "slot": "context"
259
+ },
260
+ {
261
+ "kind": "keyword",
262
+ "concept": "WITH"
263
+ },
264
+ {
265
+ "kind": "delimiter",
266
+ "value": ":"
267
+ }
268
+ ]
269
+ },
270
+ {
271
+ "name": "ar_with_expr_first",
272
+ "language": "ar",
273
+ "normalize_template": "with_expr_first",
274
+ "pattern": [
275
+ {
276
+ "kind": "expr",
277
+ "slot": "context"
278
+ },
279
+ {
280
+ "kind": "keyword",
281
+ "concept": "WITH"
282
+ },
283
+ {
284
+ "kind": "delimiter",
285
+ "value": ":"
286
+ }
287
+ ]
288
+ },
289
+ {
290
+ "name": "hi_for_iterable_first",
291
+ "language": "hi",
292
+ "normalize_template": "for_iterable_first",
293
+ "pattern": [
294
+ {
295
+ "kind": "expr",
296
+ "slot": "iterable"
297
+ },
298
+ {
299
+ "kind": "keyword",
300
+ "concept": "IN"
301
+ },
302
+ {
303
+ "kind": "identifier",
304
+ "slot": "target"
305
+ },
306
+ {
307
+ "kind": "keyword",
308
+ "concept": "LOOP_FOR"
309
+ },
310
+ {
311
+ "kind": "delimiter",
312
+ "value": ":"
313
+ }
314
+ ]
315
+ },
316
+ {
317
+ "name": "hi_while_condition_first",
318
+ "language": "hi",
319
+ "normalize_template": "while_condition_first",
320
+ "pattern": [
321
+ {
322
+ "kind": "expr",
323
+ "slot": "condition"
324
+ },
325
+ {
326
+ "kind": "keyword",
327
+ "concept": "LOOP_WHILE"
328
+ },
329
+ {
330
+ "kind": "delimiter",
331
+ "value": ":"
332
+ }
333
+ ]
334
+ },
335
+ {
336
+ "name": "hi_if_condition_first",
337
+ "language": "hi",
338
+ "normalize_template": "if_condition_first",
339
+ "pattern": [
340
+ {
341
+ "kind": "expr",
342
+ "slot": "condition"
343
+ },
344
+ {
345
+ "kind": "keyword",
346
+ "concept": "COND_IF"
347
+ },
348
+ {
349
+ "kind": "delimiter",
350
+ "value": ":"
351
+ }
352
+ ]
353
+ },
354
+ {
355
+ "name": "hi_with_expr_first",
356
+ "language": "hi",
357
+ "normalize_template": "with_expr_first",
358
+ "pattern": [
359
+ {
360
+ "kind": "expr",
361
+ "slot": "context"
362
+ },
363
+ {
364
+ "kind": "keyword",
365
+ "concept": "WITH"
366
+ },
367
+ {
368
+ "kind": "delimiter",
369
+ "value": ":"
370
+ }
371
+ ]
372
+ },
373
+ {
374
+ "name": "bn_for_iterable_first",
375
+ "language": "bn",
376
+ "normalize_template": "for_iterable_first",
377
+ "pattern": [
378
+ {
379
+ "kind": "expr",
380
+ "slot": "iterable"
381
+ },
382
+ {
383
+ "kind": "keyword",
384
+ "concept": "IN"
385
+ },
386
+ {
387
+ "kind": "identifier",
388
+ "slot": "target"
389
+ },
390
+ {
391
+ "kind": "keyword",
392
+ "concept": "LOOP_FOR"
393
+ },
394
+ {
395
+ "kind": "delimiter",
396
+ "value": ":"
397
+ }
398
+ ]
399
+ },
400
+ {
401
+ "name": "bn_while_condition_first",
402
+ "language": "bn",
403
+ "normalize_template": "while_condition_first",
404
+ "pattern": [
405
+ {
406
+ "kind": "expr",
407
+ "slot": "condition"
408
+ },
409
+ {
410
+ "kind": "keyword",
411
+ "concept": "LOOP_WHILE"
412
+ },
413
+ {
414
+ "kind": "delimiter",
415
+ "value": ":"
416
+ }
417
+ ]
418
+ },
419
+ {
420
+ "name": "bn_if_condition_first",
421
+ "language": "bn",
422
+ "normalize_template": "if_condition_first",
423
+ "pattern": [
424
+ {
425
+ "kind": "expr",
426
+ "slot": "condition"
427
+ },
428
+ {
429
+ "kind": "keyword",
430
+ "concept": "COND_IF"
431
+ },
432
+ {
433
+ "kind": "delimiter",
434
+ "value": ":"
435
+ }
436
+ ]
437
+ },
438
+ {
439
+ "name": "bn_with_expr_first",
440
+ "language": "bn",
441
+ "normalize_template": "with_expr_first",
442
+ "pattern": [
443
+ {
444
+ "kind": "expr",
445
+ "slot": "context"
446
+ },
447
+ {
448
+ "kind": "keyword",
449
+ "concept": "WITH"
450
+ },
451
+ {
452
+ "kind": "delimiter",
453
+ "value": ":"
454
+ }
455
+ ]
456
+ },
457
+ {
458
+ "name": "ta_for_iterable_first",
459
+ "language": "ta",
460
+ "normalize_template": "for_iterable_first",
461
+ "pattern": [
462
+ {
463
+ "kind": "expr",
464
+ "slot": "iterable"
465
+ },
466
+ {
467
+ "kind": "keyword",
468
+ "concept": "IN"
469
+ },
470
+ {
471
+ "kind": "identifier",
472
+ "slot": "target"
473
+ },
474
+ {
475
+ "kind": "keyword",
476
+ "concept": "LOOP_FOR"
477
+ },
478
+ {
479
+ "kind": "delimiter",
480
+ "value": ":"
481
+ }
482
+ ]
483
+ },
484
+ {
485
+ "name": "ta_while_condition_first",
486
+ "language": "ta",
487
+ "normalize_template": "while_condition_first",
488
+ "pattern": [
489
+ {
490
+ "kind": "expr",
491
+ "slot": "condition"
492
+ },
493
+ {
494
+ "kind": "keyword",
495
+ "concept": "LOOP_WHILE"
496
+ },
497
+ {
498
+ "kind": "delimiter",
499
+ "value": ":"
500
+ }
501
+ ]
502
+ },
503
+ {
504
+ "name": "ta_if_condition_first",
505
+ "language": "ta",
506
+ "normalize_template": "if_condition_first",
507
+ "pattern": [
508
+ {
509
+ "kind": "expr",
510
+ "slot": "condition"
511
+ },
512
+ {
513
+ "kind": "keyword",
514
+ "concept": "COND_IF"
515
+ },
516
+ {
517
+ "kind": "delimiter",
518
+ "value": ":"
519
+ }
520
+ ]
521
+ },
522
+ {
523
+ "name": "ta_with_expr_first",
524
+ "language": "ta",
525
+ "normalize_template": "with_expr_first",
526
+ "pattern": [
527
+ {
528
+ "kind": "expr",
529
+ "slot": "context"
530
+ },
531
+ {
532
+ "kind": "keyword",
533
+ "concept": "WITH"
534
+ },
535
+ {
536
+ "kind": "delimiter",
537
+ "value": ":"
538
+ }
539
+ ]
540
+ },
541
+ {
542
+ "name": "fr_for_iterable_first",
543
+ "language": "fr",
544
+ "normalize_template": "for_iterable_first",
545
+ "pattern": [
546
+ {
547
+ "kind": "keyword",
548
+ "concept": "LOOP_FOR"
549
+ },
550
+ {
551
+ "kind": "identifier",
552
+ "slot": "target"
553
+ },
554
+ {
555
+ "kind": "keyword",
556
+ "concept": "IN"
557
+ },
558
+ {
559
+ "kind": "expr",
560
+ "slot": "iterable"
561
+ },
562
+ {
563
+ "kind": "delimiter",
564
+ "value": ":"
565
+ }
566
+ ]
567
+ },
568
+ {
569
+ "name": "fr_while_condition_first",
570
+ "language": "fr",
571
+ "normalize_template": "while_condition_first",
572
+ "pattern": [
573
+ {
574
+ "kind": "keyword",
575
+ "concept": "LOOP_WHILE"
576
+ },
577
+ {
578
+ "kind": "expr",
579
+ "slot": "condition"
580
+ },
581
+ {
582
+ "kind": "delimiter",
583
+ "value": ":"
584
+ }
585
+ ]
586
+ },
587
+ {
588
+ "name": "fr_if_condition_first",
589
+ "language": "fr",
590
+ "normalize_template": "if_condition_first",
591
+ "pattern": [
592
+ {
593
+ "kind": "keyword",
594
+ "concept": "COND_IF"
595
+ },
596
+ {
597
+ "kind": "expr",
598
+ "slot": "condition"
599
+ },
600
+ {
601
+ "kind": "delimiter",
602
+ "value": ":"
603
+ }
604
+ ]
605
+ },
606
+ {
607
+ "name": "fr_with_expr_first",
608
+ "language": "fr",
609
+ "normalize_template": "with_expr_first",
610
+ "pattern": [
611
+ {
612
+ "kind": "keyword",
613
+ "concept": "WITH"
614
+ },
615
+ {
616
+ "kind": "expr",
617
+ "slot": "context"
618
+ },
619
+ {
620
+ "kind": "delimiter",
621
+ "value": ":"
622
+ }
623
+ ]
624
+ },
625
+ {
626
+ "name": "es_while_condition_first",
627
+ "language": "es",
628
+ "normalize_template": "while_condition_first",
629
+ "pattern": [
630
+ {
631
+ "kind": "keyword",
632
+ "concept": "LOOP_WHILE"
633
+ },
634
+ {
635
+ "kind": "expr",
636
+ "slot": "condition"
637
+ },
638
+ {
639
+ "kind": "delimiter",
640
+ "value": ":"
641
+ }
642
+ ]
643
+ },
644
+ {
645
+ "name": "es_if_condition_first",
646
+ "language": "es",
647
+ "normalize_template": "if_condition_first",
648
+ "pattern": [
649
+ {
650
+ "kind": "keyword",
651
+ "concept": "COND_IF"
652
+ },
653
+ {
654
+ "kind": "expr",
655
+ "slot": "condition"
656
+ },
657
+ {
658
+ "kind": "delimiter",
659
+ "value": ":"
660
+ }
661
+ ]
662
+ },
663
+ {
664
+ "name": "es_with_expr_first",
665
+ "language": "es",
666
+ "normalize_template": "with_expr_first",
667
+ "pattern": [
668
+ {
669
+ "kind": "keyword",
670
+ "concept": "WITH"
671
+ },
672
+ {
673
+ "kind": "expr",
674
+ "slot": "context"
675
+ },
676
+ {
677
+ "kind": "delimiter",
678
+ "value": ":"
679
+ }
680
+ ]
681
+ },
682
+ {
683
+ "name": "da_for_iterable_first",
684
+ "language": "da",
685
+ "normalize_template": "for_iterable_first",
686
+ "pattern": [
687
+ {
688
+ "kind": "keyword",
689
+ "concept": "LOOP_FOR"
690
+ },
691
+ {
692
+ "kind": "identifier",
693
+ "slot": "target"
694
+ },
695
+ {
696
+ "kind": "keyword",
697
+ "concept": "IN"
698
+ },
699
+ {
700
+ "kind": "expr",
701
+ "slot": "iterable"
702
+ },
703
+ {
704
+ "kind": "delimiter",
705
+ "value": ":"
706
+ }
707
+ ]
708
+ },
709
+ {
710
+ "name": "da_while_condition_first",
711
+ "language": "da",
712
+ "normalize_template": "while_condition_first",
713
+ "pattern": [
714
+ {
715
+ "kind": "keyword",
716
+ "concept": "LOOP_WHILE"
717
+ },
718
+ {
719
+ "kind": "expr",
720
+ "slot": "condition"
721
+ },
722
+ {
723
+ "kind": "delimiter",
724
+ "value": ":"
725
+ }
726
+ ]
727
+ },
728
+ {
729
+ "name": "da_if_condition_first",
730
+ "language": "da",
731
+ "normalize_template": "if_condition_first",
732
+ "pattern": [
733
+ {
734
+ "kind": "keyword",
735
+ "concept": "COND_IF"
736
+ },
737
+ {
738
+ "kind": "expr",
739
+ "slot": "condition"
740
+ },
741
+ {
742
+ "kind": "delimiter",
743
+ "value": ":"
744
+ }
745
+ ]
746
+ },
747
+ {
748
+ "name": "da_with_expr_first",
749
+ "language": "da",
750
+ "normalize_template": "with_expr_first",
751
+ "pattern": [
752
+ {
753
+ "kind": "keyword",
754
+ "concept": "WITH"
755
+ },
756
+ {
757
+ "kind": "expr",
758
+ "slot": "context"
759
+ },
760
+ {
761
+ "kind": "delimiter",
762
+ "value": ":"
763
+ }
764
+ ]
765
+ },
766
+ {
767
+ "name": "de_for_iterable_first",
768
+ "language": "de",
769
+ "normalize_template": "for_iterable_first",
770
+ "pattern": [
771
+ {
772
+ "kind": "keyword",
773
+ "concept": "LOOP_FOR"
774
+ },
775
+ {
776
+ "kind": "identifier",
777
+ "slot": "target"
778
+ },
779
+ {
780
+ "kind": "keyword",
781
+ "concept": "IN"
782
+ },
783
+ {
784
+ "kind": "expr",
785
+ "slot": "iterable"
786
+ },
787
+ {
788
+ "kind": "delimiter",
789
+ "value": ":"
790
+ }
791
+ ]
792
+ },
793
+ {
794
+ "name": "de_while_condition_first",
795
+ "language": "de",
796
+ "normalize_template": "while_condition_first",
797
+ "pattern": [
798
+ {
799
+ "kind": "keyword",
800
+ "concept": "LOOP_WHILE"
801
+ },
802
+ {
803
+ "kind": "expr",
804
+ "slot": "condition"
805
+ },
806
+ {
807
+ "kind": "delimiter",
808
+ "value": ":"
809
+ }
810
+ ]
811
+ },
812
+ {
813
+ "name": "de_if_condition_first",
814
+ "language": "de",
815
+ "normalize_template": "if_condition_first",
816
+ "pattern": [
817
+ {
818
+ "kind": "keyword",
819
+ "concept": "COND_IF"
820
+ },
821
+ {
822
+ "kind": "expr",
823
+ "slot": "condition"
824
+ },
825
+ {
826
+ "kind": "delimiter",
827
+ "value": ":"
828
+ }
829
+ ]
830
+ },
831
+ {
832
+ "name": "de_with_expr_first",
833
+ "language": "de",
834
+ "normalize_template": "with_expr_first",
835
+ "pattern": [
836
+ {
837
+ "kind": "keyword",
838
+ "concept": "WITH"
839
+ },
840
+ {
841
+ "kind": "expr",
842
+ "slot": "context"
843
+ },
844
+ {
845
+ "kind": "delimiter",
846
+ "value": ":"
847
+ }
848
+ ]
849
+ },
850
+ {
851
+ "name": "en_for_iterable_first",
852
+ "language": "en",
853
+ "normalize_template": "for_iterable_first",
854
+ "pattern": [
855
+ {
856
+ "kind": "keyword",
857
+ "concept": "LOOP_FOR"
858
+ },
859
+ {
860
+ "kind": "identifier",
861
+ "slot": "target"
862
+ },
863
+ {
864
+ "kind": "keyword",
865
+ "concept": "IN"
866
+ },
867
+ {
868
+ "kind": "expr",
869
+ "slot": "iterable"
870
+ },
871
+ {
872
+ "kind": "delimiter",
873
+ "value": ":"
874
+ }
875
+ ]
876
+ },
877
+ {
878
+ "name": "en_while_condition_first",
879
+ "language": "en",
880
+ "normalize_template": "while_condition_first",
881
+ "pattern": [
882
+ {
883
+ "kind": "keyword",
884
+ "concept": "LOOP_WHILE"
885
+ },
886
+ {
887
+ "kind": "expr",
888
+ "slot": "condition"
889
+ },
890
+ {
891
+ "kind": "delimiter",
892
+ "value": ":"
893
+ }
894
+ ]
895
+ },
896
+ {
897
+ "name": "en_if_condition_first",
898
+ "language": "en",
899
+ "normalize_template": "if_condition_first",
900
+ "pattern": [
901
+ {
902
+ "kind": "keyword",
903
+ "concept": "COND_IF"
904
+ },
905
+ {
906
+ "kind": "expr",
907
+ "slot": "condition"
908
+ },
909
+ {
910
+ "kind": "delimiter",
911
+ "value": ":"
912
+ }
913
+ ]
914
+ },
915
+ {
916
+ "name": "en_with_expr_first",
917
+ "language": "en",
918
+ "normalize_template": "with_expr_first",
919
+ "pattern": [
920
+ {
921
+ "kind": "keyword",
922
+ "concept": "WITH"
923
+ },
924
+ {
925
+ "kind": "expr",
926
+ "slot": "context"
927
+ },
928
+ {
929
+ "kind": "delimiter",
930
+ "value": ":"
931
+ }
932
+ ]
933
+ },
934
+ {
935
+ "name": "fi_for_iterable_first",
936
+ "language": "fi",
937
+ "normalize_template": "for_iterable_first",
938
+ "pattern": [
939
+ {
940
+ "kind": "keyword",
941
+ "concept": "LOOP_FOR"
942
+ },
943
+ {
944
+ "kind": "identifier",
945
+ "slot": "target"
946
+ },
947
+ {
948
+ "kind": "keyword",
949
+ "concept": "IN"
950
+ },
951
+ {
952
+ "kind": "expr",
953
+ "slot": "iterable"
954
+ },
955
+ {
956
+ "kind": "delimiter",
957
+ "value": ":"
958
+ }
959
+ ]
960
+ },
961
+ {
962
+ "name": "fi_while_condition_first",
963
+ "language": "fi",
964
+ "normalize_template": "while_condition_first",
965
+ "pattern": [
966
+ {
967
+ "kind": "keyword",
968
+ "concept": "LOOP_WHILE"
969
+ },
970
+ {
971
+ "kind": "expr",
972
+ "slot": "condition"
973
+ },
974
+ {
975
+ "kind": "delimiter",
976
+ "value": ":"
977
+ }
978
+ ]
979
+ },
980
+ {
981
+ "name": "fi_if_condition_first",
982
+ "language": "fi",
983
+ "normalize_template": "if_condition_first",
984
+ "pattern": [
985
+ {
986
+ "kind": "keyword",
987
+ "concept": "COND_IF"
988
+ },
989
+ {
990
+ "kind": "expr",
991
+ "slot": "condition"
992
+ },
993
+ {
994
+ "kind": "delimiter",
995
+ "value": ":"
996
+ }
997
+ ]
998
+ },
999
+ {
1000
+ "name": "fi_with_expr_first",
1001
+ "language": "fi",
1002
+ "normalize_template": "with_expr_first",
1003
+ "pattern": [
1004
+ {
1005
+ "kind": "keyword",
1006
+ "concept": "WITH"
1007
+ },
1008
+ {
1009
+ "kind": "expr",
1010
+ "slot": "context"
1011
+ },
1012
+ {
1013
+ "kind": "delimiter",
1014
+ "value": ":"
1015
+ }
1016
+ ]
1017
+ },
1018
+ {
1019
+ "name": "it_for_iterable_first",
1020
+ "language": "it",
1021
+ "normalize_template": "for_iterable_first",
1022
+ "pattern": [
1023
+ {
1024
+ "kind": "keyword",
1025
+ "concept": "LOOP_FOR"
1026
+ },
1027
+ {
1028
+ "kind": "identifier",
1029
+ "slot": "target"
1030
+ },
1031
+ {
1032
+ "kind": "keyword",
1033
+ "concept": "IN"
1034
+ },
1035
+ {
1036
+ "kind": "expr",
1037
+ "slot": "iterable"
1038
+ },
1039
+ {
1040
+ "kind": "delimiter",
1041
+ "value": ":"
1042
+ }
1043
+ ]
1044
+ },
1045
+ {
1046
+ "name": "it_while_condition_first",
1047
+ "language": "it",
1048
+ "normalize_template": "while_condition_first",
1049
+ "pattern": [
1050
+ {
1051
+ "kind": "keyword",
1052
+ "concept": "LOOP_WHILE"
1053
+ },
1054
+ {
1055
+ "kind": "expr",
1056
+ "slot": "condition"
1057
+ },
1058
+ {
1059
+ "kind": "delimiter",
1060
+ "value": ":"
1061
+ }
1062
+ ]
1063
+ },
1064
+ {
1065
+ "name": "it_if_condition_first",
1066
+ "language": "it",
1067
+ "normalize_template": "if_condition_first",
1068
+ "pattern": [
1069
+ {
1070
+ "kind": "keyword",
1071
+ "concept": "COND_IF"
1072
+ },
1073
+ {
1074
+ "kind": "expr",
1075
+ "slot": "condition"
1076
+ },
1077
+ {
1078
+ "kind": "delimiter",
1079
+ "value": ":"
1080
+ }
1081
+ ]
1082
+ },
1083
+ {
1084
+ "name": "it_with_expr_first",
1085
+ "language": "it",
1086
+ "normalize_template": "with_expr_first",
1087
+ "pattern": [
1088
+ {
1089
+ "kind": "keyword",
1090
+ "concept": "WITH"
1091
+ },
1092
+ {
1093
+ "kind": "expr",
1094
+ "slot": "context"
1095
+ },
1096
+ {
1097
+ "kind": "delimiter",
1098
+ "value": ":"
1099
+ }
1100
+ ]
1101
+ },
1102
+ {
1103
+ "name": "nl_for_iterable_first",
1104
+ "language": "nl",
1105
+ "normalize_template": "for_iterable_first",
1106
+ "pattern": [
1107
+ {
1108
+ "kind": "keyword",
1109
+ "concept": "LOOP_FOR"
1110
+ },
1111
+ {
1112
+ "kind": "identifier",
1113
+ "slot": "target"
1114
+ },
1115
+ {
1116
+ "kind": "keyword",
1117
+ "concept": "IN"
1118
+ },
1119
+ {
1120
+ "kind": "expr",
1121
+ "slot": "iterable"
1122
+ },
1123
+ {
1124
+ "kind": "delimiter",
1125
+ "value": ":"
1126
+ }
1127
+ ]
1128
+ },
1129
+ {
1130
+ "name": "nl_while_condition_first",
1131
+ "language": "nl",
1132
+ "normalize_template": "while_condition_first",
1133
+ "pattern": [
1134
+ {
1135
+ "kind": "keyword",
1136
+ "concept": "LOOP_WHILE"
1137
+ },
1138
+ {
1139
+ "kind": "expr",
1140
+ "slot": "condition"
1141
+ },
1142
+ {
1143
+ "kind": "delimiter",
1144
+ "value": ":"
1145
+ }
1146
+ ]
1147
+ },
1148
+ {
1149
+ "name": "nl_if_condition_first",
1150
+ "language": "nl",
1151
+ "normalize_template": "if_condition_first",
1152
+ "pattern": [
1153
+ {
1154
+ "kind": "keyword",
1155
+ "concept": "COND_IF"
1156
+ },
1157
+ {
1158
+ "kind": "expr",
1159
+ "slot": "condition"
1160
+ },
1161
+ {
1162
+ "kind": "delimiter",
1163
+ "value": ":"
1164
+ }
1165
+ ]
1166
+ },
1167
+ {
1168
+ "name": "nl_with_expr_first",
1169
+ "language": "nl",
1170
+ "normalize_template": "with_expr_first",
1171
+ "pattern": [
1172
+ {
1173
+ "kind": "keyword",
1174
+ "concept": "WITH"
1175
+ },
1176
+ {
1177
+ "kind": "expr",
1178
+ "slot": "context"
1179
+ },
1180
+ {
1181
+ "kind": "delimiter",
1182
+ "value": ":"
1183
+ }
1184
+ ]
1185
+ },
1186
+ {
1187
+ "name": "pl_for_iterable_first",
1188
+ "language": "pl",
1189
+ "normalize_template": "for_iterable_first",
1190
+ "pattern": [
1191
+ {
1192
+ "kind": "keyword",
1193
+ "concept": "LOOP_FOR"
1194
+ },
1195
+ {
1196
+ "kind": "identifier",
1197
+ "slot": "target"
1198
+ },
1199
+ {
1200
+ "kind": "keyword",
1201
+ "concept": "IN"
1202
+ },
1203
+ {
1204
+ "kind": "expr",
1205
+ "slot": "iterable"
1206
+ },
1207
+ {
1208
+ "kind": "delimiter",
1209
+ "value": ":"
1210
+ }
1211
+ ]
1212
+ },
1213
+ {
1214
+ "name": "pl_while_condition_first",
1215
+ "language": "pl",
1216
+ "normalize_template": "while_condition_first",
1217
+ "pattern": [
1218
+ {
1219
+ "kind": "keyword",
1220
+ "concept": "LOOP_WHILE"
1221
+ },
1222
+ {
1223
+ "kind": "expr",
1224
+ "slot": "condition"
1225
+ },
1226
+ {
1227
+ "kind": "delimiter",
1228
+ "value": ":"
1229
+ }
1230
+ ]
1231
+ },
1232
+ {
1233
+ "name": "pl_if_condition_first",
1234
+ "language": "pl",
1235
+ "normalize_template": "if_condition_first",
1236
+ "pattern": [
1237
+ {
1238
+ "kind": "keyword",
1239
+ "concept": "COND_IF"
1240
+ },
1241
+ {
1242
+ "kind": "expr",
1243
+ "slot": "condition"
1244
+ },
1245
+ {
1246
+ "kind": "delimiter",
1247
+ "value": ":"
1248
+ }
1249
+ ]
1250
+ },
1251
+ {
1252
+ "name": "pl_with_expr_first",
1253
+ "language": "pl",
1254
+ "normalize_template": "with_expr_first",
1255
+ "pattern": [
1256
+ {
1257
+ "kind": "keyword",
1258
+ "concept": "WITH"
1259
+ },
1260
+ {
1261
+ "kind": "expr",
1262
+ "slot": "context"
1263
+ },
1264
+ {
1265
+ "kind": "delimiter",
1266
+ "value": ":"
1267
+ }
1268
+ ]
1269
+ },
1270
+ {
1271
+ "name": "pt_for_iterable_first",
1272
+ "language": "pt",
1273
+ "normalize_template": "for_iterable_first",
1274
+ "pattern": [
1275
+ {
1276
+ "kind": "keyword",
1277
+ "concept": "LOOP_FOR"
1278
+ },
1279
+ {
1280
+ "kind": "identifier",
1281
+ "slot": "target"
1282
+ },
1283
+ {
1284
+ "kind": "keyword",
1285
+ "concept": "IN"
1286
+ },
1287
+ {
1288
+ "kind": "expr",
1289
+ "slot": "iterable"
1290
+ },
1291
+ {
1292
+ "kind": "delimiter",
1293
+ "value": ":"
1294
+ }
1295
+ ]
1296
+ },
1297
+ {
1298
+ "name": "pt_while_condition_first",
1299
+ "language": "pt",
1300
+ "normalize_template": "while_condition_first",
1301
+ "pattern": [
1302
+ {
1303
+ "kind": "keyword",
1304
+ "concept": "LOOP_WHILE"
1305
+ },
1306
+ {
1307
+ "kind": "expr",
1308
+ "slot": "condition"
1309
+ },
1310
+ {
1311
+ "kind": "delimiter",
1312
+ "value": ":"
1313
+ }
1314
+ ]
1315
+ },
1316
+ {
1317
+ "name": "pt_if_condition_first",
1318
+ "language": "pt",
1319
+ "normalize_template": "if_condition_first",
1320
+ "pattern": [
1321
+ {
1322
+ "kind": "keyword",
1323
+ "concept": "COND_IF"
1324
+ },
1325
+ {
1326
+ "kind": "expr",
1327
+ "slot": "condition"
1328
+ },
1329
+ {
1330
+ "kind": "delimiter",
1331
+ "value": ":"
1332
+ }
1333
+ ]
1334
+ },
1335
+ {
1336
+ "name": "pt_with_expr_first",
1337
+ "language": "pt",
1338
+ "normalize_template": "with_expr_first",
1339
+ "pattern": [
1340
+ {
1341
+ "kind": "keyword",
1342
+ "concept": "WITH"
1343
+ },
1344
+ {
1345
+ "kind": "expr",
1346
+ "slot": "context"
1347
+ },
1348
+ {
1349
+ "kind": "delimiter",
1350
+ "value": ":"
1351
+ }
1352
+ ]
1353
+ },
1354
+ {
1355
+ "name": "sv_for_iterable_first",
1356
+ "language": "sv",
1357
+ "normalize_template": "for_iterable_first",
1358
+ "pattern": [
1359
+ {
1360
+ "kind": "keyword",
1361
+ "concept": "LOOP_FOR"
1362
+ },
1363
+ {
1364
+ "kind": "identifier",
1365
+ "slot": "target"
1366
+ },
1367
+ {
1368
+ "kind": "keyword",
1369
+ "concept": "IN"
1370
+ },
1371
+ {
1372
+ "kind": "expr",
1373
+ "slot": "iterable"
1374
+ },
1375
+ {
1376
+ "kind": "delimiter",
1377
+ "value": ":"
1378
+ }
1379
+ ]
1380
+ },
1381
+ {
1382
+ "name": "sv_while_condition_first",
1383
+ "language": "sv",
1384
+ "normalize_template": "while_condition_first",
1385
+ "pattern": [
1386
+ {
1387
+ "kind": "keyword",
1388
+ "concept": "LOOP_WHILE"
1389
+ },
1390
+ {
1391
+ "kind": "expr",
1392
+ "slot": "condition"
1393
+ },
1394
+ {
1395
+ "kind": "delimiter",
1396
+ "value": ":"
1397
+ }
1398
+ ]
1399
+ },
1400
+ {
1401
+ "name": "sv_if_condition_first",
1402
+ "language": "sv",
1403
+ "normalize_template": "if_condition_first",
1404
+ "pattern": [
1405
+ {
1406
+ "kind": "keyword",
1407
+ "concept": "COND_IF"
1408
+ },
1409
+ {
1410
+ "kind": "expr",
1411
+ "slot": "condition"
1412
+ },
1413
+ {
1414
+ "kind": "delimiter",
1415
+ "value": ":"
1416
+ }
1417
+ ]
1418
+ },
1419
+ {
1420
+ "name": "sv_with_expr_first",
1421
+ "language": "sv",
1422
+ "normalize_template": "with_expr_first",
1423
+ "pattern": [
1424
+ {
1425
+ "kind": "keyword",
1426
+ "concept": "WITH"
1427
+ },
1428
+ {
1429
+ "kind": "expr",
1430
+ "slot": "context"
1431
+ },
1432
+ {
1433
+ "kind": "delimiter",
1434
+ "value": ":"
1435
+ }
1436
+ ]
1437
+ },
1438
+ {
1439
+ "name": "zh_for_iterable_first",
1440
+ "language": "zh",
1441
+ "normalize_template": "for_iterable_first",
1442
+ "pattern": [
1443
+ {
1444
+ "kind": "keyword",
1445
+ "concept": "LOOP_FOR"
1446
+ },
1447
+ {
1448
+ "kind": "identifier",
1449
+ "slot": "target"
1450
+ },
1451
+ {
1452
+ "kind": "keyword",
1453
+ "concept": "IN"
1454
+ },
1455
+ {
1456
+ "kind": "expr",
1457
+ "slot": "iterable"
1458
+ },
1459
+ {
1460
+ "kind": "delimiter",
1461
+ "value": ":"
1462
+ }
1463
+ ]
1464
+ },
1465
+ {
1466
+ "name": "zh_while_condition_first",
1467
+ "language": "zh",
1468
+ "normalize_template": "while_condition_first",
1469
+ "pattern": [
1470
+ {
1471
+ "kind": "keyword",
1472
+ "concept": "LOOP_WHILE"
1473
+ },
1474
+ {
1475
+ "kind": "expr",
1476
+ "slot": "condition"
1477
+ },
1478
+ {
1479
+ "kind": "delimiter",
1480
+ "value": ":"
1481
+ }
1482
+ ]
1483
+ },
1484
+ {
1485
+ "name": "zh_if_condition_first",
1486
+ "language": "zh",
1487
+ "normalize_template": "if_condition_first",
1488
+ "pattern": [
1489
+ {
1490
+ "kind": "keyword",
1491
+ "concept": "COND_IF"
1492
+ },
1493
+ {
1494
+ "kind": "expr",
1495
+ "slot": "condition"
1496
+ },
1497
+ {
1498
+ "kind": "delimiter",
1499
+ "value": ":"
1500
+ }
1501
+ ]
1502
+ },
1503
+ {
1504
+ "name": "zh_with_expr_first",
1505
+ "language": "zh",
1506
+ "normalize_template": "with_expr_first",
1507
+ "pattern": [
1508
+ {
1509
+ "kind": "keyword",
1510
+ "concept": "WITH"
1511
+ },
1512
+ {
1513
+ "kind": "expr",
1514
+ "slot": "context"
1515
+ },
1516
+ {
1517
+ "kind": "delimiter",
1518
+ "value": ":"
1519
+ }
1520
+ ]
1521
+ }
1522
+ ]
1523
+ }