IniLineDecoder
Defined in: packages/format-ini/src/ini-line-codec.ts:27
Decodes one IniNode per line.
INI is line-oriented and every line — section header, property, comment, blank — is self-delimiting, so unlike JSON, YAML or TOML the grammar really does stream. That is what makes this wire face possible at all; the three formats it used to be grouped with have no equivalent.
Offsets in the emitted spans are relative to the line, not to the whole document: the decoder never sees what came before. Use parseIniDocument where document-absolute spans are needed.
Implements
Section titled “Implements”Decoder<IniNode,string>
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new IniLineDecoder(
options?):IniLineDecoder
Defined in: packages/format-ini/src/ini-line-codec.ts:28
Parameters
Section titled “Parameters”options?
Section titled “options?”Returns
Section titled “Returns”IniLineDecoder
Methods
Section titled “Methods”decode()
Section titled “decode()”decode(
view,context):DecodeResult<IniNode>
Defined in: packages/format-ini/src/ini-line-codec.ts:30
Attempt to decode one value from the front of view.
view is a window into the driver’s buffer and is invalidated as soon as
this call returns. Copy anything retained in the returned value.
Parameters
Section titled “Parameters”string
context
Section titled “context”DecodeContext
Returns
Section titled “Returns”DecodeResult<IniNode>
Implementation of
Section titled “Implementation of”Decoder.decode