scope-tree
Version:
Module scope tree for CodeInspector
23 lines (22 loc) • 1.3 kB
JavaScript
module.exports.__fsLocationMap = [[1, 8, 3, 7], [1, 24, 3, 28], [1, 8, 3, 44], [3, 8, 4, 1], [3, 14, 4, 7], [3, 26, 4, 19], [3, 34, 4, 27], [4, 5, 5, 3], [4, 26, 5, 20], [4, 26, 6, 5], [4, 26, 6, 13], [4, 34, 6, 22], [5, 9, 8, 5], [5, 12, 8, 9], [5, 17, 8, 14], [5, 23, 8, 20], [5, 27, 8, 24], [6, 13, 9, 7], [6, 20, 9, 14], [8, 9, 11, 5], [8, 14, 11, 10], [8, 20, 11, 16], [8, 24, 11, 20], [9, 13, 12, 7], [9, 19, 12, 13], [10, 13, 13, 7], [10, 19, 13, 13], [11, 13, 14, 7], [11, 20, 14, 14], [12, 13, 15, 7], [12, 25, 15, 19], [13, 13, 16, 7], [13, 24, 16, 18], [16, 9, 18, 5], [16, 16, 18, 12], [16, 21, 18, 17], [16, 27, 18, 23], [16, 31, 18, 27], [3, 14, 21, 16], [3, 14, 21, 30]];
module.exports.__esModule = true;
const FirescriptRuntime = require('firescript-runtime').FirescriptRuntime;
const BlockScope = require('./BlockScope').BlockScope;
class ModuleScope extends BlockScope {
addImport (name, value) {
value = value || null;
FirescriptRuntime.paramTyping(FirescriptRuntime.TYPE_STR, name, 'name');
if (this.scope.has(name)) {
return false;
}
this.scope.set(name, {
type: 'import',
name: name,
value: value,
isCallable: true,
callCount: 0
});
return this.scope.get(name);
}
}
module.exports.ModuleScope = ModuleScope;