UNPKG

@neo-one/smart-contract-compiler

Version:

NEO•ONE TypeScript smart contract compiler.

27 lines (25 loc) 801 B
import ts from 'typescript'; import { NodeCompiler } from '../NodeCompiler'; export class BooleanLiteralCompiler extends NodeCompiler { visitNode(sb, expr, options) { if (options.pushValue) { sb.emitPushBoolean(expr, this.value); sb.emitHelper(expr, options, sb.helpers.wrapBoolean); } } } export class TrueBooleanLiteralCompiler extends BooleanLiteralCompiler { constructor() { super(...arguments); this.kind = ts.SyntaxKind.TrueKeyword; this.value = true; } } export class FalseBooleanLiteralCompiler extends BooleanLiteralCompiler { constructor() { super(...arguments); this.kind = ts.SyntaxKind.FalseKeyword; this.value = false; } } //# sourceMappingURL=BooleanLiteralCompiler.js.map