summaryrefslogtreecommitdiffstats
path: root/node_modules/babel-traverse/lib/scope/binding.js
diff options
context:
space:
mode:
authorGravatar Piotr Russ <mail@pruss.it> 2020-11-18 23:26:45 +0100
committerGravatar Piotr Russ <mail@pruss.it> 2020-11-18 23:26:45 +0100
commit81ddf9b700bc48a1f8e472209f080f9c1d9a9b09 (patch)
tree8b959d50c5a614cbf9fcb346ed556140374d4b6d /node_modules/babel-traverse/lib/scope/binding.js
parent1870f3fdf43707a15fda0f609a021f516f45eb63 (diff)
downloadwebsite_creator-81ddf9b700bc48a1f8e472209f080f9c1d9a9b09.tar.gz
website_creator-81ddf9b700bc48a1f8e472209f080f9c1d9a9b09.tar.bz2
website_creator-81ddf9b700bc48a1f8e472209f080f9c1d9a9b09.zip
rm node_modules
Diffstat (limited to 'node_modules/babel-traverse/lib/scope/binding.js')
-rw-r--r--node_modules/babel-traverse/lib/scope/binding.js82
1 files changed, 0 insertions, 82 deletions
diff --git a/node_modules/babel-traverse/lib/scope/binding.js b/node_modules/babel-traverse/lib/scope/binding.js
deleted file mode 100644
index 0730cdf..0000000
--- a/node_modules/babel-traverse/lib/scope/binding.js
+++ /dev/null
@@ -1,82 +0,0 @@
-"use strict";
-
-exports.__esModule = true;
-
-var _classCallCheck2 = require("babel-runtime/helpers/classCallCheck");
-
-var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-var Binding = function () {
- function Binding(_ref) {
- var existing = _ref.existing,
- identifier = _ref.identifier,
- scope = _ref.scope,
- path = _ref.path,
- kind = _ref.kind;
- (0, _classCallCheck3.default)(this, Binding);
-
- this.identifier = identifier;
- this.scope = scope;
- this.path = path;
- this.kind = kind;
-
- this.constantViolations = [];
- this.constant = true;
-
- this.referencePaths = [];
- this.referenced = false;
- this.references = 0;
-
- this.clearValue();
-
- if (existing) {
- this.constantViolations = [].concat(existing.path, existing.constantViolations, this.constantViolations);
- }
- }
-
- Binding.prototype.deoptValue = function deoptValue() {
- this.clearValue();
- this.hasDeoptedValue = true;
- };
-
- Binding.prototype.setValue = function setValue(value) {
- if (this.hasDeoptedValue) return;
- this.hasValue = true;
- this.value = value;
- };
-
- Binding.prototype.clearValue = function clearValue() {
- this.hasDeoptedValue = false;
- this.hasValue = false;
- this.value = null;
- };
-
- Binding.prototype.reassign = function reassign(path) {
- this.constant = false;
- if (this.constantViolations.indexOf(path) !== -1) {
- return;
- }
- this.constantViolations.push(path);
- };
-
- Binding.prototype.reference = function reference(path) {
- if (this.referencePaths.indexOf(path) !== -1) {
- return;
- }
- this.referenced = true;
- this.references++;
- this.referencePaths.push(path);
- };
-
- Binding.prototype.dereference = function dereference() {
- this.references--;
- this.referenced = !!this.references;
- };
-
- return Binding;
-}();
-
-exports.default = Binding;
-module.exports = exports["default"]; \ No newline at end of file