Mercurial > hg > octave-nkf
diff libinterp/parse-tree/lex.h @ 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.h +++ b/libinterp/parse-tree/lex.h @@ -177,9 +177,10 @@ bracketflag (0), braceflag (0), looping (0), defining_func (0), looking_at_function_handle (0), block_comment_nesting_level (0), token_count (0), - help_text (), fcn_file_name (), fcn_file_full_name (), - looking_at_object_index (), parsed_function_name (), - pending_local_variables (), nesting_level (), token_stack () + current_input_line (), help_text (), fcn_file_name (), + fcn_file_full_name (), looking_at_object_index (), + parsed_function_name (), pending_local_variables (), + nesting_level (), token_stack () { init (); } @@ -287,6 +288,9 @@ // since the last reset. size_t token_count; + // The current line of input. + std::string current_input_line; + // The current help text. std::string help_text;