For starters, I think the syntax is beautiful. In passing, I saw some Karax code that seemed like it might do what I want. I tried looking into the code with buildHtml and VNode, but it was a bit difficult at my current level of understanding. I tried asking Google Bard as it is more up to date than my ChatGPT, but it really couldn't explain it to me either. Below are some samples of what I would like to do, but I can't figure out how to call a proc or macro, use a colon at the end of it, and connect sub-content or child content to some parent element's children collection. In other words, I would like to create hierarchical trees of information using a colon at the end and starting a new line with indentation to create the inner content of that branch. As an extra, beyond just creating a data structure, I would like to have the procs or macros use a context that's passed to each for building the tree (chain-of-responsibility pattern) which I can use for contextual, integrated building where I can dynamically change the build based on prior elements in the context. Below are some samples of what I would like to do (the proc labels can change). If nim can do that kind of indentation with hierarchical information tree building, along with its other great features, then I might seriously consider using it much more. Can anyone help, at least, point me to some documentation on how I could do that?
dynamic type instantiation system example
type "type_example_1": member( name="member1", type="int" ) member( name="member2", type="collection" )
instance( type="type_example_1" ): value( type="member1", value=1 ) collection( type="member2" ): item( text="one" ) item( text="two" ) item( text="three" )
outline example
o"outline line 1" o"outline line 2": o"outline line 2.1" o"outline line 2.2": o"outline line 2.2.1" o"outline line 2.2.2"
You can see what I did here: https://github.com/elcritch/ants/blob/main/src/ants/language_v1.nim
In short, the list macro turns the block into an array with each line an array item. The second part is more complicated, but I found generating templates for each field worked. So field1 = value(x, y, z).
You might better disconnect your decision of using Nim from the specific app-idea that you have and base it on the intrinsic abilities of the language and the copious documentation that exists allready.
It's like saying to sculpter - you better stop thinking about sculptures you want to create, and look at these wonderfull chisels and hammers we have here.