scope-tree
Version:
Module scope tree for CodeInspector
29 lines (27 loc) • 1.65 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, 52, 5, 37], [5, 9, 9, 5], [5, 12, 9, 9], [5, 17, 9, 14], [5, 23, 9, 20], [5, 27, 9, 24], [6, 13, 10, 7], [6, 20, 10, 14], [8, 9, 12, 5], [8, 14, 12, 10], [8, 20, 12, 16], [8, 24, 12, 20], [9, 13, 13, 7], [9, 19, 13, 13], [10, 13, 14, 7], [10, 19, 14, 13], [11, 13, 15, 7], [11, 21, 15, 15], [12, 13, 16, 7], [12, 23, 16, 17], [13, 13, 17, 7], [13, 20, 17, 14], [14, 13, 18, 7], [14, 24, 18, 18], [17, 9, 20, 5], [17, 16, 20, 12], [17, 21, 20, 17], [17, 27, 20, 23], [17, 31, 20, 27], [19, 5, 23, 3], [19, 21, 23, 19], [20, 9, 24, 5], [20, 14, 24, 10], [20, 26, 24, 22], [20, 41, 24, 37], [3, 14, 27, 16], [3, 14, 27, 30]];
module.exports.__esModule = true;
const FirescriptRuntime = require('firescript-runtime').FirescriptRuntime;
const BlockScope = require('./BlockScope').BlockScope;
class MethodScope extends BlockScope {
addParam (typing, name, required, value) {
FirescriptRuntime.paramTyping(FirescriptRuntime.TYPE_ANY, typing, 'typing');
FirescriptRuntime.paramTyping(FirescriptRuntime.TYPE_STR, name, 'name');
FirescriptRuntime.paramTyping(FirescriptRuntime.TYPE_BOOL, required, 'required');
if (this.scope.has(name)) {
return false;
}
this.scope.set(name, {
type: 'param',
name: name,
typing: typing,
required: required,
value: value,
callCount: 0
});
return this.scope.get(name);
}
addProperty (...args) {
this.parentScope.addProperty(...args);
}
}
module.exports.MethodScope = MethodScope;