| 344 | |
| 345 | // Allows adds no errors to ctx, so a predicate reading it runs in a branch |
| 346 | allows(node: BaseNode, arg: string = this.data): string { |
| 347 | if (!node.allowsCtx) return this.inv(node, { arg, kind: "Allows" }) |
| 348 | return node.checksCtx ? |
| 349 | `${this.ref(allowsInBranchBy)}(${this.ctx}, ${this.refToId(node.id, { kind: "Allows" })}, ${arg})` |
| 350 | : `${this.ref(node)}.allows(${arg})` |
| 351 | } |
| 352 | |
| 353 | applyMember(node: BaseNode, member: BaseNode = node): string { |
| 354 | return member.hasAlias ? this.resolution(node, member.id) : this.inv(node) |