UNPKG

@neo-one/smart-contract-compiler

Version:

NEO•ONE TypeScript smart contract compiler.

26 lines (24 loc) 820 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ValueInstanceOf = void 0; const BuiltinInstanceOf_1 = require("../BuiltinInstanceOf"); class ValueInstanceOf extends BuiltinInstanceOf_1.BuiltinInstanceOf { constructor(type, isHelper) { super(); this.type = type; this.isHelper = isHelper; } emitInstanceOf(sb, node, optionsIn) { const options = sb.pushValueOptions(optionsIn); sb.visit(node, options); if (optionsIn.pushValue) { sb.emitHelper(node, options, this.isHelper(sb)); sb.emitHelper(node, options, sb.helpers.wrapBoolean); } else { sb.emitOp(node, 'DROP'); } } } exports.ValueInstanceOf = ValueInstanceOf; //# sourceMappingURL=ValueInstanceOf.js.map