RootSource
laika.parse.RootSource
A root source represents the full input string of a parsing operation.
In a single-pass parser like those for HOCON or CSS, only RootCursor
instances will be used for the entire
parsing operation.
In a multi-pass parser like those for text markup, a RootCursor
is only used for the first pass,
whereas the subsequent passes on parts of the input are performed with the other SourceCursor
implementations.
For this reason this type of cursor is only meant to be used for creating a root cursor for the input holding the whole document (e.g. the entire markup document or the full template).
For creating a cursor for a fragment of the input, either BlockSource
or LineSource
must be used
to preserve position tracking in relation to the root input.
Attributes
- Graph
- Supertypes