UNPKG

@neo-one/smart-contract-compiler

Version:

NEO•ONE TypeScript smart contract compiler.

18 lines (16 loc) 612 B
import { tsUtils } from '@neo-one/ts-utils'; import _ from 'lodash'; import { BuiltinMemberCall } from '../BuiltinMemberCall'; export class ConsoleLog extends BuiltinMemberCall { emitCall(sb, _func, node, optionsIn) { const options = sb.pushValueOptions(optionsIn); const args = tsUtils.argumented.getArguments(node); _.reverse([...args]).forEach((arg) => { sb.visit(arg, options); }); sb.emitPushInt(node, args.length); sb.emitOp(node, 'PACK'); sb.emitHelper(node, options, sb.helpers.consoleLog); } } //# sourceMappingURL=log.js.map