2024-11-18 16:20:32 -06:00
|
|
|
---
|
|
|
|
source: kcl/src/simulation_tests.rs
|
|
|
|
description: Result of parsing array_elem_push_fail.kcl
|
|
|
|
---
|
|
|
|
{
|
|
|
|
"Ok": {
|
|
|
|
"body": [
|
|
|
|
{
|
2024-12-07 07:16:04 +13:00
|
|
|
"declaration": {
|
|
|
|
"end": 15,
|
|
|
|
"id": {
|
|
|
|
"end": 3,
|
|
|
|
"name": "arr",
|
2024-11-18 16:20:32 -06:00
|
|
|
"start": 0,
|
2024-12-07 07:16:04 +13:00
|
|
|
"type": "Identifier"
|
|
|
|
},
|
|
|
|
"init": {
|
|
|
|
"elements": [
|
|
|
|
{
|
|
|
|
"end": 8,
|
|
|
|
"raw": "1",
|
|
|
|
"start": 7,
|
|
|
|
"type": "Literal",
|
|
|
|
"type": "Literal",
|
2025-01-22 08:29:30 +13:00
|
|
|
"value": {
|
|
|
|
"value": 1.0,
|
|
|
|
"suffix": "None"
|
|
|
|
}
|
2024-12-07 07:16:04 +13:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"end": 11,
|
|
|
|
"raw": "2",
|
|
|
|
"start": 10,
|
|
|
|
"type": "Literal",
|
|
|
|
"type": "Literal",
|
2025-01-22 08:29:30 +13:00
|
|
|
"value": {
|
|
|
|
"value": 2.0,
|
|
|
|
"suffix": "None"
|
|
|
|
}
|
2024-12-07 07:16:04 +13:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"end": 14,
|
|
|
|
"raw": "3",
|
|
|
|
"start": 13,
|
|
|
|
"type": "Literal",
|
|
|
|
"type": "Literal",
|
2025-01-22 08:29:30 +13:00
|
|
|
"value": {
|
|
|
|
"value": 3.0,
|
|
|
|
"suffix": "None"
|
|
|
|
}
|
2024-12-07 07:16:04 +13:00
|
|
|
}
|
|
|
|
],
|
|
|
|
"end": 15,
|
|
|
|
"start": 6,
|
|
|
|
"type": "ArrayExpression",
|
|
|
|
"type": "ArrayExpression"
|
|
|
|
},
|
|
|
|
"start": 0,
|
|
|
|
"type": "VariableDeclarator"
|
|
|
|
},
|
2024-11-18 16:20:32 -06:00
|
|
|
"end": 15,
|
|
|
|
"kind": "const",
|
|
|
|
"start": 0,
|
|
|
|
"type": "VariableDeclaration",
|
|
|
|
"type": "VariableDeclaration"
|
|
|
|
},
|
|
|
|
{
|
2024-12-07 07:16:04 +13:00
|
|
|
"declaration": {
|
|
|
|
"end": 40,
|
|
|
|
"id": {
|
|
|
|
"end": 25,
|
|
|
|
"name": "pushedArr",
|
|
|
|
"start": 16,
|
|
|
|
"type": "Identifier"
|
|
|
|
},
|
|
|
|
"init": {
|
|
|
|
"arguments": [
|
|
|
|
{
|
|
|
|
"end": 36,
|
|
|
|
"name": "arr",
|
|
|
|
"start": 33,
|
|
|
|
"type": "Identifier",
|
2024-11-18 16:20:32 -06:00
|
|
|
"type": "Identifier"
|
|
|
|
},
|
2024-12-07 07:16:04 +13:00
|
|
|
{
|
|
|
|
"end": 39,
|
|
|
|
"raw": "4",
|
|
|
|
"start": 38,
|
|
|
|
"type": "Literal",
|
|
|
|
"type": "Literal",
|
2025-01-22 08:29:30 +13:00
|
|
|
"value": {
|
|
|
|
"value": 4.0,
|
|
|
|
"suffix": "None"
|
|
|
|
}
|
2024-12-07 07:16:04 +13:00
|
|
|
}
|
|
|
|
],
|
|
|
|
"callee": {
|
|
|
|
"end": 32,
|
|
|
|
"name": "push",
|
2024-11-18 16:20:32 -06:00
|
|
|
"start": 28,
|
2024-12-07 07:16:04 +13:00
|
|
|
"type": "Identifier"
|
2024-11-18 16:20:32 -06:00
|
|
|
},
|
2024-12-07 07:16:04 +13:00
|
|
|
"end": 40,
|
|
|
|
"start": 28,
|
|
|
|
"type": "CallExpression",
|
|
|
|
"type": "CallExpression"
|
|
|
|
},
|
|
|
|
"start": 16,
|
|
|
|
"type": "VariableDeclarator"
|
|
|
|
},
|
2024-11-18 16:20:32 -06:00
|
|
|
"end": 40,
|
|
|
|
"kind": "const",
|
|
|
|
"start": 16,
|
|
|
|
"type": "VariableDeclaration",
|
|
|
|
"type": "VariableDeclaration"
|
|
|
|
},
|
|
|
|
{
|
2024-12-07 07:16:04 +13:00
|
|
|
"declaration": {
|
|
|
|
"end": 54,
|
|
|
|
"id": {
|
|
|
|
"end": 45,
|
|
|
|
"name": "fail",
|
|
|
|
"start": 41,
|
|
|
|
"type": "Identifier"
|
|
|
|
},
|
|
|
|
"init": {
|
|
|
|
"computed": false,
|
2024-11-18 16:20:32 -06:00
|
|
|
"end": 54,
|
2024-12-07 07:16:04 +13:00
|
|
|
"object": {
|
|
|
|
"end": 51,
|
|
|
|
"name": "arr",
|
|
|
|
"start": 48,
|
|
|
|
"type": "Identifier",
|
2024-11-18 16:20:32 -06:00
|
|
|
"type": "Identifier"
|
|
|
|
},
|
2024-12-07 07:16:04 +13:00
|
|
|
"property": {
|
|
|
|
"end": 53,
|
|
|
|
"raw": "3",
|
|
|
|
"start": 52,
|
|
|
|
"type": "Literal",
|
|
|
|
"type": "Literal",
|
2025-01-22 08:29:30 +13:00
|
|
|
"value": {
|
|
|
|
"value": 3.0,
|
|
|
|
"suffix": "None"
|
|
|
|
}
|
2024-11-18 16:20:32 -06:00
|
|
|
},
|
2024-12-07 07:16:04 +13:00
|
|
|
"start": 48,
|
|
|
|
"type": "MemberExpression",
|
|
|
|
"type": "MemberExpression"
|
|
|
|
},
|
|
|
|
"start": 41,
|
|
|
|
"type": "VariableDeclarator"
|
|
|
|
},
|
2024-11-18 16:20:32 -06:00
|
|
|
"end": 54,
|
|
|
|
"kind": "const",
|
|
|
|
"start": 41,
|
|
|
|
"type": "VariableDeclaration",
|
|
|
|
"type": "VariableDeclaration"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"end": 55,
|
|
|
|
"start": 0
|
|
|
|
}
|
|
|
|
}
|