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,24 @@ description: Operations executed router-template-cross-bar.kcl
 | 
			
		||||
      "sourceRange": []
 | 
			
		||||
    },
 | 
			
		||||
    "labeledArgs": {},
 | 
			
		||||
    "nodePath": {
 | 
			
		||||
      "steps": [
 | 
			
		||||
        {
 | 
			
		||||
          "type": "ProgramBodyItem",
 | 
			
		||||
          "index": 9
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          "type": "VariableDeclarationDeclaration"
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          "type": "VariableDeclarationInit"
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          "type": "PipeBodyItem",
 | 
			
		||||
          "index": 0
 | 
			
		||||
        }
 | 
			
		||||
      ]
 | 
			
		||||
    },
 | 
			
		||||
    "sourceRange": []
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
@ -46,6 +64,20 @@ description: Operations executed router-template-cross-bar.kcl
 | 
			
		||||
        "sourceRange": []
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    "nodePath": {
 | 
			
		||||
      "steps": [
 | 
			
		||||
        {
 | 
			
		||||
          "type": "ProgramBodyItem",
 | 
			
		||||
          "index": 10
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          "type": "VariableDeclarationDeclaration"
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          "type": "VariableDeclarationInit"
 | 
			
		||||
        }
 | 
			
		||||
      ]
 | 
			
		||||
    },
 | 
			
		||||
    "sourceRange": []
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
@ -69,6 +101,24 @@ description: Operations executed router-template-cross-bar.kcl
 | 
			
		||||
        "sourceRange": []
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    "nodePath": {
 | 
			
		||||
      "steps": [
 | 
			
		||||
        {
 | 
			
		||||
          "type": "ProgramBodyItem",
 | 
			
		||||
          "index": 11
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          "type": "VariableDeclarationDeclaration"
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          "type": "VariableDeclarationInit"
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          "type": "PipeBodyItem",
 | 
			
		||||
          "index": 0
 | 
			
		||||
        }
 | 
			
		||||
      ]
 | 
			
		||||
    },
 | 
			
		||||
    "sourceRange": []
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
@ -101,6 +151,20 @@ description: Operations executed router-template-cross-bar.kcl
 | 
			
		||||
        "sourceRange": []
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    "nodePath": {
 | 
			
		||||
      "steps": [
 | 
			
		||||
        {
 | 
			
		||||
          "type": "ProgramBodyItem",
 | 
			
		||||
          "index": 12
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          "type": "VariableDeclarationDeclaration"
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          "type": "VariableDeclarationInit"
 | 
			
		||||
        }
 | 
			
		||||
      ]
 | 
			
		||||
    },
 | 
			
		||||
    "sourceRange": []
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
@ -124,6 +188,24 @@ description: Operations executed router-template-cross-bar.kcl
 | 
			
		||||
        "sourceRange": []
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    "nodePath": {
 | 
			
		||||
      "steps": [
 | 
			
		||||
        {
 | 
			
		||||
          "type": "ProgramBodyItem",
 | 
			
		||||
          "index": 13
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          "type": "VariableDeclarationDeclaration"
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          "type": "VariableDeclarationInit"
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          "type": "PipeBodyItem",
 | 
			
		||||
          "index": 0
 | 
			
		||||
        }
 | 
			
		||||
      ]
 | 
			
		||||
    },
 | 
			
		||||
    "sourceRange": []
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
@ -156,6 +238,20 @@ description: Operations executed router-template-cross-bar.kcl
 | 
			
		||||
        "sourceRange": []
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    "nodePath": {
 | 
			
		||||
      "steps": [
 | 
			
		||||
        {
 | 
			
		||||
          "type": "ProgramBodyItem",
 | 
			
		||||
          "index": 14
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          "type": "VariableDeclarationDeclaration"
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          "type": "VariableDeclarationInit"
 | 
			
		||||
        }
 | 
			
		||||
      ]
 | 
			
		||||
    },
 | 
			
		||||
    "sourceRange": []
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
@ -179,6 +275,24 @@ description: Operations executed router-template-cross-bar.kcl
 | 
			
		||||
        "sourceRange": []
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    "nodePath": {
 | 
			
		||||
      "steps": [
 | 
			
		||||
        {
 | 
			
		||||
          "type": "ProgramBodyItem",
 | 
			
		||||
          "index": 15
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          "type": "VariableDeclarationDeclaration"
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          "type": "VariableDeclarationInit"
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          "type": "PipeBodyItem",
 | 
			
		||||
          "index": 0
 | 
			
		||||
        }
 | 
			
		||||
      ]
 | 
			
		||||
    },
 | 
			
		||||
    "sourceRange": []
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
@ -211,6 +325,20 @@ description: Operations executed router-template-cross-bar.kcl
 | 
			
		||||
        "sourceRange": []
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    "nodePath": {
 | 
			
		||||
      "steps": [
 | 
			
		||||
        {
 | 
			
		||||
          "type": "ProgramBodyItem",
 | 
			
		||||
          "index": 16
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          "type": "VariableDeclarationDeclaration"
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          "type": "VariableDeclarationInit"
 | 
			
		||||
        }
 | 
			
		||||
      ]
 | 
			
		||||
    },
 | 
			
		||||
    "sourceRange": []
 | 
			
		||||
  }
 | 
			
		||||
]
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user