2024-11-18 16:20:32 -06:00
|
|
|
---
|
2025-03-18 20:34:44 -07:00
|
|
|
source: kcl-lib/src/simulation_tests.rs
|
2024-11-18 16:20:32 -06:00
|
|
|
description: Result of parsing array_index_oob.kcl
|
|
|
|
---
|
|
|
|
{
|
|
|
|
"Ok": {
|
|
|
|
"body": [
|
|
|
|
{
|
2024-12-07 07:16:04 +13:00
|
|
|
"declaration": {
|
|
|
|
"end": 8,
|
|
|
|
"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,
|
|
|
|
"start": 6,
|
|
|
|
"type": "ArrayExpression",
|
|
|
|
"type": "ArrayExpression"
|
|
|
|
},
|
|
|
|
"start": 0,
|
|
|
|
"type": "VariableDeclarator"
|
|
|
|
},
|
2024-11-18 16:20:32 -06:00
|
|
|
"end": 8,
|
|
|
|
"kind": "const",
|
|
|
|
"start": 0,
|
|
|
|
"type": "VariableDeclaration",
|
|
|
|
"type": "VariableDeclaration"
|
|
|
|
},
|
|
|
|
{
|
2024-12-07 07:16:04 +13:00
|
|
|
"declaration": {
|
|
|
|
"end": 19,
|
|
|
|
"id": {
|
|
|
|
"end": 10,
|
|
|
|
"name": "x",
|
|
|
|
"start": 9,
|
|
|
|
"type": "Identifier"
|
|
|
|
},
|
|
|
|
"init": {
|
|
|
|
"computed": false,
|
2024-11-18 16:20:32 -06:00
|
|
|
"end": 19,
|
2024-12-07 07:16:04 +13:00
|
|
|
"object": {
|
|
|
|
"end": 16,
|
|
|
|
"name": "arr",
|
|
|
|
"start": 13,
|
|
|
|
"type": "Identifier",
|
2024-11-18 16:20:32 -06:00
|
|
|
"type": "Identifier"
|
|
|
|
},
|
2024-12-07 07:16:04 +13:00
|
|
|
"property": {
|
|
|
|
"end": 18,
|
|
|
|
"raw": "0",
|
|
|
|
"start": 17,
|
|
|
|
"type": "Literal",
|
|
|
|
"type": "Literal",
|
2025-01-22 08:29:30 +13:00
|
|
|
"value": {
|
|
|
|
"value": 0.0,
|
|
|
|
"suffix": "None"
|
|
|
|
}
|
2024-11-18 16:20:32 -06:00
|
|
|
},
|
2024-12-07 07:16:04 +13:00
|
|
|
"start": 13,
|
|
|
|
"type": "MemberExpression",
|
|
|
|
"type": "MemberExpression"
|
|
|
|
},
|
|
|
|
"start": 9,
|
|
|
|
"type": "VariableDeclarator"
|
|
|
|
},
|
2024-11-18 16:20:32 -06:00
|
|
|
"end": 19,
|
|
|
|
"kind": "const",
|
|
|
|
"start": 9,
|
|
|
|
"type": "VariableDeclaration",
|
|
|
|
"type": "VariableDeclaration"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"end": 20,
|
|
|
|
"start": 0
|
|
|
|
}
|
|
|
|
}
|