source: imaps-frontend/node_modules/@babel/traverse/lib/traverse-node.js

main
Last change on this file was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago

Update repo after prototype presentation

  • Property mode set to 100644
File size: 769 bytes
Line 
1"use strict";
2
3Object.defineProperty(exports, "__esModule", {
4 value: true
5});
6exports.traverseNode = traverseNode;
7var _context = require("./context.js");
8var _t = require("@babel/types");
9const {
10 VISITOR_KEYS
11} = _t;
12function traverseNode(node, opts, scope, state, path, skipKeys, visitSelf) {
13 const keys = VISITOR_KEYS[node.type];
14 if (!keys) return false;
15 const context = new _context.default(scope, opts, state, path);
16 if (visitSelf) {
17 if (skipKeys != null && skipKeys[path.parentKey]) return false;
18 return context.visitQueue([path]);
19 }
20 for (const key of keys) {
21 if (skipKeys != null && skipKeys[key]) continue;
22 if (context.visit(node, key)) {
23 return true;
24 }
25 }
26 return false;
27}
28
29//# sourceMappingURL=traverse-node.js.map
Note: See TracBrowser for help on using the repository browser.