diff src/pt-stmt.h @ 7736:a059b5679fbb

implement dbstack
author John W. Eaton <jwe@octave.org>
date Fri, 25 Apr 2008 15:11:03 -0400
parents 2dee19385d32
children 71f068b22fcc
line wrap: on
line diff
--- a/src/pt-stmt.h
+++ b/src/pt-stmt.h
@@ -71,7 +71,8 @@
 
   tree_command *command (void) { return cmd; }
 
-  octave_value_list eval (bool silent, int nargout, bool in_function_body);
+  octave_value_list eval (bool silent, int nargout,
+			  bool in_function_or_script_body);
 
   tree_expression *expression (void) { return expr; }
 
@@ -119,10 +120,10 @@
 public:
 
   tree_statement_list (void)
-    : function_body (false) { }
+    : function_body (false), script_body (false) { }
 
   tree_statement_list (tree_statement *s)
-    : function_body (false) { append (s); }
+    : function_body (false), script_body (false) { append (s); }
 
   ~tree_statement_list (void)
     {
@@ -136,6 +137,8 @@
 
   void mark_as_function_body (void) { function_body = true; }
 
+  void mark_as_script_body (void) { script_body = true; }
+
   octave_value_list eval (bool silent = false, int nargout = 0);
 
   int set_breakpoint (int line);
@@ -153,6 +156,9 @@
   // Does this list of statements make up the body of a function?
   bool function_body;
 
+  // Does this list of statements make up the body of a script?
+  bool script_body;
+
   // No copying!
 
   tree_statement_list (const tree_statement_list&);