ASTQuery
Use css-like selectors for walking over AST-tree
Example
var ast = esprima;var astQuery = ast 'es5';astQuery; astQuery; // console output is:// > node type is FunctionDeclaration | 1|// > node type is VariableDeclarator | 2| a// > node type is VariableDeclarator | 2| b// > node type is AssignmentExpression | 3| a|=
TODO
- ':other' pseudo-class
- complex selector's support ('tag>tag')
- classes support with API to adding class description
- es6 'query' string template tag (astQuery.query
VariableDeclarator:${function(node){ return node.id.name == 'a' }}
) - 'removeListener'