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.
Structs§
- 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.
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.
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. - parse
- Parse
.env/.propertiessource into anEnvdocument.