leo/tests/parser/expression/ternary.leo.out
2021-04-12 13:15:40 -07:00

73 lines
3.9 KiB
Plaintext

---
namespace: ParseExpression
expectation: Pass
outputs:
- Ternary:
condition:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"ternary.leo\\\",\\\"content\\\":\\\"x ? y : z\\\"}\"}"
if_true:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"ternary.leo\\\",\\\"content\\\":\\\"x ? y : z\\\"}\"}"
if_false:
Identifier: "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"ternary.leo\\\",\\\"content\\\":\\\"x ? y : z\\\"}\"}"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 10
path: ternary.leo
content: "x ? y : z"
- Ternary:
condition:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"ternary.leo\\\",\\\"content\\\":\\\"x ? a ? b : c : z\\\"}\"}"
if_true:
Ternary:
condition:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"ternary.leo\\\",\\\"content\\\":\\\"x ? a ? b : c : z\\\"}\"}"
if_true:
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"ternary.leo\\\",\\\"content\\\":\\\"x ? a ? b : c : z\\\"}\"}"
if_false:
Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"ternary.leo\\\",\\\"content\\\":\\\"x ? a ? b : c : z\\\"}\"}"
span:
line_start: 1
line_stop: 1
col_start: 5
col_stop: 14
path: ternary.leo
content: "x ? a ? b : c : z"
if_false:
Identifier: "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"ternary.leo\\\",\\\"content\\\":\\\"x ? a ? b : c : z\\\"}\"}"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 18
path: ternary.leo
content: "x ? a ? b : c : z"
- Ternary:
condition:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"ternary.leo\\\",\\\"content\\\":\\\"x ? y : a ? b : c\\\"}\"}"
if_true:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"ternary.leo\\\",\\\"content\\\":\\\"x ? y : a ? b : c\\\"}\"}"
if_false:
Ternary:
condition:
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"ternary.leo\\\",\\\"content\\\":\\\"x ? y : a ? b : c\\\"}\"}"
if_true:
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"ternary.leo\\\",\\\"content\\\":\\\"x ? y : a ? b : c\\\"}\"}"
if_false:
Identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"ternary.leo\\\",\\\"content\\\":\\\"x ? y : a ? b : c\\\"}\"}"
span:
line_start: 1
line_stop: 1
col_start: 9
col_stop: 18
path: ternary.leo
content: "x ? y : a ? b : c"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 18
path: ternary.leo
content: "x ? y : a ? b : c"