UNPKG

@neo-one/smart-contract-compiler

Version:

NEO•ONE TypeScript smart contract compiler.

24 lines (22 loc) 918 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ArrayLiteralExpressionCompiler = void 0; const tslib_1 = require("tslib"); const typescript_1 = tslib_1.__importDefault(require("typescript")); const NodeCompiler_1 = require("../NodeCompiler"); class ArrayLiteralExpressionCompiler extends NodeCompiler_1.NodeCompiler { constructor() { super(...arguments); this.kind = typescript_1.default.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'); } } } exports.ArrayLiteralExpressionCompiler = ArrayLiteralExpressionCompiler; //# sourceMappingURL=ArrayLiteralExpressionCompiler.js.map