151 lines
3.8 KiB
Plaintext
151 lines
3.8 KiB
Plaintext
![]() |
---
|
||
|
source: kcl/src/simulation_tests.rs
|
||
|
description: Program memory after executing add_lots.kcl
|
||
|
snapshot_kind: text
|
||
|
---
|
||
|
{
|
||
|
"environments": [
|
||
|
{
|
||
|
"bindings": {
|
||
|
"HALF_TURN": {
|
||
|
"type": "UserVal",
|
||
|
"type": "UserVal",
|
||
|
"value": 180,
|
||
|
"__meta": []
|
||
|
},
|
||
|
"QUARTER_TURN": {
|
||
|
"type": "UserVal",
|
||
|
"type": "UserVal",
|
||
|
"value": 90,
|
||
|
"__meta": []
|
||
|
},
|
||
|
"THREE_QUARTER_TURN": {
|
||
|
"type": "UserVal",
|
||
|
"type": "UserVal",
|
||
|
"value": 270,
|
||
|
"__meta": []
|
||
|
},
|
||
|
"ZERO": {
|
||
|
"type": "UserVal",
|
||
|
"type": "UserVal",
|
||
|
"value": 0,
|
||
|
"__meta": []
|
||
|
},
|
||
|
"f": {
|
||
|
"type": "Function",
|
||
|
"expression": {
|
||
|
"body": {
|
||
|
"body": [
|
||
|
{
|
||
|
"argument": {
|
||
|
"end": 30,
|
||
|
"left": {
|
||
|
"end": 26,
|
||
|
"name": "i",
|
||
|
"start": 25,
|
||
|
"type": "Identifier",
|
||
|
"type": "Identifier"
|
||
|
},
|
||
|
"operator": "*",
|
||
|
"right": {
|
||
|
"end": 30,
|
||
|
"raw": "2",
|
||
|
"start": 29,
|
||
|
"type": "Literal",
|
||
|
"type": "Literal",
|
||
|
"value": 2
|
||
|
},
|
||
|
"start": 25,
|
||
|
"type": "BinaryExpression",
|
||
|
"type": "BinaryExpression"
|
||
|
},
|
||
|
"end": 30,
|
||
|
"start": 18,
|
||
|
"type": "ReturnStatement",
|
||
|
"type": "ReturnStatement"
|
||
|
}
|
||
|
],
|
||
|
"end": 32,
|
||
|
"start": 14
|
||
|
},
|
||
|
"end": 32,
|
||
|
"params": [
|
||
|
{
|
||
|
"type": "Parameter",
|
||
|
"identifier": {
|
||
|
"end": 9,
|
||
|
"name": "i",
|
||
|
"start": 8,
|
||
|
"type": "Identifier"
|
||
|
},
|
||
|
"optional": false
|
||
|
}
|
||
|
],
|
||
|
"start": 7,
|
||
|
"type": "FunctionExpression"
|
||
|
},
|
||
|
"memory": {
|
||
|
"environments": [
|
||
|
{
|
||
|
"bindings": {
|
||
|
"HALF_TURN": {
|
||
|
"type": "UserVal",
|
||
|
"type": "UserVal",
|
||
|
"value": 180,
|
||
|
"__meta": []
|
||
|
},
|
||
|
"QUARTER_TURN": {
|
||
|
"type": "UserVal",
|
||
|
"type": "UserVal",
|
||
|
"value": 90,
|
||
|
"__meta": []
|
||
|
},
|
||
|
"THREE_QUARTER_TURN": {
|
||
|
"type": "UserVal",
|
||
|
"type": "UserVal",
|
||
|
"value": 270,
|
||
|
"__meta": []
|
||
|
},
|
||
|
"ZERO": {
|
||
|
"type": "UserVal",
|
||
|
"type": "UserVal",
|
||
|
"value": 0,
|
||
|
"__meta": []
|
||
|
}
|
||
|
},
|
||
|
"parent": null
|
||
|
}
|
||
|
],
|
||
|
"currentEnv": 0,
|
||
|
"return": null
|
||
|
},
|
||
|
"__meta": [
|
||
|
{
|
||
|
"sourceRange": [
|
||
|
7,
|
||
|
32
|
||
|
]
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
"x": {
|
||
|
"type": "UserVal",
|
||
|
"type": "UserVal",
|
||
|
"value": 10100.0,
|
||
|
"__meta": [
|
||
|
{
|
||
|
"sourceRange": [
|
||
|
38,
|
||
|
834
|
||
|
]
|
||
|
}
|
||
|
]
|
||
|
}
|
||
|
},
|
||
|
"parent": null
|
||
|
}
|
||
|
],
|
||
|
"currentEnv": 0,
|
||
|
"return": null
|
||
|
}
|