mirror of
https://github.com/ProvableHQ/leo.git
synced 2024-12-23 10:12:21 +03:00
145 lines
3.0 KiB
Plaintext
145 lines
3.0 KiB
Plaintext
---
|
|
namespace: ParseExpression
|
|
expectation: Pass
|
|
outputs:
|
|
- Cast:
|
|
expression:
|
|
Identifier: "{\"id\":\"0\",\"name\":\"foo\",\"span\":\"{\\\"lo\\\":0,\\\"hi\\\":3}\"}"
|
|
type_:
|
|
Integer: U8
|
|
span:
|
|
lo: 0
|
|
hi: 9
|
|
id: 1
|
|
- Cast:
|
|
expression:
|
|
Literal:
|
|
Integer:
|
|
- U128
|
|
- "1"
|
|
- span:
|
|
lo: 0
|
|
hi: 5
|
|
- 0
|
|
type_:
|
|
Integer: I8
|
|
span:
|
|
lo: 0
|
|
hi: 11
|
|
id: 1
|
|
- Cast:
|
|
expression:
|
|
Struct:
|
|
name: "{\"id\":\"0\",\"name\":\"baz\",\"span\":\"{\\\"lo\\\":0,\\\"hi\\\":3}\"}"
|
|
members:
|
|
- identifier: "{\"id\":\"1\",\"name\":\"foo\",\"span\":\"{\\\"lo\\\":6,\\\"hi\\\":9}\"}"
|
|
expression:
|
|
Identifier: "{\"id\":\"2\",\"name\":\"u8\",\"span\":\"{\\\"lo\\\":11,\\\"hi\\\":13}\"}"
|
|
span:
|
|
lo: 6
|
|
hi: 13
|
|
id: 3
|
|
span:
|
|
lo: 0
|
|
hi: 15
|
|
id: 4
|
|
type_: Scalar
|
|
span:
|
|
lo: 0
|
|
hi: 25
|
|
id: 5
|
|
- Ternary:
|
|
condition:
|
|
Identifier: "{\"id\":\"0\",\"name\":\"flag\",\"span\":\"{\\\"lo\\\":0,\\\"hi\\\":4}\"}"
|
|
if_true:
|
|
Literal:
|
|
Integer:
|
|
- U8
|
|
- "1"
|
|
- span:
|
|
lo: 7
|
|
hi: 10
|
|
- 1
|
|
if_false:
|
|
Cast:
|
|
expression:
|
|
Literal:
|
|
Integer:
|
|
- U8
|
|
- "0"
|
|
- span:
|
|
lo: 13
|
|
hi: 16
|
|
- 2
|
|
type_: Scalar
|
|
span:
|
|
lo: 13
|
|
hi: 26
|
|
id: 3
|
|
span:
|
|
lo: 0
|
|
hi: 26
|
|
id: 4
|
|
- Cast:
|
|
expression:
|
|
Ternary:
|
|
condition:
|
|
Identifier: "{\"id\":\"0\",\"name\":\"flag\",\"span\":\"{\\\"lo\\\":1,\\\"hi\\\":5}\"}"
|
|
if_true:
|
|
Literal:
|
|
Integer:
|
|
- U8
|
|
- "1"
|
|
- span:
|
|
lo: 8
|
|
hi: 11
|
|
- 1
|
|
if_false:
|
|
Literal:
|
|
Integer:
|
|
- U8
|
|
- "0"
|
|
- span:
|
|
lo: 14
|
|
hi: 17
|
|
- 2
|
|
span:
|
|
lo: 1
|
|
hi: 17
|
|
id: 3
|
|
type_: Scalar
|
|
span:
|
|
lo: 1
|
|
hi: 28
|
|
id: 4
|
|
- Cast:
|
|
expression:
|
|
Literal:
|
|
Integer:
|
|
- I8
|
|
- "34"
|
|
- span:
|
|
lo: 0
|
|
hi: 4
|
|
- 0
|
|
type_: Field
|
|
span:
|
|
lo: 0
|
|
hi: 13
|
|
id: 1
|
|
- Cast:
|
|
expression:
|
|
Literal:
|
|
Field:
|
|
- "0925348043850"
|
|
- span:
|
|
lo: 0
|
|
hi: 18
|
|
- 0
|
|
type_:
|
|
Integer: I8
|
|
span:
|
|
lo: 0
|
|
hi: 24
|
|
id: 1
|