leo/tests/parser/statement/assign.leo.out

412 lines
14 KiB
Plaintext
Raw Normal View History

2021-03-30 01:45:10 +03:00
---
ns: ParseStatement
expectation: Pass
outputs:
- Assign:
operation: Assign
assignee:
2021-04-06 16:57:46 +03:00
identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"assign.leo\\\",\\\"content\\\":\\\"x = expr;\\\"}\"}"
2021-03-30 01:45:10 +03:00
accesses: []
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 2
2021-04-06 16:57:46 +03:00
path: assign.leo
2021-03-30 01:45:10 +03:00
content: x = expr;
value:
2021-04-06 16:57:46 +03:00
Identifier: "{\"name\":\"expr\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"assign.leo\\\",\\\"content\\\":\\\"x = expr;\\\"}\"}"
2021-03-30 01:45:10 +03:00
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 9
2021-04-06 16:57:46 +03:00
path: assign.leo
2021-03-30 01:45:10 +03:00
content: x = expr;
- Assign:
operation: Assign
assignee:
2021-04-06 16:57:46 +03:00
identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"assign.leo\\\",\\\"content\\\":\\\"x = ();\\\"}\"}"
2021-03-30 01:45:10 +03:00
accesses: []
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 2
2021-04-06 16:57:46 +03:00
path: assign.leo
2021-03-30 01:45:10 +03:00
content: x = ();
value:
TupleInit:
elements: []
span:
line_start: 1
line_stop: 1
col_start: 5
col_stop: 7
2021-04-06 16:57:46 +03:00
path: assign.leo
2021-03-30 01:45:10 +03:00
content: x = ();
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 7
2021-04-06 16:57:46 +03:00
path: assign.leo
2021-03-30 01:45:10 +03:00
content: x = ();
- Assign:
operation: Assign
assignee:
2021-04-06 16:57:46 +03:00
identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"assign.leo\\\",\\\"content\\\":\\\"x = x+y;\\\"}\"}"
2021-03-30 01:45:10 +03:00
accesses: []
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 2
2021-04-06 16:57:46 +03:00
path: assign.leo
2021-03-30 01:45:10 +03:00
content: x = x+y;
value:
Binary:
left:
2021-04-06 16:57:46 +03:00
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"assign.leo\\\",\\\"content\\\":\\\"x = x+y;\\\"}\"}"
2021-03-30 01:45:10 +03:00
right:
2021-04-06 16:57:46 +03:00
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"assign.leo\\\",\\\"content\\\":\\\"x = x+y;\\\"}\"}"
2021-03-30 01:45:10 +03:00
op: Add
span:
line_start: 1
line_stop: 1
col_start: 5
col_stop: 8
2021-04-06 16:57:46 +03:00
path: assign.leo
2021-03-30 01:45:10 +03:00
content: x = x+y;
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 8
2021-04-06 16:57:46 +03:00
path: assign.leo
2021-03-30 01:45:10 +03:00
content: x = x+y;
- Assign:
operation: Assign
assignee:
2021-04-06 16:57:46 +03:00
identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"assign.leo\\\",\\\"content\\\":\\\"x = (x,y);\\\"}\"}"
2021-03-30 01:45:10 +03:00
accesses: []
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 2
2021-04-06 16:57:46 +03:00
path: assign.leo
2021-03-30 01:45:10 +03:00
content: "x = (x,y);"
value:
TupleInit:
elements:
2021-04-06 16:57:46 +03:00
- Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"assign.leo\\\",\\\"content\\\":\\\"x = (x,y);\\\"}\"}"
- Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"assign.leo\\\",\\\"content\\\":\\\"x = (x,y);\\\"}\"}"
2021-03-30 01:45:10 +03:00
span:
line_start: 1
line_stop: 1
col_start: 5
col_stop: 10
2021-04-06 16:57:46 +03:00
path: assign.leo
2021-03-30 01:45:10 +03:00
content: "x = (x,y);"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 10
2021-04-06 16:57:46 +03:00
path: assign.leo
2021-03-30 01:45:10 +03:00
content: "x = (x,y);"
- Assign:
operation: Assign
assignee:
2021-04-06 16:57:46 +03:00
identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"assign.leo\\\",\\\"content\\\":\\\"x = x();\\\"}\"}"
2021-03-30 01:45:10 +03:00
accesses: []
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 2
2021-04-06 16:57:46 +03:00
path: assign.leo
2021-03-30 01:45:10 +03:00
content: x = x();
value:
Call:
function:
2021-04-06 16:57:46 +03:00
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"assign.leo\\\",\\\"content\\\":\\\"x = x();\\\"}\"}"
2021-03-30 01:45:10 +03:00
arguments: []
span:
line_start: 1
line_stop: 1
col_start: 5
col_stop: 8
2021-04-06 16:57:46 +03:00
path: assign.leo
2021-03-30 01:45:10 +03:00
content: x = x();
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 8
2021-04-06 16:57:46 +03:00
path: assign.leo
2021-03-30 01:45:10 +03:00
content: x = x();
- Assign:
operation: Assign
assignee:
2021-04-06 16:57:46 +03:00
identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"assign.leo\\\",\\\"content\\\":\\\"x[0] = y;\\\"}\"}"
2021-03-30 01:45:10 +03:00
accesses:
- ArrayIndex:
Value:
Implicit:
- "0"
- line_start: 1
line_stop: 1
col_start: 3
col_stop: 4
2021-04-06 16:57:46 +03:00
path: assign.leo
2021-03-30 01:45:10 +03:00
content: "x[0] = y;"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 5
2021-04-06 16:57:46 +03:00
path: assign.leo
2021-03-30 01:45:10 +03:00
content: "x[0] = y;"
value:
2021-04-06 16:57:46 +03:00
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"assign.leo\\\",\\\"content\\\":\\\"x[0] = y;\\\"}\"}"
2021-03-30 01:45:10 +03:00
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 9
2021-04-06 16:57:46 +03:00
path: assign.leo
2021-03-30 01:45:10 +03:00
content: "x[0] = y;"
- Assign:
operation: Assign
assignee:
2021-04-06 16:57:46 +03:00
identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"assign.leo\\\",\\\"content\\\":\\\"x[0u32] = y;\\\"}\"}"
2021-03-30 01:45:10 +03:00
accesses:
- ArrayIndex:
Value:
Integer:
- U32
- "0"
- line_start: 1
line_stop: 1
col_start: 3
col_stop: 7
2021-04-06 16:57:46 +03:00
path: assign.leo
2021-03-30 01:45:10 +03:00
content: "x[0u32] = y;"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 8
2021-04-06 16:57:46 +03:00
path: assign.leo
2021-03-30 01:45:10 +03:00
content: "x[0u32] = y;"
value:
2021-04-06 16:57:46 +03:00
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"assign.leo\\\",\\\"content\\\":\\\"x[0u32] = y;\\\"}\"}"
2021-03-30 01:45:10 +03:00
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 12
2021-04-06 16:57:46 +03:00
path: assign.leo
2021-03-30 01:45:10 +03:00
content: "x[0u32] = y;"
- Assign:
operation: Assign
assignee:
2021-04-06 16:57:46 +03:00
identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"assign.leo\\\",\\\"content\\\":\\\"x.0 = y;\\\"}\"}"
2021-03-30 01:45:10 +03:00
accesses:
- Tuple:
- value: "0"
- line_start: 1
line_stop: 1
col_start: 1
col_stop: 4
2021-04-06 16:57:46 +03:00
path: assign.leo
2021-03-30 01:45:10 +03:00
content: x.0 = y;
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 4
2021-04-06 16:57:46 +03:00
path: assign.leo
2021-03-30 01:45:10 +03:00
content: x.0 = y;
value:
2021-04-06 16:57:46 +03:00
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"assign.leo\\\",\\\"content\\\":\\\"x.0 = y;\\\"}\"}"
2021-03-30 01:45:10 +03:00
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 8
2021-04-06 16:57:46 +03:00
path: assign.leo
2021-03-30 01:45:10 +03:00
content: x.0 = y;
- Assign:
operation: Assign
assignee:
2021-04-06 16:57:46 +03:00
identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"assign.leo\\\",\\\"content\\\":\\\"x[1..2] = y;\\\"}\"}"
2021-03-30 01:45:10 +03:00
accesses:
- ArrayRange:
- Value:
Implicit:
- "1"
- line_start: 1
line_stop: 1
col_start: 3
col_stop: 4
2021-04-06 16:57:46 +03:00
path: assign.leo
2021-03-30 01:45:10 +03:00
content: "x[1..2] = y;"
- Value:
Implicit:
- "2"
- line_start: 1
line_stop: 1
col_start: 6
col_stop: 7
2021-04-06 16:57:46 +03:00
path: assign.leo
2021-03-30 01:45:10 +03:00
content: "x[1..2] = y;"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 8
2021-04-06 16:57:46 +03:00
path: assign.leo
2021-03-30 01:45:10 +03:00
content: "x[1..2] = y;"
value:
2021-04-06 16:57:46 +03:00
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"assign.leo\\\",\\\"content\\\":\\\"x[1..2] = y;\\\"}\"}"
2021-03-30 01:45:10 +03:00
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 12
2021-04-06 16:57:46 +03:00
path: assign.leo
2021-03-30 01:45:10 +03:00
content: "x[1..2] = y;"
- Assign:
operation: Assign
assignee:
2021-04-06 16:57:46 +03:00
identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"assign.leo\\\",\\\"content\\\":\\\"x[..2] = y;\\\"}\"}"
2021-03-30 01:45:10 +03:00
accesses:
- ArrayRange:
- ~
- Value:
Implicit:
- "2"
- line_start: 1
line_stop: 1
col_start: 5
col_stop: 6
2021-04-06 16:57:46 +03:00
path: assign.leo
2021-03-30 01:45:10 +03:00
content: "x[..2] = y;"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 7
2021-04-06 16:57:46 +03:00
path: assign.leo
2021-03-30 01:45:10 +03:00
content: "x[..2] = y;"
value:
2021-04-06 16:57:46 +03:00
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"assign.leo\\\",\\\"content\\\":\\\"x[..2] = y;\\\"}\"}"
2021-03-30 01:45:10 +03:00
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 11
2021-04-06 16:57:46 +03:00
path: assign.leo
2021-03-30 01:45:10 +03:00
content: "x[..2] = y;"
- Assign:
operation: Assign
assignee:
2021-04-06 16:57:46 +03:00
identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"assign.leo\\\",\\\"content\\\":\\\"x[2..] = y;\\\"}\"}"
2021-03-30 01:45:10 +03:00
accesses:
- ArrayRange:
- Value:
Implicit:
- "2"
- line_start: 1
line_stop: 1
col_start: 3
col_stop: 4
2021-04-06 16:57:46 +03:00
path: assign.leo
2021-03-30 01:45:10 +03:00
content: "x[2..] = y;"
- ~
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 7
2021-04-06 16:57:46 +03:00
path: assign.leo
2021-03-30 01:45:10 +03:00
content: "x[2..] = y;"
value:
2021-04-06 16:57:46 +03:00
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"assign.leo\\\",\\\"content\\\":\\\"x[2..] = y;\\\"}\"}"
2021-03-30 01:45:10 +03:00
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 11
2021-04-06 16:57:46 +03:00
path: assign.leo
2021-03-30 01:45:10 +03:00
content: "x[2..] = y;"
- Assign:
operation: Assign
assignee:
2021-04-06 16:57:46 +03:00
identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"assign.leo\\\",\\\"content\\\":\\\"x[..] = y;\\\"}\"}"
2021-03-30 01:45:10 +03:00
accesses:
- ArrayRange:
- ~
- ~
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 6
2021-04-06 16:57:46 +03:00
path: assign.leo
2021-03-30 01:45:10 +03:00
content: "x[..] = y;"
value:
2021-04-06 16:57:46 +03:00
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"assign.leo\\\",\\\"content\\\":\\\"x[..] = y;\\\"}\"}"
2021-03-30 01:45:10 +03:00
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 10
2021-04-06 16:57:46 +03:00
path: assign.leo
2021-03-30 01:45:10 +03:00
content: "x[..] = y;"
- Assign:
operation: Assign
assignee:
2021-04-06 16:57:46 +03:00
identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"assign.leo\\\",\\\"content\\\":\\\"x.0[0][..] = y;\\\"}\"}"
2021-03-30 01:45:10 +03:00
accesses:
- Tuple:
- value: "0"
- line_start: 1
line_stop: 1
col_start: 1
col_stop: 4
2021-04-06 16:57:46 +03:00
path: assign.leo
2021-03-30 01:45:10 +03:00
content: "x.0[0][..] = y;"
- ArrayIndex:
Value:
Implicit:
- "0"
- line_start: 1
line_stop: 1
col_start: 5
col_stop: 6
2021-04-06 16:57:46 +03:00
path: assign.leo
2021-03-30 01:45:10 +03:00
content: "x.0[0][..] = y;"
- ArrayRange:
- ~
- ~
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 11
2021-04-06 16:57:46 +03:00
path: assign.leo
2021-03-30 01:45:10 +03:00
content: "x.0[0][..] = y;"
value:
2021-04-06 16:57:46 +03:00
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"assign.leo\\\",\\\"content\\\":\\\"x.0[0][..] = y;\\\"}\"}"
2021-03-30 01:45:10 +03:00
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 15
2021-04-06 16:57:46 +03:00
path: assign.leo
2021-03-30 01:45:10 +03:00
content: "x.0[0][..] = y;"