Skip to content

Commit 5978311

Browse files
committed
regenerate the parser
1 parent 3b58ba1 commit 5978311

File tree

8 files changed

+432654
-416766
lines changed

8 files changed

+432654
-416766
lines changed

tsx/src/grammar.json

Lines changed: 86 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7326,7 +7326,7 @@
73267326
},
73277327
{
73287328
"type": "SYMBOL",
7329-
"name": "template_string"
7329+
"name": "template_literal_type"
73307330
}
73317331
]
73327332
}
@@ -8467,6 +8467,56 @@
84678467
{
84688468
"type": "SYMBOL",
84698469
"name": "conditional_type"
8470+
},
8471+
{
8472+
"type": "SYMBOL",
8473+
"name": "template_literal_type"
8474+
}
8475+
]
8476+
},
8477+
"template_type": {
8478+
"type": "SEQ",
8479+
"members": [
8480+
{
8481+
"type": "STRING",
8482+
"value": "${"
8483+
},
8484+
{
8485+
"type": "SYMBOL",
8486+
"name": "_primary_type"
8487+
},
8488+
{
8489+
"type": "STRING",
8490+
"value": "}"
8491+
}
8492+
]
8493+
},
8494+
"template_literal_type": {
8495+
"type": "SEQ",
8496+
"members": [
8497+
{
8498+
"type": "STRING",
8499+
"value": "`"
8500+
},
8501+
{
8502+
"type": "REPEAT",
8503+
"content": {
8504+
"type": "CHOICE",
8505+
"members": [
8506+
{
8507+
"type": "SYMBOL",
8508+
"name": "_template_chars"
8509+
},
8510+
{
8511+
"type": "SYMBOL",
8512+
"name": "template_type"
8513+
}
8514+
]
8515+
}
8516+
},
8517+
{
8518+
"type": "STRING",
8519+
"value": "`"
84708520
}
84718521
]
84728522
},
@@ -8680,6 +8730,27 @@
86808730
{
86818731
"type": "SYMBOL",
86828732
"name": "_type"
8733+
},
8734+
{
8735+
"type": "CHOICE",
8736+
"members": [
8737+
{
8738+
"type": "SEQ",
8739+
"members": [
8740+
{
8741+
"type": "STRING",
8742+
"value": "as"
8743+
},
8744+
{
8745+
"type": "SYMBOL",
8746+
"name": "_type"
8747+
}
8748+
]
8749+
},
8750+
{
8751+
"type": "BLANK"
8752+
}
8753+
]
86838754
}
86848755
]
86858756
},
@@ -9835,6 +9906,10 @@
98359906
[
98369907
"array_pattern",
98379908
"tuple_type"
9909+
],
9910+
[
9911+
"template_literal_type",
9912+
"template_string"
98389913
]
98399914
],
98409915
"precedences": [
@@ -10203,6 +10278,16 @@
1020310278
"type": "SYMBOL",
1020410279
"name": "_type"
1020510280
}
10281+
],
10282+
[
10283+
{
10284+
"type": "SYMBOL",
10285+
"name": "as_expression"
10286+
},
10287+
{
10288+
"type": "SYMBOL",
10289+
"name": "_primary_type"
10290+
}
1020610291
]
1020710292
],
1020810293
"externals": [

tsx/src/node-types.json

Lines changed: 34 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@
5151
"type": "predefined_type",
5252
"named": true
5353
},
54+
{
55+
"type": "template_literal_type",
56+
"named": true
57+
},
5458
{
5559
"type": "this",
5660
"named": true
@@ -775,10 +779,6 @@
775779
"type": "readonly_type",
776780
"named": true
777781
},
778-
{
779-
"type": "template_string",
780-
"named": true
781-
},
782782
{
783783
"type": "union_type",
784784
"named": true
@@ -1119,14 +1119,6 @@
11191119
{
11201120
"type": "expression",
11211121
"named": true
1122-
},
1123-
{
1124-
"type": "identifier",
1125-
"named": true
1126-
},
1127-
{
1128-
"type": "member_expression",
1129-
"named": true
11301122
}
11311123
]
11321124
},
@@ -3514,14 +3506,6 @@
35143506
{
35153507
"type": "expression",
35163508
"named": true
3517-
},
3518-
{
3519-
"type": "identifier",
3520-
"named": true
3521-
},
3522-
{
3523-
"type": "member_expression",
3524-
"named": true
35253509
}
35263510
]
35273511
},
@@ -4845,6 +4829,21 @@
48454829
}
48464830
}
48474831
},
4832+
{
4833+
"type": "template_literal_type",
4834+
"named": true,
4835+
"fields": {},
4836+
"children": {
4837+
"multiple": true,
4838+
"required": false,
4839+
"types": [
4840+
{
4841+
"type": "template_type",
4842+
"named": true
4843+
}
4844+
]
4845+
}
4846+
},
48484847
{
48494848
"type": "template_string",
48504849
"named": true,
@@ -4883,6 +4882,21 @@
48834882
]
48844883
}
48854884
},
4885+
{
4886+
"type": "template_type",
4887+
"named": true,
4888+
"fields": {},
4889+
"children": {
4890+
"multiple": false,
4891+
"required": true,
4892+
"types": [
4893+
{
4894+
"type": "_primary_type",
4895+
"named": true
4896+
}
4897+
]
4898+
}
4899+
},
48864900
{
48874901
"type": "ternary_expression",
48884902
"named": true,

0 commit comments

Comments
 (0)