javascriptkw.swg 1015 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #ifndef JAVASCRIPT_JAVASCRIPTKW_SWG_
  2. #define JAVASCRIPT_JAVASCRIPTKW_SWG_
  3. /* Warnings for Java keywords */
  4. #define JAVASCRIPTKW(x) %keywordwarn("'" `x` "' is a javascript keyword, renaming to '_"`x`"'",rename="_%s") `x`
  5. /* Taken from https://developer.mozilla.org/En/Core_JavaScript_1.5_Reference/Reserved_Words */
  6. JAVASCRIPTKW(break);
  7. JAVASCRIPTKW(case);
  8. JAVASCRIPTKW(catch);
  9. JAVASCRIPTKW(continue);
  10. JAVASCRIPTKW(default);
  11. JAVASCRIPTKW(delete);
  12. JAVASCRIPTKW(do);
  13. JAVASCRIPTKW(else);
  14. JAVASCRIPTKW(finally);
  15. JAVASCRIPTKW(for);
  16. JAVASCRIPTKW(function);
  17. JAVASCRIPTKW(if);
  18. JAVASCRIPTKW(in);
  19. JAVASCRIPTKW(instanceof);
  20. JAVASCRIPTKW(new);
  21. JAVASCRIPTKW(return);
  22. JAVASCRIPTKW(switch);
  23. JAVASCRIPTKW(this);
  24. JAVASCRIPTKW(throw);
  25. JAVASCRIPTKW(try);
  26. JAVASCRIPTKW(typeof);
  27. JAVASCRIPTKW(var);
  28. JAVASCRIPTKW(void);
  29. JAVASCRIPTKW(while);
  30. JAVASCRIPTKW(with);
  31. /* others bad names if any*/
  32. // for example %namewarn("321:clone() is a javascript bad method name") *::clone();
  33. #undef JAVASCRIPTKW
  34. #endif //JAVASCRIPT_JAVASCRIPTKW_SWG_