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,20 @@ description: Operations executed subtract_with_pattern.kcl
"sourceRange": []
},
"labeledArgs": {},
"nodePath": {
"steps": [
{
"type": "ProgramBodyItem",
"index": 0
},
{
"type": "VariableDeclarationDeclaration"
},
{
"type": "VariableDeclarationInit"
}
]
},
"sourceRange": []
},
{
@ -46,6 +60,20 @@ description: Operations executed subtract_with_pattern.kcl
"sourceRange": []
}
},
"nodePath": {
"steps": [
{
"type": "ProgramBodyItem",
"index": 2
},
{
"type": "VariableDeclarationDeclaration"
},
{
"type": "VariableDeclarationInit"
}
]
},
"sourceRange": []
},
{
@ -59,6 +87,20 @@ description: Operations executed subtract_with_pattern.kcl
"sourceRange": []
},
"labeledArgs": {},
"nodePath": {
"steps": [
{
"type": "ProgramBodyItem",
"index": 3
},
{
"type": "VariableDeclarationDeclaration"
},
{
"type": "VariableDeclarationInit"
}
]
},
"sourceRange": []
},
{
@ -91,6 +133,20 @@ description: Operations executed subtract_with_pattern.kcl
"sourceRange": []
}
},
"nodePath": {
"steps": [
{
"type": "ProgramBodyItem",
"index": 5
},
{
"type": "VariableDeclarationDeclaration"
},
{
"type": "VariableDeclarationInit"
}
]
},
"sourceRange": []
},
{
@ -181,6 +237,20 @@ description: Operations executed subtract_with_pattern.kcl
"sourceRange": []
}
},
"nodePath": {
"steps": [
{
"type": "ProgramBodyItem",
"index": 6
},
{
"type": "VariableDeclarationDeclaration"
},
{
"type": "VariableDeclarationInit"
}
]
},
"sourceRange": []
},
{
@ -270,6 +340,21 @@ description: Operations executed subtract_with_pattern.kcl
"sourceRange": []
}
},
"nodePath": {
"steps": [
{
"type": "ProgramBodyItem",
"index": 7
},
{
"type": "ExpressionStatementExpr"
},
{
"type": "PipeBodyItem",
"index": 0
}
]
},
"sourceRange": []
},
{
@ -349,6 +434,21 @@ description: Operations executed subtract_with_pattern.kcl
"sourceRange": []
}
},
"nodePath": {
"steps": [
{
"type": "ProgramBodyItem",
"index": 7
},
{
"type": "ExpressionStatementExpr"
},
{
"type": "PipeBodyItem",
"index": 1
}
]
},
"sourceRange": []
}
]