class-cursor-kind.nut 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. class CursorKind
  2. {
  3. /*
  4. A CursorKind describes the kind of entity that a cursor points to.
  5. */
  6. // The required BaseEnumeration declarations.
  7. _kinds = [];
  8. _name_map = null;
  9. constructor(BaseEnumeration)
  10. {
  11. }
  12. static function get_all_kinds()
  13. {
  14. //Return all CursorKind enumeration instances.
  15. return filter(null, CursorKind._kinds)
  16. }
  17. function is_declaration()
  18. {
  19. //Test if this is a declaration kind.
  20. return conf.lib.clang_isDeclaration();
  21. }
  22. function is_reference()
  23. {
  24. //Test if this is a reference kind.
  25. return conf.lib.clang_isReference();
  26. }
  27. function is_expression()
  28. {
  29. //Test if this is an expression kind.
  30. return conf.lib.clang_isExpression();
  31. }
  32. function is_statement()
  33. {
  34. //Test if this is a statement kind.
  35. return conf.lib.clang_isStatement();
  36. }
  37. function is_attribute()
  38. {
  39. //Test if this is an attribute kind.
  40. return conf.lib.clang_isAttribute();
  41. }
  42. function is_invalid()
  43. {
  44. //Test if this is an invalid kind.
  45. return conf.lib.clang_isInvalid();
  46. }
  47. function is_translation_unit()
  48. {
  49. //Test if this is a translation unit kind.
  50. return conf.lib.clang_isTranslationUnit();
  51. }
  52. function is_preprocessing()
  53. {
  54. //Test if this is a preprocessing kind.
  55. return conf.lib.clang_isPreprocessing();
  56. }
  57. function is_unexposed()
  58. {
  59. //Test if this is an unexposed kind.
  60. return conf.lib.clang_isUnexposed();
  61. }
  62. function tostring()
  63. {
  64. return format("CursorKind.%s", name);
  65. }
  66. }
  67. dofile("generate-cpp-class-wrapper.nut");
  68. generateCppClassWrapper(CursorKind, "CursorKind");