mirror of
https://github.com/ProvableHQ/leo.git
synced 2024-11-24 07:48:04 +03:00
674 lines
24 KiB
JSON
674 lines
24 KiB
JSON
{
|
|
"name": "",
|
|
"expected_input": [],
|
|
"imports": [],
|
|
"circuits": {},
|
|
"global_consts": {},
|
|
"functions": {
|
|
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function main() {\\\"}\"}": {
|
|
"annotations": [],
|
|
"identifier": "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function main() {\\\"}\"}",
|
|
"input": [],
|
|
"output": {
|
|
"Tuple": []
|
|
},
|
|
"block": {
|
|
"statements": [
|
|
{
|
|
"Definition": {
|
|
"declaration_type": "Let",
|
|
"variable_names": [
|
|
{
|
|
"mutable": true,
|
|
"identifier": "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":2,\\\"line_stop\\\":2,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let s = \\\\\\\"\\\\\\\\u{2764}ello, World!\\\\\\\";\\\"}\"}",
|
|
"span": {
|
|
"line_start": 2,
|
|
"line_stop": 2,
|
|
"col_start": 9,
|
|
"col_stop": 10,
|
|
"path": "",
|
|
"content": " let s = \"\\u{2764}ello, World!\";"
|
|
}
|
|
}
|
|
],
|
|
"type_": null,
|
|
"value": {
|
|
"ArrayInline": {
|
|
"elements": [
|
|
{
|
|
"Expression": {
|
|
"Value": {
|
|
"Char": [
|
|
"❤",
|
|
{
|
|
"line_start": 2,
|
|
"line_stop": 2,
|
|
"col_start": 13,
|
|
"col_stop": 35,
|
|
"path": "",
|
|
"content": " let s = \"\\u{2764}ello, World!\";"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"Expression": {
|
|
"Value": {
|
|
"Char": [
|
|
"e",
|
|
{
|
|
"line_start": 2,
|
|
"line_stop": 2,
|
|
"col_start": 13,
|
|
"col_stop": 35,
|
|
"path": "",
|
|
"content": " let s = \"\\u{2764}ello, World!\";"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"Expression": {
|
|
"Value": {
|
|
"Char": [
|
|
"l",
|
|
{
|
|
"line_start": 2,
|
|
"line_stop": 2,
|
|
"col_start": 13,
|
|
"col_stop": 35,
|
|
"path": "",
|
|
"content": " let s = \"\\u{2764}ello, World!\";"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"Expression": {
|
|
"Value": {
|
|
"Char": [
|
|
"l",
|
|
{
|
|
"line_start": 2,
|
|
"line_stop": 2,
|
|
"col_start": 13,
|
|
"col_stop": 35,
|
|
"path": "",
|
|
"content": " let s = \"\\u{2764}ello, World!\";"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"Expression": {
|
|
"Value": {
|
|
"Char": [
|
|
"o",
|
|
{
|
|
"line_start": 2,
|
|
"line_stop": 2,
|
|
"col_start": 13,
|
|
"col_stop": 35,
|
|
"path": "",
|
|
"content": " let s = \"\\u{2764}ello, World!\";"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"Expression": {
|
|
"Value": {
|
|
"Char": [
|
|
",",
|
|
{
|
|
"line_start": 2,
|
|
"line_stop": 2,
|
|
"col_start": 13,
|
|
"col_stop": 35,
|
|
"path": "",
|
|
"content": " let s = \"\\u{2764}ello, World!\";"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"Expression": {
|
|
"Value": {
|
|
"Char": [
|
|
" ",
|
|
{
|
|
"line_start": 2,
|
|
"line_stop": 2,
|
|
"col_start": 13,
|
|
"col_stop": 35,
|
|
"path": "",
|
|
"content": " let s = \"\\u{2764}ello, World!\";"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"Expression": {
|
|
"Value": {
|
|
"Char": [
|
|
"W",
|
|
{
|
|
"line_start": 2,
|
|
"line_stop": 2,
|
|
"col_start": 13,
|
|
"col_stop": 35,
|
|
"path": "",
|
|
"content": " let s = \"\\u{2764}ello, World!\";"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"Expression": {
|
|
"Value": {
|
|
"Char": [
|
|
"o",
|
|
{
|
|
"line_start": 2,
|
|
"line_stop": 2,
|
|
"col_start": 13,
|
|
"col_stop": 35,
|
|
"path": "",
|
|
"content": " let s = \"\\u{2764}ello, World!\";"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"Expression": {
|
|
"Value": {
|
|
"Char": [
|
|
"r",
|
|
{
|
|
"line_start": 2,
|
|
"line_stop": 2,
|
|
"col_start": 13,
|
|
"col_stop": 35,
|
|
"path": "",
|
|
"content": " let s = \"\\u{2764}ello, World!\";"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"Expression": {
|
|
"Value": {
|
|
"Char": [
|
|
"l",
|
|
{
|
|
"line_start": 2,
|
|
"line_stop": 2,
|
|
"col_start": 13,
|
|
"col_stop": 35,
|
|
"path": "",
|
|
"content": " let s = \"\\u{2764}ello, World!\";"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"Expression": {
|
|
"Value": {
|
|
"Char": [
|
|
"d",
|
|
{
|
|
"line_start": 2,
|
|
"line_stop": 2,
|
|
"col_start": 13,
|
|
"col_stop": 35,
|
|
"path": "",
|
|
"content": " let s = \"\\u{2764}ello, World!\";"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"Expression": {
|
|
"Value": {
|
|
"Char": [
|
|
"!",
|
|
{
|
|
"line_start": 2,
|
|
"line_stop": 2,
|
|
"col_start": 13,
|
|
"col_stop": 35,
|
|
"path": "",
|
|
"content": " let s = \"\\u{2764}ello, World!\";"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"span": {
|
|
"line_start": 2,
|
|
"line_stop": 2,
|
|
"col_start": 13,
|
|
"col_stop": 35,
|
|
"path": "",
|
|
"content": " let s = \"\\u{2764}ello, World!\";"
|
|
}
|
|
}
|
|
},
|
|
"span": {
|
|
"line_start": 2,
|
|
"line_stop": 2,
|
|
"col_start": 5,
|
|
"col_stop": 35,
|
|
"path": "",
|
|
"content": " let s = \"\\u{2764}ello, World!\";"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"Assign": {
|
|
"operation": "Assign",
|
|
"assignee": {
|
|
"identifier": "{\"name\":\"s\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" s[..2] = \\\\\\\"he\\\\\\\";\\\"}\"}",
|
|
"accesses": [
|
|
{
|
|
"ArrayRange": [
|
|
null,
|
|
{
|
|
"Value": {
|
|
"Implicit": [
|
|
"2",
|
|
{
|
|
"line_start": 3,
|
|
"line_stop": 3,
|
|
"col_start": 9,
|
|
"col_stop": 10,
|
|
"path": "",
|
|
"content": " s[..2] = \"he\";"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"span": {
|
|
"line_start": 3,
|
|
"line_stop": 3,
|
|
"col_start": 5,
|
|
"col_stop": 11,
|
|
"path": "",
|
|
"content": " s[..2] = \"he\";"
|
|
}
|
|
},
|
|
"value": {
|
|
"ArrayInline": {
|
|
"elements": [
|
|
{
|
|
"Expression": {
|
|
"Value": {
|
|
"Char": [
|
|
"h",
|
|
{
|
|
"line_start": 3,
|
|
"line_stop": 3,
|
|
"col_start": 14,
|
|
"col_stop": 18,
|
|
"path": "",
|
|
"content": " s[..2] = \"he\";"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"Expression": {
|
|
"Value": {
|
|
"Char": [
|
|
"e",
|
|
{
|
|
"line_start": 3,
|
|
"line_stop": 3,
|
|
"col_start": 14,
|
|
"col_stop": 18,
|
|
"path": "",
|
|
"content": " s[..2] = \"he\";"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"span": {
|
|
"line_start": 3,
|
|
"line_stop": 3,
|
|
"col_start": 14,
|
|
"col_stop": 18,
|
|
"path": "",
|
|
"content": " s[..2] = \"he\";"
|
|
}
|
|
}
|
|
},
|
|
"span": {
|
|
"line_start": 3,
|
|
"line_stop": 3,
|
|
"col_start": 5,
|
|
"col_stop": 18,
|
|
"path": "",
|
|
"content": " s[..2] = \"he\";"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"Definition": {
|
|
"declaration_type": "Let",
|
|
"variable_names": [
|
|
{
|
|
"mutable": true,
|
|
"identifier": "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let x = false;\\\"}\"}",
|
|
"span": {
|
|
"line_start": 4,
|
|
"line_stop": 4,
|
|
"col_start": 9,
|
|
"col_stop": 10,
|
|
"path": "",
|
|
"content": " let x = false;"
|
|
}
|
|
}
|
|
],
|
|
"type_": null,
|
|
"value": {
|
|
"Value": {
|
|
"Boolean": [
|
|
"false",
|
|
{
|
|
"line_start": 4,
|
|
"line_stop": 4,
|
|
"col_start": 13,
|
|
"col_stop": 18,
|
|
"path": "",
|
|
"content": " let x = false;"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"span": {
|
|
"line_start": 4,
|
|
"line_stop": 4,
|
|
"col_start": 5,
|
|
"col_stop": 18,
|
|
"path": "",
|
|
"content": " let x = false;"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"Assign": {
|
|
"operation": "Assign",
|
|
"assignee": {
|
|
"identifier": "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" x = \\\\\\\"test1\\\\\\\" == \\\\\\\"test2\\\\\\\";\\\"}\"}",
|
|
"accesses": [],
|
|
"span": {
|
|
"line_start": 5,
|
|
"line_stop": 5,
|
|
"col_start": 5,
|
|
"col_stop": 6,
|
|
"path": "",
|
|
"content": " x = \"test1\" == \"test2\";"
|
|
}
|
|
},
|
|
"value": {
|
|
"Binary": {
|
|
"left": {
|
|
"ArrayInline": {
|
|
"elements": [
|
|
{
|
|
"Expression": {
|
|
"Value": {
|
|
"Char": [
|
|
"t",
|
|
{
|
|
"line_start": 5,
|
|
"line_stop": 5,
|
|
"col_start": 9,
|
|
"col_stop": 16,
|
|
"path": "",
|
|
"content": " x = \"test1\" == \"test2\";"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"Expression": {
|
|
"Value": {
|
|
"Char": [
|
|
"e",
|
|
{
|
|
"line_start": 5,
|
|
"line_stop": 5,
|
|
"col_start": 9,
|
|
"col_stop": 16,
|
|
"path": "",
|
|
"content": " x = \"test1\" == \"test2\";"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"Expression": {
|
|
"Value": {
|
|
"Char": [
|
|
"s",
|
|
{
|
|
"line_start": 5,
|
|
"line_stop": 5,
|
|
"col_start": 9,
|
|
"col_stop": 16,
|
|
"path": "",
|
|
"content": " x = \"test1\" == \"test2\";"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"Expression": {
|
|
"Value": {
|
|
"Char": [
|
|
"t",
|
|
{
|
|
"line_start": 5,
|
|
"line_stop": 5,
|
|
"col_start": 9,
|
|
"col_stop": 16,
|
|
"path": "",
|
|
"content": " x = \"test1\" == \"test2\";"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"Expression": {
|
|
"Value": {
|
|
"Char": [
|
|
"1",
|
|
{
|
|
"line_start": 5,
|
|
"line_stop": 5,
|
|
"col_start": 9,
|
|
"col_stop": 16,
|
|
"path": "",
|
|
"content": " x = \"test1\" == \"test2\";"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"span": {
|
|
"line_start": 5,
|
|
"line_stop": 5,
|
|
"col_start": 9,
|
|
"col_stop": 16,
|
|
"path": "",
|
|
"content": " x = \"test1\" == \"test2\";"
|
|
}
|
|
}
|
|
},
|
|
"right": {
|
|
"ArrayInline": {
|
|
"elements": [
|
|
{
|
|
"Expression": {
|
|
"Value": {
|
|
"Char": [
|
|
"t",
|
|
{
|
|
"line_start": 5,
|
|
"line_stop": 5,
|
|
"col_start": 20,
|
|
"col_stop": 27,
|
|
"path": "",
|
|
"content": " x = \"test1\" == \"test2\";"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"Expression": {
|
|
"Value": {
|
|
"Char": [
|
|
"e",
|
|
{
|
|
"line_start": 5,
|
|
"line_stop": 5,
|
|
"col_start": 20,
|
|
"col_stop": 27,
|
|
"path": "",
|
|
"content": " x = \"test1\" == \"test2\";"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"Expression": {
|
|
"Value": {
|
|
"Char": [
|
|
"s",
|
|
{
|
|
"line_start": 5,
|
|
"line_stop": 5,
|
|
"col_start": 20,
|
|
"col_stop": 27,
|
|
"path": "",
|
|
"content": " x = \"test1\" == \"test2\";"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"Expression": {
|
|
"Value": {
|
|
"Char": [
|
|
"t",
|
|
{
|
|
"line_start": 5,
|
|
"line_stop": 5,
|
|
"col_start": 20,
|
|
"col_stop": 27,
|
|
"path": "",
|
|
"content": " x = \"test1\" == \"test2\";"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"Expression": {
|
|
"Value": {
|
|
"Char": [
|
|
"2",
|
|
{
|
|
"line_start": 5,
|
|
"line_stop": 5,
|
|
"col_start": 20,
|
|
"col_stop": 27,
|
|
"path": "",
|
|
"content": " x = \"test1\" == \"test2\";"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"span": {
|
|
"line_start": 5,
|
|
"line_stop": 5,
|
|
"col_start": 20,
|
|
"col_stop": 27,
|
|
"path": "",
|
|
"content": " x = \"test1\" == \"test2\";"
|
|
}
|
|
}
|
|
},
|
|
"op": "Eq",
|
|
"span": {
|
|
"line_start": 5,
|
|
"line_stop": 5,
|
|
"col_start": 9,
|
|
"col_stop": 27,
|
|
"path": "",
|
|
"content": " x = \"test1\" == \"test2\";"
|
|
}
|
|
}
|
|
},
|
|
"span": {
|
|
"line_start": 5,
|
|
"line_stop": 5,
|
|
"col_start": 5,
|
|
"col_stop": 27,
|
|
"path": "",
|
|
"content": " x = \"test1\" == \"test2\";"
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"span": {
|
|
"line_start": 1,
|
|
"line_stop": 6,
|
|
"col_start": 17,
|
|
"col_stop": 2,
|
|
"path": "",
|
|
"content": "function main() {\n...\n}"
|
|
}
|
|
},
|
|
"span": {
|
|
"line_start": 1,
|
|
"line_stop": 6,
|
|
"col_start": 1,
|
|
"col_stop": 2,
|
|
"path": "",
|
|
"content": "function main() {\n...\n}\n\n\n"
|
|
}
|
|
}
|
|
}
|
|
}
|