function o(r, e) {
  if (!Array.isArray(r.body)) throw new Error("Expected node with body array");
  if (r.body.length !== 1) return !1;
  const a = r.body[0];
  return !e || Object.keys(e).every((t) => e[t] === a[t]);
}
function i(r) {
  return n.has(r.type);
}
const n = /* @__PURE__ */ new Set(["AbsenceFunction", "Backreference", "CapturingGroup", "Character", "CharacterClass", "CharacterSet", "Group", "Quantifier", "Subroutine"]);
export {
  o as hasOnlyChild,
  i as isQuantifiable
};
