private void CompileCode() { Parser = new Parser.Parser(); try { //Console.WriteLine(COMPILE_START); Parser.CleanData(); Parser.StartParse(richTextBox1.Text); //Console.WriteLine(COMPILE_END); } catch (Exception ex) { //Console.WriteLine(COMPILE_ERROR); Console.WriteLine(ex.Message); errorRangeText.Add(richTextBox2.Text.Trim().Length - ex.Message.Trim().Length - COMPILE_ERROR.Trim().Length - 3, richTextBox2.Text.Length); Console.WriteLine(ex.StackTrace); } }