예제 #1
0
        public void CheckScript(string read)
        {
            if (read == "Clear")
            {
                Console.Clear();
                return;
            }
            if (read == "Save")
            {
                CODE_INFO.SaveAssembly("DarkLanguageAssembly");
                Console.WriteLine("This Assembly Was Saved!!!");
                Console.ReadKey();
                return;
            }
            var            scr    = ScriptCompiler.GetScriptCode("../Script");
            CompiledScript script = ScriptCompiler.CompileScript(scr);

            Console.WriteLine("///////////////Script////////////////");
            foreach (var method in script.Methods)
            {
                foreach (var e in method.Events)
                {
                    foreach (var condition in e.Conditions)
                    {
                        foreach (var action in condition.Actions)
                        {
                            Console.WriteLine(action.Code);
                        }
                        Console.WriteLine(condition.Condition);
                    }
                    Console.WriteLine(e.Type);
                }
                Console.WriteLine(method.Type);
            }
            Console.ReadKey(true);

            //CODE_EXEC.AutoExecuteCode(read);

            //Console.WriteLine("///////////FIELDS///////////////");
            //foreach(var field in CODE_EXEC.Fields)
            //{
            //	Console.WriteLine(field);
            //}
            //Console.WriteLine("///////////METHOD//////////////");
            //CODE_READER.CheckLanguageRoutines(read);
            //var rs = CODE_READER.GetReads(read);
            //foreach(var r in rs)
            //{
            //	Console.WriteLine(r);
            //}
        }