From cb652094dc074324367029196ad9095b1a8e54c6 Mon Sep 17 00:00:00 2001 From: ideadapt Date: Mon, 30 Mar 2015 22:13:24 +0200 Subject: [PATCH] use espree in actual code --- bin/esgraph.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/esgraph.js b/bin/esgraph.js index 4367e4c..2620a79 100755 --- a/bin/esgraph.js +++ b/bin/esgraph.js @@ -1,6 +1,6 @@ #!/usr/bin/env node -var esprima = require('esprima'); +var espree = require('espree'); var walkes = require('walkes'); var esgraph = require('../'); @@ -19,7 +19,7 @@ process.stdin.on('end', function () { } try { - var ast = esprima.parse(source, {range: true}); + var ast = espree.parse(source, {range: true}); var functions = findFunctions(ast); console.log('digraph cfg {'); @@ -48,7 +48,7 @@ process.stdin.on('end', function () { function findFunctions(ast) { var functions = []; - function handleFunction(node, recurse, stop) { + function handleFunction(node, recurse) { functions.push(node); recurse(node.body); }