leo/tests/parser/expression/cast.leo.out

187 lines
7.5 KiB
Plaintext
Raw Normal View History

2021-03-30 01:45:10 +03:00
---
ns: ParseExpression
expectation: Pass
outputs:
- Cast:
inner:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"/home/p/aleo/leo/parser/../tests/parser/expression/cast.leo\\\",\\\"content\\\":\\\"x as u8\\\"}\"}"
target_type:
IntegerType: U8
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 8
path: /home/p/aleo/leo/parser/../tests/parser/expression/cast.leo
content: x as u8
- Cast:
inner:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"/home/p/aleo/leo/parser/../tests/parser/expression/cast.leo\\\",\\\"content\\\":\\\"y as id\\\"}\"}"
target_type:
Circuit: "{\"name\":\"id\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":8,\\\"path\\\":\\\"/home/p/aleo/leo/parser/../tests/parser/expression/cast.leo\\\",\\\"content\\\":\\\"y as id\\\"}\"}"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 8
path: /home/p/aleo/leo/parser/../tests/parser/expression/cast.leo
content: y as id
- Cast:
inner:
Identifier: "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"/home/p/aleo/leo/parser/../tests/parser/expression/cast.leo\\\",\\\"content\\\":\\\"z as u32\\\"}\"}"
target_type:
IntegerType: U32
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 9
path: /home/p/aleo/leo/parser/../tests/parser/expression/cast.leo
content: z as u32
- Cast:
inner:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"/home/p/aleo/leo/parser/../tests/parser/expression/cast.leo\\\",\\\"content\\\":\\\"x as i128\\\"}\"}"
target_type:
IntegerType: I128
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 10
path: /home/p/aleo/leo/parser/../tests/parser/expression/cast.leo
content: x as i128
- Cast:
inner:
Cast:
inner:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"/home/p/aleo/leo/parser/../tests/parser/expression/cast.leo\\\",\\\"content\\\":\\\"x as u8 as u128\\\"}\"}"
target_type:
IntegerType: U8
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 8
path: /home/p/aleo/leo/parser/../tests/parser/expression/cast.leo
content: x as u8 as u128
target_type:
IntegerType: U128
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 16
path: /home/p/aleo/leo/parser/../tests/parser/expression/cast.leo
content: x as u8 as u128
- Cast:
inner:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"/home/p/aleo/leo/parser/../tests/parser/expression/cast.leo\\\",\\\"content\\\":\\\"x as field\\\"}\"}"
target_type: Field
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 11
path: /home/p/aleo/leo/parser/../tests/parser/expression/cast.leo
content: x as field
- Cast:
inner:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"/home/p/aleo/leo/parser/../tests/parser/expression/cast.leo\\\",\\\"content\\\":\\\"x as group\\\"}\"}"
target_type: Group
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 11
path: /home/p/aleo/leo/parser/../tests/parser/expression/cast.leo
content: x as group
- Binary:
left:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"/home/p/aleo/leo/parser/../tests/parser/expression/cast.leo\\\",\\\"content\\\":\\\"x ** y as u32 ** z\\\"}\"}"
right:
Binary:
left:
Cast:
inner:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"/home/p/aleo/leo/parser/../tests/parser/expression/cast.leo\\\",\\\"content\\\":\\\"x ** y as u32 ** z\\\"}\"}"
target_type:
IntegerType: U32
span:
line_start: 1
line_stop: 1
col_start: 6
col_stop: 14
path: /home/p/aleo/leo/parser/../tests/parser/expression/cast.leo
content: x ** y as u32 ** z
right:
Identifier: "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"/home/p/aleo/leo/parser/../tests/parser/expression/cast.leo\\\",\\\"content\\\":\\\"x ** y as u32 ** z\\\"}\"}"
op: Pow
span:
line_start: 1
line_stop: 1
col_start: 6
col_stop: 19
path: /home/p/aleo/leo/parser/../tests/parser/expression/cast.leo
content: x ** y as u32 ** z
op: Pow
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 19
path: /home/p/aleo/leo/parser/../tests/parser/expression/cast.leo
content: x ** y as u32 ** z
- Value:
Implicit:
- ""
- line_start: 0
line_stop: 0
col_start: 0
col_stop: 0
path: ""
content: ""
- Cast:
inner:
Unary:
inner:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":2,\\\"col_stop\\\":3,\\\"path\\\":\\\"/home/p/aleo/leo/parser/../tests/parser/expression/cast.leo\\\",\\\"content\\\":\\\"!x as u32\\\"}\"}"
op: Not
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 3
path: /home/p/aleo/leo/parser/../tests/parser/expression/cast.leo
content: "!x as u32"
target_type:
IntegerType: U32
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 10
path: /home/p/aleo/leo/parser/../tests/parser/expression/cast.leo
content: "!x as u32"
- Cast:
inner:
Unary:
inner:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":2,\\\"col_stop\\\":3,\\\"path\\\":\\\"/home/p/aleo/leo/parser/../tests/parser/expression/cast.leo\\\",\\\"content\\\":\\\"-x as u32\\\"}\"}"
op: Negate
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 3
path: /home/p/aleo/leo/parser/../tests/parser/expression/cast.leo
content: "-x as u32"
target_type:
IntegerType: U32
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 10
path: /home/p/aleo/leo/parser/../tests/parser/expression/cast.leo
content: "-x as u32"