()
| 945 | ]; |
| 946 | } |
| 947 | #flatten() { |
| 948 | if (!isExtglobAST(this)) { |
| 949 | for (const p of this.#parts) { |
| 950 | if (typeof p === "object") { |
| 951 | p.#flatten(); |
| 952 | } |
| 953 | } |
| 954 | } else { |
| 955 | let iterations = 0; |
| 956 | let done = false; |
| 957 | do { |
| 958 | done = true; |
| 959 | for (let i = 0; i < this.#parts.length; i++) { |
| 960 | const c = this.#parts[i]; |
| 961 | if (typeof c === "object") { |
| 962 | c.#flatten(); |
| 963 | if (this.#canAdopt(c)) { |
| 964 | done = false; |
| 965 | this.#adopt(c, i); |
| 966 | } else if (this.#canAdoptWithSpace(c)) { |
| 967 | done = false; |
| 968 | this.#adoptWithSpace(c, i); |
| 969 | } else if (this.#canUsurp(c)) { |
| 970 | done = false; |
| 971 | this.#usurp(c); |
| 972 | } |
| 973 | } |
| 974 | } |
| 975 | } while (!done && ++iterations < 10); |
| 976 | } |
| 977 | this.#toString = void 0; |
| 978 | } |
| 979 | #partsToRegExp(dot) { |
| 980 | return this.#parts.map((p) => { |
| 981 | if (typeof p === "string") { |
no test coverage detected