abstract class fandoc::DocNode

sys::Obj
  fandoc::DocNode

@Js

Source

DocNode is the base class for nodes in a fandoc model. There are two type of nodes: DocElem and DocText.

See pod doc for usage.

dump

Void dump(OutStream out := Env.cur().out())

Source

Debug dump to output stream.

id

abstract DocNodeId id()

Source

Get node id for node type.

isBlock

Bool isBlock()

Source

Is this a block element versus an inline element.

isFirst

Bool isFirst()

Source

Return true if this node is the first child in its parent.

isInline

abstract Bool isInline()

Source

Is this an inline versus a block node.

isLast

Bool isLast()

Source

Return true if this node is the last child in its parent.

parent

DocElem? parent { internal set }

Source

Get the DocElem that contains this node. Return null if not parented.

path

virtual List<DocNode> path()

Source

Get the path from the root of the DOM to this node.

pos

Int? pos()

Source

Get the index of this node in its parent's children. Return null if not parented.

toText

abstract Str toText()

Source

Get all the DocText children as a string

write

abstract Void write(DocWriter out)

Source

Write this node to the specified DocWriter.