- Uniform the definition of the keyword warnings through
the supported languages. - Added keyword list for most of the languages that didn't have one. - "All keywords" warning support, through the -DSWIG_ALLKW option. Read the Changes.current git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5543 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
76e67c8cee
commit
7b8f415319
18 changed files with 593 additions and 60 deletions
|
|
@ -630,4 +630,8 @@ typedef unsigned long VALUE;
|
|||
%ignorewarn("386:operator->* ignored") operator->*;
|
||||
%ignorewarn("389:operator[] ignored (consider using %extend)") operator[];
|
||||
|
||||
/* ruby keywords */
|
||||
/* please test and activate */
|
||||
// %include "rubykw.swg"
|
||||
|
||||
#endif /* __cplusplus */
|
||||
|
|
|
|||
56
Lib/ruby/rubykw.swg
Normal file
56
Lib/ruby/rubykw.swg
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
#ifndef __ruby_rubykw_swg__
|
||||
#define __ruby_rubykw_swg__
|
||||
|
||||
/* Warnings for Ruby keywords */
|
||||
#define RUBYKW(x) %namewarn("314:" #x " is a ruby keyword") #x
|
||||
|
||||
|
||||
/*
|
||||
|
||||
from
|
||||
http://www.ruby-lang.org/en/man-1.4/syntax.html#resword
|
||||
|
||||
*/
|
||||
|
||||
RUBYKW(BEGIN);
|
||||
RUBYKW(class);
|
||||
RUBYKW(ensure);
|
||||
RUBYKW(nil);
|
||||
RUBYKW(self);
|
||||
RUBYKW(when);
|
||||
RUBYKW(END);
|
||||
RUBYKW(def);
|
||||
RUBYKW(false);
|
||||
RUBYKW(not);
|
||||
RUBYKW(super);
|
||||
RUBYKW(while);
|
||||
RUBYKW(alias);
|
||||
RUBYKW(for);
|
||||
RUBYKW(or);
|
||||
RUBYKW(then);
|
||||
RUBYKW(yield);
|
||||
RUBYKW(and);
|
||||
RUBYKW(do);
|
||||
RUBYKW(if);
|
||||
RUBYKW(redo);
|
||||
RUBYKW(true);
|
||||
RUBYKW(begin);
|
||||
RUBYKW(else);
|
||||
RUBYKW(in);
|
||||
RUBYKW(rescue);
|
||||
RUBYKW(undef);
|
||||
RUBYKW(break);
|
||||
RUBYKW(elsif);
|
||||
RUBYKW(module);
|
||||
RUBYKW(retry);
|
||||
RUBYKW(unless);
|
||||
RUBYKW(case);
|
||||
RUBYKW(end);
|
||||
RUBYKW(next);
|
||||
RUBYKW(return);
|
||||
RUBYKW(until);
|
||||
|
||||
/* swig doesn't like this one */
|
||||
// RUBYKW(defined);
|
||||
|
||||
#endif //__ruby_rubykw_swg__
|
||||
Loading…
Add table
Add a link
Reference in a new issue