2021-09-22 19:28:55 +03:00
|
|
|
[TextualTarget::] Final Textual Inter.
|
2019-06-28 20:25:50 +03:00
|
|
|
|
|
|
|
To create the range of possible targets into which Inter can be converted.
|
|
|
|
|
|
|
|
@ This target is very simple: when we get the message to begin generation,
|
|
|
|
we simply ask the Inter module to output some text, and return true to
|
|
|
|
tell the generator that nothing more need be done.
|
|
|
|
|
|
|
|
=
|
2021-09-22 19:28:55 +03:00
|
|
|
void TextualTarget::create_generator(void) {
|
|
|
|
code_generator *textual_inter_cgt = Generators::new(I"text");
|
|
|
|
METHOD_ADD(textual_inter_cgt, BEGIN_GENERATION_MTID, TextualTarget::text);
|
2019-06-28 20:25:50 +03:00
|
|
|
}
|
|
|
|
|
2021-11-12 01:32:10 +02:00
|
|
|
int TextualTarget::text(code_generator *gtr, code_generation *gen) {
|
2021-09-22 19:28:55 +03:00
|
|
|
if (gen->to_stream) Inter::Textual::write(gen->to_stream, gen->from, NULL, 1);
|
2019-06-28 20:25:50 +03:00
|
|
|
return TRUE;
|
|
|
|
}
|