* Improve snapshot testing Signed-off-by: Nick Cameron <nrc@ncameron.org> * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 --------- Signed-off-by: Nick Cameron <nrc@ncameron.org> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
		
			
				
	
	
		
			143 lines
		
	
	
		
			3.4 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			143 lines
		
	
	
		
			3.4 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
---
 | 
						|
source: kcl-lib/src/simulation_tests.rs
 | 
						|
description: Result of parsing argument_error.kcl
 | 
						|
---
 | 
						|
{
 | 
						|
  "Ok": {
 | 
						|
    "body": [
 | 
						|
      {
 | 
						|
        "declaration": {
 | 
						|
          "end": 0,
 | 
						|
          "id": {
 | 
						|
            "end": 0,
 | 
						|
            "name": "f",
 | 
						|
            "start": 0,
 | 
						|
            "type": "Identifier"
 | 
						|
          },
 | 
						|
          "init": {
 | 
						|
            "body": {
 | 
						|
              "body": [
 | 
						|
                {
 | 
						|
                  "argument": {
 | 
						|
                    "end": 0,
 | 
						|
                    "raw": "5",
 | 
						|
                    "start": 0,
 | 
						|
                    "type": "Literal",
 | 
						|
                    "type": "Literal",
 | 
						|
                    "value": {
 | 
						|
                      "value": 5.0,
 | 
						|
                      "suffix": "None"
 | 
						|
                    }
 | 
						|
                  },
 | 
						|
                  "end": 0,
 | 
						|
                  "start": 0,
 | 
						|
                  "type": "ReturnStatement",
 | 
						|
                  "type": "ReturnStatement"
 | 
						|
                }
 | 
						|
              ],
 | 
						|
              "end": 0,
 | 
						|
              "start": 0
 | 
						|
            },
 | 
						|
            "end": 0,
 | 
						|
            "params": [
 | 
						|
              {
 | 
						|
                "type": "Parameter",
 | 
						|
                "identifier": {
 | 
						|
                  "end": 0,
 | 
						|
                  "name": "i",
 | 
						|
                  "start": 0,
 | 
						|
                  "type": "Identifier"
 | 
						|
                }
 | 
						|
              }
 | 
						|
            ],
 | 
						|
            "start": 0,
 | 
						|
            "type": "FunctionExpression",
 | 
						|
            "type": "FunctionExpression"
 | 
						|
          },
 | 
						|
          "start": 0,
 | 
						|
          "type": "VariableDeclarator"
 | 
						|
        },
 | 
						|
        "end": 0,
 | 
						|
        "kind": "fn",
 | 
						|
        "start": 0,
 | 
						|
        "type": "VariableDeclaration",
 | 
						|
        "type": "VariableDeclaration"
 | 
						|
      },
 | 
						|
      {
 | 
						|
        "end": 0,
 | 
						|
        "expression": {
 | 
						|
          "arguments": [
 | 
						|
            {
 | 
						|
              "end": 0,
 | 
						|
              "name": "f",
 | 
						|
              "start": 0,
 | 
						|
              "type": "Identifier",
 | 
						|
              "type": "Identifier"
 | 
						|
            },
 | 
						|
            {
 | 
						|
              "elements": [
 | 
						|
                {
 | 
						|
                  "end": 0,
 | 
						|
                  "raw": "0",
 | 
						|
                  "start": 0,
 | 
						|
                  "type": "Literal",
 | 
						|
                  "type": "Literal",
 | 
						|
                  "value": {
 | 
						|
                    "value": 0.0,
 | 
						|
                    "suffix": "None"
 | 
						|
                  }
 | 
						|
                },
 | 
						|
                {
 | 
						|
                  "end": 0,
 | 
						|
                  "raw": "1",
 | 
						|
                  "start": 0,
 | 
						|
                  "type": "Literal",
 | 
						|
                  "type": "Literal",
 | 
						|
                  "value": {
 | 
						|
                    "value": 1.0,
 | 
						|
                    "suffix": "None"
 | 
						|
                  }
 | 
						|
                }
 | 
						|
              ],
 | 
						|
              "end": 0,
 | 
						|
              "start": 0,
 | 
						|
              "type": "ArrayExpression",
 | 
						|
              "type": "ArrayExpression"
 | 
						|
            }
 | 
						|
          ],
 | 
						|
          "callee": {
 | 
						|
            "end": 0,
 | 
						|
            "name": "map",
 | 
						|
            "start": 0,
 | 
						|
            "type": "Identifier"
 | 
						|
          },
 | 
						|
          "end": 0,
 | 
						|
          "start": 0,
 | 
						|
          "type": "CallExpression",
 | 
						|
          "type": "CallExpression"
 | 
						|
        },
 | 
						|
        "start": 0,
 | 
						|
        "type": "ExpressionStatement",
 | 
						|
        "type": "ExpressionStatement"
 | 
						|
      }
 | 
						|
    ],
 | 
						|
    "end": 0,
 | 
						|
    "nonCodeMeta": {
 | 
						|
      "nonCodeNodes": {
 | 
						|
        "0": [
 | 
						|
          {
 | 
						|
            "end": 0,
 | 
						|
            "start": 0,
 | 
						|
            "type": "NonCodeNode",
 | 
						|
            "value": {
 | 
						|
              "type": "newLine"
 | 
						|
            }
 | 
						|
          }
 | 
						|
        ]
 | 
						|
      },
 | 
						|
      "startNodes": []
 | 
						|
    },
 | 
						|
    "start": 0
 | 
						|
  }
 | 
						|
}
 |