MCPcopy
hub / github.com/ajv-validator/ajv / _endBlockNode

Method _endBlockNode

lib/compile/codegen/index.ts:745–752  ·  view source on GitHub ↗
(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

Callers 5

endIfMethod · 0.95
endForMethod · 0.95
returnMethod · 0.95
tryMethod · 0.95
endFuncMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected