abstract class fandoc::DocNode
sys::Obj fandoc::DocNode
@Js
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())
Debug dump to output stream.
- id
-
abstract DocNodeId id()
Get node id for node type.
- isFirst
-
Bool isFirst()
Return
true
if this node is the first child in its parent. - isLast
-
Bool isLast()
Return
true
if this node is the last child in its parent. - parent
-
DocElem? parent { internal set }
Get the
DocElem
that contains this node. Returnnull
if not parented. - path
-
virtual DocNode[] path()
Get the path from the root of the DOM to this node.
- pos
-
Int? pos()
Get the index of this node in its parent's children. Return
null
if not parented. - write
-
abstract Void write(DocWriter out)
Write this node to the specified DocWriter.