diff libinterp/parse-tree/lex.h @ 27768:d6701f835496

use filepos object to store beginning position of character strings * lex.h, lex.ll (lexical_feedback::m_beg_string): New member variable. Replace all uses of m_string_line and m_string_column with m_beg_string. (lexical_feedback::m_string_line, lexical_feedback::m_string_column): Delete.
author John W. Eaton <jwe@octave.org>
date Mon, 02 Dec 2019 22:37:05 -0600
parents 0ca7f17de041
children cd566153edd6
line wrap: on
line diff
--- a/libinterp/parse-tree/lex.h	Mon Dec 02 18:23:12 2019 +0100
+++ b/libinterp/parse-tree/lex.h	Mon Dec 02 22:37:05 2019 -0600
@@ -296,13 +296,12 @@
         m_command_arg_paren_count (0),
         m_token_count (0),
         m_filepos (),
+        m_beg_string (),
+        m_string_text (),
         m_current_input_line (),
         m_comment_text (),
         m_help_text (),
         m_function_text (),
-        m_string_text (),
-        m_string_line (0),
-        m_string_column (0),
         m_fcn_file_name (),
         m_fcn_file_full_name (),
         m_dir_name (),
@@ -465,6 +464,12 @@
     // The current position in the file (line and column).
     filepos m_filepos;
 
+    // The position of the beginning of the current character string.
+    filepos m_beg_string;
+
+    // The current character string text.
+    std::string m_string_text;
+
     // The current line of input.
     std::string m_current_input_line;
 
@@ -477,13 +482,6 @@
     // The text of functions entered on the command line.
     std::string m_function_text;
 
-    // The current character string text.
-    std::string m_string_text;
-
-    // The position of the beginning of the current character string.
-    int m_string_line;
-    int m_string_column;
-
     // Simple name of function file we are reading.
     std::string m_fcn_file_name;