Skip to content

Commit 1e6adf5

Browse files
committed
Python: Regenerate parser files
1 parent e9876aa commit 1e6adf5

File tree

4 files changed

+39991
-38487
lines changed

4 files changed

+39991
-38487
lines changed

python/extractor/tsg-python/tsp/src/grammar.json

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1800,6 +1800,14 @@
18001800
"type": "SYMBOL",
18011801
"name": "concatenated_string"
18021802
},
1803+
{
1804+
"type": "SYMBOL",
1805+
"name": "template_string"
1806+
},
1807+
{
1808+
"type": "SYMBOL",
1809+
"name": "concatenated_template_string"
1810+
},
18031811
{
18041812
"type": "SYMBOL",
18051813
"name": "none"
@@ -3891,6 +3899,14 @@
38913899
"type": "SYMBOL",
38923900
"name": "concatenated_string"
38933901
},
3902+
{
3903+
"type": "SYMBOL",
3904+
"name": "template_string"
3905+
},
3906+
{
3907+
"type": "SYMBOL",
3908+
"name": "concatenated_template_string"
3909+
},
38943910
{
38953911
"type": "SYMBOL",
38963912
"name": "integer"
@@ -5982,6 +5998,77 @@
59825998
}
59835999
]
59846000
},
6001+
"concatenated_template_string": {
6002+
"type": "SEQ",
6003+
"members": [
6004+
{
6005+
"type": "SYMBOL",
6006+
"name": "template_string"
6007+
},
6008+
{
6009+
"type": "REPEAT1",
6010+
"content": {
6011+
"type": "SYMBOL",
6012+
"name": "template_string"
6013+
}
6014+
}
6015+
]
6016+
},
6017+
"template_string": {
6018+
"type": "SEQ",
6019+
"members": [
6020+
{
6021+
"type": "FIELD",
6022+
"name": "prefix",
6023+
"content": {
6024+
"type": "ALIAS",
6025+
"content": {
6026+
"type": "SYMBOL",
6027+
"name": "_template_string_start"
6028+
},
6029+
"named": false,
6030+
"value": "\""
6031+
}
6032+
},
6033+
{
6034+
"type": "REPEAT",
6035+
"content": {
6036+
"type": "CHOICE",
6037+
"members": [
6038+
{
6039+
"type": "FIELD",
6040+
"name": "interpolation",
6041+
"content": {
6042+
"type": "SYMBOL",
6043+
"name": "interpolation"
6044+
}
6045+
},
6046+
{
6047+
"type": "FIELD",
6048+
"name": "string_content",
6049+
"content": {
6050+
"type": "SYMBOL",
6051+
"name": "string_content"
6052+
}
6053+
}
6054+
]
6055+
}
6056+
},
6057+
{
6058+
"type": "FIELD",
6059+
"name": "suffix",
6060+
"content": {
6061+
"type": "ALIAS",
6062+
"content": {
6063+
"type": "SYMBOL",
6064+
"name": "_string_end"
6065+
},
6066+
"named": false,
6067+
"value": "\""
6068+
}
6069+
}
6070+
]
6071+
},
59856072
"string_content": {
59866073
"type": "PREC_RIGHT",
59876074
"value": 0,
@@ -6710,6 +6797,10 @@
67106797
{
67116798
"type": "SYMBOL",
67126799
"name": "_string_end"
6800+
},
6801+
{
6802+
"type": "SYMBOL",
6803+
"name": "_template_string_start"
67136804
}
67146805
],
67156806
"inline": [

python/extractor/tsg-python/tsp/src/node-types.json

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,10 @@
241241
"type": "concatenated_string",
242242
"named": true
243243
},
244+
{
245+
"type": "concatenated_template_string",
246+
"named": true
247+
},
244248
{
245249
"type": "dictionary",
246250
"named": true
@@ -305,6 +309,10 @@
305309
"type": "subscript",
306310
"named": true
307311
},
312+
{
313+
"type": "template_string",
314+
"named": true
315+
},
308316
{
309317
"type": "true",
310318
"named": true
@@ -1000,6 +1008,21 @@
10001008
]
10011009
}
10021010
},
1011+
{
1012+
"type": "concatenated_template_string",
1013+
"named": true,
1014+
"fields": {},
1015+
"children": {
1016+
"multiple": true,
1017+
"required": true,
1018+
"types": [
1019+
{
1020+
"type": "template_string",
1021+
"named": true
1022+
}
1023+
]
1024+
}
1025+
},
10031026
{
10041027
"type": "conditional_expression",
10051028
"named": true,
@@ -2460,6 +2483,10 @@
24602483
"type": "concatenated_string",
24612484
"named": true
24622485
},
2486+
{
2487+
"type": "concatenated_template_string",
2488+
"named": true
2489+
},
24632490
{
24642491
"type": "false",
24652492
"named": true
@@ -2472,6 +2499,10 @@
24722499
"type": "string",
24732500
"named": true
24742501
},
2502+
{
2503+
"type": "template_string",
2504+
"named": true
2505+
},
24752506
{
24762507
"type": "true",
24772508
"named": true
@@ -3257,6 +3288,52 @@
32573288
}
32583289
}
32593290
},
3291+
{
3292+
"type": "template_string",
3293+
"named": true,
3294+
"fields": {
3295+
"interpolation": {
3296+
"multiple": true,
3297+
"required": false,
3298+
"types": [
3299+
{
3300+
"type": "interpolation",
3301+
"named": true
3302+
}
3303+
]
3304+
},
3305+
"prefix": {
3306+
"multiple": false,
3307+
"required": true,
3308+
"types": [
3309+
{
3310+
"type": "\"",
3311+
"named": false
3312+
}
3313+
]
3314+
},
3315+
"string_content": {
3316+
"multiple": true,
3317+
"required": false,
3318+
"types": [
3319+
{
3320+
"type": "string_content",
3321+
"named": true
3322+
}
3323+
]
3324+
},
3325+
"suffix": {
3326+
"multiple": false,
3327+
"required": true,
3328+
"types": [
3329+
{
3330+
"type": "\"",
3331+
"named": false
3332+
}
3333+
]
3334+
}
3335+
}
3336+
},
32603337
{
32613338
"type": "try_statement",
32623339
"named": true,

0 commit comments

Comments
 (0)