Class: KdlParser

kdljs.parser.kdl.KdlParser()

new KdlParser()

Source:

Extends

Methods

argument() → {Array.<module:kdljs~Value>}

Consume an argument

Source:
Returns:

value-type tuple

Type
Array.<module:kdljs~Value>

document() → {module:kdljs~Document}

Consume a KDL document

Source:
Returns:
Type
module:kdljs~Document

formatError(input, error, messageopt, optionsopt) → {string}

Parameters:
Name Type Attributes Description
input string

Input KDL file (or fragment)

error Object
message string <optional>

Override the error message

options Object <optional>

Further configuration

Properties
Name Type Attributes Default Description
context number <optional>
3

How many lines before the problematic line to include

Overrides:
Source:
Returns:
Type
string

identifierString() → {string}

Consume an identifierString

Overrides:
Source:
Returns:
Type
string

lineSpace()

Consume line space

Source:

multilineRawString() → {string}

Consume a multiline raw string

Overrides:
Source:
Returns:
Type
string

multilineString() → {string}

Consume a multiline string

Overrides:
Source:
Returns:
Type
string

node() → {module:kdljs~Node}

Consume a KDL node

Source:
Returns:
Type
module:kdljs~Node

nodeChildren() → {module:kdljs~Document}

Consume node children

Source:
Returns:
Type
module:kdljs~Document

nodeTerminator()

Consume a node terminator

Source:

nodes() → {module:kdljs~Document}

Consume a sequence of KDL nodes

Source:
Returns:
Type
module:kdljs~Document

property() → {Array.<module:kdljs~Value>}

Consume a property

Source:
Returns:

key-value-type tuple

Type
Array.<module:kdljs~Value>

quotedString() → {string}

Consume a quoted string

Overrides:
Source:
Returns:
Type
string

rawString() → {string}

Consume a raw string

Overrides:
Source:
Returns:
Type
string

string() → {string}

Consume a normal string

Overrides:
Source:
Returns:
Type
string

tag() → {string}

Consume a tag

Overrides:
Source:
Returns:
Type
string

unicodeEscape() → {string}

Consume a Unicode escape

Overrides:
Source:
Returns:
Type
string

value() → {module:kdljs~Value}

Consume a value

Overrides:
Source:
Returns:
Type
module:kdljs~Value