> I'm thinking we could provide a few helper functions that help generate js code so you don't have to write the js output directly, unless you're doing something really crazy. A helper function could be compileNodesIntoFunction which compiles the nodes inside a function() { ... }. Just thinking out loud.

I can totally get behind that. I'd like to see your implementation.