diff options
author | Seth R Johnson <johnsonsr@ornl.gov> | 2018-02-22 10:10:12 -0500 |
---|---|---|
committer | Seth R Johnson <johnsonsr@ornl.gov> | 2022-02-06 13:51:37 -0500 |
commit | de78b80de9d1c49d8360ccfef874892430c5e462 (patch) | |
tree | 7670719815e46c0a557ce7a4538cfcc4d1ddfbfc /Lib/php | |
parent | d7e0aaa57d40de56ea45ca25ee8494fdfec2accb (diff) | |
download | swig-de78b80de9d1c49d8360ccfef874892430c5e462.tar.gz |
Renames performed by `%namewarn` with `rename=` are printed in warning message
This is necessary for regex-like renames (where you can't use the #define trick
as is done in many of the %keywordwarn directives). It's now unnecessary to print
the "renaming to '`x`'" code explicitly by the kw.swg files.
Diffstat (limited to 'Lib/php')
-rw-r--r-- | Lib/php/phpkw.swg | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/php/phpkw.swg b/Lib/php/phpkw.swg index b6855ce9a..443ac8bf8 100644 --- a/Lib/php/phpkw.swg +++ b/Lib/php/phpkw.swg @@ -3,13 +3,13 @@ * ----------------------------------------------------------------------------- */ /* Keyword (case insensitive) */ -#define PHPKW(x) %keywordwarn("'" `x` "' is a PHP keyword, renaming to 'c_" `x` "'",sourcefmt="%(lower)s",rename="c_%s") `x` +#define PHPKW(x) %keywordwarn("'" `x` "' is a PHP keyword",sourcefmt="%(lower)s",rename="c_%s") `x` /* Keyword, except ok as a function */ #define PHPKW_ok_as_function(x) %keywordwarn("'" `x` "' is a PHP keyword, renaming to 'c_" `x` "'",%$not %$isfunction,sourcefmt="%(lower)s",rename="c_%s") `x` /* Class (case insensitive) */ -#define PHPCN(x) %keywordwarn("'" `x` "' is a PHP reserved class name, renaming to 'c_" `x` "'",%$isclass,sourcefmt="%(lower)s",rename="c_%s") `x` +#define PHPCN(x) %keywordwarn("'" `x` "' is a PHP reserved class name",%$isclass,sourcefmt="%(lower)s",rename="c_%s") `x` /* Constant (case insensitive) */ #define PHPBN1a(x) %namewarn(%warningmsg(SWIGWARN_PARSE_BUILTIN_NAME, "enum conflicts with a built-in constant '"`x`"' in PHP"),%$isenumitem,sourcefmt="%(lower)s") `x` @@ -25,7 +25,7 @@ PHPBN2a(X); PHPBN2b(X) %enddef -#define PHPFN(x) %keywordwarn("'" `x` "' is a PHP built-in function, renaming to 'c_" `x` "'",sourcefmt="%(lower)s",%$isfunction,%$not %$ismember,rename="c_%s") `x` +#define PHPFN(x) %keywordwarn("'" `x` "' is a PHP built-in function",sourcefmt="%(lower)s",%$isfunction,%$not %$ismember,rename="c_%s") `x` /* From: http://php.net/manual/en/reserved.keywords.php * "You cannot use any of the following words as constants, class names, |