It took some time to get the semantics just right, but everything runs great now. The only thing that bugs me is initializing nested members. At the moment, this is as good as it gets:
structure point :( integer(x), integer(y))structure messagetype :( integer(hwnd), integer(message), integer(wparam), integer(lparam), integer(time), point(pt))point(pt, 0, 0)messagetype(msg, 0, 0, 0, 0, 0, pt)
Ideally, I'd like to see it more along these lines:
messagetype(msg, 0, 0, 0, 0, 0, (0, 0))
I haven't quite figured out an elegant way to parse that second option, but I'm confident I'll find something that works.
The reason I ask is because I wanted to write a small lisp-like language and build the VM in C# and allow interaction between the scripting language and C#. Passing functions between C# and the language was a major conceptual road-block. Looking at your solution, I might have to learn .NET CIL ...
Would love your thoughts.
Thanks