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

@ -10,6 +10,14 @@ description: Operations executed pattern_linear_in_module.kcl
"name": "thing.kcl",
"moduleId": 0
},
"nodePath": {
"steps": [
{
"type": "ProgramBodyItem",
"index": 0
}
]
},
"sourceRange": []
},
{
@ -21,6 +29,17 @@ description: Operations executed pattern_linear_in_module.kcl
"unlabeledArg": null,
"labeledArgs": {}
},
"nodePath": {
"steps": [
{
"type": "ProgramBodyItem",
"index": 1
},
{
"type": "ExpressionStatementExpr"
}
]
},
"sourceRange": []
},
{
@ -34,6 +53,9 @@ description: Operations executed pattern_linear_in_module.kcl
"sourceRange": []
},
"labeledArgs": {},
"nodePath": {
"steps": []
},
"sourceRange": []
},
{
@ -107,6 +129,9 @@ description: Operations executed pattern_linear_in_module.kcl
"sourceRange": []
}
},
"nodePath": {
"steps": []
},
"sourceRange": []
},
{