Exemple #1
0
        private void PerformParallelCompile(ParallelCompilationState s)
        {
            ParallelCompilationDoneState state = new ParallelCompilationDoneState();

            try
            {
                Code code = DiagramParserHelper.ParseCode(s.CodeText);
                state.CodeObject = code;
            }
            catch (Exception exc)
            {
                state.Error = exc;
            }

            s.Sync.Post(s_ => FinishParallelCompilation((ParallelCompilationDoneState)s_), state);
        }
Exemple #2
0
        static void Main(string[] args)
        {
            while (true)
            {
                Code code = null;
                try
                {
                    code = DiagramParserHelper.ParseCode(File.ReadAllText("code.dd"));
                }
                catch (Exception exc)
                {
                    Console.Error.WriteLine(exc.ToString());
                    Thread.Sleep(3000);
                    Console.Clear();
                    continue;
                }

                Console.WriteLine(code.ToString());

                Thread.Sleep(3000);
                Console.Clear();
            }
        }