UNPKG

@neo-one/smart-contract-compiler

Version:

NEO•ONE TypeScript smart contract compiler.

22 lines (20 loc) 712 B
import { DiagnosticCode } from '../../DiagnosticCode'; import { DiagnosticMessage } from '../../DiagnosticMessage'; import { BuiltinType } from './types'; export class BuiltinMemberValue { constructor() { this.types = new Set([BuiltinType.MemberValue]); this.canSet = false; this.isReadonly = true; } emitValue(sb, node, options) { if (!this.canSet && options.setValue) { if (!this.isReadonly) { sb.context.reportError(node, DiagnosticCode.InvalidBuiltinModify, DiagnosticMessage.CannotModifyBuiltin); } return; } this.emit(sb, node, options); } } //# sourceMappingURL=BuiltinMemberValue.js.map