@neo-one/smart-contract-compiler
Version:
NEO•ONE TypeScript smart contract compiler.
23 lines (21 loc) • 784 B
JavaScript
import { tsUtils } from '@neo-one/ts-utils';
import { BuiltinMemberCall } from '../BuiltinMemberCall';
export class BufferConcat extends BuiltinMemberCall {
emitCall(sb, _func, node, optionsIn) {
const options = sb.pushValueOptions(optionsIn);
if (tsUtils.argumented.getArguments(node).length < 1) {
return;
}
const arg = tsUtils.argumented.getArguments(node)[0];
sb.visit(arg, options);
sb.emitHelper(arg, options, sb.helpers.unwrapArray);
sb.emitHelper(node, options, sb.helpers.concatBuffer);
if (optionsIn.pushValue) {
sb.emitHelper(node, options, sb.helpers.wrapBuffer);
}
else {
sb.emitOp(node, 'DROP');
}
}
}
//# sourceMappingURL=concat.js.map