Load Esprima and use it to parse a input:
var esprima = require('esprima'); var input = 'answer = 42'; var tree = esprima.parseScript(input); console.log(tree);

no comments

    sign in to comment

    running