UNPKG

@neo-one/smart-contract-compiler

Version:

NEO•ONE TypeScript smart contract compiler.

52 lines (50 loc) 1.31 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.CapturingScope = void 0; const ResolvedScope_1 = require("./ResolvedScope"); class CapturingScope { constructor(node, index, parent) { this.node = node; this.index = index; this.parent = parent; this.mutableVariableCount = 0; this.bindings = new Set(); } add(name) { this.mutableVariableCount += 1; this.bindings.add(name); return { nameBrand: 0 }; } addUnique() { this.mutableVariableCount += 1; return { nameBrand: 0 }; } set(sb, node) { sb.emitOp(node, 'NOP'); } get(sb, node) { sb.emitOp(node, 'NOP'); } getThis(sb, node) { sb.emitOp(node, 'NOP'); } getGlobal(sb, node) { sb.emitOp(node, 'NOP'); } setGlobal(sb, node) { sb.emitOp(node, 'NOP'); } pushAll(sb, node) { sb.emitOp(node, 'NOP'); } emit(sb, node, options, func) { sb.emitOp(node, 'NOP'); func(options); sb.emitOp(node, 'NOP'); } resolve(parent) { return new ResolvedScope_1.ResolvedScope(this.mutableVariableCount, parent); } } exports.CapturingScope = CapturingScope; //# sourceMappingURL=CapturingScope.js.map