Skip to content

Simple but flexible lexically ordered AST traversal with pre and post visitors

License

Notifications You must be signed in to change notification settings

olov/ordered-ast-traverse

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ordered-ast-traverse.js

Simple but flexible lexically ordered AST traversal with pre and post visitors.

Same as ast-traverse but instead of visiting everything that looks like an AST node, nodes are visited according to ordered-esprima-props.

The result is that the AST traversal happens in lexical order, i.e. an AST-traversal in this order will visit nodes in increasing source code position. Tested with Esprima but should work for any Mozilla Parser API compatible AST, see https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey/Parser_API

Usage and examples

See ast-traverse README

License

MIT, see LICENSE file.

About

Simple but flexible lexically ordered AST traversal with pre and post visitors

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published