Mercurial > jwe > octave
changeset 29309:01679f865fc7
Deprecate obsolete warning messages in lex.ll.
* NEWS: Announce deprecation of '\' as line continuation outside of
double-quoted strings. Announce deprecation of trailing whitespace
after '\' line continuation.
* lex.ll: Change warning message to indicate '\' as line continuation was
deprecated in version 7. Add FIXME note to remove code block in version 9.
* lex.ll: Change warning message to indicate whitespace after '\' line
continuation was deprecated in version 7. Add FIXME note to remove code block
in version 9.
author | Rik <rik@octave.org> |
---|---|
date | Tue, 19 Jan 2021 17:10:07 -0800 |
parents | cb9add260b2b |
children | 477f7d6c61e4 |
files | NEWS libinterp/parse-tree/lex.ll |
diffstat | 2 files changed, 12 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/NEWS Mon Jan 18 17:08:14 2021 +0900 +++ b/NEWS Tue Jan 19 17:10:07 2021 -0800 @@ -219,10 +219,17 @@ - Interpreter - * The use of `'...'` for line continuations within double-quoted + * The use of `'...'` for line continuations *inside* double-quoted strings has been deprecated. Use `'\'` for line continuations + inside strings instead. + + * The use of `'\'` as a line continuation *outside* of double-quoted + strings has been deprecated. Use `'...'` for line continuations instead. + * Any trailing whitespace after a `'\'` line continuation has been + deprecated. Delete unnecessary trailing whitespace. + ### Removed functions and properties The following functions and properties were deprecated in Octave 5
--- a/libinterp/parse-tree/lex.ll Mon Jan 18 17:08:14 2021 +0900 +++ b/libinterp/parse-tree/lex.ll Tue Jan 19 17:10:07 2021 -0800 @@ -1101,7 +1101,8 @@ <DQ_STRING_START>\\{S}+{NL} { curr_lexer->lexer_debug ("<DQ_STRING_START>\\\\{S}+{NL}"); - static const char *msg = "whitespace after continuation markers in double-quoted character strings are obsolete and will not be allowed in a future version of Octave"; + /* FIXME: Remove support for WS after line continuation in Octave 9 */ + static const char *msg = "whitespace after continuation markers in double-quoted character strings were deprecated in version 7 and will not be allowed in a future version of Octave"; std::string nm = curr_lexer->m_fcn_file_full_name; @@ -1311,7 +1312,8 @@ \\{S}*{CCHAR}{ANY_EXCEPT_NL}*{NL} { curr_lexer->lexer_debug ("\\\\{S}*{NL}|\\\\{S}*{CCHAR}{ANY_EXCEPT_NL}*{NL}"); - static const char *msg = "using continuation marker \\ outside of double quoted strings is deprecated and will be removed from a future version of Octave, use ... instead"; + /* FIXME: Remove support for '\\' line continuation in Octave 9 */ + static const char *msg = "using continuation marker \\ outside of double quoted strings was deprecated in version 7 and will be removed from a future version of Octave, use ... instead"; std::string nm = curr_lexer->m_fcn_file_full_name;