Example #1
0
        public override void Eval(EvaluatorState ev)
        {
            //Console.WriteLine(this.ToString());

            // value is in R
            IValue val = ev.GetVal();

            // get tableptr
            // TODO: add a test, if is the value at the stack top a table
            ValueTable table = (ValueTable)ev.Stack.ReadTop().GetObjectValue();

            // get the key and assign the value to the array
            // table[key] = value
            table.Insert(table.AssignAutoKey().ToString(), val);
        }