style($parse): rename variables in generated code so that code is more readable

This commit is contained in:
Igor Minar
2014-08-08 13:30:43 -07:00
parent 6acea1152f
commit 99d70af11c

View File

@@ -912,12 +912,12 @@ function getterFn(path, options, fullExp) {
// we simply dereference 's' on any .dot notation
? 's'
// but if we are first then we check locals first, and if so read it first
: '((k&&k.hasOwnProperty("' + key + '"))?k:s)') + '.' + key + ';\n';
: '((l&&l.hasOwnProperty("' + key + '"))?l:s)') + '.' + key + ';\n';
});
code += 'return s;';
/* jshint -W054 */
var evaledFnGetter = new Function('s', 'k', code); // s=scope, k=locals
var evaledFnGetter = new Function('s', 'l', code); // s=scope, l=locals
/* jshint +W054 */
evaledFnGetter.toString = valueFn(code);
fn = evaledFnGetter;