We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 78f8077 commit 9513fc7Copy full SHA for 9513fc7
lib/ast-walkers.js
@@ -5,6 +5,18 @@ var TypeIndex = require('./type-index');
5
var walkers = exports;
6
7
8
+// All walkers accept `opts` arguments (occasionally referred to as
9
+// `searchOpts`) which is an object with the following fields:
10
+//
11
+// - iterator: function(node, nodeIndex, parent, [props]))
12
+// function running once for each node being walked over, in order
13
14
+// - [typeIndex]: boolean=false
15
+// if true, `props` will have an integer `typeIndex` field which
16
+// represents a node index among all its sibling of the same type
17
18
+
19
20
walkers.topScan = function (node, nodeIndex, parent, opts) {
21
if (parent) {
22
// We would like to avoid spinning an extra loop through the starting
0 commit comments