Change to use nodePath instead of sourceRange for Operations (#7320)

* Add NodePath to operations

* Change to use nodePath to get pathToNode instead of sourceRange

* Add additional node path unit test

* Update output

* Fix import statement NodePaths

* Update output

* Factor into function
This commit is contained in:
Jonathan Tran
2025-06-05 12:24:34 -04:00
committed by GitHub
parent b5f81cb84a
commit f6a3a3d0cd
195 changed files with 66733 additions and 5281 deletions

View File

@ -14,6 +14,37 @@ description: Operations executed gridfinity-bins.kcl
"sourceRange": []
},
"labeledArgs": {},
"nodePath": {
"steps": [
{
"type": "ProgramBodyItem",
"index": 16
},
{
"type": "VariableDeclarationDeclaration"
},
{
"type": "VariableDeclarationInit"
},
{
"type": "FunctionExpressionBody"
},
{
"type": "FunctionExpressionBodyItem",
"index": 0
},
{
"type": "VariableDeclarationDeclaration"
},
{
"type": "VariableDeclarationInit"
},
{
"type": "PipeBodyItem",
"index": 0
}
]
},
"sourceRange": []
},
{
@ -27,6 +58,37 @@ description: Operations executed gridfinity-bins.kcl
"sourceRange": []
},
"labeledArgs": {},
"nodePath": {
"steps": [
{
"type": "ProgramBodyItem",
"index": 16
},
{
"type": "VariableDeclarationDeclaration"
},
{
"type": "VariableDeclarationInit"
},
{
"type": "FunctionExpressionBody"
},
{
"type": "FunctionExpressionBodyItem",
"index": 0
},
{
"type": "VariableDeclarationDeclaration"
},
{
"type": "VariableDeclarationInit"
},
{
"type": "PipeBodyItem",
"index": 0
}
]
},
"sourceRange": []
},
{
@ -59,6 +121,20 @@ description: Operations executed gridfinity-bins.kcl
"sourceRange": []
}
},
"nodePath": {
"steps": [
{
"type": "ProgramBodyItem",
"index": 17
},
{
"type": "VariableDeclarationDeclaration"
},
{
"type": "VariableDeclarationInit"
}
]
},
"sourceRange": []
},
{
@ -76,6 +152,23 @@ description: Operations executed gridfinity-bins.kcl
},
"labeledArgs": {}
},
"nodePath": {
"steps": [
{
"type": "ProgramBodyItem",
"index": 17
},
{
"type": "VariableDeclarationDeclaration"
},
{
"type": "VariableDeclarationInit"
},
{
"type": "CallKwUnlabeledArg"
}
]
},
"sourceRange": []
},
{
@ -106,6 +199,26 @@ description: Operations executed gridfinity-bins.kcl
"sourceRange": []
}
},
"nodePath": {
"steps": [
{
"type": "ProgramBodyItem",
"index": 17
},
{
"type": "VariableDeclarationDeclaration"
},
{
"type": "VariableDeclarationInit"
},
{
"type": "CallKwUnlabeledArg"
},
{
"type": "CallKwUnlabeledArg"
}
]
},
"sourceRange": []
},
{
@ -246,6 +359,20 @@ description: Operations executed gridfinity-bins.kcl
"sourceRange": []
}
},
"nodePath": {
"steps": [
{
"type": "ProgramBodyItem",
"index": 18
},
{
"type": "VariableDeclarationDeclaration"
},
{
"type": "VariableDeclarationInit"
}
]
},
"sourceRange": []
},
{
@ -348,6 +475,20 @@ description: Operations executed gridfinity-bins.kcl
"sourceRange": []
}
},
"nodePath": {
"steps": [
{
"type": "ProgramBodyItem",
"index": 20
},
{
"type": "VariableDeclarationDeclaration"
},
{
"type": "VariableDeclarationInit"
}
]
},
"sourceRange": []
},
{
@ -365,6 +506,23 @@ description: Operations executed gridfinity-bins.kcl
},
"labeledArgs": {}
},
"nodePath": {
"steps": [
{
"type": "ProgramBodyItem",
"index": 20
},
{
"type": "VariableDeclarationDeclaration"
},
{
"type": "VariableDeclarationInit"
},
{
"type": "CallKwUnlabeledArg"
}
]
},
"sourceRange": []
},
{
@ -395,6 +553,26 @@ description: Operations executed gridfinity-bins.kcl
"sourceRange": []
}
},
"nodePath": {
"steps": [
{
"type": "ProgramBodyItem",
"index": 20
},
{
"type": "VariableDeclarationDeclaration"
},
{
"type": "VariableDeclarationInit"
},
{
"type": "CallKwUnlabeledArg"
},
{
"type": "CallKwUnlabeledArg"
}
]
},
"sourceRange": []
},
{
@ -535,6 +713,20 @@ description: Operations executed gridfinity-bins.kcl
"sourceRange": []
}
},
"nodePath": {
"steps": [
{
"type": "ProgramBodyItem",
"index": 21
},
{
"type": "VariableDeclarationDeclaration"
},
{
"type": "VariableDeclarationInit"
}
]
},
"sourceRange": []
},
{
@ -548,6 +740,24 @@ description: Operations executed gridfinity-bins.kcl
"sourceRange": []
},
"labeledArgs": {},
"nodePath": {
"steps": [
{
"type": "ProgramBodyItem",
"index": 22
},
{
"type": "VariableDeclarationDeclaration"
},
{
"type": "VariableDeclarationInit"
},
{
"type": "PipeBodyItem",
"index": 0
}
]
},
"sourceRange": []
},
{
@ -580,6 +790,24 @@ description: Operations executed gridfinity-bins.kcl
"sourceRange": []
}
},
"nodePath": {
"steps": [
{
"type": "ProgramBodyItem",
"index": 22
},
{
"type": "VariableDeclarationDeclaration"
},
{
"type": "VariableDeclarationInit"
},
{
"type": "PipeBodyItem",
"index": 6
}
]
},
"sourceRange": []
},
{
@ -636,6 +864,24 @@ description: Operations executed gridfinity-bins.kcl
"sourceRange": []
}
},
"nodePath": {
"steps": [
{
"type": "ProgramBodyItem",
"index": 22
},
{
"type": "VariableDeclarationDeclaration"
},
{
"type": "VariableDeclarationInit"
},
{
"type": "PipeBodyItem",
"index": 7
}
]
},
"sourceRange": []
},
{
@ -659,6 +905,24 @@ description: Operations executed gridfinity-bins.kcl
"sourceRange": []
}
},
"nodePath": {
"steps": [
{
"type": "ProgramBodyItem",
"index": 23
},
{
"type": "VariableDeclarationDeclaration"
},
{
"type": "VariableDeclarationInit"
},
{
"type": "PipeBodyItem",
"index": 0
}
]
},
"sourceRange": []
},
{
@ -714,6 +978,24 @@ description: Operations executed gridfinity-bins.kcl
"sourceRange": []
}
},
"nodePath": {
"steps": [
{
"type": "ProgramBodyItem",
"index": 23
},
{
"type": "VariableDeclarationDeclaration"
},
{
"type": "VariableDeclarationInit"
},
{
"type": "PipeBodyItem",
"index": 3
}
]
},
"sourceRange": []
},
{
@ -827,6 +1109,24 @@ description: Operations executed gridfinity-bins.kcl
"sourceRange": []
}
},
"nodePath": {
"steps": [
{
"type": "ProgramBodyItem",
"index": 24
},
{
"type": "VariableDeclarationDeclaration"
},
{
"type": "VariableDeclarationInit"
},
{
"type": "PipeBodyItem",
"index": 0
}
]
},
"sourceRange": []
},
{
@ -964,6 +1264,24 @@ description: Operations executed gridfinity-bins.kcl
"sourceRange": []
}
},
"nodePath": {
"steps": [
{
"type": "ProgramBodyItem",
"index": 24
},
{
"type": "VariableDeclarationDeclaration"
},
{
"type": "VariableDeclarationInit"
},
{
"type": "PipeBodyItem",
"index": 1
}
]
},
"sourceRange": []
},
{
@ -1077,6 +1395,24 @@ description: Operations executed gridfinity-bins.kcl
"sourceRange": []
}
},
"nodePath": {
"steps": [
{
"type": "ProgramBodyItem",
"index": 25
},
{
"type": "VariableDeclarationDeclaration"
},
{
"type": "VariableDeclarationInit"
},
{
"type": "PipeBodyItem",
"index": 0
}
]
},
"sourceRange": []
},
{
@ -1214,6 +1550,24 @@ description: Operations executed gridfinity-bins.kcl
"sourceRange": []
}
},
"nodePath": {
"steps": [
{
"type": "ProgramBodyItem",
"index": 25
},
{
"type": "VariableDeclarationDeclaration"
},
{
"type": "VariableDeclarationInit"
},
{
"type": "PipeBodyItem",
"index": 1
}
]
},
"sourceRange": []
},
{
@ -1304,6 +1658,24 @@ description: Operations executed gridfinity-bins.kcl
"sourceRange": []
}
},
"nodePath": {
"steps": [
{
"type": "ProgramBodyItem",
"index": 26
},
{
"type": "VariableDeclarationDeclaration"
},
{
"type": "VariableDeclarationInit"
},
{
"type": "PipeBodyItem",
"index": 0
}
]
},
"sourceRange": []
},
{
@ -1405,6 +1777,24 @@ description: Operations executed gridfinity-bins.kcl
"sourceRange": []
}
},
"nodePath": {
"steps": [
{
"type": "ProgramBodyItem",
"index": 26
},
{
"type": "VariableDeclarationDeclaration"
},
{
"type": "VariableDeclarationInit"
},
{
"type": "PipeBodyItem",
"index": 1
}
]
},
"sourceRange": []
},
{
@ -1418,6 +1808,24 @@ description: Operations executed gridfinity-bins.kcl
"sourceRange": []
},
"labeledArgs": {},
"nodePath": {
"steps": [
{
"type": "ProgramBodyItem",
"index": 27
},
{
"type": "VariableDeclarationDeclaration"
},
{
"type": "VariableDeclarationInit"
},
{
"type": "PipeBodyItem",
"index": 0
}
]
},
"sourceRange": []
},
{
@ -1448,6 +1856,27 @@ description: Operations executed gridfinity-bins.kcl
"sourceRange": []
}
},
"nodePath": {
"steps": [
{
"type": "ProgramBodyItem",
"index": 27
},
{
"type": "VariableDeclarationDeclaration"
},
{
"type": "VariableDeclarationInit"
},
{
"type": "PipeBodyItem",
"index": 0
},
{
"type": "CallKwUnlabeledArg"
}
]
},
"sourceRange": []
},
{
@ -1480,6 +1909,24 @@ description: Operations executed gridfinity-bins.kcl
"sourceRange": []
}
},
"nodePath": {
"steps": [
{
"type": "ProgramBodyItem",
"index": 27
},
{
"type": "VariableDeclarationDeclaration"
},
{
"type": "VariableDeclarationInit"
},
{
"type": "PipeBodyItem",
"index": 6
}
]
},
"sourceRange": []
},
{
@ -1536,6 +1983,24 @@ description: Operations executed gridfinity-bins.kcl
"sourceRange": []
}
},
"nodePath": {
"steps": [
{
"type": "ProgramBodyItem",
"index": 27
},
{
"type": "VariableDeclarationDeclaration"
},
{
"type": "VariableDeclarationInit"
},
{
"type": "PipeBodyItem",
"index": 7
}
]
},
"sourceRange": []
},
{
@ -1580,6 +2045,24 @@ description: Operations executed gridfinity-bins.kcl
"sourceRange": []
}
},
"nodePath": {
"steps": [
{
"type": "ProgramBodyItem",
"index": 27
},
{
"type": "VariableDeclarationDeclaration"
},
{
"type": "VariableDeclarationInit"
},
{
"type": "PipeBodyItem",
"index": 8
}
]
},
"sourceRange": []
},
{