estree-toolkit icon indicating copy to clipboard operation
estree-toolkit copied to clipboard

Tools for working with ESTree AST

Results 7 estree-toolkit issues
Sort by recently updated
recently updated
newest added

Something like ``` const argumentsVisitor = { Identifier(path) { console.log(path.node.name) }, Node(path) { console.log(path.node.type) }, } ``` that will print all types except `Identifier`?

In a visitor, I can do something like ``` CallExpression(path) { path.get('callee').skip(); } ``` but since `arguments` isn't a node, ``` path.get('arguments').skip() ``` doesn't return something I can use this...

Another fast ESTree parser is oxc. https://github.com/web-infra-dev/oxc#-ast-and-parser However the generated ESTree AST slightly differs: > The Oxc AST differs slightly from the [estree] AST by removing ambiguous nodes and introducing...

https://astexplorer.net/#/gist/d3b754be4002e2073a4edf60cef78b90/999019efedfc3882485ab2be3340e217b9644b42 ```js define({ foo: null, bar: null, }) ``` Meriyah reports that both "foo" and "bar" are simple Identifiers and not PrivateIdentifiers.

scope currently does not support Typescript instructions, so for the following snippet: ```ts import { type A } from 'b'; export const x: A = ''; ``` `A` has no...

When traversing an AST, is there an easy way to know if an `Identifier` node references a binding or not? In other words, this code... ```js const ast = parse(`foo;...

Today `path.skip()` only applies to the current node, it would be great to skip the traversal of all children of that given path too.