Example #1
0
        public override void Execute(ActionContext context)
        {
            var id  = Parameters[0].ToInteger();
            var str = context.Scope.Constants[id].ToString();

            Value result;

            if (context.CheckParameter(str))
            {
                result = context.GetParameter(str);
            }
            else if (context.CheckLocal(str))
            {
                result = context.GetLocal(str);
            }
            else
            {
                result = context.GetObject(str);
            }

            if (result == null)
            {
                throw new InvalidOperationException();
            }

            context.Stack.Push(result);
        }
Example #2
0
        public override void Execute(ActionContext context)
        {
            //pop the value
            var valueVal = context.Pop();
            //pop the member name
            var memberName = context.Pop().ToString();

            if (context.CheckLocal(memberName))
            {
                context.Locals[memberName] = valueVal;
            }
            else
            {
                context.Scope.Variables[memberName] = valueVal;
            }
        }