rapydscript-ng 0.8.2 → 0.8.4
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.
- package/CHANGELOG.md +17 -0
- package/bin/build.ts +29 -0
- package/local-agent.md +4 -0
- package/package.json +1 -1
- package/release/baselib-plain-pretty.js +85 -61
- package/release/baselib-plain-ugly.js +3 -3
- package/release/compiler.js +9661 -9540
- package/release/signatures.json +26 -26
- package/src/ast.pyj +169 -64
- package/src/baselib-builtins.pyj +35 -14
- package/src/baselib-containers.pyj +70 -40
- package/src/baselib-internal.pyj +20 -8
- package/src/baselib-itertools.pyj +6 -2
- package/src/baselib-str.pyj +74 -28
- package/src/errors.pyj +4 -1
- package/src/lib/aes.pyj +664 -35
- package/src/lib/elementmaker.pyj +105 -13
- package/src/lib/encodings.pyj +31 -7
- package/src/lib/gettext.pyj +6 -3
- package/src/lib/math.pyj +38 -22
- package/src/lib/pythonize.pyj +5 -3
- package/src/lib/random.pyj +13 -5
- package/src/lib/re.pyj +81 -18
- package/src/lib/traceback.pyj +42 -10
- package/src/lib/uuid.pyj +2 -1
- package/src/output/classes.pyj +70 -26
- package/src/output/codegen.pyj +92 -20
- package/src/output/comments.pyj +11 -4
- package/src/output/exceptions.pyj +17 -4
- package/src/output/functions.pyj +145 -26
- package/src/output/literals.pyj +7 -2
- package/src/output/loops.pyj +79 -23
- package/src/output/modules.pyj +41 -12
- package/src/output/operators.pyj +154 -31
- package/src/output/statements.pyj +38 -10
- package/src/output/stream.pyj +43 -12
- package/src/output/utils.pyj +10 -3
- package/src/parse.pyj +740 -259
- package/src/string_interpolation.pyj +4 -1
- package/src/tokenizer.pyj +314 -57
- package/src/unicode_aliases.pyj +4 -2
- package/src/utils.pyj +19 -5
- package/test/functions.pyj +8 -0
- package/test/generic.pyj +9 -0
- package/test/lsp.pyj +16 -0
- package/test/str.pyj +10 -0
- package/tools/cli.mjs +4 -3
- package/tools/compile.mjs +9 -3
- package/tools/compiler.mjs +0 -6
- package/tools/fmt.mjs +41 -2
- package/tools/lint-worker.mjs +107 -0
- package/tools/lint.mjs +134 -8
- package/tools/lsp.mjs +11 -1
- package/tree-sitter/grammar.js +27 -6
- package/tree-sitter/queries/highlights.scm +10 -0
- package/tree-sitter/src/grammar.json +130 -5
- package/tree-sitter/src/node-types.json +73 -0
- package/tree-sitter/src/parser.c +119589 -114993
- package/tree-sitter/src/scanner.c +275 -17
- package/tree-sitter/test/corpus/strings.txt +41 -5
|
@@ -2474,6 +2474,10 @@
|
|
|
2474
2474
|
"type": "SYMBOL",
|
|
2475
2475
|
"name": "string"
|
|
2476
2476
|
},
|
|
2477
|
+
{
|
|
2478
|
+
"type": "SYMBOL",
|
|
2479
|
+
"name": "f_string"
|
|
2480
|
+
},
|
|
2477
2481
|
{
|
|
2478
2482
|
"type": "SYMBOL",
|
|
2479
2483
|
"name": "concatenated_string"
|
|
@@ -4493,19 +4497,128 @@
|
|
|
4493
4497
|
"type": "SEQ",
|
|
4494
4498
|
"members": [
|
|
4495
4499
|
{
|
|
4496
|
-
"type": "
|
|
4497
|
-
"
|
|
4500
|
+
"type": "CHOICE",
|
|
4501
|
+
"members": [
|
|
4502
|
+
{
|
|
4503
|
+
"type": "SYMBOL",
|
|
4504
|
+
"name": "string"
|
|
4505
|
+
},
|
|
4506
|
+
{
|
|
4507
|
+
"type": "SYMBOL",
|
|
4508
|
+
"name": "f_string"
|
|
4509
|
+
}
|
|
4510
|
+
]
|
|
4498
4511
|
},
|
|
4499
4512
|
{
|
|
4500
4513
|
"type": "REPEAT1",
|
|
4501
4514
|
"content": {
|
|
4502
|
-
"type": "
|
|
4503
|
-
"
|
|
4515
|
+
"type": "CHOICE",
|
|
4516
|
+
"members": [
|
|
4517
|
+
{
|
|
4518
|
+
"type": "SYMBOL",
|
|
4519
|
+
"name": "string"
|
|
4520
|
+
},
|
|
4521
|
+
{
|
|
4522
|
+
"type": "SYMBOL",
|
|
4523
|
+
"name": "f_string"
|
|
4524
|
+
}
|
|
4525
|
+
]
|
|
4504
4526
|
}
|
|
4505
4527
|
}
|
|
4506
4528
|
]
|
|
4507
4529
|
}
|
|
4508
4530
|
},
|
|
4531
|
+
"f_string": {
|
|
4532
|
+
"type": "SEQ",
|
|
4533
|
+
"members": [
|
|
4534
|
+
{
|
|
4535
|
+
"type": "SYMBOL",
|
|
4536
|
+
"name": "fstring_start"
|
|
4537
|
+
},
|
|
4538
|
+
{
|
|
4539
|
+
"type": "REPEAT",
|
|
4540
|
+
"content": {
|
|
4541
|
+
"type": "CHOICE",
|
|
4542
|
+
"members": [
|
|
4543
|
+
{
|
|
4544
|
+
"type": "SYMBOL",
|
|
4545
|
+
"name": "fstring_content"
|
|
4546
|
+
},
|
|
4547
|
+
{
|
|
4548
|
+
"type": "SYMBOL",
|
|
4549
|
+
"name": "interpolation"
|
|
4550
|
+
}
|
|
4551
|
+
]
|
|
4552
|
+
}
|
|
4553
|
+
},
|
|
4554
|
+
{
|
|
4555
|
+
"type": "SYMBOL",
|
|
4556
|
+
"name": "fstring_end"
|
|
4557
|
+
}
|
|
4558
|
+
]
|
|
4559
|
+
},
|
|
4560
|
+
"interpolation": {
|
|
4561
|
+
"type": "SEQ",
|
|
4562
|
+
"members": [
|
|
4563
|
+
{
|
|
4564
|
+
"type": "STRING",
|
|
4565
|
+
"value": "{"
|
|
4566
|
+
},
|
|
4567
|
+
{
|
|
4568
|
+
"type": "FIELD",
|
|
4569
|
+
"name": "expression",
|
|
4570
|
+
"content": {
|
|
4571
|
+
"type": "SYMBOL",
|
|
4572
|
+
"name": "_expression"
|
|
4573
|
+
}
|
|
4574
|
+
},
|
|
4575
|
+
{
|
|
4576
|
+
"type": "CHOICE",
|
|
4577
|
+
"members": [
|
|
4578
|
+
{
|
|
4579
|
+
"type": "FIELD",
|
|
4580
|
+
"name": "type_conversion",
|
|
4581
|
+
"content": {
|
|
4582
|
+
"type": "PATTERN",
|
|
4583
|
+
"value": "![rsa]"
|
|
4584
|
+
}
|
|
4585
|
+
},
|
|
4586
|
+
{
|
|
4587
|
+
"type": "BLANK"
|
|
4588
|
+
}
|
|
4589
|
+
]
|
|
4590
|
+
},
|
|
4591
|
+
{
|
|
4592
|
+
"type": "CHOICE",
|
|
4593
|
+
"members": [
|
|
4594
|
+
{
|
|
4595
|
+
"type": "SEQ",
|
|
4596
|
+
"members": [
|
|
4597
|
+
{
|
|
4598
|
+
"type": "STRING",
|
|
4599
|
+
"value": ":"
|
|
4600
|
+
},
|
|
4601
|
+
{
|
|
4602
|
+
"type": "FIELD",
|
|
4603
|
+
"name": "format_spec",
|
|
4604
|
+
"content": {
|
|
4605
|
+
"type": "SYMBOL",
|
|
4606
|
+
"name": "fstring_content"
|
|
4607
|
+
}
|
|
4608
|
+
}
|
|
4609
|
+
]
|
|
4610
|
+
},
|
|
4611
|
+
{
|
|
4612
|
+
"type": "BLANK"
|
|
4613
|
+
}
|
|
4614
|
+
]
|
|
4615
|
+
},
|
|
4616
|
+
{
|
|
4617
|
+
"type": "STRING",
|
|
4618
|
+
"value": "}"
|
|
4619
|
+
}
|
|
4620
|
+
]
|
|
4621
|
+
},
|
|
4509
4622
|
"this": {
|
|
4510
4623
|
"type": "STRING",
|
|
4511
4624
|
"value": "this"
|
|
@@ -4532,7 +4645,7 @@
|
|
|
4532
4645
|
"members": [
|
|
4533
4646
|
{
|
|
4534
4647
|
"type": "PATTERN",
|
|
4535
|
-
"value": "[
|
|
4648
|
+
"value": "[rRuUbB]+"
|
|
4536
4649
|
},
|
|
4537
4650
|
{
|
|
4538
4651
|
"type": "BLANK"
|
|
@@ -4963,6 +5076,18 @@
|
|
|
4963
5076
|
{
|
|
4964
5077
|
"type": "SYMBOL",
|
|
4965
5078
|
"name": "regex"
|
|
5079
|
+
},
|
|
5080
|
+
{
|
|
5081
|
+
"type": "SYMBOL",
|
|
5082
|
+
"name": "fstring_start"
|
|
5083
|
+
},
|
|
5084
|
+
{
|
|
5085
|
+
"type": "SYMBOL",
|
|
5086
|
+
"name": "fstring_content"
|
|
5087
|
+
},
|
|
5088
|
+
{
|
|
5089
|
+
"type": "SYMBOL",
|
|
5090
|
+
"name": "fstring_end"
|
|
4966
5091
|
}
|
|
4967
5092
|
],
|
|
4968
5093
|
"inline": [],
|
|
@@ -131,6 +131,10 @@
|
|
|
131
131
|
"type": "existential",
|
|
132
132
|
"named": true
|
|
133
133
|
},
|
|
134
|
+
{
|
|
135
|
+
"type": "f_string",
|
|
136
|
+
"named": true
|
|
137
|
+
},
|
|
134
138
|
{
|
|
135
139
|
"type": "false",
|
|
136
140
|
"named": true
|
|
@@ -976,6 +980,10 @@
|
|
|
976
980
|
"multiple": true,
|
|
977
981
|
"required": true,
|
|
978
982
|
"types": [
|
|
983
|
+
{
|
|
984
|
+
"type": "f_string",
|
|
985
|
+
"named": true
|
|
986
|
+
},
|
|
979
987
|
{
|
|
980
988
|
"type": "string",
|
|
981
989
|
"named": true
|
|
@@ -1376,6 +1384,33 @@
|
|
|
1376
1384
|
]
|
|
1377
1385
|
}
|
|
1378
1386
|
},
|
|
1387
|
+
{
|
|
1388
|
+
"type": "f_string",
|
|
1389
|
+
"named": true,
|
|
1390
|
+
"fields": {},
|
|
1391
|
+
"children": {
|
|
1392
|
+
"multiple": true,
|
|
1393
|
+
"required": true,
|
|
1394
|
+
"types": [
|
|
1395
|
+
{
|
|
1396
|
+
"type": "fstring_content",
|
|
1397
|
+
"named": true
|
|
1398
|
+
},
|
|
1399
|
+
{
|
|
1400
|
+
"type": "fstring_end",
|
|
1401
|
+
"named": true
|
|
1402
|
+
},
|
|
1403
|
+
{
|
|
1404
|
+
"type": "fstring_start",
|
|
1405
|
+
"named": true
|
|
1406
|
+
},
|
|
1407
|
+
{
|
|
1408
|
+
"type": "interpolation",
|
|
1409
|
+
"named": true
|
|
1410
|
+
}
|
|
1411
|
+
]
|
|
1412
|
+
}
|
|
1413
|
+
},
|
|
1379
1414
|
{
|
|
1380
1415
|
"type": "finally_clause",
|
|
1381
1416
|
"named": true,
|
|
@@ -1702,6 +1737,32 @@
|
|
|
1702
1737
|
}
|
|
1703
1738
|
}
|
|
1704
1739
|
},
|
|
1740
|
+
{
|
|
1741
|
+
"type": "interpolation",
|
|
1742
|
+
"named": true,
|
|
1743
|
+
"fields": {
|
|
1744
|
+
"expression": {
|
|
1745
|
+
"multiple": false,
|
|
1746
|
+
"required": true,
|
|
1747
|
+
"types": [
|
|
1748
|
+
{
|
|
1749
|
+
"type": "_expression",
|
|
1750
|
+
"named": true
|
|
1751
|
+
}
|
|
1752
|
+
]
|
|
1753
|
+
},
|
|
1754
|
+
"format_spec": {
|
|
1755
|
+
"multiple": false,
|
|
1756
|
+
"required": false,
|
|
1757
|
+
"types": [
|
|
1758
|
+
{
|
|
1759
|
+
"type": "fstring_content",
|
|
1760
|
+
"named": true
|
|
1761
|
+
}
|
|
1762
|
+
]
|
|
1763
|
+
}
|
|
1764
|
+
}
|
|
1765
|
+
},
|
|
1705
1766
|
{
|
|
1706
1767
|
"type": "keyword_argument",
|
|
1707
1768
|
"named": true,
|
|
@@ -2770,6 +2831,18 @@
|
|
|
2770
2831
|
"type": "from",
|
|
2771
2832
|
"named": false
|
|
2772
2833
|
},
|
|
2834
|
+
{
|
|
2835
|
+
"type": "fstring_content",
|
|
2836
|
+
"named": true
|
|
2837
|
+
},
|
|
2838
|
+
{
|
|
2839
|
+
"type": "fstring_end",
|
|
2840
|
+
"named": true
|
|
2841
|
+
},
|
|
2842
|
+
{
|
|
2843
|
+
"type": "fstring_start",
|
|
2844
|
+
"named": true
|
|
2845
|
+
},
|
|
2773
2846
|
{
|
|
2774
2847
|
"type": "global",
|
|
2775
2848
|
"named": false
|