@neo-one/smart-contract-compiler
Version:
NEO•ONE TypeScript smart contract compiler.
22 lines (20 loc) • 752 B
JavaScript
import { tsUtils } from '@neo-one/ts-utils';
import ts from 'typescript';
import { NodeCompiler } from '../NodeCompiler';
export class ExportAssignmentCompiler extends NodeCompiler {
constructor() {
super(...arguments);
this.kind = ts.SyntaxKind.ExportAssignment;
}
visitNode(sb, node, optionsIn) {
if (tsUtils.importExport.isExportEquals(node)) {
sb.context.reportUnsupported(node);
}
else {
const options = sb.pushValueOptions(optionsIn);
sb.visit(tsUtils.expression.getExpression(node), options);
sb.emitHelper(node, options, sb.helpers.exportSingle({ defaultExport: true }));
}
}
}
//# sourceMappingURL=ExportAssignmentCompiler.js.map