using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DotPrograms
{
    public class Variables : Dictionary<string, object>
    {

        /// <summary>
        /// clones this set of variables
        /// this is required in order to support local scope and recursion
        /// a copy of the set of variables (arguments in a function) will be pushed on the scope stack
        /// </summary>
        /// <returns></returns>
        public Variables Clone()
        {
            Variables vars = new Variables();
            foreach (string key in Keys)
                vars.Add(key, this[key]);

            return vars;
        }
    }
}
