UNPKG

@neo-one/smart-contract-compiler

Version:

NEO•ONE TypeScript smart contract compiler.

19 lines (17 loc) 587 B
import { tsUtils } from '@neo-one/ts-utils'; import ts from 'typescript'; import { NodeCompiler } from '../NodeCompiler'; export class BreakStatementCompiler extends NodeCompiler { constructor() { super(...arguments); this.kind = ts.SyntaxKind.BreakStatement; } visitNode(sb, node, options) { const label = tsUtils.statement.getLabel(node); if (label !== undefined) { sb.context.reportUnsupported(label); } sb.emitHelper(node, options, sb.helpers.break); } } //# sourceMappingURL=BreakStatementCompiler.js.map