Files
modeling-app/rust/kcl-lib/tests/invalid_index_negative/ast.snap

147 lines
3.5 KiB
Plaintext
Raw Normal View History

---
source: kcl/src/simulation_tests.rs
description: Result of parsing invalid_index_negative.kcl
---
{
"Ok": {
"body": [
{
"declaration": {
"end": 15,
"id": {
"end": 3,
"name": "arr",
"start": 0,
"type": "Identifier"
},
"init": {
"elements": [
{
"end": 8,
"raw": "1",
"start": 7,
"type": "Literal",
"type": "Literal",
"value": {
"value": 1.0,
"suffix": "None"
}
},
{
"end": 11,
"raw": "2",
"start": 10,
"type": "Literal",
"type": "Literal",
"value": {
"value": 2.0,
"suffix": "None"
}
},
{
"end": 14,
"raw": "3",
"start": 13,
"type": "Literal",
"type": "Literal",
"value": {
"value": 3.0,
"suffix": "None"
}
}
],
"end": 15,
"start": 6,
"type": "ArrayExpression",
"type": "ArrayExpression"
},
"start": 0,
"type": "VariableDeclarator"
},
"end": 15,
"kind": "const",
"start": 0,
"type": "VariableDeclaration",
"type": "VariableDeclaration"
},
{
"declaration": {
"end": 22,
"id": {
"end": 17,
"name": "i",
"start": 16,
"type": "Identifier"
},
"init": {
"argument": {
"end": 22,
"raw": "1",
"start": 21,
"type": "Literal",
"type": "Literal",
"value": {
"value": 1.0,
"suffix": "None"
}
},
"end": 22,
"operator": "-",
"start": 20,
"type": "UnaryExpression",
"type": "UnaryExpression"
},
"start": 16,
"type": "VariableDeclarator"
},
"end": 22,
"kind": "const",
"start": 16,
"type": "VariableDeclaration",
"type": "VariableDeclaration"
},
{
"declaration": {
"end": 33,
"id": {
"end": 24,
"name": "x",
"start": 23,
"type": "Identifier"
},
"init": {
"computed": true,
"end": 33,
"object": {
"end": 30,
"name": "arr",
"start": 27,
"type": "Identifier",
"type": "Identifier"
},
"property": {
"end": 32,
"name": "i",
"start": 31,
"type": "Identifier",
"type": "Identifier"
},
"start": 27,
"type": "MemberExpression",
"type": "MemberExpression"
},
"start": 23,
"type": "VariableDeclarator"
},
"end": 33,
"kind": "const",
"start": 23,
"type": "VariableDeclaration",
"type": "VariableDeclaration"
}
],
"end": 34,
"start": 0
}
}