diff libinterp/octave-value/ov-usr-fcn.h @ 23075:4e3d47dc7e25

move parse tree classes inside octave namespace * lex.h, lex.ll, oct-parse.in.yy, parse.h, pt-all.h, pt-arg-list.cc, pt-arg-list.h, pt-array-list.cc, pt-array-list.h, pt-assign.cc, pt-assign.h, pt-binop.cc, pt-binop.h, pt-bp.cc, pt-bp.h, pt-cbinop.cc, pt-cbinop.h, pt.cc, pt-cell.cc, pt-cell.h, pt-check.cc, pt-check.h, pt-classdef.cc, pt-classdef.h, pt-cmd.cc, pt-cmd.h, pt-colon.cc, pt-colon.h, pt-const.cc, pt-const.h, pt-decl.cc, pt-decl.h, pt-eval.cc, pt-eval.h, pt-except.cc, pt-except.h, pt-exp.cc, pt-exp.h, pt-fcn-handle.cc, pt-fcn-handle.h, pt-funcall.cc, pt-funcall.h, pt.h, pt-id.cc, pt-id.h, pt-idx.cc, pt-idx.h, pt-jump.cc, pt-jump.h, pt-loop.cc, pt-loop.h, pt-mat.cc, pt-mat.h, pt-misc.cc, pt-misc.h, pt-pr-code.cc, pt-pr-code.h, pt-select.cc, pt-select.h, pt-stmt.cc, pt-stmt.h, pt-unop.cc, pt-unop.h, pt-walk.h, token.cc, token.h: Move classes and most functions inside octave namespace. Change all uses.
author John W. Eaton <jwe@octave.org>
date Thu, 19 Jan 2017 23:41:54 -0500
parents f75d289645ec
children ef4d915df748
line wrap: on
line diff
--- a/libinterp/octave-value/ov-usr-fcn.h	Thu Jan 19 14:47:19 2017 -0500
+++ b/libinterp/octave-value/ov-usr-fcn.h	Thu Jan 19 23:41:54 2017 -0500
@@ -40,11 +40,14 @@
 class string_vector;
 
 class octave_value;
-class tree_parameter_list;
-class tree_statement_list;
-class tree_va_return_list;
-class tree_expression;
-class tree_walker;
+
+namespace octave
+{
+  class tree_parameter_list;
+  class tree_statement_list;
+  class tree_expression;
+  class tree_walker;
+}
 
 #if defined (HAVE_LLVM)
 class jit_function_info;
@@ -76,7 +79,7 @@
 
   virtual std::map<std::string, octave_value> subfunctions (void) const;
 
-  virtual tree_statement_list *body (void) = 0;
+  virtual octave::tree_statement_list *body (void) = 0;
 };
 
 // Scripts.
@@ -89,7 +92,7 @@
   octave_user_script (void);
 
   octave_user_script (const std::string& fnm, const std::string& nm,
-                      tree_statement_list *cmds,
+                      octave::tree_statement_list *cmds,
                       const std::string& ds = "");
 
   octave_user_script (const std::string& fnm, const std::string& nm,
@@ -144,14 +147,14 @@
   octave_value_list
   do_multi_index_op (int nargout, const octave_value_list& args);
 
-  tree_statement_list *body (void) { return cmd_list; }
+  octave::tree_statement_list *body (void) { return cmd_list; }
 
-  void accept (tree_walker& tw);
+  void accept (octave::tree_walker& tw);
 
 private:
 
   // The list of commands that make up the body of this function.
-  tree_statement_list *cmd_list;
+  octave::tree_statement_list *cmd_list;
 
   // The name of the file we parsed.
   std::string file_name;
@@ -177,9 +180,9 @@
 public:
 
   octave_user_function (symbol_table::scope_id sid = -1,
-                        tree_parameter_list *pl = 0,
-                        tree_parameter_list *rl = 0,
-                        tree_statement_list *cl = 0);
+                        octave::tree_parameter_list *pl = 0,
+                        octave::tree_parameter_list *rl = 0,
+                        octave::tree_statement_list *cl = 0);
 
   // No copying!
 
@@ -201,9 +204,9 @@
 
   octave_user_code *user_code_value (bool = false) { return this; }
 
-  octave_user_function *define_param_list (tree_parameter_list *t);
+  octave_user_function *define_param_list (octave::tree_parameter_list *t);
 
-  octave_user_function *define_ret_list (tree_parameter_list *t);
+  octave_user_function *define_ret_list (octave::tree_parameter_list *t);
 
   void stash_fcn_file_name (const std::string& nm);
 
@@ -379,11 +382,11 @@
   do_multi_index_op (int nargout, const octave_value_list& args,
                      const std::list<octave_lvalue>* lvalue_list);
 
-  tree_parameter_list *parameter_list (void) { return param_list; }
+  octave::tree_parameter_list *parameter_list (void) { return param_list; }
 
-  tree_parameter_list *return_list (void) { return ret_list; }
+  octave::tree_parameter_list *return_list (void) { return ret_list; }
 
-  tree_statement_list *body (void) { return cmd_list; }
+  octave::tree_statement_list *body (void) { return cmd_list; }
 
   octave_comment_list *leading_comment (void) { return lead_comm; }
 
@@ -391,11 +394,11 @@
 
   // If is_special_expr is true, retrieve the sigular expression that forms the
   // body.  May be null (even if is_special_expr is true).
-  tree_expression *special_expr (void);
+  octave::tree_expression *special_expr (void);
 
   bool subsasgn_optimization_ok (void);
 
-  void accept (tree_walker& tw);
+  void accept (octave::tree_walker& tw);
 
   template <typename T>
   bool local_protect (T& variable)
@@ -429,14 +432,14 @@
   };
 
   // List of arguments for this function.  These are local variables.
-  tree_parameter_list *param_list;
+  octave::tree_parameter_list *param_list;
 
   // List of parameters we return.  These are also local variables in
   // this function.
-  tree_parameter_list *ret_list;
+  octave::tree_parameter_list *ret_list;
 
   // The list of commands that make up the body of this function.
-  tree_statement_list *cmd_list;
+  octave::tree_statement_list *cmd_list;
 
   // The comments preceding the FUNCTION token.
   octave_comment_list *lead_comm;