| | |
| | | Object.defineProperty(exports, "__esModule", { |
| | | value: true |
| | | }); |
| | | exports.call = call; |
| | | exports._call = _call; |
| | | exports._getQueueContexts = _getQueueContexts; |
| | | exports._resyncKey = _resyncKey; |
| | | exports._resyncList = _resyncList; |
| | | exports._resyncParent = _resyncParent; |
| | | exports._resyncRemoved = _resyncRemoved; |
| | | exports.call = call; |
| | | exports.isBlacklisted = exports.isDenylisted = isDenylisted; |
| | | exports.visit = visit; |
| | | exports.popContext = popContext; |
| | | exports.pushContext = pushContext; |
| | | exports.requeue = requeue; |
| | | exports.resync = resync; |
| | | exports.setContext = setContext; |
| | | exports.setKey = setKey; |
| | | exports.setScope = setScope; |
| | | exports.setup = setup; |
| | | exports.skip = skip; |
| | | exports.skipKey = skipKey; |
| | | exports.stop = stop; |
| | | exports.setScope = setScope; |
| | | exports.setContext = setContext; |
| | | exports.resync = resync; |
| | | exports._resyncParent = _resyncParent; |
| | | exports._resyncKey = _resyncKey; |
| | | exports._resyncList = _resyncList; |
| | | exports._resyncRemoved = _resyncRemoved; |
| | | exports.popContext = popContext; |
| | | exports.pushContext = pushContext; |
| | | exports.setup = setup; |
| | | exports.setKey = setKey; |
| | | exports.requeue = requeue; |
| | | exports._getQueueContexts = _getQueueContexts; |
| | | exports.visit = visit; |
| | | |
| | | var _index = require("../index"); |
| | | var _traverseNode = require("../traverse-node"); |
| | | |
| | | var _index2 = require("./index"); |
| | | var _index = require("./index"); |
| | | |
| | | function call(key) { |
| | | const opts = this.opts; |
| | |
| | | return denylist && denylist.indexOf(this.node.type) > -1; |
| | | } |
| | | |
| | | function restoreContext(path, context) { |
| | | if (path.context !== context) { |
| | | path.context = context; |
| | | path.state = context.state; |
| | | path.opts = context.opts; |
| | | } |
| | | } |
| | | |
| | | function visit() { |
| | | if (!this.node) { |
| | | return false; |
| | |
| | | return false; |
| | | } |
| | | |
| | | if (this.shouldSkip || this.call("enter") || this.shouldSkip) { |
| | | const currentContext = this.context; |
| | | |
| | | if (this.shouldSkip || this.call("enter")) { |
| | | this.debug("Skip..."); |
| | | return this.shouldStop; |
| | | } |
| | | |
| | | restoreContext(this, currentContext); |
| | | this.debug("Recursing into..."); |
| | | |
| | | _index.default.node(this.node, this.opts, this.scope, this.state, this, this.skipKeys); |
| | | |
| | | this.shouldStop = (0, _traverseNode.traverseNode)(this.node, this.opts, this.scope, this.state, this, this.skipKeys); |
| | | restoreContext(this, currentContext); |
| | | this.call("exit"); |
| | | return this.shouldStop; |
| | | } |
| | |
| | | } |
| | | |
| | | function stop() { |
| | | this._traverseFlags |= _index2.SHOULD_SKIP | _index2.SHOULD_STOP; |
| | | this._traverseFlags |= _index.SHOULD_SKIP | _index.SHOULD_STOP; |
| | | } |
| | | |
| | | function setScope() { |