Mercurial > octave
diff libinterp/parse-tree/lex.ll @ 26059:da2bbcf1fbcd
Deprecate C++ function is_keyword in favor of iskeyword for readability.
* token.h (iskeyword): New function with same code as is_keyword.
* token.h (is_keyword): Add OCTAVE_DEPRECATED decoration on function.
Change code to call iskeyword.
* NEWS: Announce deprecation.
* ls-mat-ascii.cc, utils.cc, variables.cc, lex.h, lex.ll, oct-parse.yy:
Replace instances of is_keyword with iskeyword.
author | Rik <rik@octave.org> |
---|---|
date | Sun, 11 Nov 2018 14:31:10 -0800 |
parents | f881d3e271d2 |
children | 00f796120a6d |
line wrap: on
line diff
--- a/libinterp/parse-tree/lex.ll Sun Nov 11 13:22:37 2018 +0100 +++ b/libinterp/parse-tree/lex.ll Sun Nov 11 14:31:10 2018 -0800 @@ -1952,7 +1952,7 @@ namespace octave { bool - is_keyword (const std::string& s) + iskeyword (const std::string& s) { // Parsing function names like "set.property_name" inside // classdef-style class definitions is simplified by handling the @@ -1989,7 +1989,7 @@ if (nargin == 0) { // Neither set nor get are keywords. See the note in the - // is_keyword function for additional details. + // iskeyword function for additional details. string_vector lst (TOTAL_KEYWORDS); @@ -2010,7 +2010,7 @@ else { std::string name = args(0).xstring_value ("iskeyword: NAME must be a string"); - retval = octave::is_keyword (name); + retval = octave::iskeyword (name); } return retval; @@ -2194,7 +2194,7 @@ lexical_feedback::previous_token_is_keyword (void) const { const token *tok = m_tokens.front (); - return tok ? tok->is_keyword () : false; + return tok ? tok->iskeyword () : false; } bool