leo/tests/parser/statement/return.leo.out
2021-04-14 15:27:57 -07:00

111 lines
3.2 KiB
Plaintext

---
namespace: ParseStatement
expectation: Pass
outputs:
- Return:
expression:
Identifier: "{\"name\":\"expr\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":12,\\\"path\\\":\\\"return.leo\\\",\\\"content\\\":\\\"return expr;\\\"}\"}"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 12
path: return.leo
content: return expr;
- Return:
expression:
TupleInit:
elements: []
span:
line_start: 1
line_stop: 1
col_start: 8
col_stop: 10
path: return.leo
content: return ();
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 10
path: return.leo
content: return ();
- Return:
expression:
TupleInit:
elements: []
span:
line_start: 1
line_stop: 1
col_start: 8
col_stop: 10
path: return.leo
content: return ();
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 10
path: return.leo
content: return ();
- Return:
expression:
Binary:
left:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"return.leo\\\",\\\"content\\\":\\\"return x+y;\\\"}\"}"
right:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"return.leo\\\",\\\"content\\\":\\\"return x+y;\\\"}\"}"
op: Add
span:
line_start: 1
line_stop: 1
col_start: 8
col_stop: 11
path: return.leo
content: return x+y;
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 11
path: return.leo
content: return x+y;
- Return:
expression:
TupleInit:
elements:
- Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"return.leo\\\",\\\"content\\\":\\\"return (x,y);\\\"}\"}"
- Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"return.leo\\\",\\\"content\\\":\\\"return (x,y);\\\"}\"}"
span:
line_start: 1
line_stop: 1
col_start: 8
col_stop: 13
path: return.leo
content: "return (x,y);"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 13
path: return.leo
content: "return (x,y);"
- Return:
expression:
Value:
Implicit:
- "5"
- line_start: 2
line_stop: 2
col_start: 1
col_stop: 2
path: return.leo
content: 5;
span:
line_start: 1
line_stop: 2
col_start: 1
col_stop: 2
path: return.leo
content: "return\n5;"