Skip to content

Commit 8057c92

Browse files
committed
regenerate parser for 'function_signature'
1 parent ef5d588 commit 8057c92

File tree

6 files changed

+186603
-173555
lines changed

6 files changed

+186603
-173555
lines changed

tsx/src/grammar.json

Lines changed: 154 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -4924,7 +4924,7 @@
49244924
},
49254925
{
49264926
"type": "PATTERN",
4927-
"value": "[^*]*\\*+([^\\/*][^*]*\\*+)*"
4927+
"value": "[^*]*\\*+([^/*][^*]*\\*+)*"
49284928
},
49294929
{
49304930
"type": "STRING",
@@ -5086,7 +5086,7 @@
50865086
},
50875087
{
50885088
"type": "PATTERN",
5089-
"value": "[^\\/\\\\\\[\\n]"
5089+
"value": "[^/\\\\\\[\\n]"
50905090
}
50915091
]
50925092
}
@@ -5595,13 +5595,13 @@
55955595
"members": [
55965596
{
55975597
"type": "PATTERN",
5598-
"value": "[^\\x00-\\x1F\\s0-9:;`\"'@#.,|^&<=>+\\-*\\/\\\\%?!~()\\[\\]{}\\uFEFF\\u2060\\u200B\\u00A0]|\\\\u[0-9a-fA-F]{4}|\\\\u\\{[0-9a-fA-F]+\\}"
5598+
"value": "[^\\x00-\\x1F\\s0-9:;`\"'@#.,|^&<=>+\\-*/\\\\%?!~()\\[\\]{}\\uFEFF\\u2060\\u200B\\u00A0]|\\\\u[0-9a-fA-F]{4}|\\\\u\\{[0-9a-fA-F]+\\}"
55995599
},
56005600
{
56015601
"type": "REPEAT",
56025602
"content": {
56035603
"type": "PATTERN",
5604-
"value": "[^\\x00-\\x1F\\s:;`\"'@#.,|^&<=>+\\-*\\/\\\\%?!~()\\[\\]{}\\uFEFF\\u2060\\u200B\\u00A0]|\\\\u[0-9a-fA-F]{4}|\\\\u\\{[0-9a-fA-F]+\\}"
5604+
"value": "[^\\x00-\\x1F\\s:;`\"'@#.,|^&<=>+\\-*/\\\\%?!~()\\[\\]{}\\uFEFF\\u2060\\u200B\\u00A0]|\\\\u[0-9a-fA-F]{4}|\\\\u\\{[0-9a-fA-F]+\\}"
56055605
}
56065606
}
56075607
]
@@ -6779,41 +6779,154 @@
67796779
]
67806780
},
67816781
"function_signature": {
6782-
"type": "SEQ",
6783-
"members": [
6784-
{
6785-
"type": "CHOICE",
6786-
"members": [
6787-
{
6788-
"type": "STRING",
6789-
"value": "async"
6790-
},
6791-
{
6792-
"type": "BLANK"
6782+
"type": "PREC_RIGHT",
6783+
"value": 0,
6784+
"content": {
6785+
"type": "SEQ",
6786+
"members": [
6787+
{
6788+
"type": "CHOICE",
6789+
"members": [
6790+
{
6791+
"type": "STRING",
6792+
"value": "async"
6793+
},
6794+
{
6795+
"type": "BLANK"
6796+
}
6797+
]
6798+
},
6799+
{
6800+
"type": "STRING",
6801+
"value": "function"
6802+
},
6803+
{
6804+
"type": "FIELD",
6805+
"name": "name",
6806+
"content": {
6807+
"type": "SYMBOL",
6808+
"name": "identifier"
6809+
}
6810+
},
6811+
{
6812+
"type": "FIELD",
6813+
"name": "type_parameters",
6814+
"content": {
6815+
"type": "CHOICE",
6816+
"members": [
6817+
{
6818+
"type": "SYMBOL",
6819+
"name": "type_parameters"
6820+
},
6821+
{
6822+
"type": "BLANK"
6823+
}
6824+
]
6825+
}
6826+
},
6827+
{
6828+
"type": "FIELD",
6829+
"name": "parameters",
6830+
"content": {
6831+
"type": "SYMBOL",
6832+
"name": "formal_parameters"
6833+
}
6834+
},
6835+
{
6836+
"type": "FIELD",
6837+
"name": "return_type",
6838+
"content": {
6839+
"type": "CHOICE",
6840+
"members": [
6841+
{
6842+
"type": "SEQ",
6843+
"members": [
6844+
{
6845+
"type": "CHOICE",
6846+
"members": [
6847+
{
6848+
"type": "SYMBOL",
6849+
"name": "type_annotation"
6850+
},
6851+
{
6852+
"type": "SYMBOL",
6853+
"name": "asserts"
6854+
},
6855+
{
6856+
"type": "SYMBOL",
6857+
"name": "type_predicate_annotation"
6858+
}
6859+
]
6860+
},
6861+
{
6862+
"type": "SYMBOL",
6863+
"name": "_function_signature_semicolon"
6864+
},
6865+
{
6866+
"type": "CHOICE",
6867+
"members": [
6868+
{
6869+
"type": "STRING",
6870+
"value": ";"
6871+
},
6872+
{
6873+
"type": "BLANK"
6874+
}
6875+
]
6876+
}
6877+
]
6878+
},
6879+
{
6880+
"type": "SEQ",
6881+
"members": [
6882+
{
6883+
"type": "SYMBOL",
6884+
"name": "_function_signature_semicolon"
6885+
},
6886+
{
6887+
"type": "CHOICE",
6888+
"members": [
6889+
{
6890+
"type": "CHOICE",
6891+
"members": [
6892+
{
6893+
"type": "SYMBOL",
6894+
"name": "type_annotation"
6895+
},
6896+
{
6897+
"type": "SYMBOL",
6898+
"name": "asserts"
6899+
},
6900+
{
6901+
"type": "SYMBOL",
6902+
"name": "type_predicate_annotation"
6903+
}
6904+
]
6905+
},
6906+
{
6907+
"type": "BLANK"
6908+
}
6909+
]
6910+
},
6911+
{
6912+
"type": "CHOICE",
6913+
"members": [
6914+
{
6915+
"type": "STRING",
6916+
"value": ";"
6917+
},
6918+
{
6919+
"type": "BLANK"
6920+
}
6921+
]
6922+
}
6923+
]
6924+
}
6925+
]
67936926
}
6794-
]
6795-
},
6796-
{
6797-
"type": "STRING",
6798-
"value": "function"
6799-
},
6800-
{
6801-
"type": "FIELD",
6802-
"name": "name",
6803-
"content": {
6804-
"type": "SYMBOL",
6805-
"name": "identifier"
68066927
}
6807-
},
6808-
{
6809-
"type": "SYMBOL",
6810-
"name": "_call_signature"
6811-
},
6812-
{
6813-
"type": "SYMBOL",
6814-
"name": "_semicolon"
6815-
}
6816-
]
6928+
]
6929+
}
68176930
},
68186931
"type_assertion": {
68196932
"type": "PREC",
@@ -9282,6 +9395,10 @@
92829395
{
92839396
"type": "STRING",
92849397
"value": "||"
9398+
},
9399+
{
9400+
"type": "SYMBOL",
9401+
"name": "_function_signature_semicolon"
92859402
}
92869403
],
92879404
"inline": [

tsx/src/node-types.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2844,9 +2844,13 @@
28442844
]
28452845
},
28462846
"return_type": {
2847-
"multiple": false,
2848-
"required": false,
2847+
"multiple": true,
2848+
"required": true,
28492849
"types": [
2850+
{
2851+
"type": ";",
2852+
"named": false
2853+
},
28502854
{
28512855
"type": "asserts",
28522856
"named": true

0 commit comments

Comments
 (0)