diff options
| author | Adam Mathes <adam@adammathes.com> | 2026-02-14 14:46:37 -0800 |
|---|---|---|
| committer | Adam Mathes <adam@adammathes.com> | 2026-02-14 14:46:37 -0800 |
| commit | afa87af01c79a9baa539f2992d32154d2a4739bd (patch) | |
| tree | 92c7416db734270a2fee1d72ee9cc119379ff8e1 /vanilla/node_modules/estree-walker/README.md | |
| parent | 3b927e84d200402281f68181cd4253bc77e5528d (diff) | |
| download | neko-afa87af01c79a9baa539f2992d32154d2a4739bd.tar.gz neko-afa87af01c79a9baa539f2992d32154d2a4739bd.tar.bz2 neko-afa87af01c79a9baa539f2992d32154d2a4739bd.zip | |
task: delete vanilla js prototype\n\n- Removed vanilla/ directory and web/dist/vanilla directory\n- Updated Makefile, Dockerfile, and CI workflow to remove vanilla references\n- Cleaned up web/web.go to remove vanilla embed and routes\n- Verified build and tests pass\n\nCloses NK-2tcnmq
Diffstat (limited to 'vanilla/node_modules/estree-walker/README.md')
| -rw-r--r-- | vanilla/node_modules/estree-walker/README.md | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/vanilla/node_modules/estree-walker/README.md b/vanilla/node_modules/estree-walker/README.md deleted file mode 100644 index d739d1b..0000000 --- a/vanilla/node_modules/estree-walker/README.md +++ /dev/null @@ -1,48 +0,0 @@ -# estree-walker - -Simple utility for walking an [ESTree](https://github.com/estree/estree)-compliant AST, such as one generated by [acorn](https://github.com/marijnh/acorn). - - -## Installation - -```bash -npm i estree-walker -``` - - -## Usage - -```js -var walk = require('estree-walker').walk; -var acorn = require('acorn'); - -ast = acorn.parse(sourceCode, options); // https://github.com/acornjs/acorn - -walk(ast, { - enter(node, parent, prop, index) { - // some code happens - }, - leave(node, parent, prop, index) { - // some code happens - } -}); -``` - -Inside the `enter` function, calling `this.skip()` will prevent the node's children being walked, or the `leave` function (which is optional) being called. - -Call `this.replace(new_node)` in either `enter` or `leave` to replace the current node with a new one. - -Call `this.remove()` in either `enter` or `leave` to remove the current node. - -## Why not use estraverse? - -The ESTree spec is evolving to accommodate ES6/7. I've had a couple of experiences where [estraverse](https://github.com/estools/estraverse) was unable to handle an AST generated by recent versions of acorn, because it hard-codes visitor keys. - -estree-walker, by contrast, simply enumerates a node's properties to find child nodes (and child lists of nodes), and is therefore resistant to spec changes. It's also much smaller. (The performance, if you're wondering, is basically identical.) - -None of which should be taken as criticism of estraverse, which has more features and has been battle-tested in many more situations, and for which I'm very grateful. - - -## License - -MIT |
