License
BSD-3-Clause
CF - Configuration File Format
This module provides a parser, document model, and writer for the CF (Configuration File) format as specified in CF-SPEC.md v1.0.
The implementation provides a document model (CST) — a CF-specific tree (CfNode / CfDocument) that preserves all metadata: comments, source locations, original formatting (quote style, separator choice, whitespace, indentation). This enables roundtrip-preserving read-modify-write workflows.
Example:
import dex.cf;
// Document API - for roundtrip editing
auto doc = parseCFDocument(`name = "example"`);
assert(doc.root.members[0].key == "name");
// Write back to CF format
string output = toCF(doc);CfParserConfig makeEnvConfig() @trustedCreates a CfParserConfig with system environment variable support.CfDocument parseCFDocument(string source, string filename = "",
CfParserConfig config = CfParserConfig.init) @safeParses a CF source string into a `CfDocument`.CfDocument parseCFDocumentFile(string path, CfParserConfig config = CfParserConfig.init)Parses a CF file into a `CfDocument`.CfDocument parseCFDocumentWithEnv(string source, string filename = "") @trustedParses a CF source string with environment variable substitution.CfDocument parseCFDocumentFileWithEnv(string path) @trustedParses a CF file with environment variable substitution.CfDocument parseCFDocumentWithIncludes(string source, string filename,
string delegate(string path) @safe fileReader) @safeParses a CF source string with include support.