Mercurial > octave-dspies
diff libinterp/parse-tree/lex.ll @ 16207:0467d68ca891
move current_input_line to lexical_feedback class
* input.h, input.cc, lex.h, lex.ll (current_input_line): Declare as
member of lexical_feedback class.
(octave_base_reader::octave_gets, octave_terminal_reader::get_input,
octave_file_reader::get_input, octave_eval_string_reader::get_input):
Don't set current_input_line.
(octave_lexer::read): Set current_input_line.
* oct-parse.in.yy (octave_parser::bison_error): Use
curr_lexer->current_input_line.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 06 Mar 2013 19:39:48 -0500 |
parents | 127cccb037bf |
children | e7ff32e7cf82 |
line wrap: on
line diff
--- a/libinterp/parse-tree/lex.ll Wed Mar 06 15:10:22 2013 -0800 +++ b/libinterp/parse-tree/lex.ll Wed Mar 06 19:39:48 2013 -0500 @@ -1337,6 +1337,7 @@ looking_at_function_handle = 0; block_comment_nesting_level = 0; token_count = 0; + current_input_line = ""; help_text = ""; fcn_file_name = ""; fcn_file_full_name = ""; @@ -1479,8 +1480,8 @@ if (input_buf.empty ()) { bool eof = false; - std::string input = input_reader.get_input (eof); - input_buf.fill (input, eof); + current_input_line = input_reader.get_input (eof); + input_buf.fill (current_input_line, eof); } if (! input_buf.empty ())