diff src/parse.y @ 8881:8ed42c679af5

after defining a script or function, clear local variables created for parsing
author John W. Eaton <jwe@octave.org>
date Thu, 26 Feb 2009 13:58:47 -0500
parents be7b30a24938
children eb63fbe60fab
line wrap: on
line diff
--- a/src/parse.y
+++ b/src/parse.y
@@ -840,7 +840,7 @@
 			 p != lexer_flags.pending_local_variables.end ();
 			 p++)
 		      {
-			force_local_variable (*p);
+			symbol_table::force_variable (*p);
 		      }
 		    lexer_flags.pending_local_variables.clear ();
 		  }
@@ -2495,6 +2495,8 @@
   script->stash_fcn_file_time (now);
 
   curr_fcn_ptr = script;
+
+  symbol_table::clear_forced_variables ();
 }
 
 // Begin defining a function.
@@ -2677,7 +2679,7 @@
       // Clear any local variables that may have been added while
       // parsing (for example, by force_local_variable in lex.l). 
 
-      symbol_table::clear_variables (fcn->scope ());
+      symbol_table::clear_forced_variables (fcn->scope ());
     }
 
   return retval;