internal bool AddMiss(Hint hint) { if (Misses.Any(m => m.Text == hint.Text) || Matches.Any(m => m.Text == hint.Text)) { return(false); } Misses.Add(hint.Clone()); return(true); }
internal bool AddMatch(Hint hint, TokenEnumerator enumerator) { if (Matches.Any(m => m.Text == hint.Text)) { return(false); } Matches.Add(new HintMatch { Text = hint.Text, Optional = hint.Optional, Location = enumerator.Location.Clone() }); return(true); }