comparison command-window.cpp @ 12:894be158b32d

define parser as a class and eliminate some global variables
author John W. Eaton <jwe@octave.org>
date Thu, 23 May 2019 17:57:20 -0400
parents b652a5528fb1
children 1e5a1e15fa56
comparison
equal deleted inserted replaced
11:b652a5528fb1 12:894be158b32d
207 207
208 void command_window::redisplay (void) 208 void command_window::redisplay (void)
209 { 209 {
210 erase_line (); 210 erase_line ();
211 211
212 interpreter& interp = m_interpreter->get_interpreter ();
213 parser& parser = interp.get_parser ();
214
212 std::string line = rl_line_buffer ? rl_line_buffer : ""; 215 std::string line = rl_line_buffer ? rl_line_buffer : "";
213 std::string prompt = (rl_prompt && parser::beg_of_stmt) ? rl_prompt : ""; 216 std::string prompt = (rl_prompt && parser.beg_of_stmt ()) ? rl_prompt : "";
214 217
215 insert_line (prompt, line); 218 insert_line (prompt, line);
216 219
217 scroll_to_bottom (); 220 scroll_to_bottom ();
218 221