leo/ast/tests/serialization/expected_leo_ast.json
2020-12-16 15:01:15 -08:00

77 lines
2.1 KiB
JSON

{
"name": "leo_tree",
"expected_input": [],
"imports": [],
"circuits": {},
"functions": {
"{\"name\":\"main\",\"span\":\"{\\\"text\\\":\\\" function main() {\\\",\\\"line\\\":1,\\\"start\\\":10,\\\"end\\\":14}\"}": {
"identifier": "{\"name\":\"main\",\"span\":\"{\\\"text\\\":\\\" function main() {\\\",\\\"line\\\":1,\\\"start\\\":10,\\\"end\\\":14}\"}",
"input": [],
"output": null,
"block" : {
"statements": [
{
"Return": {
"expression": {
"Binary": {
"left": {
"Value": {
"Implicit": [
"1",
{
"text": " return 1 + 1",
"line": 2,
"start": 12,
"end": 13
}
]
}
},
"op": "Add",
"right": {
"Value": {
"Implicit": [
"1",
{
"text": " return 1 + 1",
"line": 2,
"start": 16,
"end": 17
}
]
}
},
"span": {
"text": " return 1 + 1",
"line": 2,
"start": 12,
"end": 17
}
}
},
"span" : {
"text": " return 1 + 1",
"line": 2,
"start": 5,
"end": 17
}
}
}
],
"span" : {
"text": " return 1 + 1",
"line": 2,
"start": 5,
"end": 17
}
},
"span": {
"text": " function main() {",
"line": 1,
"start": 1,
"end": 1
}
}
},
"tests": {}
}