leo/compiler/tests/canonicalization/compound_assignment.json

2033 lines
74 KiB
JSON
Raw Normal View History

{
2021-03-29 21:24:58 +03:00
"name": "",
"expected_input": [],
"imports": [],
2021-03-31 02:38:37 +03:00
"global_consts": {},
2021-03-27 00:14:37 +03:00
"circuits": {
2021-03-31 21:08:38 +03:00
"{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}": {
"circuit_name": "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}",
2021-03-27 00:14:37 +03:00
"members": [
{
"CircuitVariable": [
2021-03-31 21:08:38 +03:00
"{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":2,\\\"line_stop\\\":2,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" f: u8,\\\"}\"}",
{
2021-03-27 00:14:37 +03:00
"IntegerType": "U8"
}
]
},
{
"CircuitVariable": [
"{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" y: (u8, u8),\\\"}\"}",
{
"Tuple": [
{
"IntegerType": "U8"
},
{
"IntegerType": "U8"
}
]
}
]
},
{
"CircuitFunction": {
"annotations": [],
"identifier": "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" function z (mut self) -> u16 {\\\"}\"}",
"input": [
{
"MutSelfKeyword": "{\"name\":\"mut self\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":15,\\\"col_stop\\\":23,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" function z (mut self) -> u16 {\\\"}\"}"
}
],
"output": {
"IntegerType": "U16"
},
"block": {
"statements": [
{
"Assign": {
"operation": "Assign",
"assignee": {
"identifier": "{\"name\":\"self\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" self.y.0 += 1u8;\\\"}\"}",
"accesses": [
{
"Member": "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" self.y.0 += 1u8;\\\"}\"}"
},
{
"Tuple": [
{
"value": "0"
},
{
"line_start": 6,
"line_stop": 6,
"col_start": 5,
"col_stop": 13,
"path": "",
"content": " self.y.0 += 1u8;"
}
]
}
],
"span": {
"line_start": 6,
"line_stop": 6,
"col_start": 5,
"col_stop": 13,
"path": "",
"content": " self.y.0 += 1u8;"
}
},
"value": {
"Binary": {
"left": {
"TupleAccess": {
"tuple": {
"CircuitMemberAccess": {
"circuit": {
"Identifier": "{\"name\":\"self\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" self.y.0 += 1u8;\\\"}\"}"
},
"name": "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" self.y.0 += 1u8;\\\"}\"}",
"span": {
"line_start": 6,
"line_stop": 6,
"col_start": 5,
"col_stop": 20,
"path": "",
"content": " self.y.0 += 1u8;"
}
}
},
"index": {
"value": "0"
},
"span": {
"line_start": 6,
"line_stop": 6,
"col_start": 5,
"col_stop": 20,
"path": "",
"content": " self.y.0 += 1u8;"
}
}
},
"right": {
"Value": {
"Integer": [
"U8",
"1",
{
"line_start": 6,
"line_stop": 6,
"col_start": 17,
"col_stop": 20,
"path": "",
"content": " self.y.0 += 1u8;"
}
]
}
},
"op": "Add",
"span": {
"line_start": 6,
"line_stop": 6,
"col_start": 5,
"col_stop": 20,
"path": "",
"content": " self.y.0 += 1u8;"
}
}
},
"span": {
"line_start": 6,
"line_stop": 6,
"col_start": 5,
"col_stop": 20,
"path": "",
"content": " self.y.0 += 1u8;"
}
}
},
{
"Return": {
"expression": {
"Value": {
"Integer": [
"U16",
"1",
{
"line_start": 7,
"line_stop": 7,
"col_start": 12,
"col_stop": 16,
"path": "",
"content": " return 1u16"
}
]
}
},
"span": {
"line_start": 7,
"line_stop": 7,
"col_start": 5,
"col_stop": 16,
"path": "",
"content": " return 1u16"
}
}
}
],
"span": {
"line_start": 5,
"line_stop": 8,
"col_start": 32,
"col_stop": 4,
"path": "",
"content": " function z (mut self) -> u16 {\n...\n }"
}
},
"span": {
"line_start": 5,
"line_stop": 8,
"col_start": 3,
"col_stop": 4,
"path": "",
"content": " function z (mut self) -> u16 {\n...\n }\n"
}
}
2021-03-27 00:14:37 +03:00
}
]
}
},
2021-03-29 21:24:58 +03:00
"functions": {
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function main() {\\\"}\"}": {
2021-03-29 21:24:58 +03:00
"annotations": [],
"identifier": "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function main() {\\\"}\"}",
2021-03-29 21:24:58 +03:00
"input": [],
"output": {
"Tuple": []
},
"block": {
"statements": [
{
"Definition": {
"declaration_type": "Let",
"variable_names": [
{
"mutable": true,
"identifier": "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let x = 10u32;\\\"}\"}",
2021-03-29 21:24:58 +03:00
"span": {
"line_start": 11,
"line_stop": 11,
2021-03-29 21:24:58 +03:00
"col_start": 7,
"col_stop": 8,
"path": "",
"content": " let x = 10u32;"
}
}
],
2021-04-14 19:51:20 +03:00
"type_": {
"IntegerType": "U32"
},
2021-03-29 21:24:58 +03:00
"value": {
"Value": {
"Integer": [
"U32",
"10",
{
"line_start": 11,
"line_stop": 11,
2021-03-29 21:24:58 +03:00
"col_start": 11,
"col_stop": 16,
"path": "",
"content": " let x = 10u32;"
}
2021-03-29 21:24:58 +03:00
]
}
},
"span": {
"line_start": 11,
"line_stop": 11,
2021-03-29 21:24:58 +03:00
"col_start": 3,
"col_stop": 16,
"path": "",
"content": " let x = 10u32;"
}
}
},
{
"Assign": {
"operation": "Assign",
"assignee": {
"identifier": "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" x += 20;\\\"}\"}",
2021-03-29 21:24:58 +03:00
"accesses": [],
"span": {
"line_start": 12,
"line_stop": 12,
"col_start": 3,
2021-03-29 21:24:58 +03:00
"col_stop": 4,
"path": "",
"content": " x += 20;"
}
2021-03-29 21:24:58 +03:00
},
"value": {
"Binary": {
"left": {
"Identifier": "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" x += 20;\\\"}\"}"
2021-03-29 21:24:58 +03:00
},
"right": {
"Value": {
2021-04-14 19:51:20 +03:00
"Integer": [
"U32",
2021-03-29 21:24:58 +03:00
"20",
{
"line_start": 12,
"line_stop": 12,
2021-03-29 21:24:58 +03:00
"col_start": 8,
"col_stop": 10,
"path": "",
"content": " x += 20;"
}
]
}
},
"op": "Add",
"span": {
"line_start": 12,
"line_stop": 12,
"col_start": 3,
2021-03-29 21:24:58 +03:00
"col_stop": 10,
"path": "",
"content": " x += 20;"
}
}
2021-03-29 21:24:58 +03:00
},
"span": {
"line_start": 12,
"line_stop": 12,
2021-03-29 21:24:58 +03:00
"col_start": 3,
"col_stop": 10,
"path": "",
"content": " x += 20;"
}
}
2021-03-27 00:14:37 +03:00
},
{
"Console": {
"function": {
"Assert": {
"Binary": {
"left": {
"Identifier": "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" console.assert(x == 30u32);\\\"}\"}"
2021-03-27 00:14:37 +03:00
},
"right": {
"Value": {
"Integer": [
"U32",
"30",
{
"line_start": 13,
"line_stop": 13,
2021-03-31 21:08:38 +03:00
"col_start": 23,
"col_stop": 28,
"path": "",
"content": " console.assert(x == 30u32);"
2021-03-27 00:14:37 +03:00
}
]
}
},
"op": "Eq",
"span": {
"line_start": 13,
"line_stop": 13,
2021-03-31 21:08:38 +03:00
"col_start": 18,
"col_stop": 28,
"path": "",
"content": " console.assert(x == 30u32);"
}
}
2021-03-27 00:14:37 +03:00
}
},
"span": {
"line_start": 13,
"line_stop": 13,
2021-03-31 21:08:38 +03:00
"col_start": 3,
"col_stop": 28,
"path": "",
"content": " console.assert(x == 30u32);"
2021-03-27 00:14:37 +03:00
}
}
},
{
"Definition": {
"declaration_type": "Let",
"variable_names": [
{
"mutable": true,
"identifier": "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let y = [1u8, 2u8];\\\"}\"}",
2021-03-27 00:14:37 +03:00
"span": {
"line_start": 15,
"line_stop": 15,
2021-03-31 21:08:38 +03:00
"col_start": 7,
"col_stop": 8,
"path": "",
"content": " let y = [1u8, 2u8];"
2021-03-27 00:14:37 +03:00
}
}
],
2021-04-14 19:51:20 +03:00
"type_": {
"Array": [
{
"IntegerType": "U8"
},
[
{
"value": "2"
}
]
]
},
2021-03-27 00:14:37 +03:00
"value": {
"ArrayInline": {
"elements": [
{
"Expression": {
"Value": {
"Integer": [
"U8",
"1",
{
"line_start": 15,
"line_stop": 15,
2021-03-31 21:08:38 +03:00
"col_start": 12,
"col_stop": 15,
"path": "",
"content": " let y = [1u8, 2u8];"
2021-03-27 00:14:37 +03:00
}
]
}
}
},
{
"Expression": {
"Value": {
"Integer": [
"U8",
"2",
{
"line_start": 15,
"line_stop": 15,
2021-03-31 21:08:38 +03:00
"col_start": 17,
"col_stop": 20,
"path": "",
"content": " let y = [1u8, 2u8];"
2021-03-27 00:14:37 +03:00
}
]
}
}
}
],
"span": {
"line_start": 15,
"line_stop": 15,
2021-03-31 21:08:38 +03:00
"col_start": 11,
"col_stop": 21,
"path": "",
"content": " let y = [1u8, 2u8];"
2021-03-27 00:14:37 +03:00
}
}
},
"span": {
"line_start": 15,
"line_stop": 15,
2021-03-31 21:08:38 +03:00
"col_start": 3,
"col_stop": 21,
"path": "",
"content": " let y = [1u8, 2u8];"
2021-03-27 00:14:37 +03:00
}
}
},
{
"Assign": {
"operation": "Assign",
"assignee": {
"identifier": "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" y[0] += 3u8;\\\"}\"}",
2021-03-27 00:14:37 +03:00
"accesses": [
{
"ArrayIndex": {
"Value": {
2021-04-14 19:51:20 +03:00
"Integer": [
"U32",
2021-03-27 00:14:37 +03:00
"0",
{
"line_start": 16,
"line_stop": 16,
2021-03-31 21:08:38 +03:00
"col_start": 5,
"col_stop": 6,
"path": "",
"content": " y[0] += 3u8;"
2021-03-27 00:14:37 +03:00
}
]
}
}
}
],
2021-03-27 00:14:37 +03:00
"span": {
"line_start": 16,
"line_stop": 16,
2021-03-31 21:08:38 +03:00
"col_start": 3,
"col_stop": 7,
"path": "",
"content": " y[0] += 3u8;"
2021-03-27 00:14:37 +03:00
}
},
"value": {
"Binary": {
"left": {
"ArrayAccess": {
"array": {
"Identifier": "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" y[0] += 3u8;\\\"}\"}"
2021-03-27 00:14:37 +03:00
},
"index": {
"Value": {
2021-04-14 19:51:20 +03:00
"Integer": [
"U32",
2021-03-27 00:14:37 +03:00
"0",
{
"line_start": 16,
"line_stop": 16,
2021-03-31 21:08:38 +03:00
"col_start": 5,
"col_stop": 6,
"path": "",
"content": " y[0] += 3u8;"
2021-03-27 00:14:37 +03:00
}
]
}
},
"span": {
"line_start": 16,
"line_stop": 16,
2021-03-31 21:08:38 +03:00
"col_start": 3,
"col_stop": 14,
"path": "",
"content": " y[0] += 3u8;"
2021-03-27 00:14:37 +03:00
}
}
},
"right": {
"Value": {
"Integer": [
"U8",
"3",
{
"line_start": 16,
"line_stop": 16,
2021-03-31 21:08:38 +03:00
"col_start": 11,
"col_stop": 14,
"path": "",
"content": " y[0] += 3u8;"
2021-03-27 00:14:37 +03:00
}
]
}
},
"op": "Add",
"span": {
"line_start": 16,
"line_stop": 16,
2021-03-31 21:08:38 +03:00
"col_start": 3,
"col_stop": 14,
"path": "",
"content": " y[0] += 3u8;"
2021-03-27 00:14:37 +03:00
}
}
},
"span": {
"line_start": 16,
"line_stop": 16,
2021-03-31 21:08:38 +03:00
"col_start": 3,
"col_stop": 14,
"path": "",
"content": " y[0] += 3u8;"
2021-03-27 00:14:37 +03:00
}
}
},
{
"Console": {
"function": {
"Assert": {
"Binary": {
"left": {
"ArrayAccess": {
"array": {
"Identifier": "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":17,\\\"line_stop\\\":17,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" console.assert(y[0] == 4u8);\\\"}\"}"
2021-03-27 00:14:37 +03:00
},
"index": {
"Value": {
2021-04-14 19:51:20 +03:00
"Integer": [
"U32",
2021-03-27 00:14:37 +03:00
"0",
{
"line_start": 17,
"line_stop": 17,
2021-03-31 21:08:38 +03:00
"col_start": 20,
"col_stop": 21,
"path": "",
"content": " console.assert(y[0] == 4u8);"
2021-03-27 00:14:37 +03:00
}
]
}
},
"span": {
"line_start": 17,
"line_stop": 17,
2021-03-31 21:08:38 +03:00
"col_start": 18,
"col_stop": 22,
"path": "",
"content": " console.assert(y[0] == 4u8);"
2021-03-27 00:14:37 +03:00
}
}
},
"right": {
"Value": {
"Integer": [
"U8",
"4",
{
"line_start": 17,
"line_stop": 17,
2021-03-31 21:08:38 +03:00
"col_start": 26,
"col_stop": 29,
"path": "",
"content": " console.assert(y[0] == 4u8);"
2021-03-27 00:14:37 +03:00
}
]
}
},
"op": "Eq",
"span": {
"line_start": 17,
"line_stop": 17,
2021-03-31 21:08:38 +03:00
"col_start": 18,
"col_stop": 29,
"path": "",
"content": " console.assert(y[0] == 4u8);"
2021-03-27 00:14:37 +03:00
}
}
}
},
"span": {
"line_start": 17,
"line_stop": 17,
2021-03-31 21:08:38 +03:00
"col_start": 3,
"col_stop": 29,
"path": "",
"content": " console.assert(y[0] == 4u8);"
2021-03-27 00:14:37 +03:00
}
}
},
{
"Definition": {
"declaration_type": "Let",
"variable_names": [
{
"mutable": true,
"identifier": "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":19,\\\"line_stop\\\":19,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let z = (1u8, 2u8);\\\"}\"}",
2021-03-27 00:14:37 +03:00
"span": {
"line_start": 19,
"line_stop": 19,
2021-03-31 21:08:38 +03:00
"col_start": 7,
"col_stop": 8,
"path": "",
"content": " let z = (1u8, 2u8);"
2021-03-27 00:14:37 +03:00
}
}
],
2021-04-14 19:51:20 +03:00
"type_": {
"Tuple": [
{
"IntegerType": "U8"
},
{
"IntegerType": "U8"
}
]
},
2021-03-27 00:14:37 +03:00
"value": {
"TupleInit": {
"elements": [
{
"Value": {
"Integer": [
"U8",
"1",
{
"line_start": 19,
"line_stop": 19,
2021-03-31 21:08:38 +03:00
"col_start": 12,
"col_stop": 15,
"path": "",
"content": " let z = (1u8, 2u8);"
2021-03-27 00:14:37 +03:00
}
]
}
},
{
"Value": {
"Integer": [
"U8",
"2",
{
"line_start": 19,
"line_stop": 19,
2021-03-31 21:08:38 +03:00
"col_start": 17,
"col_stop": 20,
"path": "",
"content": " let z = (1u8, 2u8);"
2021-03-27 00:14:37 +03:00
}
]
}
}
],
"span": {
"line_start": 19,
"line_stop": 19,
2021-03-31 21:08:38 +03:00
"col_start": 11,
"col_stop": 21,
"path": "",
"content": " let z = (1u8, 2u8);"
2021-03-27 00:14:37 +03:00
}
}
},
"span": {
"line_start": 19,
"line_stop": 19,
2021-03-31 21:08:38 +03:00
"col_start": 3,
"col_stop": 21,
"path": "",
"content": " let z = (1u8, 2u8);"
2021-03-27 00:14:37 +03:00
}
}
},
{
"Assign": {
"operation": "Assign",
"assignee": {
"identifier": "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":20,\\\"line_stop\\\":20,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" z.1 += 3u8;\\\"}\"}",
2021-03-27 00:14:37 +03:00
"accesses": [
{
"Tuple": [
{
"value": "1"
},
{
"line_start": 20,
"line_stop": 20,
2021-03-31 21:08:38 +03:00
"col_start": 3,
"col_stop": 6,
"path": "",
"content": " z.1 += 3u8;"
}
]
}
2021-03-27 00:14:37 +03:00
],
"span": {
"line_start": 20,
"line_stop": 20,
2021-03-31 21:08:38 +03:00
"col_start": 3,
"col_stop": 6,
"path": "",
"content": " z.1 += 3u8;"
}
2021-03-27 00:14:37 +03:00
},
"value": {
"Binary": {
"left": {
"TupleAccess": {
"tuple": {
"Identifier": "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":20,\\\"line_stop\\\":20,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" z.1 += 3u8;\\\"}\"}"
2021-03-27 00:14:37 +03:00
},
"index": {
"value": "1"
},
"span": {
"line_start": 20,
"line_stop": 20,
2021-03-31 21:08:38 +03:00
"col_start": 3,
"col_stop": 13,
"path": "",
"content": " z.1 += 3u8;"
2021-03-27 00:14:37 +03:00
}
}
},
"right": {
"Value": {
"Integer": [
"U8",
"3",
{
"line_start": 20,
"line_stop": 20,
2021-03-31 21:08:38 +03:00
"col_start": 10,
"col_stop": 13,
"path": "",
"content": " z.1 += 3u8;"
2021-03-27 00:14:37 +03:00
}
]
}
},
"op": "Add",
"span": {
"line_start": 20,
"line_stop": 20,
2021-03-31 21:08:38 +03:00
"col_start": 3,
"col_stop": 13,
"path": "",
"content": " z.1 += 3u8;"
}
2021-03-27 00:14:37 +03:00
}
},
"span": {
"line_start": 20,
"line_stop": 20,
2021-03-31 21:08:38 +03:00
"col_start": 3,
"col_stop": 13,
"path": "",
"content": " z.1 += 3u8;"
2021-03-27 00:14:37 +03:00
}
}
},
{
"Console": {
"function": {
"Assert": {
"Binary": {
"left": {
2021-03-27 00:14:37 +03:00
"TupleAccess": {
"tuple": {
"Identifier": "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":21,\\\"line_stop\\\":21,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" console.assert(z.1 == 5u8);\\\"}\"}"
2021-03-27 00:14:37 +03:00
},
"index": {
"value": "1"
},
"span": {
"line_start": 21,
"line_stop": 21,
2021-03-31 21:08:38 +03:00
"col_start": 18,
"col_stop": 21,
"path": "",
"content": " console.assert(z.1 == 5u8);"
2021-03-27 00:14:37 +03:00
}
}
},
"right": {
"Value": {
2021-03-27 00:14:37 +03:00
"Integer": [
"U8",
"5",
{
"line_start": 21,
"line_stop": 21,
2021-03-31 21:08:38 +03:00
"col_start": 25,
"col_stop": 28,
"path": "",
"content": " console.assert(z.1 == 5u8);"
}
]
}
},
2021-03-27 00:14:37 +03:00
"op": "Eq",
"span": {
"line_start": 21,
"line_stop": 21,
2021-03-31 21:08:38 +03:00
"col_start": 18,
"col_stop": 28,
"path": "",
"content": " console.assert(z.1 == 5u8);"
}
}
2021-03-27 00:14:37 +03:00
}
},
"span": {
"line_start": 21,
"line_stop": 21,
2021-03-31 21:08:38 +03:00
"col_start": 3,
"col_stop": 28,
"path": "",
"content": " console.assert(z.1 == 5u8);"
2021-03-27 00:14:37 +03:00
}
}
},
{
"Definition": {
"declaration_type": "Let",
"variable_names": [
{
"mutable": true,
"identifier": "{\"name\":\"foo\",\"span\":\"{\\\"line_start\\\":23,\\\"line_stop\\\":23,\\\"col_start\\\":7,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let foo = Foo { f: 6u8, y: (1u8, 1u8) };\\\"}\"}",
2021-03-27 00:14:37 +03:00
"span": {
"line_start": 23,
"line_stop": 23,
2021-03-31 21:08:38 +03:00
"col_start": 7,
"col_stop": 10,
"path": "",
"content": " let foo = Foo { f: 6u8, y: (1u8, 1u8) };"
2021-03-27 00:14:37 +03:00
}
}
],
2021-04-14 19:51:20 +03:00
"type_": {
"Circuit": "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"circuit Foo {\\\"}\"}"
},
2021-03-27 00:14:37 +03:00
"value": {
"CircuitInit": {
"name": "{\"name\":\"Foo\",\"span\":\"{\\\"line_start\\\":23,\\\"line_stop\\\":23,\\\"col_start\\\":13,\\\"col_stop\\\":16,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let foo = Foo { f: 6u8, y: (1u8, 1u8) };\\\"}\"}",
2021-03-27 00:14:37 +03:00
"members": [
{
"identifier": "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":23,\\\"line_stop\\\":23,\\\"col_start\\\":19,\\\"col_stop\\\":20,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let foo = Foo { f: 6u8, y: (1u8, 1u8) };\\\"}\"}",
2021-03-27 00:14:37 +03:00
"expression": {
"Value": {
"Integer": [
"U8",
"6",
{
"line_start": 23,
"line_stop": 23,
2021-03-31 21:08:38 +03:00
"col_start": 22,
"col_stop": 25,
"path": "",
"content": " let foo = Foo { f: 6u8, y: (1u8, 1u8) };"
2021-03-27 00:14:37 +03:00
}
]
}
}
},
{
"identifier": "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":23,\\\"line_stop\\\":23,\\\"col_start\\\":27,\\\"col_stop\\\":28,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let foo = Foo { f: 6u8, y: (1u8, 1u8) };\\\"}\"}",
"expression": {
"TupleInit": {
"elements": [
{
"Value": {
"Integer": [
"U8",
"1",
{
"line_start": 23,
"line_stop": 23,
"col_start": 31,
"col_stop": 34,
"path": "",
"content": " let foo = Foo { f: 6u8, y: (1u8, 1u8) };"
}
]
}
},
{
"Value": {
"Integer": [
"U8",
"1",
{
"line_start": 23,
"line_stop": 23,
"col_start": 36,
"col_stop": 39,
"path": "",
"content": " let foo = Foo { f: 6u8, y: (1u8, 1u8) };"
}
]
}
}
],
"span": {
"line_start": 23,
"line_stop": 23,
"col_start": 30,
"col_stop": 40,
"path": "",
"content": " let foo = Foo { f: 6u8, y: (1u8, 1u8) };"
}
}
}
2021-03-27 00:14:37 +03:00
}
],
"span": {
"line_start": 23,
"line_stop": 23,
2021-03-31 21:08:38 +03:00
"col_start": 13,
"col_stop": 42,
2021-03-31 21:08:38 +03:00
"path": "",
"content": " let foo = Foo { f: 6u8, y: (1u8, 1u8) };"
2021-03-27 00:14:37 +03:00
}
}
},
"span": {
"line_start": 23,
"line_stop": 23,
2021-03-31 21:08:38 +03:00
"col_start": 3,
"col_stop": 42,
2021-03-31 21:08:38 +03:00
"path": "",
"content": " let foo = Foo { f: 6u8, y: (1u8, 1u8) };"
2021-03-27 00:14:37 +03:00
}
}
},
{
"Assign": {
"operation": "Assign",
"assignee": {
"identifier": "{\"name\":\"foo\",\"span\":\"{\\\"line_start\\\":24,\\\"line_stop\\\":24,\\\"col_start\\\":3,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" foo.f += 2u8;\\\"}\"}",
2021-03-27 00:14:37 +03:00
"accesses": [
{
"Member": "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":24,\\\"line_stop\\\":24,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" foo.f += 2u8;\\\"}\"}"
2021-03-27 00:14:37 +03:00
}
],
"span": {
"line_start": 24,
"line_stop": 24,
2021-03-31 21:08:38 +03:00
"col_start": 3,
"col_stop": 8,
"path": "",
2021-03-31 21:59:45 +03:00
"content": " foo.f += 2u8;"
}
2021-03-27 00:14:37 +03:00
},
"value": {
"Binary": {
"left": {
"CircuitMemberAccess": {
"circuit": {
"Identifier": "{\"name\":\"foo\",\"span\":\"{\\\"line_start\\\":24,\\\"line_stop\\\":24,\\\"col_start\\\":3,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" foo.f += 2u8;\\\"}\"}"
2021-03-27 00:14:37 +03:00
},
"name": "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":24,\\\"line_stop\\\":24,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" foo.f += 2u8;\\\"}\"}",
2021-03-27 00:14:37 +03:00
"span": {
"line_start": 24,
"line_stop": 24,
2021-03-31 21:59:45 +03:00
"col_start": 3,
"col_stop": 15,
2021-03-31 21:08:38 +03:00
"path": "",
2021-03-31 21:59:45 +03:00
"content": " foo.f += 2u8;"
2021-03-27 00:14:37 +03:00
}
}
},
"right": {
"Value": {
"Integer": [
"U8",
"2",
{
"line_start": 24,
"line_stop": 24,
2021-03-31 21:59:45 +03:00
"col_start": 12,
"col_stop": 15,
2021-03-31 21:08:38 +03:00
"path": "",
2021-03-31 21:59:45 +03:00
"content": " foo.f += 2u8;"
2021-03-27 00:14:37 +03:00
}
]
}
},
"op": "Add",
"span": {
"line_start": 24,
"line_stop": 24,
2021-03-31 21:59:45 +03:00
"col_start": 3,
"col_stop": 15,
2021-03-31 21:08:38 +03:00
"path": "",
2021-03-31 21:59:45 +03:00
"content": " foo.f += 2u8;"
2021-03-27 00:14:37 +03:00
}
}
},
"span": {
"line_start": 24,
"line_stop": 24,
2021-03-31 21:08:38 +03:00
"col_start": 3,
2021-03-31 21:59:45 +03:00
"col_stop": 15,
2021-03-31 21:08:38 +03:00
"path": "",
2021-03-31 21:59:45 +03:00
"content": " foo.f += 2u8;"
2021-03-27 00:14:37 +03:00
}
}
},
{
"Console": {
"function": {
"Assert": {
"Binary": {
"left": {
"CircuitMemberAccess": {
"circuit": {
"Identifier": "{\"name\":\"foo\",\"span\":\"{\\\"line_start\\\":25,\\\"line_stop\\\":25,\\\"col_start\\\":18,\\\"col_stop\\\":21,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" console.assert(foo.f == 8u8);\\\"}\"}"
2021-03-27 00:14:37 +03:00
},
"name": "{\"name\":\"f\",\"span\":\"{\\\"line_start\\\":25,\\\"line_stop\\\":25,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" console.assert(foo.f == 8u8);\\\"}\"}",
2021-03-27 00:14:37 +03:00
"span": {
"line_start": 25,
"line_stop": 25,
2021-03-31 21:08:38 +03:00
"col_start": 18,
"col_stop": 23,
"path": "",
"content": " console.assert(foo.f == 8u8);"
2021-03-27 00:14:37 +03:00
}
}
},
"right": {
"Value": {
"Integer": [
"U8",
"8",
{
"line_start": 25,
"line_stop": 25,
2021-03-31 21:08:38 +03:00
"col_start": 27,
"col_stop": 30,
"path": "",
"content": " console.assert(foo.f == 8u8);"
2021-03-27 00:14:37 +03:00
}
]
}
},
"op": "Eq",
"span": {
"line_start": 25,
"line_stop": 25,
2021-03-31 21:08:38 +03:00
"col_start": 18,
"col_stop": 30,
"path": "",
"content": " console.assert(foo.f == 8u8);"
2021-03-27 00:14:37 +03:00
}
}
}
},
"span": {
"line_start": 25,
"line_stop": 25,
2021-03-31 21:08:38 +03:00
"col_start": 3,
"col_stop": 30,
"path": "",
"content": " console.assert(foo.f == 8u8);"
}
}
},
{
"Definition": {
"declaration_type": "Let",
"variable_names": [
{
"mutable": true,
2021-04-14 19:51:20 +03:00
"identifier": "{\"name\":\"complex\",\"span\":\"{\\\"line_start\\\":27,\\\"line_stop\\\":27,\\\"col_start\\\":7,\\\"col_stop\\\":14,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let complex = 2u8;\\\"}\"}",
"span": {
"line_start": 27,
"line_stop": 27,
"col_start": 7,
"col_stop": 14,
"path": "",
"content": " let complex = 2u8;"
}
}
],
2021-04-14 19:51:20 +03:00
"type_": {
"IntegerType": "U8"
},
"value": {
"Value": {
"Integer": [
"U8",
"2",
{
2021-04-14 19:51:20 +03:00
"line_start": 27,
"line_stop": 27,
"col_start": 17,
"col_stop": 20,
"path": "",
"content": " let complex = 2u8;"
}
]
}
},
"span": {
2021-04-14 19:51:20 +03:00
"line_start": 27,
"line_stop": 27,
"col_start": 3,
"col_stop": 20,
"path": "",
"content": " let complex = 2u8;"
}
}
},
{
"Assign": {
"operation": "Assign",
"assignee": {
2021-04-14 19:51:20 +03:00
"identifier": "{\"name\":\"complex\",\"span\":\"{\\\"line_start\\\":28,\\\"line_stop\\\":28,\\\"col_start\\\":3,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" complex += 22u8 - 2u8+ 1u8;\\\"}\"}",
"accesses": [],
"span": {
2021-04-14 19:51:20 +03:00
"line_start": 28,
"line_stop": 28,
"col_start": 3,
"col_stop": 10,
"path": "",
"content": " complex += 22u8 - 2u8+ 1u8;"
}
},
"value": {
"Binary": {
"left": {
2021-04-14 19:51:20 +03:00
"Identifier": "{\"name\":\"complex\",\"span\":\"{\\\"line_start\\\":28,\\\"line_stop\\\":28,\\\"col_start\\\":3,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" complex += 22u8 - 2u8+ 1u8;\\\"}\"}"
},
"right": {
"Binary": {
"left": {
"Binary": {
"left": {
"Value": {
"Integer": [
"U8",
"22",
{
2021-04-14 19:51:20 +03:00
"line_start": 28,
"line_stop": 28,
"col_start": 14,
"col_stop": 18,
"path": "",
"content": " complex += 22u8 - 2u8+ 1u8;"
}
]
}
},
"right": {
"Value": {
"Integer": [
"U8",
"2",
{
2021-04-14 19:51:20 +03:00
"line_start": 28,
"line_stop": 28,
"col_start": 21,
"col_stop": 24,
"path": "",
"content": " complex += 22u8 - 2u8+ 1u8;"
}
]
}
},
"op": "Sub",
"span": {
2021-04-14 19:51:20 +03:00
"line_start": 28,
"line_stop": 28,
"col_start": 14,
"col_stop": 24,
"path": "",
"content": " complex += 22u8 - 2u8+ 1u8;"
}
}
},
"right": {
"Value": {
"Integer": [
"U8",
"1",
{
2021-04-14 19:51:20 +03:00
"line_start": 28,
"line_stop": 28,
"col_start": 26,
"col_stop": 29,
"path": "",
"content": " complex += 22u8 - 2u8+ 1u8;"
}
]
}
},
"op": "Add",
"span": {
2021-04-14 19:51:20 +03:00
"line_start": 28,
"line_stop": 28,
"col_start": 14,
"col_stop": 29,
"path": "",
"content": " complex += 22u8 - 2u8+ 1u8;"
}
}
},
"op": "Add",
"span": {
2021-04-14 19:51:20 +03:00
"line_start": 28,
"line_stop": 28,
"col_start": 3,
"col_stop": 29,
"path": "",
"content": " complex += 22u8 - 2u8+ 1u8;"
}
}
},
"span": {
2021-04-14 19:51:20 +03:00
"line_start": 28,
"line_stop": 28,
"col_start": 3,
"col_stop": 29,
"path": "",
"content": " complex += 22u8 - 2u8+ 1u8;"
}
}
},
{
"Console": {
"function": {
"Assert": {
"Binary": {
"left": {
2021-04-14 19:51:20 +03:00
"Identifier": "{\"name\":\"complex\",\"span\":\"{\\\"line_start\\\":29,\\\"line_stop\\\":29,\\\"col_start\\\":18,\\\"col_stop\\\":25,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" console.assert(complex == 23u8);\\\"}\"}"
},
"right": {
"Value": {
"Integer": [
"U8",
"23",
{
2021-04-14 19:51:20 +03:00
"line_start": 29,
"line_stop": 29,
"col_start": 29,
"col_stop": 33,
"path": "",
"content": " console.assert(complex == 23u8);"
}
]
}
},
"op": "Eq",
"span": {
2021-04-14 19:51:20 +03:00
"line_start": 29,
"line_stop": 29,
"col_start": 18,
"col_stop": 33,
"path": "",
"content": " console.assert(complex == 23u8);"
}
}
}
},
"span": {
2021-04-14 19:51:20 +03:00
"line_start": 29,
"line_stop": 29,
"col_start": 3,
"col_stop": 33,
"path": "",
"content": " console.assert(complex == 23u8);"
}
}
2021-04-14 19:51:20 +03:00
},
{
"Definition": {
"declaration_type": "Let",
"variable_names": [
{
"mutable": true,
"identifier": "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":30,\\\"line_stop\\\":30,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let a = [[0u8; 1]; 4];\\\"}\"}",
"span": {
"line_start": 30,
"line_stop": 30,
"col_start": 7,
"col_stop": 8,
"path": "",
"content": " let a = [[0u8; 1]; 4];"
}
}
],
2021-04-14 19:51:20 +03:00
"type_": {
"Array": [
{
"Array": [
{
"IntegerType": "U8"
},
[
{
"value": "1"
}
]
]
},
[
{
"value": "4"
}
]
]
},
"value": {
"ArrayInit": {
"element": {
"ArrayInit": {
"element": {
"Value": {
"Integer": [
"U8",
"0",
{
2021-04-14 19:51:20 +03:00
"line_start": 30,
"line_stop": 30,
"col_start": 13,
"col_stop": 16,
"path": "",
"content": " let a = [[0u8; 1]; 4];"
}
]
}
},
"dimensions": [
{
"value": "1"
}
],
"span": {
2021-04-14 19:51:20 +03:00
"line_start": 30,
"line_stop": 30,
"col_start": 12,
"col_stop": 20,
"path": "",
"content": " let a = [[0u8; 1]; 4];"
}
}
},
"dimensions": [
{
"value": "4"
}
],
"span": {
2021-04-14 19:51:20 +03:00
"line_start": 30,
"line_stop": 30,
"col_start": 11,
"col_stop": 24,
"path": "",
"content": " let a = [[0u8; 1]; 4];"
}
}
},
"span": {
2021-04-14 19:51:20 +03:00
"line_start": 30,
"line_stop": 30,
"col_start": 3,
"col_stop": 24,
"path": "",
"content": " let a = [[0u8; 1]; 4];"
}
}
},
{
"Assign": {
"operation": "Assign",
"assignee": {
2021-04-14 19:51:20 +03:00
"identifier": "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":31,\\\"line_stop\\\":31,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" a[2][0] += 1u8;\\\"}\"}",
"accesses": [
{
"ArrayIndex": {
"Value": {
2021-04-14 19:51:20 +03:00
"Integer": [
"U32",
"2",
{
2021-04-14 19:51:20 +03:00
"line_start": 31,
"line_stop": 31,
"col_start": 5,
"col_stop": 6,
"path": "",
"content": " a[2][0] += 1u8;"
}
]
}
}
},
{
"ArrayIndex": {
"Value": {
2021-04-14 19:51:20 +03:00
"Integer": [
"U32",
"0",
{
2021-04-14 19:51:20 +03:00
"line_start": 31,
"line_stop": 31,
"col_start": 8,
"col_stop": 9,
"path": "",
"content": " a[2][0] += 1u8;"
}
]
}
}
}
],
"span": {
2021-04-14 19:51:20 +03:00
"line_start": 31,
"line_stop": 31,
"col_start": 3,
"col_stop": 10,
"path": "",
"content": " a[2][0] += 1u8;"
}
},
"value": {
"Binary": {
"left": {
"ArrayAccess": {
"array": {
"ArrayAccess": {
"array": {
2021-04-14 19:51:20 +03:00
"Identifier": "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":31,\\\"line_stop\\\":31,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" a[2][0] += 1u8;\\\"}\"}"
},
"index": {
"Value": {
2021-04-14 19:51:20 +03:00
"Integer": [
"U32",
"2",
{
2021-04-14 19:51:20 +03:00
"line_start": 31,
"line_stop": 31,
"col_start": 5,
"col_stop": 6,
"path": "",
"content": " a[2][0] += 1u8;"
}
]
}
},
"span": {
2021-04-14 19:51:20 +03:00
"line_start": 31,
"line_stop": 31,
"col_start": 3,
"col_stop": 17,
"path": "",
"content": " a[2][0] += 1u8;"
}
}
},
"index": {
"Value": {
2021-04-14 19:51:20 +03:00
"Integer": [
"U32",
"0",
{
2021-04-14 19:51:20 +03:00
"line_start": 31,
"line_stop": 31,
"col_start": 8,
"col_stop": 9,
"path": "",
"content": " a[2][0] += 1u8;"
}
]
}
},
"span": {
2021-04-14 19:51:20 +03:00
"line_start": 31,
"line_stop": 31,
"col_start": 3,
"col_stop": 17,
"path": "",
"content": " a[2][0] += 1u8;"
}
}
},
"right": {
"Value": {
"Integer": [
"U8",
"1",
{
2021-04-14 19:51:20 +03:00
"line_start": 31,
"line_stop": 31,
"col_start": 14,
"col_stop": 17,
"path": "",
"content": " a[2][0] += 1u8;"
}
]
}
},
"op": "Add",
"span": {
2021-04-14 19:51:20 +03:00
"line_start": 31,
"line_stop": 31,
"col_start": 3,
"col_stop": 17,
"path": "",
"content": " a[2][0] += 1u8;"
}
}
},
"span": {
2021-04-14 19:51:20 +03:00
"line_start": 31,
"line_stop": 31,
"col_start": 3,
"col_stop": 17,
"path": "",
"content": " a[2][0] += 1u8;"
}
}
},
{
"Console": {
"function": {
"Assert": {
"Binary": {
"left": {
"ArrayAccess": {
"array": {
"ArrayAccess": {
"array": {
2021-04-14 19:51:20 +03:00
"Identifier": "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":32,\\\"line_stop\\\":32,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" console.assert(a[2][0] == 1u8);\\\"}\"}"
},
"index": {
"Value": {
2021-04-14 19:51:20 +03:00
"Integer": [
"U32",
"2",
{
2021-04-14 19:51:20 +03:00
"line_start": 32,
"line_stop": 32,
"col_start": 20,
"col_stop": 21,
"path": "",
"content": " console.assert(a[2][0] == 1u8);"
}
]
}
},
"span": {
2021-04-14 19:51:20 +03:00
"line_start": 32,
"line_stop": 32,
"col_start": 18,
"col_stop": 22,
"path": "",
"content": " console.assert(a[2][0] == 1u8);"
}
}
},
"index": {
"Value": {
2021-04-14 19:51:20 +03:00
"Integer": [
"U32",
"0",
{
2021-04-14 19:51:20 +03:00
"line_start": 32,
"line_stop": 32,
"col_start": 23,
"col_stop": 24,
"path": "",
"content": " console.assert(a[2][0] == 1u8);"
}
]
}
},
"span": {
2021-04-14 19:51:20 +03:00
"line_start": 32,
"line_stop": 32,
"col_start": 18,
"col_stop": 25,
"path": "",
"content": " console.assert(a[2][0] == 1u8);"
}
}
},
"right": {
"Value": {
"Integer": [
"U8",
"1",
{
2021-04-14 19:51:20 +03:00
"line_start": 32,
"line_stop": 32,
"col_start": 29,
"col_stop": 32,
"path": "",
"content": " console.assert(a[2][0] == 1u8);"
}
]
}
},
"op": "Eq",
"span": {
2021-04-14 19:51:20 +03:00
"line_start": 32,
"line_stop": 32,
"col_start": 18,
"col_stop": 32,
"path": "",
"content": " console.assert(a[2][0] == 1u8);"
}
}
}
},
"span": {
2021-04-14 19:51:20 +03:00
"line_start": 32,
"line_stop": 32,
"col_start": 3,
"col_stop": 32,
"path": "",
"content": " console.assert(a[2][0] == 1u8);"
}
}
},
{
"Definition": {
"declaration_type": "Let",
"variable_names": [
{
"mutable": true,
2021-04-14 19:51:20 +03:00
"identifier": "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":34,\\\"line_stop\\\":34,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let b = [0u8; (4, 1)];\\\"}\"}",
"span": {
2021-04-14 19:51:20 +03:00
"line_start": 34,
"line_stop": 34,
"col_start": 7,
"col_stop": 8,
"path": "",
"content": " let b = [0u8; (4, 1)];"
}
}
],
2021-04-14 19:51:20 +03:00
"type_": {
"Array": [
{
"Array": [
{
"IntegerType": "U8"
},
[
{
"value": "1"
}
]
]
},
[
{
"value": "4"
}
]
]
},
"value": {
"ArrayInit": {
"element": {
"ArrayInit": {
"element": {
"Value": {
"Integer": [
"U8",
"0",
{
2021-04-14 19:51:20 +03:00
"line_start": 34,
"line_stop": 34,
"col_start": 12,
"col_stop": 15,
"path": "",
"content": " let b = [0u8; (4, 1)];"
}
]
}
},
"dimensions": [
{
"value": "1"
}
],
"span": {
2021-04-14 19:51:20 +03:00
"line_start": 34,
"line_stop": 34,
"col_start": 11,
"col_stop": 24,
"path": "",
"content": " let b = [0u8; (4, 1)];"
}
}
},
"dimensions": [
{
"value": "4"
}
],
"span": {
2021-04-14 19:51:20 +03:00
"line_start": 34,
"line_stop": 34,
"col_start": 11,
"col_stop": 24,
"path": "",
"content": " let b = [0u8; (4, 1)];"
}
}
},
"span": {
2021-04-14 19:51:20 +03:00
"line_start": 34,
"line_stop": 34,
"col_start": 3,
"col_stop": 24,
"path": "",
"content": " let b = [0u8; (4, 1)];"
}
}
},
{
"Assign": {
"operation": "Assign",
"assignee": {
2021-04-14 19:51:20 +03:00
"identifier": "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":35,\\\"line_stop\\\":35,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" b[2][0] += 1u8;\\\"}\"}",
"accesses": [
{
"ArrayIndex": {
"Value": {
2021-04-14 19:51:20 +03:00
"Integer": [
"U32",
"2",
{
2021-04-14 19:51:20 +03:00
"line_start": 35,
"line_stop": 35,
"col_start": 5,
"col_stop": 6,
"path": "",
"content": " b[2][0] += 1u8;"
}
]
}
}
},
{
"ArrayIndex": {
"Value": {
2021-04-14 19:51:20 +03:00
"Integer": [
"U32",
"0",
{
2021-04-14 19:51:20 +03:00
"line_start": 35,
"line_stop": 35,
"col_start": 8,
"col_stop": 9,
"path": "",
"content": " b[2][0] += 1u8;"
}
]
}
}
}
],
"span": {
2021-04-14 19:51:20 +03:00
"line_start": 35,
"line_stop": 35,
"col_start": 3,
"col_stop": 10,
"path": "",
"content": " b[2][0] += 1u8;"
}
},
"value": {
"Binary": {
"left": {
"ArrayAccess": {
"array": {
"ArrayAccess": {
"array": {
2021-04-14 19:51:20 +03:00
"Identifier": "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":35,\\\"line_stop\\\":35,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" b[2][0] += 1u8;\\\"}\"}"
},
"index": {
"Value": {
2021-04-14 19:51:20 +03:00
"Integer": [
"U32",
"2",
{
2021-04-14 19:51:20 +03:00
"line_start": 35,
"line_stop": 35,
"col_start": 5,
"col_stop": 6,
"path": "",
"content": " b[2][0] += 1u8;"
}
]
}
},
"span": {
2021-04-14 19:51:20 +03:00
"line_start": 35,
"line_stop": 35,
"col_start": 3,
"col_stop": 17,
"path": "",
"content": " b[2][0] += 1u8;"
}
}
},
"index": {
"Value": {
2021-04-14 19:51:20 +03:00
"Integer": [
"U32",
"0",
{
2021-04-14 19:51:20 +03:00
"line_start": 35,
"line_stop": 35,
"col_start": 8,
"col_stop": 9,
"path": "",
"content": " b[2][0] += 1u8;"
}
]
}
},
"span": {
2021-04-14 19:51:20 +03:00
"line_start": 35,
"line_stop": 35,
"col_start": 3,
"col_stop": 17,
"path": "",
"content": " b[2][0] += 1u8;"
}
}
},
"right": {
"Value": {
"Integer": [
"U8",
"1",
{
2021-04-14 19:51:20 +03:00
"line_start": 35,
"line_stop": 35,
"col_start": 14,
"col_stop": 17,
"path": "",
"content": " b[2][0] += 1u8;"
}
]
}
},
"op": "Add",
"span": {
2021-04-14 19:51:20 +03:00
"line_start": 35,
"line_stop": 35,
"col_start": 3,
"col_stop": 17,
"path": "",
"content": " b[2][0] += 1u8;"
}
}
},
"span": {
2021-04-14 19:51:20 +03:00
"line_start": 35,
"line_stop": 35,
"col_start": 3,
"col_stop": 17,
"path": "",
"content": " b[2][0] += 1u8;"
}
}
},
{
"Console": {
"function": {
"Assert": {
"Binary": {
"left": {
"ArrayAccess": {
"array": {
"ArrayAccess": {
"array": {
2021-04-14 19:51:20 +03:00
"Identifier": "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":36,\\\"line_stop\\\":36,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" console.assert(a[2][0] == 1u8);\\\"}\"}"
},
"index": {
"Value": {
2021-04-14 19:51:20 +03:00
"Integer": [
"U32",
"2",
{
2021-04-14 19:51:20 +03:00
"line_start": 36,
"line_stop": 36,
"col_start": 20,
"col_stop": 21,
"path": "",
"content": " console.assert(a[2][0] == 1u8);"
}
]
}
},
"span": {
2021-04-14 19:51:20 +03:00
"line_start": 36,
"line_stop": 36,
"col_start": 18,
"col_stop": 22,
"path": "",
"content": " console.assert(a[2][0] == 1u8);"
}
}
},
"index": {
"Value": {
2021-04-14 19:51:20 +03:00
"Integer": [
"U32",
"0",
{
2021-04-14 19:51:20 +03:00
"line_start": 36,
"line_stop": 36,
"col_start": 23,
"col_stop": 24,
"path": "",
"content": " console.assert(a[2][0] == 1u8);"
}
]
}
},
"span": {
2021-04-14 19:51:20 +03:00
"line_start": 36,
"line_stop": 36,
"col_start": 18,
"col_stop": 25,
"path": "",
"content": " console.assert(a[2][0] == 1u8);"
}
}
},
"right": {
"Value": {
"Integer": [
"U8",
"1",
{
2021-04-14 19:51:20 +03:00
"line_start": 36,
"line_stop": 36,
"col_start": 29,
"col_stop": 32,
"path": "",
"content": " console.assert(a[2][0] == 1u8);"
}
]
}
},
"op": "Eq",
"span": {
2021-04-14 19:51:20 +03:00
"line_start": 36,
"line_stop": 36,
"col_start": 18,
"col_stop": 32,
"path": "",
"content": " console.assert(a[2][0] == 1u8);"
}
}
}
},
"span": {
2021-04-14 19:51:20 +03:00
"line_start": 36,
"line_stop": 36,
"col_start": 3,
"col_stop": 32,
"path": "",
"content": " console.assert(a[2][0] == 1u8);"
}
}
}
2021-03-29 21:24:58 +03:00
],
"span": {
"line_start": 10,
2021-04-14 19:51:20 +03:00
"line_stop": 37,
2021-03-29 21:24:58 +03:00
"col_start": 17,
"col_stop": 2,
2021-03-29 21:24:58 +03:00
"path": "",
"content": "function main() {\n...\n}"
}
2021-03-29 21:24:58 +03:00
},
"span": {
"line_start": 10,
2021-04-14 19:51:20 +03:00
"line_stop": 37,
2021-03-29 21:24:58 +03:00
"col_start": 1,
"col_stop": 2,
"path": "",
2021-04-14 19:51:20 +03:00
"content": "function main() {\n...\n}\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"
}
}
}
2021-03-29 21:24:58 +03:00
}