I'm trying to write an HTML template engine that parses HTML like this:
<!doctype html>
<html lang="en-US">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width" />
<title>My test page</title>
</head>
<body>
<table1 items="people"></table1>
<div class="@settings.className">@person.FirstName</div>
<for items="people" item="person" index="i">
<for items="person.Nicknames" item="nickname" index="j">
<div>@i @j @nickname</div>
</for>
</for>
</body>
</html>
and can replace variables like @settings.className with contextual data (e.g. the data could originate from a Dict(String, Dict(String, String)) where the top-level key is settings and the lower-level key is className. I'd love to be able to represent different structures of data (e.g. a List(String) under a key, with different levels of nesting), and am trying to figure out a good data structure in Gleam to represent this. Any ideas?
