diff --git a/index.js b/index.js index e76e68b..47b0289 100644 --- a/index.js +++ b/index.js @@ -44,12 +44,13 @@ function getArgNames(ast) { } function preprocess(func) { + PREFIX_COUNTER++; + //Compute new prefix + var prefix = "_inline_" + PREFIX_COUNTER + "_" + var src = ["(", func, ")()"].join("") var ast = esprima.parse(src, { range: true }) - //Compute new prefix - var prefix = "_inline_" + (PREFIX_COUNTER++) + "_" - //Parse out arguments var argNames = getArgNames(ast) var compiledArgs = new Array(argNames.length) @@ -192,4 +193,4 @@ function preprocess(func) { return routine } -module.exports = preprocess \ No newline at end of file +module.exports = preprocess