@neo-one/smart-contract-compiler
Version:
NEO•ONE TypeScript smart contract compiler.
18 lines (16 loc) • 562 B
JavaScript
import { tsUtils } from '@neo-one/ts-utils';
import ts from 'typescript';
import { NodeCompiler } from '../NodeCompiler';
export class StringLiteralCompiler extends NodeCompiler {
constructor() {
super(...arguments);
this.kind = ts.SyntaxKind.StringLiteral;
}
visitNode(sb, expr, options) {
if (options.pushValue) {
sb.emitPushString(expr, tsUtils.literal.getLiteralValue(expr));
sb.emitHelper(expr, options, sb.helpers.wrapString);
}
}
}
//# sourceMappingURL=StringLiteralCompiler.js.map