{
if (!lex_source_get__ (src))
{
- /* This should not be reachable because we always get a T_STOP at the
- end of input and the macro_expander should always terminate
- expansion on T_STOP. */
+ /* This should not be reachable because we always get a T_ENDCMD at
+ the end of an input file (transformed from T_STOP by
+ lex_source_try_get()) and the macro_expander should always
+ terminate expansion on T_ENDCMD. */
NOT_REACHED ();
}
macro_expander_get_expansion (me, &expansion);
macro_expander_destroy (me);
+ if (settings_get_mprint ())
+ {
+ struct string mprint = DS_EMPTY_INITIALIZER;
+ macro_tokens_to_representation (&expansion, &mprint);
+ output_item_submit (text_item_create (TEXT_ITEM_LOG, ds_cstr (&mprint),
+ _("Macro Expansion")));
+ ds_destroy (&mprint);
+ }
+
for (size_t i = 0; i < expansion.n; i++)
{
*lex_push_token__ (src) = (struct lex_token) {