Mercurial > octave
diff libinterp/parse-tree/pt-eval.h @ 27519:804e5d42b728
move reader and parser from evaluator repl to interpreter main_loop
* interpreter.h, interpreter.cc (interpreter::m_in_top_level_repl,
interpreter::in_top_level_repl): Move data member and function here
from tree_evaluator.
(interpreter::main_loop): Move reader, parser, and most exception
handling here from tree_evaluator::repl function. Eliminate
non-working code for debugging nan or inf exceptions.
* pt-eval.h, pt-eval.cc (tree_evaluator::eval): Rename from repl.
Perform statement list evaluation here.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 16 Oct 2019 23:26:33 -0400 |
parents | 2d537a089e5d |
children | e091e09d26f0 |
line wrap: on
line diff
--- a/libinterp/parse-tree/pt-eval.h Wed Oct 16 14:35:03 2019 -0700 +++ b/libinterp/parse-tree/pt-eval.h Wed Oct 16 23:26:33 2019 -0400 @@ -27,6 +27,7 @@ #include <iosfwd> #include <list> +#include <memory> #include <set> #include <stack> #include <string> @@ -134,7 +135,7 @@ m_echo_files (), m_in_loop_command (false), m_breaking (0), m_continuing (0), m_returning (0), m_indexed_object (nullptr), m_index_position (0), - m_num_indices (0), m_in_top_level_repl (false) + m_num_indices (0) { } // No copying! @@ -147,7 +148,8 @@ bool at_top_level (void) const; - int repl (bool interactive); + void eval (std::shared_ptr<tree_statement_list>& stmt_list, + bool interactive); std::string mfilename (const std::string& opt = "") const; @@ -630,8 +632,6 @@ int num_indices (void) const { return m_num_indices; } - bool in_top_level_repl (void) const { return m_in_top_level_repl; } - const std::list<octave_lvalue> * lvalue_list (void) const { return m_lvalue_list; @@ -832,9 +832,6 @@ const octave_value *m_indexed_object; int m_index_position; int m_num_indices; - - // TRUE if we are in the top level interactive read eval print loop. - bool m_in_top_level_repl; }; }