From b1767f0d1f3e27e9e56f397aa4cc112212407c70 Mon Sep 17 00:00:00 2001 From: David Kastrup Date: Sat, 8 Sep 2012 17:31:14 +0200 Subject: [PATCH] When printing a context def, include the source location. This is a supplement to make the printing of "parser objects should be dead" messages more useful. Adding the source location of an undead context def makes the problem far easier to identify. --- lily/context-def.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lily/context-def.cc b/lily/context-def.cc index b4e1e2567c..1f823bf503 100644 --- a/lily/context-def.cc +++ b/lily/context-def.cc @@ -93,6 +93,9 @@ Context_def::print_smob (SCM smob, SCM port, scm_print_state *) scm_puts ("#context_name_, port); + scm_puts (" ", port); + string loc = me->origin ()->location_string (); + scm_puts (loc.c_str (), port); scm_puts (">", port); return 1; } -- 2.39.5