* 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
		
			
				
	
	
		
			110 lines
		
	
	
		
			2.1 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			110 lines
		
	
	
		
			2.1 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
---
 | 
						|
source: kcl-lib/src/simulation_tests.rs
 | 
						|
description: Operations executed kw_fn_with_defaults.kcl
 | 
						|
---
 | 
						|
[
 | 
						|
  {
 | 
						|
    "type": "GroupBegin",
 | 
						|
    "group": {
 | 
						|
      "type": "FunctionCall",
 | 
						|
      "name": "increment",
 | 
						|
      "functionSourceRange": [],
 | 
						|
      "unlabeledArg": {
 | 
						|
        "value": {
 | 
						|
          "type": "Number",
 | 
						|
          "value": 1.0,
 | 
						|
          "ty": {
 | 
						|
            "type": "Default",
 | 
						|
            "len": {
 | 
						|
              "type": "Mm"
 | 
						|
            },
 | 
						|
            "angle": {
 | 
						|
              "type": "Degrees"
 | 
						|
            }
 | 
						|
          }
 | 
						|
        },
 | 
						|
        "sourceRange": []
 | 
						|
      },
 | 
						|
      "labeledArgs": {}
 | 
						|
    },
 | 
						|
    "nodePath": {
 | 
						|
      "steps": [
 | 
						|
        {
 | 
						|
          "type": "ProgramBodyItem",
 | 
						|
          "index": 1
 | 
						|
        },
 | 
						|
        {
 | 
						|
          "type": "VariableDeclarationDeclaration"
 | 
						|
        },
 | 
						|
        {
 | 
						|
          "type": "VariableDeclarationInit"
 | 
						|
        }
 | 
						|
      ]
 | 
						|
    },
 | 
						|
    "sourceRange": []
 | 
						|
  },
 | 
						|
  {
 | 
						|
    "type": "GroupBegin",
 | 
						|
    "group": {
 | 
						|
      "type": "FunctionCall",
 | 
						|
      "name": "increment",
 | 
						|
      "functionSourceRange": [],
 | 
						|
      "unlabeledArg": {
 | 
						|
        "value": {
 | 
						|
          "type": "Number",
 | 
						|
          "value": 1.0,
 | 
						|
          "ty": {
 | 
						|
            "type": "Default",
 | 
						|
            "len": {
 | 
						|
              "type": "Mm"
 | 
						|
            },
 | 
						|
            "angle": {
 | 
						|
              "type": "Degrees"
 | 
						|
            }
 | 
						|
          }
 | 
						|
        },
 | 
						|
        "sourceRange": []
 | 
						|
      },
 | 
						|
      "labeledArgs": {
 | 
						|
        "by": {
 | 
						|
          "value": {
 | 
						|
            "type": "Number",
 | 
						|
            "value": 20.0,
 | 
						|
            "ty": {
 | 
						|
              "type": "Default",
 | 
						|
              "len": {
 | 
						|
                "type": "Mm"
 | 
						|
              },
 | 
						|
              "angle": {
 | 
						|
                "type": "Degrees"
 | 
						|
              }
 | 
						|
            }
 | 
						|
          },
 | 
						|
          "sourceRange": []
 | 
						|
        }
 | 
						|
      }
 | 
						|
    },
 | 
						|
    "nodePath": {
 | 
						|
      "steps": [
 | 
						|
        {
 | 
						|
          "type": "ProgramBodyItem",
 | 
						|
          "index": 2
 | 
						|
        },
 | 
						|
        {
 | 
						|
          "type": "VariableDeclarationDeclaration"
 | 
						|
        },
 | 
						|
        {
 | 
						|
          "type": "VariableDeclarationInit"
 | 
						|
        }
 | 
						|
      ]
 | 
						|
    },
 | 
						|
    "sourceRange": []
 | 
						|
  },
 | 
						|
  {
 | 
						|
    "type": "GroupEnd"
 | 
						|
  },
 | 
						|
  {
 | 
						|
    "type": "GroupEnd"
 | 
						|
  }
 | 
						|
]
 |