* Add operations for variable declarations * Update output * Change to use OpKclValue * Update output after merge
		
			
				
	
	
		
			261 lines
		
	
	
		
			5.4 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			261 lines
		
	
	
		
			5.4 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
---
 | 
						|
source: kcl-lib/src/simulation_tests.rs
 | 
						|
description: Operations executed pipe_as_arg.kcl
 | 
						|
---
 | 
						|
{
 | 
						|
  "rust/kcl-lib/tests/pipe_as_arg/input.kcl": [
 | 
						|
    {
 | 
						|
      "type": "GroupBegin",
 | 
						|
      "group": {
 | 
						|
        "type": "FunctionCall",
 | 
						|
        "name": "double",
 | 
						|
        "functionSourceRange": [],
 | 
						|
        "unlabeledArg": {
 | 
						|
          "value": {
 | 
						|
            "type": "Number",
 | 
						|
            "value": 200.0,
 | 
						|
            "ty": {
 | 
						|
              "type": "Default",
 | 
						|
              "len": {
 | 
						|
                "type": "Mm"
 | 
						|
              },
 | 
						|
              "angle": {
 | 
						|
                "type": "Degrees"
 | 
						|
              }
 | 
						|
            }
 | 
						|
          },
 | 
						|
          "sourceRange": []
 | 
						|
        },
 | 
						|
        "labeledArgs": {}
 | 
						|
      },
 | 
						|
      "nodePath": {
 | 
						|
        "steps": [
 | 
						|
          {
 | 
						|
            "type": "ProgramBodyItem",
 | 
						|
            "index": 3
 | 
						|
          },
 | 
						|
          {
 | 
						|
            "type": "VariableDeclarationDeclaration"
 | 
						|
          },
 | 
						|
          {
 | 
						|
            "type": "VariableDeclarationInit"
 | 
						|
          },
 | 
						|
          {
 | 
						|
            "type": "CallKwArg",
 | 
						|
            "index": 0
 | 
						|
          },
 | 
						|
          {
 | 
						|
            "type": "PipeBodyItem",
 | 
						|
            "index": 1
 | 
						|
          }
 | 
						|
        ]
 | 
						|
      },
 | 
						|
      "sourceRange": []
 | 
						|
    },
 | 
						|
    {
 | 
						|
      "type": "GroupEnd"
 | 
						|
    },
 | 
						|
    {
 | 
						|
      "type": "GroupBegin",
 | 
						|
      "group": {
 | 
						|
        "type": "FunctionCall",
 | 
						|
        "name": "cube",
 | 
						|
        "functionSourceRange": [],
 | 
						|
        "unlabeledArg": null,
 | 
						|
        "labeledArgs": {
 | 
						|
          "center": {
 | 
						|
            "value": {
 | 
						|
              "type": "Array",
 | 
						|
              "value": [
 | 
						|
                {
 | 
						|
                  "type": "Number",
 | 
						|
                  "value": 0.0,
 | 
						|
                  "ty": {
 | 
						|
                    "type": "Default",
 | 
						|
                    "len": {
 | 
						|
                      "type": "Mm"
 | 
						|
                    },
 | 
						|
                    "angle": {
 | 
						|
                      "type": "Degrees"
 | 
						|
                    }
 | 
						|
                  }
 | 
						|
                },
 | 
						|
                {
 | 
						|
                  "type": "Number",
 | 
						|
                  "value": 0.0,
 | 
						|
                  "ty": {
 | 
						|
                    "type": "Default",
 | 
						|
                    "len": {
 | 
						|
                      "type": "Mm"
 | 
						|
                    },
 | 
						|
                    "angle": {
 | 
						|
                      "type": "Degrees"
 | 
						|
                    }
 | 
						|
                  }
 | 
						|
                }
 | 
						|
              ]
 | 
						|
            },
 | 
						|
            "sourceRange": []
 | 
						|
          },
 | 
						|
          "length": {
 | 
						|
            "value": {
 | 
						|
              "type": "Number",
 | 
						|
              "value": 400.0,
 | 
						|
              "ty": {
 | 
						|
                "type": "Default",
 | 
						|
                "len": {
 | 
						|
                  "type": "Mm"
 | 
						|
                },
 | 
						|
                "angle": {
 | 
						|
                  "type": "Degrees"
 | 
						|
                }
 | 
						|
              }
 | 
						|
            },
 | 
						|
            "sourceRange": []
 | 
						|
          }
 | 
						|
        }
 | 
						|
      },
 | 
						|
      "nodePath": {
 | 
						|
        "steps": [
 | 
						|
          {
 | 
						|
            "type": "ProgramBodyItem",
 | 
						|
            "index": 3
 | 
						|
          },
 | 
						|
          {
 | 
						|
            "type": "VariableDeclarationDeclaration"
 | 
						|
          },
 | 
						|
          {
 | 
						|
            "type": "VariableDeclarationInit"
 | 
						|
          }
 | 
						|
        ]
 | 
						|
      },
 | 
						|
      "sourceRange": []
 | 
						|
    },
 | 
						|
    {
 | 
						|
      "type": "GroupEnd"
 | 
						|
    },
 | 
						|
    {
 | 
						|
      "type": "VariableDeclaration",
 | 
						|
      "name": "myCube",
 | 
						|
      "value": {
 | 
						|
        "type": "Number",
 | 
						|
        "value": 400.0,
 | 
						|
        "ty": {
 | 
						|
          "type": "Default",
 | 
						|
          "len": {
 | 
						|
            "type": "Mm"
 | 
						|
          },
 | 
						|
          "angle": {
 | 
						|
            "type": "Degrees"
 | 
						|
          }
 | 
						|
        }
 | 
						|
      },
 | 
						|
      "visibility": "default",
 | 
						|
      "nodePath": {
 | 
						|
        "steps": [
 | 
						|
          {
 | 
						|
            "type": "ProgramBodyItem",
 | 
						|
            "index": 3
 | 
						|
          },
 | 
						|
          {
 | 
						|
            "type": "VariableDeclarationDeclaration"
 | 
						|
          },
 | 
						|
          {
 | 
						|
            "type": "VariableDeclarationInit"
 | 
						|
          }
 | 
						|
        ]
 | 
						|
      },
 | 
						|
      "sourceRange": []
 | 
						|
    }
 | 
						|
  ],
 | 
						|
  "std::appearance": [],
 | 
						|
  "std::array": [],
 | 
						|
  "std::math": [
 | 
						|
    {
 | 
						|
      "type": "VariableDeclaration",
 | 
						|
      "name": "PI",
 | 
						|
      "value": {
 | 
						|
        "type": "Number",
 | 
						|
        "value": 3.142,
 | 
						|
        "ty": {
 | 
						|
          "type": "Unknown"
 | 
						|
        }
 | 
						|
      },
 | 
						|
      "visibility": "export",
 | 
						|
      "nodePath": {
 | 
						|
        "steps": []
 | 
						|
      },
 | 
						|
      "sourceRange": []
 | 
						|
    },
 | 
						|
    {
 | 
						|
      "type": "VariableDeclaration",
 | 
						|
      "name": "E",
 | 
						|
      "value": {
 | 
						|
        "type": "Number",
 | 
						|
        "value": 2.718,
 | 
						|
        "ty": {
 | 
						|
          "type": "Known",
 | 
						|
          "type": "Count"
 | 
						|
        }
 | 
						|
      },
 | 
						|
      "visibility": "export",
 | 
						|
      "nodePath": {
 | 
						|
        "steps": []
 | 
						|
      },
 | 
						|
      "sourceRange": []
 | 
						|
    },
 | 
						|
    {
 | 
						|
      "type": "VariableDeclaration",
 | 
						|
      "name": "TAU",
 | 
						|
      "value": {
 | 
						|
        "type": "Number",
 | 
						|
        "value": 6.283,
 | 
						|
        "ty": {
 | 
						|
          "type": "Known",
 | 
						|
          "type": "Count"
 | 
						|
        }
 | 
						|
      },
 | 
						|
      "visibility": "export",
 | 
						|
      "nodePath": {
 | 
						|
        "steps": []
 | 
						|
      },
 | 
						|
      "sourceRange": []
 | 
						|
    }
 | 
						|
  ],
 | 
						|
  "std::prelude": [
 | 
						|
    {
 | 
						|
      "type": "VariableDeclaration",
 | 
						|
      "name": "START",
 | 
						|
      "value": {
 | 
						|
        "type": "String",
 | 
						|
        "value": "start"
 | 
						|
      },
 | 
						|
      "visibility": "export",
 | 
						|
      "nodePath": {
 | 
						|
        "steps": []
 | 
						|
      },
 | 
						|
      "sourceRange": []
 | 
						|
    },
 | 
						|
    {
 | 
						|
      "type": "VariableDeclaration",
 | 
						|
      "name": "END",
 | 
						|
      "value": {
 | 
						|
        "type": "String",
 | 
						|
        "value": "end"
 | 
						|
      },
 | 
						|
      "visibility": "export",
 | 
						|
      "nodePath": {
 | 
						|
        "steps": []
 | 
						|
      },
 | 
						|
      "sourceRange": []
 | 
						|
    }
 | 
						|
  ],
 | 
						|
  "std::sketch": [],
 | 
						|
  "std::solid": [],
 | 
						|
  "std::sweep": [],
 | 
						|
  "std::transform": [],
 | 
						|
  "std::turns": [],
 | 
						|
  "std::types": [],
 | 
						|
  "std::units": []
 | 
						|
}
 |