Logo fantomas

EventList Type

Mutable doubly-linked list of WriterEvents. Supports O(1) append, insert, remove, and truncation.

Constructors

Constructor Description

EventList()

Full Usage: EventList()

Returns: EventList
Returns: EventList

Instance members

Instance member Description

this.Append

Full Usage: this.Append

Parameters:
Returns: EventNode

O(1) append — returns the node for future reference.

event : WriterEvent
Returns: EventNode

this.CreateBackupPoint

Full Usage: this.CreateBackupPoint

Returns: EventNode

O(1) — mark the current end of the list so we can later discard everything appended after it. Used by speculative formatting: create a backup point, try an expression, and RollbackTo if it doesn't fit.

Returns: EventNode

this.CurrentLineContent

Full Usage: this.CurrentLineContent

Returns: string

Collect the text content of the current (last) line by walking backward from the tail to the nearest newline event. Returns the concatenated Write texts in forward order.

Returns: string

this.Head

Full Usage: this.Head

Returns: EventNode
Returns: EventNode

this.InsertAfter

Full Usage: this.InsertAfter

Parameters:
Returns: EventNode

O(1) insert after a given node — returns the new node.

after : EventNode
event : WriterEvent
Returns: EventNode

this.InsertBefore

Full Usage: this.InsertBefore

Parameters:
Returns: EventNode

O(1) insert before a given node — returns the new node.

before : EventNode
event : WriterEvent
Returns: EventNode

this.Remove

Full Usage: this.Remove

Parameters:

O(1) remove a node from the list.

node : EventNode

this.RollbackTo

Full Usage: this.RollbackTo

Parameters:

O(1) — discard every node appended after `point`, restoring the list to where it was when CreateBackupPoint was called. Pass null to clear the entire list (when the backup point was created on an empty list).

point : EventNode

this.Tail

Full Usage: this.Tail

Returns: EventNode
Returns: EventNode

this.ToRevSeq

Full Usage: this.ToRevSeq

Returns: WriterEvent seq

Iterate events from tail to head (reverse order).

Returns: WriterEvent seq

this.ToSeq

Full Usage: this.ToSeq

Returns: WriterEvent seq

Iterate events from head to tail.

Returns: WriterEvent seq

Type something to start searching.