Skip to content

Commit 15fb996

Browse files
authored
feat: support PHP 8.3 dynamic constant fetch (php-rust-tools#244)
Signed-off-by: azjezz <[email protected]>
1 parent 48725c1 commit 15fb996

File tree

16 files changed

+1464
-1552
lines changed

16 files changed

+1464
-1552
lines changed

schema.json

+212-132
Original file line numberDiff line numberDiff line change
@@ -4768,7 +4768,45 @@
47684768
"$ref": "#/definitions/Span"
47694769
},
47704770
"method": {
4771+
"$ref": "#/definitions/Identifier"
4772+
},
4773+
"target": {
47714774
"$ref": "#/definitions/Expression"
4775+
}
4776+
}
4777+
}
4778+
}
4779+
},
4780+
{
4781+
"type": "object",
4782+
"required": [
4783+
"type",
4784+
"value"
4785+
],
4786+
"properties": {
4787+
"type": {
4788+
"type": "string",
4789+
"enum": [
4790+
"static_variable_method_call"
4791+
]
4792+
},
4793+
"value": {
4794+
"type": "object",
4795+
"required": [
4796+
"arguments",
4797+
"double_colon",
4798+
"method",
4799+
"target"
4800+
],
4801+
"properties": {
4802+
"arguments": {
4803+
"$ref": "#/definitions/ArgumentList"
4804+
},
4805+
"double_colon": {
4806+
"$ref": "#/definitions/Span"
4807+
},
4808+
"method": {
4809+
"$ref": "#/definitions/Variable"
47724810
},
47734811
"target": {
47744812
"$ref": "#/definitions/Expression"
@@ -4803,7 +4841,45 @@
48034841
"$ref": "#/definitions/Span"
48044842
},
48054843
"method": {
4844+
"$ref": "#/definitions/Identifier"
4845+
},
4846+
"placeholder": {
4847+
"$ref": "#/definitions/ArgumentPlaceholder"
4848+
},
4849+
"target": {
48064850
"$ref": "#/definitions/Expression"
4851+
}
4852+
}
4853+
}
4854+
}
4855+
},
4856+
{
4857+
"type": "object",
4858+
"required": [
4859+
"type",
4860+
"value"
4861+
],
4862+
"properties": {
4863+
"type": {
4864+
"type": "string",
4865+
"enum": [
4866+
"static_variable_method_closure_creation"
4867+
]
4868+
},
4869+
"value": {
4870+
"type": "object",
4871+
"required": [
4872+
"double_colon",
4873+
"method",
4874+
"placeholder",
4875+
"target"
4876+
],
4877+
"properties": {
4878+
"double_colon": {
4879+
"$ref": "#/definitions/Span"
4880+
},
4881+
"method": {
4882+
"$ref": "#/definitions/Variable"
48074883
},
48084884
"placeholder": {
48094885
"$ref": "#/definitions/ArgumentPlaceholder"
@@ -4815,6 +4891,142 @@
48154891
}
48164892
}
48174893
},
4894+
{
4895+
"type": "object",
4896+
"required": [
4897+
"type",
4898+
"value"
4899+
],
4900+
"properties": {
4901+
"type": {
4902+
"type": "string",
4903+
"enum": [
4904+
"property_fetch"
4905+
]
4906+
},
4907+
"value": {
4908+
"type": "object",
4909+
"required": [
4910+
"arrow",
4911+
"property",
4912+
"target"
4913+
],
4914+
"properties": {
4915+
"arrow": {
4916+
"$ref": "#/definitions/Span"
4917+
},
4918+
"property": {
4919+
"$ref": "#/definitions/Expression"
4920+
},
4921+
"target": {
4922+
"$ref": "#/definitions/Expression"
4923+
}
4924+
}
4925+
}
4926+
}
4927+
},
4928+
{
4929+
"type": "object",
4930+
"required": [
4931+
"type",
4932+
"value"
4933+
],
4934+
"properties": {
4935+
"type": {
4936+
"type": "string",
4937+
"enum": [
4938+
"nullsafe_property_fetch"
4939+
]
4940+
},
4941+
"value": {
4942+
"type": "object",
4943+
"required": [
4944+
"property",
4945+
"question_arrow",
4946+
"target"
4947+
],
4948+
"properties": {
4949+
"property": {
4950+
"$ref": "#/definitions/Expression"
4951+
},
4952+
"question_arrow": {
4953+
"$ref": "#/definitions/Span"
4954+
},
4955+
"target": {
4956+
"$ref": "#/definitions/Expression"
4957+
}
4958+
}
4959+
}
4960+
}
4961+
},
4962+
{
4963+
"type": "object",
4964+
"required": [
4965+
"type",
4966+
"value"
4967+
],
4968+
"properties": {
4969+
"type": {
4970+
"type": "string",
4971+
"enum": [
4972+
"static_property_fetch"
4973+
]
4974+
},
4975+
"value": {
4976+
"type": "object",
4977+
"required": [
4978+
"double_colon",
4979+
"property",
4980+
"target"
4981+
],
4982+
"properties": {
4983+
"double_colon": {
4984+
"$ref": "#/definitions/Span"
4985+
},
4986+
"property": {
4987+
"$ref": "#/definitions/Variable"
4988+
},
4989+
"target": {
4990+
"$ref": "#/definitions/Expression"
4991+
}
4992+
}
4993+
}
4994+
}
4995+
},
4996+
{
4997+
"type": "object",
4998+
"required": [
4999+
"type",
5000+
"value"
5001+
],
5002+
"properties": {
5003+
"type": {
5004+
"type": "string",
5005+
"enum": [
5006+
"constant_fetch"
5007+
]
5008+
},
5009+
"value": {
5010+
"type": "object",
5011+
"required": [
5012+
"constant",
5013+
"double_colon",
5014+
"target"
5015+
],
5016+
"properties": {
5017+
"constant": {
5018+
"$ref": "#/definitions/Identifier"
5019+
},
5020+
"double_colon": {
5021+
"$ref": "#/definitions/Span"
5022+
},
5023+
"target": {
5024+
"$ref": "#/definitions/Expression"
5025+
}
5026+
}
5027+
}
5028+
}
5029+
},
48185030
{
48195031
"type": "object",
48205032
"required": [
@@ -5159,138 +5371,6 @@
51595371
}
51605372
}
51615373
},
5162-
{
5163-
"type": "object",
5164-
"required": [
5165-
"type",
5166-
"value"
5167-
],
5168-
"properties": {
5169-
"type": {
5170-
"type": "string",
5171-
"enum": [
5172-
"property_fetch"
5173-
]
5174-
},
5175-
"value": {
5176-
"type": "object",
5177-
"required": [
5178-
"arrow",
5179-
"property",
5180-
"target"
5181-
],
5182-
"properties": {
5183-
"arrow": {
5184-
"$ref": "#/definitions/Span"
5185-
},
5186-
"property": {
5187-
"$ref": "#/definitions/Expression"
5188-
},
5189-
"target": {
5190-
"$ref": "#/definitions/Expression"
5191-
}
5192-
}
5193-
}
5194-
}
5195-
},
5196-
{
5197-
"type": "object",
5198-
"required": [
5199-
"type",
5200-
"value"
5201-
],
5202-
"properties": {
5203-
"type": {
5204-
"type": "string",
5205-
"enum": [
5206-
"nullsafe_property_fetch"
5207-
]
5208-
},
5209-
"value": {
5210-
"type": "object",
5211-
"required": [
5212-
"property",
5213-
"question_arrow",
5214-
"target"
5215-
],
5216-
"properties": {
5217-
"property": {
5218-
"$ref": "#/definitions/Expression"
5219-
},
5220-
"question_arrow": {
5221-
"$ref": "#/definitions/Span"
5222-
},
5223-
"target": {
5224-
"$ref": "#/definitions/Expression"
5225-
}
5226-
}
5227-
}
5228-
}
5229-
},
5230-
{
5231-
"type": "object",
5232-
"required": [
5233-
"type",
5234-
"value"
5235-
],
5236-
"properties": {
5237-
"type": {
5238-
"type": "string",
5239-
"enum": [
5240-
"static_property_fetch"
5241-
]
5242-
},
5243-
"value": {
5244-
"type": "object",
5245-
"required": [
5246-
"double_colon",
5247-
"property",
5248-
"target"
5249-
],
5250-
"properties": {
5251-
"double_colon": {
5252-
"$ref": "#/definitions/Span"
5253-
},
5254-
"property": {
5255-
"$ref": "#/definitions/Expression"
5256-
},
5257-
"target": {
5258-
"$ref": "#/definitions/Expression"
5259-
}
5260-
}
5261-
}
5262-
}
5263-
},
5264-
{
5265-
"type": "object",
5266-
"required": [
5267-
"type",
5268-
"value"
5269-
],
5270-
"properties": {
5271-
"type": {
5272-
"type": "string",
5273-
"enum": [
5274-
"const_fetch"
5275-
]
5276-
},
5277-
"value": {
5278-
"type": "object",
5279-
"required": [
5280-
"constant",
5281-
"target"
5282-
],
5283-
"properties": {
5284-
"constant": {
5285-
"$ref": "#/definitions/SimpleIdentifier"
5286-
},
5287-
"target": {
5288-
"$ref": "#/definitions/Expression"
5289-
}
5290-
}
5291-
}
5292-
}
5293-
},
52945374
{
52955375
"type": "object",
52965376
"required": [

0 commit comments

Comments
 (0)