Method
_endBlockNode
(N1: EndBlockNodeType, N2?: EndBlockNodeType)
Source from the content-addressed store, hash-verified
| 743 | } |
| 744 | |
| 745 | private _endBlockNode(N1: EndBlockNodeType, N2?: EndBlockNodeType): CodeGen { |
| 746 | const n = this._currNode |
| 747 | if (n instanceof N1 || (N2 && n instanceof N2)) { |
| 748 | this._nodes.pop() |
| 749 | return this |
| 750 | } |
| 751 | throw new Error(`CodeGen: not in block "${N2 ? `${N1.kind}/${N2.kind}` : N1.kind}"`) |
| 752 | } |
| 753 | |
| 754 | private _elseNode(node: If | Else): CodeGen { |
| 755 | const n = this._currNode |
Tested by
no test coverage detected