Kuddle.V2.Decoder (Kuddle v1.1.0) View Source

Tokenizes and parses KDL2 documents into kuddle documents.

Link to this section Summary

Types

A kuddle document is a list of Kuddle Nodes

A single node in the Kuddle document

Parsed tokens from the Tokenizer, these will be processed and converted into the final nodes for the document.

Functions

Tokenize and parse a given KDL document.

Same as decode/1, but will raise a Kuddle.DecodeError on error from decode.

Link to this section Types

Specs

document() :: [document_node()]

A kuddle document is a list of Kuddle Nodes

Specs

document_node() :: Kuddle.Node.t()

A single node in the Kuddle document

Specs

Parsed tokens from the Tokenizer, these will be processed and converted into the final nodes for the document.

Link to this section Functions

Specs

decode(String.t()) :: {:ok, document(), tokens()} | {:error, term()}

Tokenize and parse a given KDL document.

If successful, it will return {:ok, document, tokens}, where document is the list of nodes that were parsed and tokens are any unparsed tokens.

Specs

decode!(String.t()) :: document()

Same as decode/1, but will raise a Kuddle.DecodeError on error from decode.

Link to this macro

default_state(args \\ [])

View Source (macro)
Link to this macro

default_state(record, args)

View Source (macro)
Link to this macro

node_state(args \\ [])

View Source (macro)
Link to this macro

node_state(record, args)

View Source (macro)