'use strict';

function ArgumentReadNode(argIndex) {
    assert(argIndex >= 0);

    this.execute = function (frame) {
        return frame.getArg(argIndex);
    };

    this.doPreEvaluated = function (frame, args) {
        return args[argIndex];
    };
}

'use strict';

function ArgumentReadNode(contextLevel, arg, source) {
    ContextualNode.call(this, contextLevel, source);
    var _this = this;

    assert(arg.getIndex() >= 0);

    this.execute = function (frame) {
        var ctx = _this.determineContext(frame);
        return ctx.getArgument(arg.getIndex());
    };
}
ArgumentReadNode.prototype = Object.create(ContextualNode.prototype);

Fix argument read node to be context node
Fix argument read node to be context node

Signed-off-by: Stefan Marr <46f1a0bd5592a2f9244ca321b129902a06b53e03@stefan-marr.de>
