diff --git a/lib/jspath.js b/lib/jspath.js index adb173b..7dc1749 100644 --- a/lib/jspath.js +++ b/lib/jspath.js @@ -1267,7 +1267,11 @@ var translate = (function() { })(); function compile(path) { - return Function('data,subst', translate(parse(path))); + return compileParsed(parse(path)); +} + +function compileParsed(parseTree) { + return Function('data,subst', translate(parseTree)); } var cache = {}, @@ -1314,6 +1318,8 @@ decl.params = function(_params) { } }; +decl.parse = parse; +decl.compileParsed = compileParsed; decl.compile = compile; decl.apply = decl;