Skip to main content

Module cst

Module cst 

Source
Expand description

Concrete syntax tree of a JSON5 document.

Every byte of the source is owned by exactly one node, so printing the tree returns the source unchanged. The document stores its Dialect because the comma rule and the spelling of new keys depend on it, and that keeps to_string the one way to emit.

Modulesยง

array ๐Ÿ”’
Arrays of the JSON syntax tree.
key ๐Ÿ”’
Object keys of the JSON syntax tree.
object ๐Ÿ”’
Objects of the JSON syntax tree and their member edits.
quote ๐Ÿ”’
Quoted string spellings.
scalar ๐Ÿ”’
Literal tokens of the JSON syntax tree.
tail ๐Ÿ”’
Commas and trailing trivia after elements.
trivia ๐Ÿ”’
Whitespace, comments and indentation of the JSON syntax tree.

Structsยง

Document ๐Ÿ”’
The root of a parsed or built document.
Value ๐Ÿ”’
A value with the trivia that precedes it.

Enumsยง

Kind ๐Ÿ”’
A container or a literal token.