* Support paths to names rather than just raw idents Signed-off-by: Nick Cameron <nrc@ncameron.org> * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 * 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>
		
			
				
	
	
		
			202 lines
		
	
	
		
			5.0 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			202 lines
		
	
	
		
			5.0 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
---
 | 
						|
source: kcl-lib/src/simulation_tests.rs
 | 
						|
description: Result of parsing array_elem_push_fail.kcl
 | 
						|
---
 | 
						|
{
 | 
						|
  "Ok": {
 | 
						|
    "body": [
 | 
						|
      {
 | 
						|
        "commentStart": 0,
 | 
						|
        "declaration": {
 | 
						|
          "commentStart": 0,
 | 
						|
          "end": 0,
 | 
						|
          "id": {
 | 
						|
            "commentStart": 0,
 | 
						|
            "end": 0,
 | 
						|
            "name": "arr",
 | 
						|
            "start": 0,
 | 
						|
            "type": "Identifier"
 | 
						|
          },
 | 
						|
          "init": {
 | 
						|
            "commentStart": 6,
 | 
						|
            "elements": [
 | 
						|
              {
 | 
						|
                "commentStart": 7,
 | 
						|
                "end": 0,
 | 
						|
                "raw": "1",
 | 
						|
                "start": 0,
 | 
						|
                "type": "Literal",
 | 
						|
                "type": "Literal",
 | 
						|
                "value": {
 | 
						|
                  "value": 1.0,
 | 
						|
                  "suffix": "None"
 | 
						|
                }
 | 
						|
              },
 | 
						|
              {
 | 
						|
                "commentStart": 10,
 | 
						|
                "end": 0,
 | 
						|
                "raw": "2",
 | 
						|
                "start": 0,
 | 
						|
                "type": "Literal",
 | 
						|
                "type": "Literal",
 | 
						|
                "value": {
 | 
						|
                  "value": 2.0,
 | 
						|
                  "suffix": "None"
 | 
						|
                }
 | 
						|
              },
 | 
						|
              {
 | 
						|
                "commentStart": 13,
 | 
						|
                "end": 0,
 | 
						|
                "raw": "3",
 | 
						|
                "start": 0,
 | 
						|
                "type": "Literal",
 | 
						|
                "type": "Literal",
 | 
						|
                "value": {
 | 
						|
                  "value": 3.0,
 | 
						|
                  "suffix": "None"
 | 
						|
                }
 | 
						|
              }
 | 
						|
            ],
 | 
						|
            "end": 0,
 | 
						|
            "start": 0,
 | 
						|
            "type": "ArrayExpression",
 | 
						|
            "type": "ArrayExpression"
 | 
						|
          },
 | 
						|
          "start": 0,
 | 
						|
          "type": "VariableDeclarator"
 | 
						|
        },
 | 
						|
        "end": 0,
 | 
						|
        "kind": "const",
 | 
						|
        "start": 0,
 | 
						|
        "type": "VariableDeclaration",
 | 
						|
        "type": "VariableDeclaration"
 | 
						|
      },
 | 
						|
      {
 | 
						|
        "commentStart": 16,
 | 
						|
        "declaration": {
 | 
						|
          "commentStart": 16,
 | 
						|
          "end": 0,
 | 
						|
          "id": {
 | 
						|
            "commentStart": 16,
 | 
						|
            "end": 0,
 | 
						|
            "name": "pushedArr",
 | 
						|
            "start": 0,
 | 
						|
            "type": "Identifier"
 | 
						|
          },
 | 
						|
          "init": {
 | 
						|
            "arguments": [
 | 
						|
              {
 | 
						|
                "abs_path": false,
 | 
						|
                "commentStart": 33,
 | 
						|
                "end": 0,
 | 
						|
                "name": {
 | 
						|
                  "commentStart": 33,
 | 
						|
                  "end": 0,
 | 
						|
                  "name": "arr",
 | 
						|
                  "start": 0,
 | 
						|
                  "type": "Identifier"
 | 
						|
                },
 | 
						|
                "path": [],
 | 
						|
                "start": 0,
 | 
						|
                "type": "Name",
 | 
						|
                "type": "Name"
 | 
						|
              },
 | 
						|
              {
 | 
						|
                "commentStart": 38,
 | 
						|
                "end": 0,
 | 
						|
                "raw": "4",
 | 
						|
                "start": 0,
 | 
						|
                "type": "Literal",
 | 
						|
                "type": "Literal",
 | 
						|
                "value": {
 | 
						|
                  "value": 4.0,
 | 
						|
                  "suffix": "None"
 | 
						|
                }
 | 
						|
              }
 | 
						|
            ],
 | 
						|
            "callee": {
 | 
						|
              "abs_path": false,
 | 
						|
              "commentStart": 28,
 | 
						|
              "end": 0,
 | 
						|
              "name": {
 | 
						|
                "commentStart": 28,
 | 
						|
                "end": 0,
 | 
						|
                "name": "push",
 | 
						|
                "start": 0,
 | 
						|
                "type": "Identifier"
 | 
						|
              },
 | 
						|
              "path": [],
 | 
						|
              "start": 0,
 | 
						|
              "type": "Name"
 | 
						|
            },
 | 
						|
            "commentStart": 28,
 | 
						|
            "end": 0,
 | 
						|
            "start": 0,
 | 
						|
            "type": "CallExpression",
 | 
						|
            "type": "CallExpression"
 | 
						|
          },
 | 
						|
          "start": 0,
 | 
						|
          "type": "VariableDeclarator"
 | 
						|
        },
 | 
						|
        "end": 0,
 | 
						|
        "kind": "const",
 | 
						|
        "start": 0,
 | 
						|
        "type": "VariableDeclaration",
 | 
						|
        "type": "VariableDeclaration"
 | 
						|
      },
 | 
						|
      {
 | 
						|
        "commentStart": 41,
 | 
						|
        "declaration": {
 | 
						|
          "commentStart": 41,
 | 
						|
          "end": 0,
 | 
						|
          "id": {
 | 
						|
            "commentStart": 41,
 | 
						|
            "end": 0,
 | 
						|
            "name": "fail",
 | 
						|
            "start": 0,
 | 
						|
            "type": "Identifier"
 | 
						|
          },
 | 
						|
          "init": {
 | 
						|
            "commentStart": 48,
 | 
						|
            "computed": false,
 | 
						|
            "end": 0,
 | 
						|
            "object": {
 | 
						|
              "commentStart": 48,
 | 
						|
              "end": 0,
 | 
						|
              "name": "arr",
 | 
						|
              "start": 0,
 | 
						|
              "type": "Identifier",
 | 
						|
              "type": "Identifier"
 | 
						|
            },
 | 
						|
            "property": {
 | 
						|
              "commentStart": 52,
 | 
						|
              "end": 0,
 | 
						|
              "raw": "3",
 | 
						|
              "start": 0,
 | 
						|
              "type": "Literal",
 | 
						|
              "type": "Literal",
 | 
						|
              "value": {
 | 
						|
                "value": 3.0,
 | 
						|
                "suffix": "None"
 | 
						|
              }
 | 
						|
            },
 | 
						|
            "start": 0,
 | 
						|
            "type": "MemberExpression",
 | 
						|
            "type": "MemberExpression"
 | 
						|
          },
 | 
						|
          "start": 0,
 | 
						|
          "type": "VariableDeclarator"
 | 
						|
        },
 | 
						|
        "end": 0,
 | 
						|
        "kind": "const",
 | 
						|
        "start": 0,
 | 
						|
        "type": "VariableDeclaration",
 | 
						|
        "type": "VariableDeclaration"
 | 
						|
      }
 | 
						|
    ],
 | 
						|
    "commentStart": 0,
 | 
						|
    "end": 0,
 | 
						|
    "start": 0
 | 
						|
  }
 | 
						|
}
 |