{
  "manifest": {
    "name": "acorn-walk",
    "description": "ECMAScript (ESTree) AST walker",
    "homepage": "https://github.com/acornjs/acorn",
    "main": "dist/walk.js",
    "types": "dist/walk.d.ts",
    "module": "dist/walk.mjs",
    "version": "7.2.0",
    "engines": {
      "node": ">=0.4.0"
    },
    "maintainers": [
      {
        "name": "Marijn Haverbeke",
        "email": "marijnh@gmail.com",
        "url": "https://marijnhaverbeke.nl"
      },
      {
        "name": "Ingvar Stepanyan",
        "email": "me@rreverser.com",
        "url": "https://rreverser.com/"
      },
      {
        "name": "Adrian Heine",
        "url": "http://adrianheine.de"
      }
    ],
    "repository": {
      "type": "git",
      "url": "https://github.com/acornjs/acorn.git"
    },
    "scripts": {
      "prepare": "cd ..; npm run build:walk"
    },
    "license": "MIT",
    "_registry": "npm",
    "_loc": "/homez.1033/heliovt/.cache/yarn/v6/npm-acorn-walk-7.2.0-0de889a601203909b0fbe07b8938dc21d2e967bc-integrity/node_modules/acorn-walk/package.json",
    "readmeFilename": "README.md",
    "readme": "# Acorn AST walker\n\nAn abstract syntax tree walker for the\n[ESTree](https://github.com/estree/estree) format.\n\n## Community\n\nAcorn is open source software released under an\n[MIT license](https://github.com/acornjs/acorn/blob/master/acorn-walk/LICENSE).\n\nYou are welcome to\n[report bugs](https://github.com/acornjs/acorn/issues) or create pull\nrequests on [github](https://github.com/acornjs/acorn). For questions\nand discussion, please use the\n[Tern discussion forum](https://discuss.ternjs.net).\n\n## Installation\n\nThe easiest way to install acorn is from [`npm`](https://www.npmjs.com/):\n\n```sh\nnpm install acorn-walk\n```\n\nAlternately, you can download the source and build acorn yourself:\n\n```sh\ngit clone https://github.com/acornjs/acorn.git\ncd acorn\nnpm install\n```\n\n## Interface\n\nAn algorithm for recursing through a syntax tree is stored as an\nobject, with a property for each tree node type holding a function\nthat will recurse through such a node. There are several ways to run\nsuch a walker.\n\n**simple**`(node, visitors, base, state)` does a 'simple' walk over a\ntree. `node` should be the AST node to walk, and `visitors` an object\nwith properties whose names correspond to node types in the [ESTree\nspec](https://github.com/estree/estree). The properties should contain\nfunctions that will be called with the node object and, if applicable\nthe state at that point. The last two arguments are optional. `base`\nis a walker algorithm, and `state` is a start state. The default\nwalker will simply visit all statements and expressions and not\nproduce a meaningful state. (An example of a use of state is to track\nscope at each point in the tree.)\n\n```js\nconst acorn = require(\"acorn\")\nconst walk = require(\"acorn-walk\")\n\nwalk.simple(acorn.parse(\"let x = 10\"), {\n  Literal(node) {\n    console.log(`Found a literal: ${node.value}`)\n  }\n})\n```\n\n**ancestor**`(node, visitors, base, state)` does a 'simple' walk over\na tree, building up an array of ancestor nodes (including the current node)\nand passing the array to the callbacks as a third parameter.\n\n```js\nconst acorn = require(\"acorn\")\nconst walk = require(\"acorn-walk\")\n\nwalk.ancestor(acorn.parse(\"foo('hi')\"), {\n  Literal(_, ancestors) {\n    console.log(\"This literal's ancestors are:\", ancestors.map(n => n.type))\n  }\n})\n```\n\n**recursive**`(node, state, functions, base)` does a 'recursive'\nwalk, where the walker functions are responsible for continuing the\nwalk on the child nodes of their target node. `state` is the start\nstate, and `functions` should contain an object that maps node types\nto walker functions. Such functions are called with `(node, state, c)`\narguments, and can cause the walk to continue on a sub-node by calling\nthe `c` argument on it with `(node, state)` arguments. The optional\n`base` argument provides the fallback walker functions for node types\nthat aren't handled in the `functions` object. If not given, the\ndefault walkers will be used.\n\n**make**`(functions, base)` builds a new walker object by using the\nwalker functions in `functions` and filling in the missing ones by\ntaking defaults from `base`.\n\n**full**`(node, callback, base, state)` does a 'full' walk over a\ntree, calling the callback with the arguments (node, state, type) for\neach node\n\n**fullAncestor**`(node, callback, base, state)` does a 'full' walk\nover a tree, building up an array of ancestor nodes (including the\ncurrent node) and passing the array to the callbacks as a third\nparameter.\n\n```js\nconst acorn = require(\"acorn\")\nconst walk = require(\"acorn-walk\")\n\nwalk.full(acorn.parse(\"1 + 1\"), node => {\n  console.log(`There's a ${node.type} node at ${node.ch}`)\n})\n```\n\n**findNodeAt**`(node, start, end, test, base, state)` tries to locate\na node in a tree at the given start and/or end offsets, which\nsatisfies the predicate `test`. `start` and `end` can be either `null`\n(as wildcard) or a number. `test` may be a string (indicating a node\ntype) or a function that takes `(nodeType, node)` arguments and\nreturns a boolean indicating whether this node is interesting. `base`\nand `state` are optional, and can be used to specify a custom walker.\nNodes are tested from inner to outer, so if two nodes match the\nboundaries, the inner one will be preferred.\n\n**findNodeAround**`(node, pos, test, base, state)` is a lot like\n`findNodeAt`, but will match any node that exists 'around' (spanning)\nthe given position.\n\n**findNodeAfter**`(node, pos, test, base, state)` is similar to\n`findNodeAround`, but will match all nodes *after* the given position\n(testing outer nodes before inner nodes).\n",
    "licenseText": "Copyright (C) 2012-2018 by various contributors (see AUTHORS)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n"
  },
  "artifacts": [],
  "remote": {
    "resolved": "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-7.2.0.tgz#0de889a601203909b0fbe07b8938dc21d2e967bc",
    "type": "tarball",
    "reference": "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-7.2.0.tgz",
    "hash": "0de889a601203909b0fbe07b8938dc21d2e967bc",
    "integrity": "sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA==",
    "registry": "npm",
    "packageName": "acorn-walk",
    "cacheIntegrity": "sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA== sha1-DeiJpgEgOQmw++B7iTjcIdLpZ7w="
  },
  "registry": "npm",
  "hash": "0de889a601203909b0fbe07b8938dc21d2e967bc"
}