Skip to content

Commit 6545bff

Browse files
committed
Python: Regenerate parser files
Two new files -- alloc.h and array.h -- suddenly appeared. Presumably they are used by the somewhat newer version of tree-sitter. To be safe, I included them in this commit.
1 parent 882249e commit 6545bff

File tree

6 files changed

+30873
-32538
lines changed

6 files changed

+30873
-32538
lines changed

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

Lines changed: 71 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"$schema": "https://tree-sitter.github.io/tree-sitter/assets/schemas/grammar.schema.json",
23
"name": "python",
34
"word": "identifier",
45
"rules": {
@@ -2970,6 +2971,18 @@
29702971
"type": "BLANK"
29712972
}
29722973
]
2974+
},
2975+
{
2976+
"type": "CHOICE",
2977+
"members": [
2978+
{
2979+
"type": "SYMBOL",
2980+
"name": "_type_param_default"
2981+
},
2982+
{
2983+
"type": "BLANK"
2984+
}
2985+
]
29732986
}
29742987
]
29752988
},
@@ -2987,6 +3000,18 @@
29873000
"type": "SYMBOL",
29883001
"name": "identifier"
29893002
}
3003+
},
3004+
{
3005+
"type": "CHOICE",
3006+
"members": [
3007+
{
3008+
"type": "SYMBOL",
3009+
"name": "_type_param_default"
3010+
},
3011+
{
3012+
"type": "BLANK"
3013+
}
3014+
]
29903015
}
29913016
]
29923017
},
@@ -3004,6 +3029,18 @@
30043029
"type": "SYMBOL",
30053030
"name": "identifier"
30063031
}
3032+
},
3033+
{
3034+
"type": "CHOICE",
3035+
"members": [
3036+
{
3037+
"type": "SYMBOL",
3038+
"name": "_type_param_default"
3039+
},
3040+
{
3041+
"type": "BLANK"
3042+
}
3043+
]
30073044
}
30083045
]
30093046
},
@@ -3024,6 +3061,32 @@
30243061
}
30253062
]
30263063
},
3064+
"_type_param_default": {
3065+
"type": "SEQ",
3066+
"members": [
3067+
{
3068+
"type": "STRING",
3069+
"value": "="
3070+
},
3071+
{
3072+
"type": "FIELD",
3073+
"name": "default",
3074+
"content": {
3075+
"type": "CHOICE",
3076+
"members": [
3077+
{
3078+
"type": "SYMBOL",
3079+
"name": "list_splat"
3080+
},
3081+
{
3082+
"type": "SYMBOL",
3083+
"name": "expression"
3084+
}
3085+
]
3086+
}
3087+
}
3088+
]
3089+
},
30273090
"parenthesized_list_splat": {
30283091
"type": "PREC",
30293092
"value": 1,
@@ -5006,6 +5069,10 @@
50065069
"content": {
50075070
"type": "CHOICE",
50085071
"members": [
5072+
{
5073+
"type": "SYMBOL",
5074+
"name": "list_splat"
5075+
},
50095076
{
50105077
"type": "SYMBOL",
50115078
"name": "expression"
@@ -5032,6 +5099,10 @@
50325099
"content": {
50335100
"type": "CHOICE",
50345101
"members": [
5102+
{
5103+
"type": "SYMBOL",
5104+
"name": "list_splat"
5105+
},
50355106
{
50365107
"type": "SYMBOL",
50375108
"name": "expression"
@@ -6612,4 +6683,3 @@
66126683
"parameter"
66136684
]
66146685
}
6615-

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

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2691,6 +2691,7 @@
26912691
{
26922692
"type": "module",
26932693
"named": true,
2694+
"root": true,
26942695
"fields": {},
26952696
"children": {
26962697
"multiple": true,
@@ -2809,6 +2810,20 @@
28092810
"type": "paramspec_parameter",
28102811
"named": true,
28112812
"fields": {
2813+
"default": {
2814+
"multiple": false,
2815+
"required": false,
2816+
"types": [
2817+
{
2818+
"type": "expression",
2819+
"named": true
2820+
},
2821+
{
2822+
"type": "list_splat",
2823+
"named": true
2824+
}
2825+
]
2826+
},
28122827
"name": {
28132828
"multiple": false,
28142829
"required": true,
@@ -3193,6 +3208,10 @@
31933208
"type": "expression",
31943209
"named": true
31953210
},
3211+
{
3212+
"type": "list_splat",
3213+
"named": true
3214+
},
31963215
{
31973216
"type": "slice",
31983217
"named": true
@@ -3476,6 +3495,20 @@
34763495
}
34773496
]
34783497
},
3498+
"default": {
3499+
"multiple": false,
3500+
"required": false,
3501+
"types": [
3502+
{
3503+
"type": "expression",
3504+
"named": true
3505+
},
3506+
{
3507+
"type": "list_splat",
3508+
"named": true
3509+
}
3510+
]
3511+
},
34793512
"name": {
34803513
"multiple": false,
34813514
"required": true,
@@ -3492,6 +3525,20 @@
34923525
"type": "typevartuple_parameter",
34933526
"named": true,
34943527
"fields": {
3528+
"default": {
3529+
"multiple": false,
3530+
"required": false,
3531+
"types": [
3532+
{
3533+
"type": "expression",
3534+
"named": true
3535+
},
3536+
{
3537+
"type": "list_splat",
3538+
"named": true
3539+
}
3540+
]
3541+
},
34953542
"name": {
34963543
"multiple": false,
34973544
"required": true,
@@ -3765,6 +3812,10 @@
37653812
"type": ":=",
37663813
"named": false
37673814
},
3815+
{
3816+
"type": ";",
3817+
"named": false
3818+
},
37683819
{
37693820
"type": "<",
37703821
"named": false
@@ -3821,6 +3872,10 @@
38213872
"type": "[",
38223873
"named": false
38233874
},
3875+
{
3876+
"type": "\\",
3877+
"named": false
3878+
},
38243879
{
38253880
"type": "]",
38263881
"named": false

0 commit comments

Comments
 (0)