Exemple #1
0
        public override void Execute(EpsInterpreter interpreter)
        {
            var operandStack = interpreter.OperandStack;

            var value = operandStack.Pop();
            var key   = operandStack.Pop();

            var dict = DictionaryStackHelper.FindDictionary(interpreter.DictionaryStack, key);

            if (value == null)
            {
                dict = interpreter.DictionaryStack.Peek();
            }

            dict.Add(key, value);
        }
Exemple #2
0
        public override void Execute(EpsInterpreter interpreter)
        {
            var operandStack = interpreter.OperandStack;

            bool ret = false;
            var  key = operandStack.Pop();

            var dict = DictionaryStackHelper.FindDictionary(interpreter.DictionaryStack, key);

            if (dict != null)
            {
                var dictOperand = new DictionaryOperand(dict);
                operandStack.Push(dictOperand);
                ret = true;
            }

            var boolean = new BooleanOperand {
                Value = ret
            };

            operandStack.Push(boolean);
        }