Example #1
0
        public dynamic Invoke(Scope scope)
        {
            string id = null;

            if (Left is MemberExpression)
                id = ((Identifier)((MemberExpression)Left).Property).Id;

            var val = ((IOperation)Right).Invoke(scope);

            if (Left is MemberExpression)
            {
                scope.SetThis(id, val);
            }
            else if (Left is Identifier)
            {
                scope.SetVar(((Identifier)Left).Id, val);
            }
            else
                throw new Exception();

            return val;
        }