Mercurial > hg > octave-nkf
diff libinterp/parse-tree/lex.h @ 16199:810a71122c25
move more global variables to octave_lexical_feedback class
* help.cc (raw_help_from_file): Don't protect and set
reading_script_file.
* octave.cc (likewise):
* oct_parse.in.yy (parse_fcn_file): Don't protect
reading_script_file.
* input.cc (get_debug_input): Don't protect and set reading_fcn_file,
reading_classdef_file, or reading_script_file.
* lex.h, lex.ll, input.h, input.cc (reading_fcn_file,
reading_classdef_file, reading_script_file): Declare as members of the
lexical_feedback class. Change all uses.
(lexical_feedback::lexical_feedback, lexical_feedback::reset):
Initialize and set them.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Tue, 05 Mar 2013 17:50:37 -0500 |
parents | b52d2f9294b6 |
children | 127cccb037bf |
line wrap: on
line diff
--- a/libinterp/parse-tree/lex.h +++ b/libinterp/parse-tree/lex.h @@ -170,7 +170,8 @@ looking_for_object_index (false), looking_at_indirect_ref (false), parsing_class_method (false), maybe_classdef_get_set_method (false), parsing_classdef (false), - quote_is_transpose (false), + quote_is_transpose (false), reading_fcn_file (false), + reading_script_file (false), reading_classdef_file (false), input_line_number (1), current_input_column (1), bracketflag (0), braceflag (0), looping (0), defining_func (0), looking_at_function_handle (0), @@ -243,6 +244,15 @@ // return transpose or start a string? bool quote_is_transpose; + // TRUE means we're parsing a function file. + bool reading_fcn_file; + + // TRUE means we're parsing a script file. + bool reading_script_file; + + // TRUE means we're parsing a classdef file. + bool reading_classdef_file; + // the current input line number. int input_line_number;