Redesigned the writer (#36) and added YAML support based on the new writer (#23)

This commit is contained in:
Patrick Urbanke
2024-01-03 07:22:36 +01:00
parent 0a524a9893
commit 5c81e40f09
133 changed files with 3082 additions and 838 deletions
+3 -3
View File
@@ -11,7 +11,7 @@
namespace test_monster_example1 {
using Color = rfl::Literal<"Red", "Green", "Blue">;
enum class Color { Red, Green, Blue };
struct Weapon {
std::string name;
@@ -33,7 +33,7 @@ struct Monster {
std::string name;
bool friendly = false;
std::vector<std::uint8_t> inventory;
Color color = Color::make<"Blue">();
Color color = Color::Blue;
std::vector<Weapon> weapons;
Equipment equipped;
std::vector<Vec3> path;
@@ -57,7 +57,7 @@ void test() {
.hp = 80,
.name = "MyMonster",
.inventory = inventory,
.color = Color::make<"Red">(),
.color = Color::Red,
.weapons = weapons,
.equipped = rfl::make_field<"weapon">(axe)};