diff libinterp/parse-tree/lex.h @ 16105:b7de58feb2d3

move block_comment_nesting_level to lexical_feedback_class * lex.h, lex.ll (block_comment_nesting_level): Move global variable to lexical_feedback class. Change all uses. (reset_parser): Don't reset block_comment_nesting_level.
author John W. Eaton <jwe@octave.org>
date Mon, 25 Feb 2013 21:59:40 -0500
parents c8974e28da59
children 031117f4db7c
line wrap: on
line diff
--- a/libinterp/parse-tree/lex.h
+++ b/libinterp/parse-tree/lex.h
@@ -150,6 +150,7 @@
       input_line_number (1), current_input_column (1),
       bracketflag (0), braceflag (0),
       looping (0), defining_func (0), looking_at_function_handle (0),
+      block_comment_nesting_level (0),
       looking_at_object_index (), parsed_function_name (),
       pending_local_variables (), nesting_level ()
   {
@@ -180,6 +181,7 @@
       looping (lf.looping),
       defining_func (lf.defining_func),
       looking_at_function_handle (lf.looking_at_function_handle),
+      block_comment_nesting_level (lf.block_comment_nesting_level),
       looking_at_object_index (lf.looking_at_object_index),
       parsed_function_name (lf.parsed_function_name),
       pending_local_variables (lf.pending_local_variables),
@@ -213,6 +215,7 @@
         looping = lf.looping;
         defining_func = lf.defining_func;
         looking_at_function_handle = lf.looking_at_function_handle;
+        block_comment_nesting_level = lf.block_comment_nesting_level,
         looking_at_object_index = lf.looking_at_object_index;
         parsed_function_name = lf.parsed_function_name;
         pending_local_variables = lf.pending_local_variables;
@@ -308,6 +311,9 @@
   // Nonzero means we are parsing a function handle.
   int looking_at_function_handle;
 
+  // Nestng level for blcok comments.
+  int block_comment_nesting_level;
+
   // If the front of the list is TRUE, the closest paren, brace, or
   // bracket nesting is an index for an object.
   std::list<bool> looking_at_object_index;