mozilla / spiderflunky

Static analysis of JavaScript
5 stars 3 forks source link

Symbol (id) search on the AST #8

Open mvcisback opened 10 years ago

mvcisback commented 10 years ago

Be able to filter based on the id:foo

This plus (intersection) a filter on functions, would give all functions named foo

erikrose commented 10 years ago

Is this for data flow analysis someday in the future? All we should need for initial indexing—i.e. letting DXR users search for a function by name—is to emit an iterable of all functions and their names. Just making sure. :-)

mvcisback commented 10 years ago

Ah, really I should of named this issue filter based on id, which in principle returns an iterable.

The reason its not connected with the rest of the filters is because the id is currently its own node. So what would need to be returned is attribute associated with that id, not the id node itself. Atm this would be the id's parent

mvcisback commented 10 years ago

19 adds id's to the IR under the symbol group