Nesting programming language text

Some time ago I started to implement nested language evaluation in Muesli, but I got bogged down. Now I’ve re-written it from scratch, as a state machine that copies the program text, making the necessary substitutions as it does so.

So now it can evaluate this (with Scheme as the base language):

(+ 3 {{lua: return 4 * 5;}})

and this:

(+ 3 {{lua: return {{siod: (- 12 7)}} * 5;}})

This mention of profiling has given me the idea of trying to implement common tracing and profiling interfaces in Muesli, but that may be a little too ambitious.

Advertisements

Post a Comment

Required fields are marked *

*
*

%d bloggers like this: