UNPKG

@neo-one/smart-contract-compiler

Version:

NEO•ONE TypeScript smart contract compiler.

19 lines (17 loc) 616 B
import ts from 'typescript'; import { NodeCompiler } from '../NodeCompiler'; export class ArrayLiteralExpressionCompiler extends NodeCompiler { constructor() { super(...arguments); this.kind = ts.SyntaxKind.ArrayLiteralExpression; } visitNode(sb, node, optionsIn) { const options = sb.pushValueOptions(optionsIn); sb.emitHelper(node, options, sb.helpers.args); sb.emitHelper(node, options, sb.helpers.wrapArray); if (!optionsIn.pushValue) { sb.emitOp(node, 'DROP'); } } } //# sourceMappingURL=ArrayLiteralExpressionCompiler.js.map