Add support for depthed resolution of data fields

This commit is contained in:
kpdecker
2014-02-09 18:35:22 -06:00
parent fcec69ae2c
commit 16f135835e
6 changed files with 39 additions and 24 deletions
@@ -403,8 +403,12 @@ JavaScriptCompiler.prototype = {
// On stack, after: data, ...
//
// Push the data lookup operator
lookupData: function() {
this.pushStackLiteral('data');
lookupData: function(depth) {
if (!depth) {
this.pushStackLiteral('data');
} else {
this.pushStackLiteral('this.data(data, ' + depth + ')');
}
},
// [pushStringParam]