improve tree-sitter

This commit is contained in:
csh
2025-10-26 22:51:27 +08:00
parent 9385aaf2c1
commit dbccd5b605
9 changed files with 270641 additions and 270588 deletions
+92 -131
View File
@@ -2413,20 +2413,20 @@
"name": "_parameter_signature"
},
{
"type": "FIELD",
"name": "return_type",
"content": {
"type": "CHOICE",
"members": [
{
"type": "CHOICE",
"members": [
{
"type": "FIELD",
"name": "return_type",
"content": {
"type": "SYMBOL",
"name": "_type_clause"
},
{
"type": "BLANK"
}
]
}
},
{
"type": "BLANK"
}
]
},
{
"type": "CHOICE",
@@ -5601,7 +5601,7 @@
}
]
},
"function_declaration_statement": {
"_function_header": {
"type": "SEQ",
"members": [
{
@@ -5640,6 +5640,15 @@
"type": "BLANK"
}
]
}
]
},
"function_declaration_statement": {
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "_function_header"
},
{
"type": "STRING",
@@ -5650,42 +5659,9 @@
"function_definition_statement": {
"type": "SEQ",
"members": [
{
"type": "ALIAS",
"content": {
"type": "PATTERN",
"value": "(?i)function"
},
"named": false,
"value": "function"
},
{
"type": "FIELD",
"name": "name",
"content": {
"type": "SYMBOL",
"name": "identifier"
}
},
{
"type": "SYMBOL",
"name": "_parameter_signature"
},
{
"type": "FIELD",
"name": "return_type",
"content": {
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "_type_clause"
},
{
"type": "BLANK"
}
]
}
"name": "_function_header"
},
{
"type": "CHOICE",
@@ -5724,42 +5700,9 @@
"function_definition_with_overload_statement": {
"type": "SEQ",
"members": [
{
"type": "ALIAS",
"content": {
"type": "PATTERN",
"value": "(?i)function"
},
"named": false,
"value": "function"
},
{
"type": "FIELD",
"name": "name",
"content": {
"type": "SYMBOL",
"name": "identifier"
}
},
{
"type": "SYMBOL",
"name": "_parameter_signature"
},
{
"type": "FIELD",
"name": "return_type",
"content": {
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "_type_clause"
},
{
"type": "BLANK"
}
]
}
"name": "_function_header"
},
{
"type": "STRING",
@@ -6115,11 +6058,20 @@
]
},
"class_body": {
"type": "REPEAT1",
"content": {
"type": "SYMBOL",
"name": "class_member"
}
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "uses_statement"
},
{
"type": "REPEAT1",
"content": {
"type": "SYMBOL",
"name": "class_member"
}
}
]
},
"class_member": {
"type": "CHOICE",
@@ -6156,10 +6108,6 @@
"name": "property_declaration"
}
]
},
{
"type": "SYMBOL",
"name": "uses_statement"
}
]
},
@@ -7396,8 +7344,33 @@
]
},
"_operator_method": {
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "_operator_overload_method"
},
{
"type": "SYMBOL",
"name": "_operator_method_with_modifier"
}
]
},
"_normal_method": {
"type": "SEQ",
"members": [
{
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "class"
},
{
"type": "BLANK"
}
]
},
{
"type": "ALIAS",
"content": {
@@ -7408,33 +7381,8 @@
"value": "function"
},
{
"type": "ALIAS",
"content": {
"type": "PATTERN",
"value": "(?i)operator"
},
"named": false,
"value": "operator"
},
{
"type": "FIELD",
"name": "class_name",
"content": {
"type": "SYMBOL",
"name": "identifier"
}
},
{
"type": "STRING",
"value": "."
},
{
"type": "FIELD",
"name": "operator",
"content": {
"type": "SYMBOL",
"name": "_overloadable_operator"
}
"type": "SYMBOL",
"name": "_qualified_method_name"
},
{
"type": "SYMBOL",
@@ -7490,21 +7438,9 @@
}
]
},
"_normal_method": {
"_operator_overload_method": {
"type": "SEQ",
"members": [
{
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "class"
},
{
"type": "BLANK"
}
]
},
{
"type": "ALIAS",
"content": {
@@ -7515,8 +7451,33 @@
"value": "function"
},
{
"type": "SYMBOL",
"name": "_qualified_method_name"
"type": "ALIAS",
"content": {
"type": "PATTERN",
"value": "(?i)operator"
},
"named": false,
"value": "operator"
},
{
"type": "FIELD",
"name": "class_name",
"content": {
"type": "SYMBOL",
"name": "identifier"
}
},
{
"type": "STRING",
"value": "."
},
{
"type": "FIELD",
"name": "operator",
"content": {
"type": "SYMBOL",
"name": "_overloadable_operator"
}
},
{
"type": "SYMBOL",
+6 -6
View File
@@ -1127,6 +1127,10 @@
{
"type": "class_member",
"named": true
},
{
"type": "uses_statement",
"named": true
}
]
}
@@ -1230,10 +1234,6 @@
"type": "property_declaration",
"named": true
},
{
"type": "uses_statement",
"named": true
},
{
"type": "variable_declaration",
"named": true
@@ -1680,7 +1680,7 @@
"fields": {
"body": {
"multiple": false,
"required": true,
"required": false,
"types": [
{
"type": "block_suite",
@@ -1690,7 +1690,7 @@
},
"class_name": {
"multiple": false,
"required": false,
"required": true,
"types": [
{
"type": "identifier",
+135172 -135121
View File
File diff suppressed because it is too large Load Diff