import t from"../../../../_virtual/index26.mjs";import e from"../../../../_virtual/index19.mjs";import{isString as r,isRegExp as n,assert as o}from"./validateTypes.mjs";function i(i,s,u){const a=e(i);return a.walk(e=>{if("function"!==e.type)return;const{value:c}=e;if(r(s)&&c!==s)return;if(n(s)&&!s.test(e.value))return;const f=t("(",")",i.slice(e.sourceIndex));o(f);const l=f.body,m=e.sourceIndex+c.length+1;u(l,m,e,a)})}export{i as default};