Expand description
edikt .env / .properties format module.
Flat, string-valued, honest line-level editing only: no grammar, no
interpolation, no quoting semantics, no inline comments. key=value /
key:value entries, #/! comments, and blanks round-trip byte-for-byte.
Paths are a single .key; edits change only the targeted value or line.
Macros§
Structs§
- Commented
- A
Valueenriched with per-node comments: what conversion carries so a commented source survives-Tinto a commented target. - Edit
Error - A format-preserving edit failure (bad path, wrong type for the operation, unsupported construct).
- Env
- A parsed
.env/.propertiesdocument, backed by a lossless CST. - Parse
Error - A parse failure.
Enums§
- Comment
Kind - One of the three comment kinds in the uniform model. Which kinds a format
supports is its comment capability: each format declares a
COMMENT_KINDS: &[CommentKind](empty => no comments, subsuming the booleanFeature::Comments). The#accessor addresses a node’s comment by kind. - Dialect
- Which separator spelling a document uses.
- Expr
- An expression node.
- Feature
- A capability a config format may or may not support.
- Step
- One navigation step within a path, applied to the current input.
- Value
Constants§
- COMMENT_
KINDS - Comment kinds this format supports (empty => none); the comment
capability, subsuming the boolean
Feature::Comments. No inline: a#inside a value is data, not a comment. - FEATURES
- Capabilities: comments only. Flat and string-valued: no nesting, arrays, typed scalars, or sections.
Traits§
- Document
- A parsed config document.
Functions§
- apply
- emit
- Emit a value as a flat
.env: every leaf becomes akey=valueline, with nested objects/arrays flattened to dotted keys. Returns the text and warnings. (The comment-free case ofemit_commented.) - emit_
commented - Emit a commented value as a flat
.env: every leaf becomes akey=valueline (nesting flattened to dotted keys), head/foot comments as#lines. An inline comment can’t exist here, so it moves to a head line of its own - with a warning, since that is a remap, not a placement. - emit_
commented_ with - As
emit_commented, writing the separatordialectspells. - parse
- Parse
.env/.propertiessource into anEnvdocument. - parse_
expr - Parse a complete expression, consuming all of
src. - parse_
spaced - Parse space-separated
key valuesource (sshd_config-shaped) into anEnvdocument. - parse_
with - Parse with an explicit
Dialect.