Mercurial > octave
diff libinterp/parse-tree/lex.h @ 30131:a471bf0f78ba
allow for invalid filepos objects
* filepos.h (filepos::filepos (int, int)): Don't provide default values.
(filepos::filepos (void)): Initialize to invalid line and column positions.
(filepos::operator bool): New function.
(filepos::set): Delete.
* lex.h (lexical_feedback::lexical_feedback): Initialize filepos with
line and column == 1.
* lex.ll (lexical_feedback::reset): Set m_filepos to (1, 1).
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Sat, 04 Sep 2021 07:50:08 -0400 |
parents | e2e493712818 |
children | c41fec3367b0 |
line wrap: on
line diff
--- a/libinterp/parse-tree/lex.h Sat Sep 04 05:33:27 2021 -0400 +++ b/libinterp/parse-tree/lex.h Sat Sep 04 07:50:08 2021 -0400 @@ -299,7 +299,7 @@ m_block_comment_nesting_level (0), m_command_arg_paren_count (0), m_token_count (0), - m_filepos (), + m_filepos (1, 1), m_tok_beg (), m_tok_end (), m_string_text (),