private LineViewModel ParseLine(string line) { var lineViewModel = new LineViewModel(this); var matchList = Regex.Matches(line, CSHARP_TOKENS + @"|.|\s+", RegexOptions.None); foreach (Match match in matchList) { var token = new TokenViewModel(lineViewModel, match.Value, Color.gray); GetColor(token); lineViewModel.Tokens.AddLast(token); } return(lineViewModel); }
public TokenViewModel(LineViewModel lineViewModel, string text, Color color) { _lineViewModel = lineViewModel; Text = text; Color = color; }
public TokenViewModel(LineViewModel lineViewModel) { LineViewModel = lineViewModel; }