Hi
So the goal is to create a CFG from esprima AST. Since it was the first
time I worked with a CFG (or even create one), I might have missed
something.
This code is actually a year old, I’ve just found some motivation now to get it properly packaged.
`esgraph(ast)` returns an array with entry and exit node.
Each node is linked to its successor using `normal`, `true`, `false` or `exception` edges and to its predecessors using the `prev` array.
`node.astNode` is the original Statement or Expression.
There are some things that are not handled yet, like WithStatement and labeled `continue`/`break`, and I’m not sure its worth the trouble for lack of real world code using those constructs.
Code is over at
https://github.com/Swatinem/esgraphWould love some constructive feedback :-)
-Arpad