title: How to generate all the leaf to leaf path in an AST?
body: <p>Given a JS snippet, how to generate all the leaf-to-leaf path from the AST?</p>
  <p>Let’s say the code snippet is:</p>
  <p><code>var answer = 6 * 7;</code></p>
  <p>Example AST: <a href="https://esprima.org/demo/parse.html" rel="nofollow noreferrer">https://esprima.org/demo/parse.html</a></p>
  <p>For this code snippet, I have to generate all the paths from leaf to leaf. I can use any parser like esprima, acorn or any other parser.</p>
  <p>I am happy to use the python parser as well <a href="https://github.com/Kronuz/esprima-python" rel="nofollow noreferrer">https://github.com/Kronuz/esprima-python</a></p>
  <p>Any idea, pointers to open source project is welcome.</p>