(def, ctx)
| 453 | > |
| 454 | |
| 455 | const parseBranchTuple: IndexOneParser<BranchOperator> = (def, ctx) => { |
| 456 | assertTupleArity(def, def[1], 3) |
| 457 | if (def[2] === undefined) |
| 458 | return throwParseError(writeMissingRightOperandMessage(def[1], "")) |
| 459 | |
| 460 | const l = ctx.$.parseOwn(def[0], ctx) |
| 461 | const r = ctx.$.parseOwn(def[2], ctx) |
| 462 | if (def[1] === "|") return ctx.$.node("union", { branches: [l, r] }) |
| 463 | const result = |
| 464 | def[1] === "&" ? |
| 465 | intersectNodesRoot(l, r, ctx.$) |
| 466 | : pipeNodesRoot(l, r, ctx.$) |
| 467 | if (result instanceof Disjoint) return result.throw() |
| 468 | if (def[1] === "&") checkWrittenIntersection(result, l, r) |
| 469 | return result |
| 470 | } |
| 471 | |
| 472 | const parseArrayTuple: IndexOneParser<"[]"> = (def, ctx) => { |
| 473 | assertTupleArity(def, "[]", 2) |
nothing calls this directly
no test coverage detected