list/list/utils/postfixers

Api-module icon module

Functions

  • Chevron-right icon

    findAndAddListHeadToMap( position, itemToListHead, visited ) → void
    internal

    Based on the provided positions looks for the list head and stores it in the provided map.

    Parameters

    position : ModelPosition

    The search starting position.

    itemToListHead : Set<ListElement>

    The map from list item element to the list head element.

    visited : Set<ModelElement>

    A set of elements that were already visited.

    Returns

    void
  • Chevron-right icon

    fixListIndents( listNodes, writer ) → boolean
    internal

    Scans the list starting from the given list head element and fixes items' indentation.

    Parameters

    listNodes : Iterable<ListIteratorValue>

    The iterable of list nodes.

    writer : ModelWriter

    The model writer.

    Returns

    boolean

    Whether the model was modified.

  • Chevron-right icon

    fixListItemIds( listNodes, seenIds, writer ) → boolean
    internal

    Scans the list starting from the given list head element and fixes items' types.

    Parameters

    listNodes : Iterable<ListIteratorValue>

    The iterable of list nodes.

    seenIds : Set<string>

    The set of already known IDs.

    writer : ModelWriter

    The model writer.

    Returns

    boolean

    Whether the model was modified.