0

When I used the Esprima function in javascript to build the AST tree, the output was different from Esprima, not showing the full details of the online site This is my code below `

var esprima = require("esprima")
script = "answer = 42"
var ast_script = esprima.parseScript(script)
console.log(ast_script)

` The output of my code: enter image description here The same code output results in the Esprima online site: enter image description here I then looked into the official Esprima manual and found no valuable information If you have a solution, it would be appreciated!!

My problem has been stated clearly above, so this module can be skipped.

  • Seems just like your console is printing to a limited depth. That has nothing to really do with ESPrima or anything. – VLAZ Oct 31 '22 at 07:36

0 Answers0