コード例 #1
0
        public static Readtable GetStandardReadtable()
        {
            var table = new Readtable();

            table.Init();
            return(table);
        }
コード例 #2
0
ファイル: setup.cs プロジェクト: Unknown6656/kiezellisp
        public static void RestartVariables()
        {
            ReadDecimalNumbers = true;
            GentempCounter     = 0;
            LispPackage        = null;
            KeywordPackage     = null;
            UserPackage        = null;
            Documentation      = new Dictionary <object, string>();
            Packages           = new Dictionary <string, Package>();
            PackagesByType     = new Dictionary <Type, Package>();
            Types = new Dictionary <Symbol, object>();

            InitRandom();

            DefaultReadtable = GetStandardReadtable();
        }
コード例 #3
0
        public static Readtable CopyReadtable(params object[] kwargs)
        {
            var args   = ParseKwargs(kwargs, new string[] { "readtable" }, GetReadtable());
            var source = (Readtable)args[0];
            var dest   = new Readtable();

            if (source == null)
            {
                dest.Init();
            }
            else
            {
                for (var i = 0; i < source.Items.Length; ++i)
                {
                    dest.Items[i] = source.Items[i].Clone();
                }
                foreach (var pair in source.OtherItems)
                {
                    dest.OtherItems[pair.Key] = pair.Value.Clone();
                }
            }
            return(dest);
        }