hsp/expressions/manipulator.js
function(scope, newValue) {
            if (!isAssignable) {
               throw new Error('Expression "' + input + '" is not assignable');
            }

            if (tree.a === 'idn') {
                json.set(scope, tree.v, newValue);
            } else if (tree.a === 'bnr') {
                json.set(evaluator(tree.l, scope), evaluator(tree.r, scope), newValue);
            }
        }
function(scope, newValue) {
            if (!isAssignable) {
               throw new Error('Expression "' + input + '" is not assignable');
            }

            if (tree.a === 'idn') {
                json.set(scope, tree.v, newValue);
            } else if (tree.a === 'bnr') {
                json.set(evaluator(tree.l, scope), evaluator(tree.r, scope), newValue);
            }
        }
function ( scope , newValue ) { if ( ! isAssignable ) { throw new Error ( 'Expression "' + input + '" is not assignable' ) ; } if ( tree . a === 'idn' ) { json . set ( scope , tree . v , newValue ) ; } else if ( tree . a === 'bnr' ) { json . set ( evaluator ( tree . l , scope ) , evaluator ( tree . r , scope ) , newValue ) ; } }
Sets value of an expression on a scope. Not all expressions
are assignable.
@param scope - scope that should be modified
@param {*} a new value for a given expression and scope
Sets value of an expression on a scope . Not all expressions are assignable .