feat(parser): add support for and/or chaining

This commit is contained in:
rvcas
2023-08-14 17:18:11 -04:00
committed by Lucas
parent 4a1ae9f412
commit ab3a418b9c
9 changed files with 53 additions and 9 deletions

View File

@@ -1,6 +1,6 @@
---
source: crates/aiken-lang/src/tests/format.rs
description: "Code:\n\nfn foo(output) {\n [\n output.address.stake_credential == Some(\n Inline(\n VerificationKeyCredential(\n #\"66666666666666666666666666666666666666666666666666666666\",\n ))\n )\n ,\n when output.datum is {\n InlineDatum(_) -> True\n _ -> fail \"expected inline datum\"\n },\n ]\n |> list.and\n}\n"
description: "Code:\n\nfn foo(output) {\n [\n output.address.stake_credential == Some(\n Inline(\n VerificationKeyCredential(\n #\"66666666666666666666666666666666666666666666666666666666\",\n ))\n )\n ,\n when output.datum is {\n InlineDatum(_) -> True\n _ -> fail \"expected inline datum\"\n },\n ]\n |> list.and_func\n}\n"
---
fn foo(output) {
[
@@ -16,6 +16,6 @@ fn foo(output) {
_ -> fail @"expected inline datum"
},
]
|> list.and
|> list.and_func
}