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,37 @@ description: Operations executed sketch_on_face_end.kcl
 | 
			
		||||
      "sourceRange": []
 | 
			
		||||
    },
 | 
			
		||||
    "labeledArgs": {},
 | 
			
		||||
    "nodePath": {
 | 
			
		||||
      "steps": [
 | 
			
		||||
        {
 | 
			
		||||
          "type": "ProgramBodyItem",
 | 
			
		||||
          "index": 0
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          "type": "VariableDeclarationDeclaration"
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          "type": "VariableDeclarationInit"
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          "type": "FunctionExpressionBody"
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          "type": "FunctionExpressionBodyItem",
 | 
			
		||||
          "index": 0
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          "type": "VariableDeclarationDeclaration"
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          "type": "VariableDeclarationInit"
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          "type": "PipeBodyItem",
 | 
			
		||||
          "index": 0
 | 
			
		||||
        }
 | 
			
		||||
      ]
 | 
			
		||||
    },
 | 
			
		||||
    "sourceRange": []
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
@ -76,6 +107,24 @@ description: Operations executed sketch_on_face_end.kcl
 | 
			
		||||
        }
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    "nodePath": {
 | 
			
		||||
      "steps": [
 | 
			
		||||
        {
 | 
			
		||||
          "type": "ProgramBodyItem",
 | 
			
		||||
          "index": 1
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          "type": "VariableDeclarationDeclaration"
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          "type": "VariableDeclarationInit"
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          "type": "PipeBodyItem",
 | 
			
		||||
          "index": 0
 | 
			
		||||
        }
 | 
			
		||||
      ]
 | 
			
		||||
    },
 | 
			
		||||
    "sourceRange": []
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
@ -108,6 +157,24 @@ description: Operations executed sketch_on_face_end.kcl
 | 
			
		||||
        "sourceRange": []
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    "nodePath": {
 | 
			
		||||
      "steps": [
 | 
			
		||||
        {
 | 
			
		||||
          "type": "ProgramBodyItem",
 | 
			
		||||
          "index": 1
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          "type": "VariableDeclarationDeclaration"
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          "type": "VariableDeclarationInit"
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          "type": "PipeBodyItem",
 | 
			
		||||
          "index": 2
 | 
			
		||||
        }
 | 
			
		||||
      ]
 | 
			
		||||
    },
 | 
			
		||||
    "sourceRange": []
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
@ -131,6 +198,24 @@ description: Operations executed sketch_on_face_end.kcl
 | 
			
		||||
        "sourceRange": []
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    "nodePath": {
 | 
			
		||||
      "steps": [
 | 
			
		||||
        {
 | 
			
		||||
          "type": "ProgramBodyItem",
 | 
			
		||||
          "index": 2
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          "type": "VariableDeclarationDeclaration"
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          "type": "VariableDeclarationInit"
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          "type": "PipeBodyItem",
 | 
			
		||||
          "index": 0
 | 
			
		||||
        }
 | 
			
		||||
      ]
 | 
			
		||||
    },
 | 
			
		||||
    "sourceRange": []
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
@ -163,6 +248,24 @@ description: Operations executed sketch_on_face_end.kcl
 | 
			
		||||
        "sourceRange": []
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    "nodePath": {
 | 
			
		||||
      "steps": [
 | 
			
		||||
        {
 | 
			
		||||
          "type": "ProgramBodyItem",
 | 
			
		||||
          "index": 2
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          "type": "VariableDeclarationDeclaration"
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          "type": "VariableDeclarationInit"
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          "type": "PipeBodyItem",
 | 
			
		||||
          "index": 6
 | 
			
		||||
        }
 | 
			
		||||
      ]
 | 
			
		||||
    },
 | 
			
		||||
    "sourceRange": []
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user