/// <summary> /// Put match in its canonical form before returning it. /// </summary> private Match TidyMatch(bool quick) { if (!quick) { Match match = runmatch; runmatch = null; match.Tidy(runtextpos); return(match); } else { // in quick mode, a successful match returns null, and // the allocated match object is left in the cache return(null); } }