sclass NLStringMatcher_singleDollarVar extends StringMatcher { // change matches only if returning true bool match(S pat, S input, SS matches) { if (!isDollarVar(pat)) ret match3(pat, input); ret addMapToMapWithoutOverwritingIC(matches, litmap(pat, input)); } S apply(S input, SS matches) { ret replaceVars(input, matches); } }