private void StartCompile(object sender, RoutedEventArgs e) { ClearErrors(); Storage.Clear(); tbOutput.Clear(); var exprParser = new ReversePolishNotation(); var text = textEditor.Text + "\r\n"; try { exprParser.Interpret(text); } catch (SyntaxException ex) { Storage.Output = ex.Message; textEditor.TextArea.TextView.LineTransformers.Add(new LineColorizer( CalculateRow(ex.Lexem.Position), ex.Lexem.Position, ex.Lexem.Content.ToString().Length + ex.Lexem.Position)); } tbOutput.Text = Storage.Output; }