UNPKG

@neo-one/smart-contract-compiler

Version:

NEO•ONE TypeScript smart contract compiler.

23 lines (21 loc) 852 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.StringLiteralCompiler = void 0; const tslib_1 = require("tslib"); const ts_utils_1 = require("@neo-one/ts-utils"); const typescript_1 = tslib_1.__importDefault(require("typescript")); const NodeCompiler_1 = require("../NodeCompiler"); class StringLiteralCompiler extends NodeCompiler_1.NodeCompiler { constructor() { super(...arguments); this.kind = typescript_1.default.SyntaxKind.StringLiteral; } visitNode(sb, expr, options) { if (options.pushValue) { sb.emitPushString(expr, ts_utils_1.tsUtils.literal.getLiteralValue(expr)); sb.emitHelper(expr, options, sb.helpers.wrapString); } } } exports.StringLiteralCompiler = StringLiteralCompiler; //# sourceMappingURL=StringLiteralCompiler.js.map