leo/parser/tests/serialization/expected_leo_ast.json
2021-03-30 19:38:37 -04:00

90 lines
2.7 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\\\":\\\"test\\\",\\\"content\\\":\\\"function main() {\\\"}\"}": {
"annotations": [],
"identifier": "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function main() {\\\"}\"}",
"input": [],
"output": null,
"block": {
"statements": [
{
"Return": {
"expression": {
"Binary": {
"left": {
"Value": {
"Implicit": [
"1",
{
"line_start": 2,
"line_stop": 2,
"col_start": 12,
"col_stop": 13,
"path": "test",
"content": " return 1 + 1"
}
]
}
},
"right": {
"Value": {
"Implicit": [
"1",
{
"line_start": 2,
"line_stop": 2,
"col_start": 16,
"col_stop": 17,
"path": "test",
"content": " return 1 + 1"
}
]
}
},
"op": "Add",
"span": {
"line_start": 2,
"line_stop": 2,
"col_start": 12,
"col_stop": 17,
"path": "test",
"content": " return 1 + 1"
}
}
},
"span": {
"line_start": 2,
"line_stop": 2,
"col_start": 5,
"col_stop": 17,
"path": "test",
"content": " return 1 + 1"
}
}
}
],
"span": {
"line_start": 1,
"line_stop": 3,
"col_start": 17,
"col_stop": 2,
"path": "test",
"content": "function main() {\n...\n}"
}
},
"span": {
"line_start": 1,
"line_stop": 3,
"col_start": 1,
"col_stop": 2,
"path": "test",
"content": "function main() {\n...\n}"
}
}
}
}