@neo-one/smart-contract-compiler
Version:
NEO•ONE TypeScript smart contract compiler.
26 lines (24 loc) • 916 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.BuiltinMemberValue = void 0;
const DiagnosticCode_1 = require("../../DiagnosticCode");
const DiagnosticMessage_1 = require("../../DiagnosticMessage");
const types_1 = require("./types");
class BuiltinMemberValue {
constructor() {
this.types = new Set([types_1.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_1.DiagnosticCode.InvalidBuiltinModify, DiagnosticMessage_1.DiagnosticMessage.CannotModifyBuiltin);
}
return;
}
this.emit(sb, node, options);
}
}
exports.BuiltinMemberValue = BuiltinMemberValue;
//# sourceMappingURL=BuiltinMemberValue.js.map