avl._core.phase module

class avl._core.phase.Phase(name: str, top_down: bool = True)[source]
__init__(name: str, top_down: bool = True) None[source]

Initializes the Phase instance.

Parameters:
  • name (str) – Name of the phase.

  • top_down (bool) – Indicates if the phase is top-down (default is True).

insert(after: Phase | None = None) None[source]

Inserts the phase after another phase.

Parameters:

after (Phase, optional) – The phase to insert after (optional).

remove() None[source]

Removes the phase.

raise_objection(obj: Any) None[source]

Raises an objection for the phase.

Parameters:

obj (Any) – The object raising the objection.

drop_objection(obj: Any) None[source]

Drops an objection for the phase.

Parameters:

obj (Any) – The object dropping the objection.

async wait_for_objections() None[source]

Waits for all objections to be dropped.