Skip to content

toml.decoder #

fn decode_quoted_escapes #

fn decode_quoted_escapes(mut q ast.Quoted) !

decode_quoted_escapes returns an error for any disallowed escape sequences. Delimiters in TOML has significant meaning: '/''' delimits literal strings (WYSIWYG / What-you-see-is-what-you-get) "/""" delimits basic strings Allowed escapes in basic strings are: \b - backspace (U+0008) \t - tab (U+0009) \n - linefeed (U+000A) \f - form feed (U+000C) \r - carriage return (U+000D) " - quote (U+0022) \ - backslash (U+005C) \uXXXX - Unicode (U+XXXX) \UXXXXXXXX - Unicode (U+XXXXXXXX)

struct Decoder #

struct Decoder {
	scanner &scanner.Scanner = unsafe { nil }

Decoder decode special sequences in a tree of TOML ast.Value's.

fn (Decoder) decode #

fn (d Decoder) decode(mut n ast.Value) !

decode decodes certain ast.Value's and all it's children.