| 487 | }; |
| 488 | } |
| 489 | constructor(type, parent, options = {}) { |
| 490 | this.type = type; |
| 491 | if (type) |
| 492 | this.#hasMagic = true; |
| 493 | this.#parent = parent; |
| 494 | this.#root = this.#parent ? this.#parent.#root : this; |
| 495 | this.#options = this.#root === this ? options : this.#root.#options; |
| 496 | this.#negs = this.#root === this ? [] : this.#root.#negs; |
| 497 | if (type === "!" && !this.#root.#filledNegs) |
| 498 | this.#negs.push(this); |
| 499 | this.#parentIndex = this.#parent ? this.#parent.#parts.length : 0; |
| 500 | } |
| 501 | get hasMagic() { |
| 502 | if (this.#hasMagic !== void 0) |
| 503 | return this.#hasMagic; |