sclass NLStringMatcher_dollarVars extends StringMatcher { // change matches only if returning true bool match(S pat, S input, SS matches) { SS newMatches = matchDollarVarsIC(pat, input); ret newMatches != null && addMapToMapWithoutOverwritingIC(matches, newMatches); } S apply(S input, SS matches) { ret replaceVars(input, matches); } }