Moonchild is a toolkit for experimenting with new kinds of programming interfaces, based on a text editor written in HTML and JavaScript. The editor supports plugins which can extend the presentation of the source code based on the contents of the AST. Plugins can also be interactive widgets that modify the original source code. For example, a state machine in the code could be edited with a drag-and-drop graph editor.
The Moonchild parser also supports a form of metadata embedded in comments in the source code. Metadata is attached to AST nodes, so it can be read and written by the plugins. This allows plugins to operate on structure beyond what is stored in the raw AST. For example, this allows a function to be cross-referenced with its tests, and a plugin can re-run the tests every time the function is edited.
I started this project in order to explore a few different things. First, I'm interested in exploring interfaces for programming in augmented text. This has been done in the past, but I think it's worth further exploration. There are also interesting UX questions around how to combine free-form text editing with more structured graphical widgets. Finally, I'd like to explore programming languages that are designed around a rich, interactive environment like this, rather than plain text.