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:
@ -14,6 +14,34 @@ description: Operations executed cube_with_error.kcl
|
||||
"sourceRange": []
|
||||
},
|
||||
"labeledArgs": {},
|
||||
"nodePath": {
|
||||
"steps": [
|
||||
{
|
||||
"type": "ProgramBodyItem",
|
||||
"index": 0
|
||||
},
|
||||
{
|
||||
"type": "VariableDeclarationDeclaration"
|
||||
},
|
||||
{
|
||||
"type": "VariableDeclarationInit"
|
||||
},
|
||||
{
|
||||
"type": "FunctionExpressionBody"
|
||||
},
|
||||
{
|
||||
"type": "FunctionExpressionBodyItem",
|
||||
"index": 7
|
||||
},
|
||||
{
|
||||
"type": "ReturnStatementArg"
|
||||
},
|
||||
{
|
||||
"type": "PipeBodyItem",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
"sourceRange": []
|
||||
},
|
||||
{
|
||||
@ -46,6 +74,34 @@ description: Operations executed cube_with_error.kcl
|
||||
"sourceRange": []
|
||||
}
|
||||
},
|
||||
"nodePath": {
|
||||
"steps": [
|
||||
{
|
||||
"type": "ProgramBodyItem",
|
||||
"index": 0
|
||||
},
|
||||
{
|
||||
"type": "VariableDeclarationDeclaration"
|
||||
},
|
||||
{
|
||||
"type": "VariableDeclarationInit"
|
||||
},
|
||||
{
|
||||
"type": "FunctionExpressionBody"
|
||||
},
|
||||
{
|
||||
"type": "FunctionExpressionBodyItem",
|
||||
"index": 7
|
||||
},
|
||||
{
|
||||
"type": "ReturnStatementArg"
|
||||
},
|
||||
{
|
||||
"type": "PipeBodyItem",
|
||||
"index": 7
|
||||
}
|
||||
]
|
||||
},
|
||||
"sourceRange": []
|
||||
},
|
||||
{
|
||||
@ -108,6 +164,20 @@ description: Operations executed cube_with_error.kcl
|
||||
}
|
||||
}
|
||||
},
|
||||
"nodePath": {
|
||||
"steps": [
|
||||
{
|
||||
"type": "ProgramBodyItem",
|
||||
"index": 1
|
||||
},
|
||||
{
|
||||
"type": "VariableDeclarationDeclaration"
|
||||
},
|
||||
{
|
||||
"type": "VariableDeclarationInit"
|
||||
}
|
||||
]
|
||||
},
|
||||
"sourceRange": []
|
||||
},
|
||||
{
|
||||
|
Reference in New Issue
Block a user