refactor: rename DTree to DValue
This commit is contained in:
@@ -1,19 +1,19 @@
|
||||
:sig
|
||||
DTree yaml_decode(String s)
|
||||
DValue yaml_decode(String s)
|
||||
|
||||
:params
|
||||
s : YAML source string
|
||||
return value : decoded DTree
|
||||
return value : decoded DValue
|
||||
|
||||
:see
|
||||
>markup
|
||||
yaml_encode
|
||||
json_decode
|
||||
xml_decode
|
||||
0_DTree
|
||||
0_DValue
|
||||
|
||||
:content
|
||||
Parses a practical YAML subset into a `DTree`.
|
||||
Parses a practical YAML subset into a `DValue`.
|
||||
|
||||
`yaml_decode()` is designed for concise UCE config files. It intentionally avoids full YAML schema behavior and does not support anchors, aliases, tags, directives, or complex inline collection syntax.
|
||||
|
||||
@@ -30,7 +30,7 @@ String source = "app:\n"
|
||||
" - site\n"
|
||||
" - cache\n";
|
||||
|
||||
DTree cfg = yaml_decode(source);
|
||||
DValue cfg = yaml_decode(source);
|
||||
|
||||
cfg["app"]["name"].to_string(); // UCE Starter
|
||||
cfg["app"]["debug"].to_bool(); // true
|
||||
|
||||
Reference in New Issue
Block a user