Currently, the Emitter interface assumes that you're producing strings. This works for generating JavaScript and GLSL, but it won't work for LLVM, where we'll need the functions to produce llvm.Value and other such objects.
One way to get started might be to make Emitter a generic interface: i.e., Emitter<string> would be the current configuration. Or, it might be less disruptive to make the current Emitter inherit from a new BaseEmitter that adds more generality.
Currently, the
Emitterinterface assumes that you're producing strings. This works for generating JavaScript and GLSL, but it won't work for LLVM, where we'll need the functions to producellvm.Valueand other such objects.One way to get started might be to make
Emittera generic interface: i.e.,Emitter<string>would be the current configuration. Or, it might be less disruptive to make the currentEmitterinherit from a newBaseEmitterthat adds more generality.