UNPKG

@neo-one/smart-contract-compiler-esnext-esm

Version:

NEO•ONE TypeScript smart contract compiler.

20 lines (18 loc) 491 B
import { Helper } from '../Helper'; export class WrapHelper extends Helper { constructor() { super(...arguments); this.length = 2; } emit(sb, node, options) { if (!options.pushValue) { sb.emitOp(node, 'DROP'); return; } sb.emitPushInt(node, this.type); sb.emitPushInt(node, this.length); sb.emitOp(node, 'PACK'); sb.emitOp(node, 'NEWSTRUCT'); } } //# sourceMappingURL=WrapHelper.js.map