diff src/parse.y @ 7761:5adeea5de26c

symbol table reporting functions
author John W. Eaton <jwe@octave.org>
date Tue, 06 May 2008 05:51:17 -0400
parents ea9cb4d68dbf
children 6b521b1e3631
line wrap: on
line diff
--- a/src/parse.y	Tue May 06 03:23:12 2008 -0400
+++ b/src/parse.y	Tue May 06 05:51:17 2008 -0400
@@ -2548,6 +2548,15 @@
 
   if (fcn)
     {
+      std::string nm = fcn->name ();
+      std::string file = fcn->fcn_file_name ();
+
+      std::string tmp = nm;
+      if (! file.empty ())
+	tmp += ": " + file;
+
+      symbol_table::cache_name (fcn->scope (), tmp);
+
       if (lc)
 	fcn->stash_leading_comment (lc);
 
@@ -2555,8 +2564,6 @@
 
       if (lexer_flags.parsing_nested_function)
 	{
-	  std::string nm = fcn->name ();
-
 	  fcn->mark_as_nested_function ();
 
 	  symbol_table::install_subfunction (nm, octave_value (fcn));