syside.sema_reset

sema_reset(element: syside.Element) None

Reset semantic state of element. This will typically remove any implied relationships, and reverse a few other changes made by sema. After this completes, element.sema_state == SemaState.None.

sema_reset(document: syside.Document, reporter: Callable[[syside.Element, syside.UnexpectedDifferentReference], None] | None = None) None

Reset semantic state of document. This will call sema_reset on all owned elements, and additionally reset all resolved references back to unresolved state. While resetting references, if the resolved reference does not match the current reference, reporter will be called with the element the reference applies to and UnexpectedDifferentReference that was found. By default, reporter will print such errors to stderr.

After this completes, document.build_state == BuildState.Indexed.