Skip to content

Latest commit

 

History

History
28 lines (23 loc) · 820 Bytes

README.md

File metadata and controls

28 lines (23 loc) · 820 Bytes

mini-xnlo 0.0.1 (mini - X Neon Light Object)

xnlo 配置文件代码语法API简化比较好,快速生成xnlo配置文件。支持压缩代码、更多嵌套。

不许重复键!

#include "mini_xnlo.hpp"
// API
Xnlo test = Xnlo();
test.key["a"] = "hello";
test["a"]["b"]["c"]["d"].key["ok"] = "ohhhhh!";
test.str();  // 生成xnlo的内容这样
// 这有二个"a" 已经重复键,不推荐用Xnlo
std::cout << test.str() << std::endl;

Pnlo ptest = Pnlo();
ptest["1"] = "hello";  // 不许重复键!
ptest["a"]["b"]["c"]["d"]["ok"] = "ohhhhh!";
ptest.str();  // 生成pnlo的内容这样
std::cout << ptest.str() << std::endl;

程序的test输出这样:

"a" = "hello" ; "a" > "b" > "c" > "d" > "ok" = "ohhhhh!" ; ~~~~
"1" = "hello" ; "a" > "b" > "c" > "d" > "ok" = "ohhhhh!" ; ~ ~ ~ ~