buxlabs / abstract-syntax-tree

A library for working with abstract syntax trees.
MIT License
110 stars 13 forks source link

ast.walk method #19

Closed emilos closed 7 years ago

emilos commented 7 years ago

General purpose walk method could have other use cases than replace and remove.

ast.walk(node => {
    // ...
});
ast.walk((node, parent) => {
    // ...
});