@coana-tech/cli 14.12.76 → 14.12.77

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (149) hide show
  1. package/cli.mjs +1 -1
  2. package/package.json +1 -1
  3. package/reachability-analyzers-cli.mjs +1 -1
  4. package/repos/coana-tech/alucard/alucard.jar +0 -0
  5. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/cli.mjs +24669 -0
  6. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/node-addon-api/LICENSE.md +9 -0
  7. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/node-addon-api/README.md +95 -0
  8. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/node-addon-api/common.gypi +21 -0
  9. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/node-addon-api/except.gypi +25 -0
  10. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/node-addon-api/index.js +14 -0
  11. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/node-addon-api/napi-inl.deprecated.h +186 -0
  12. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/node-addon-api/napi-inl.h +6941 -0
  13. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/node-addon-api/napi.h +3295 -0
  14. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/node-addon-api/node_addon_api.gyp +42 -0
  15. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/node-addon-api/node_api.gyp +9 -0
  16. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/node-addon-api/noexcept.gypi +26 -0
  17. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/node-addon-api/nothing.c +0 -0
  18. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/node-addon-api/package-support.json +21 -0
  19. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/node-addon-api/package.json +480 -0
  20. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/node-addon-api/tools/README.md +73 -0
  21. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/node-addon-api/tools/check-napi.js +99 -0
  22. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/node-addon-api/tools/clang-format.js +71 -0
  23. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/node-addon-api/tools/conversion.js +301 -0
  24. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/node-gyp-build/LICENSE +21 -0
  25. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/node-gyp-build/README.md +58 -0
  26. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/node-gyp-build/SECURITY.md +5 -0
  27. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/node-gyp-build/bin.js +84 -0
  28. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/node-gyp-build/build-test.js +19 -0
  29. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/node-gyp-build/index.js +6 -0
  30. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/node-gyp-build/node-gyp-build.js +207 -0
  31. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/node-gyp-build/optional.js +7 -0
  32. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/node-gyp-build/package.json +43 -0
  33. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/LICENSE +21 -0
  34. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/README.md +128 -0
  35. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/binding.gyp +80 -0
  36. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/index.js +919 -0
  37. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/node_modules/.bin/node-gyp-build +16 -0
  38. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/node_modules/.bin/node-gyp-build-optional +16 -0
  39. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/node_modules/.bin/node-gyp-build-test +16 -0
  40. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/package.json +76 -0
  41. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/prebuilds/darwin-arm64/tree-sitter.node +0 -0
  42. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/prebuilds/darwin-x64/tree-sitter.node +0 -0
  43. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/prebuilds/linux-arm64/tree-sitter.node +0 -0
  44. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/prebuilds/linux-x64/tree-sitter.node +0 -0
  45. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/prebuilds/win32-arm64/tree-sitter.node +0 -0
  46. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/prebuilds/win32-x64/tree-sitter.node +0 -0
  47. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/src/addon_data.h +47 -0
  48. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/src/binding.cc +35 -0
  49. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/src/conversions.cc +140 -0
  50. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/src/conversions.h +22 -0
  51. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/src/language.cc +106 -0
  52. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/src/language.h +17 -0
  53. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/src/logger.cc +70 -0
  54. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/src/logger.h +19 -0
  55. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/src/lookaheaditerator.cc +122 -0
  56. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/src/lookaheaditerator.h +33 -0
  57. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/src/node.cc +1088 -0
  58. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/src/node.h +30 -0
  59. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/src/parser.cc +306 -0
  60. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/src/parser.h +35 -0
  61. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/src/query.cc +397 -0
  62. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/src/query.h +40 -0
  63. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/src/tree.cc +316 -0
  64. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/src/tree.h +45 -0
  65. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/src/tree_cursor.cc +213 -0
  66. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/src/tree_cursor.h +52 -0
  67. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/tree-sitter.d.ts +1042 -0
  68. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/vendor/tree-sitter/lib/include/tree_sitter/api.h +1318 -0
  69. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/vendor/tree-sitter/lib/src/alloc.c +48 -0
  70. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/vendor/tree-sitter/lib/src/alloc.h +41 -0
  71. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/vendor/tree-sitter/lib/src/array.h +291 -0
  72. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/vendor/tree-sitter/lib/src/atomic.h +68 -0
  73. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/vendor/tree-sitter/lib/src/clock.h +146 -0
  74. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/vendor/tree-sitter/lib/src/error_costs.h +11 -0
  75. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/vendor/tree-sitter/lib/src/get_changed_ranges.c +501 -0
  76. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/vendor/tree-sitter/lib/src/get_changed_ranges.h +36 -0
  77. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/vendor/tree-sitter/lib/src/host.h +21 -0
  78. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/vendor/tree-sitter/lib/src/language.c +223 -0
  79. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/vendor/tree-sitter/lib/src/language.h +297 -0
  80. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/vendor/tree-sitter/lib/src/length.h +52 -0
  81. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/vendor/tree-sitter/lib/src/lexer.c +435 -0
  82. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/vendor/tree-sitter/lib/src/lexer.h +49 -0
  83. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/vendor/tree-sitter/lib/src/lib.c +12 -0
  84. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/vendor/tree-sitter/lib/src/node.c +920 -0
  85. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/vendor/tree-sitter/lib/src/parser.c +2165 -0
  86. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/vendor/tree-sitter/lib/src/parser.h +266 -0
  87. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/vendor/tree-sitter/lib/src/point.h +62 -0
  88. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/vendor/tree-sitter/lib/src/portable/endian.h +206 -0
  89. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/vendor/tree-sitter/lib/src/query.c +4187 -0
  90. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/vendor/tree-sitter/lib/src/reduce_action.h +34 -0
  91. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/vendor/tree-sitter/lib/src/reusable_node.h +95 -0
  92. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/vendor/tree-sitter/lib/src/stack.c +899 -0
  93. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/vendor/tree-sitter/lib/src/stack.h +130 -0
  94. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/vendor/tree-sitter/lib/src/subtree.c +1066 -0
  95. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/vendor/tree-sitter/lib/src/subtree.h +399 -0
  96. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/vendor/tree-sitter/lib/src/tree.c +170 -0
  97. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/vendor/tree-sitter/lib/src/tree.h +31 -0
  98. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/vendor/tree-sitter/lib/src/tree_cursor.c +712 -0
  99. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/vendor/tree-sitter/lib/src/tree_cursor.h +48 -0
  100. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/vendor/tree-sitter/lib/src/ts_assert.h +11 -0
  101. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode/ICU_SHA +1 -0
  102. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode/LICENSE +414 -0
  103. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode/README.md +29 -0
  104. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode/ptypes.h +1 -0
  105. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode/umachine.h +448 -0
  106. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode/urename.h +1 -0
  107. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode/utf.h +1 -0
  108. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode/utf16.h +733 -0
  109. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode/utf8.h +881 -0
  110. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode.h +83 -0
  111. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/vendor/tree-sitter/lib/src/wasm/stdlib-symbols.txt +24 -0
  112. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/vendor/tree-sitter/lib/src/wasm/stdlib.c +109 -0
  113. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/vendor/tree-sitter/lib/src/wasm/wasm-stdlib.h +1302 -0
  114. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/vendor/tree-sitter/lib/src/wasm_store.c +1859 -0
  115. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/vendor/tree-sitter/lib/src/wasm_store.h +31 -0
  116. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter-ruby/LICENSE +22 -0
  117. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter-ruby/README.md +21 -0
  118. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter-ruby/binding.gyp +30 -0
  119. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter-ruby/bindings/node/binding.cc +20 -0
  120. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter-ruby/bindings/node/binding_test.js +9 -0
  121. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter-ruby/bindings/node/index.d.ts +28 -0
  122. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter-ruby/bindings/node/index.js +11 -0
  123. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter-ruby/grammar.js +1281 -0
  124. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter-ruby/node_modules/.bin/node-gyp-build +16 -0
  125. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter-ruby/node_modules/.bin/node-gyp-build-optional +16 -0
  126. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter-ruby/node_modules/.bin/node-gyp-build-test +16 -0
  127. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter-ruby/package.json +77 -0
  128. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter-ruby/prebuilds/darwin-arm64/tree-sitter-ruby.node +0 -0
  129. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter-ruby/prebuilds/darwin-x64/tree-sitter-ruby.node +0 -0
  130. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter-ruby/prebuilds/linux-arm64/tree-sitter-ruby.node +0 -0
  131. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter-ruby/prebuilds/linux-x64/tree-sitter-ruby.node +0 -0
  132. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter-ruby/prebuilds/win32-arm64/tree-sitter-ruby.node +0 -0
  133. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter-ruby/prebuilds/win32-x64/tree-sitter-ruby.node +0 -0
  134. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter-ruby/queries/highlights.scm +154 -0
  135. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter-ruby/queries/locals.scm +27 -0
  136. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter-ruby/queries/tags.scm +64 -0
  137. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter-ruby/src/grammar.json +8364 -0
  138. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter-ruby/src/node-types.json +4108 -0
  139. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter-ruby/src/parser.c +471247 -0
  140. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter-ruby/src/scanner.c +1107 -0
  141. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter-ruby/src/tree_sitter/alloc.h +54 -0
  142. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter-ruby/src/tree_sitter/array.h +290 -0
  143. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter-ruby/src/tree_sitter/parser.h +266 -0
  144. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter-ruby/tree-sitter-ruby.wasm +0 -0
  145. package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter-ruby/tree-sitter.json +46 -0
  146. package/repos/coana-tech/goana/bin/goana-darwin-amd64.gz +0 -0
  147. package/repos/coana-tech/goana/bin/goana-darwin-arm64.gz +0 -0
  148. package/repos/coana-tech/goana/bin/goana-linux-amd64.gz +0 -0
  149. package/repos/coana-tech/goana/bin/goana-linux-arm64.gz +0 -0
@@ -0,0 +1,733 @@
1
+ // © 2016 and later: Unicode, Inc. and others.
2
+ // License & terms of use: http://www.unicode.org/copyright.html
3
+ /*
4
+ *******************************************************************************
5
+ *
6
+ * Copyright (C) 1999-2012, International Business Machines
7
+ * Corporation and others. All Rights Reserved.
8
+ *
9
+ *******************************************************************************
10
+ * file name: utf16.h
11
+ * encoding: UTF-8
12
+ * tab size: 8 (not used)
13
+ * indentation:4
14
+ *
15
+ * created on: 1999sep09
16
+ * created by: Markus W. Scherer
17
+ */
18
+
19
+ /**
20
+ * \file
21
+ * \brief C API: 16-bit Unicode handling macros
22
+ *
23
+ * This file defines macros to deal with 16-bit Unicode (UTF-16) code units and strings.
24
+ *
25
+ * For more information see utf.h and the ICU User Guide Strings chapter
26
+ * (http://userguide.icu-project.org/strings).
27
+ *
28
+ * <em>Usage:</em>
29
+ * ICU coding guidelines for if() statements should be followed when using these macros.
30
+ * Compound statements (curly braces {}) must be used for if-else-while...
31
+ * bodies and all macro statements should be terminated with semicolon.
32
+ */
33
+
34
+ #ifndef __UTF16_H__
35
+ #define __UTF16_H__
36
+
37
+ #include "unicode/umachine.h"
38
+ #ifndef __UTF_H__
39
+ # include "unicode/utf.h"
40
+ #endif
41
+
42
+ /* single-code point definitions -------------------------------------------- */
43
+
44
+ /**
45
+ * Does this code unit alone encode a code point (BMP, not a surrogate)?
46
+ * @param c 16-bit code unit
47
+ * @return TRUE or FALSE
48
+ * @stable ICU 2.4
49
+ */
50
+ #define U16_IS_SINGLE(c) !U_IS_SURROGATE(c)
51
+
52
+ /**
53
+ * Is this code unit a lead surrogate (U+d800..U+dbff)?
54
+ * @param c 16-bit code unit
55
+ * @return TRUE or FALSE
56
+ * @stable ICU 2.4
57
+ */
58
+ #define U16_IS_LEAD(c) (((c)&0xfffffc00)==0xd800)
59
+
60
+ /**
61
+ * Is this code unit a trail surrogate (U+dc00..U+dfff)?
62
+ * @param c 16-bit code unit
63
+ * @return TRUE or FALSE
64
+ * @stable ICU 2.4
65
+ */
66
+ #define U16_IS_TRAIL(c) (((c)&0xfffffc00)==0xdc00)
67
+
68
+ /**
69
+ * Is this code unit a surrogate (U+d800..U+dfff)?
70
+ * @param c 16-bit code unit
71
+ * @return TRUE or FALSE
72
+ * @stable ICU 2.4
73
+ */
74
+ #define U16_IS_SURROGATE(c) U_IS_SURROGATE(c)
75
+
76
+ /**
77
+ * Assuming c is a surrogate code point (U16_IS_SURROGATE(c)),
78
+ * is it a lead surrogate?
79
+ * @param c 16-bit code unit
80
+ * @return TRUE or FALSE
81
+ * @stable ICU 2.4
82
+ */
83
+ #define U16_IS_SURROGATE_LEAD(c) (((c)&0x400)==0)
84
+
85
+ /**
86
+ * Assuming c is a surrogate code point (U16_IS_SURROGATE(c)),
87
+ * is it a trail surrogate?
88
+ * @param c 16-bit code unit
89
+ * @return TRUE or FALSE
90
+ * @stable ICU 4.2
91
+ */
92
+ #define U16_IS_SURROGATE_TRAIL(c) (((c)&0x400)!=0)
93
+
94
+ /**
95
+ * Helper constant for U16_GET_SUPPLEMENTARY.
96
+ * @internal
97
+ */
98
+ #define U16_SURROGATE_OFFSET ((0xd800<<10UL)+0xdc00-0x10000)
99
+
100
+ /**
101
+ * Get a supplementary code point value (U+10000..U+10ffff)
102
+ * from its lead and trail surrogates.
103
+ * The result is undefined if the input values are not
104
+ * lead and trail surrogates.
105
+ *
106
+ * @param lead lead surrogate (U+d800..U+dbff)
107
+ * @param trail trail surrogate (U+dc00..U+dfff)
108
+ * @return supplementary code point (U+10000..U+10ffff)
109
+ * @stable ICU 2.4
110
+ */
111
+ #define U16_GET_SUPPLEMENTARY(lead, trail) \
112
+ (((UChar32)(lead)<<10UL)+(UChar32)(trail)-U16_SURROGATE_OFFSET)
113
+
114
+
115
+ /**
116
+ * Get the lead surrogate (0xd800..0xdbff) for a
117
+ * supplementary code point (0x10000..0x10ffff).
118
+ * @param supplementary 32-bit code point (U+10000..U+10ffff)
119
+ * @return lead surrogate (U+d800..U+dbff) for supplementary
120
+ * @stable ICU 2.4
121
+ */
122
+ #define U16_LEAD(supplementary) (UChar)(((supplementary)>>10)+0xd7c0)
123
+
124
+ /**
125
+ * Get the trail surrogate (0xdc00..0xdfff) for a
126
+ * supplementary code point (0x10000..0x10ffff).
127
+ * @param supplementary 32-bit code point (U+10000..U+10ffff)
128
+ * @return trail surrogate (U+dc00..U+dfff) for supplementary
129
+ * @stable ICU 2.4
130
+ */
131
+ #define U16_TRAIL(supplementary) (UChar)(((supplementary)&0x3ff)|0xdc00)
132
+
133
+ /**
134
+ * How many 16-bit code units are used to encode this Unicode code point? (1 or 2)
135
+ * The result is not defined if c is not a Unicode code point (U+0000..U+10ffff).
136
+ * @param c 32-bit code point
137
+ * @return 1 or 2
138
+ * @stable ICU 2.4
139
+ */
140
+ #define U16_LENGTH(c) ((uint32_t)(c)<=0xffff ? 1 : 2)
141
+
142
+ /**
143
+ * The maximum number of 16-bit code units per Unicode code point (U+0000..U+10ffff).
144
+ * @return 2
145
+ * @stable ICU 2.4
146
+ */
147
+ #define U16_MAX_LENGTH 2
148
+
149
+ /**
150
+ * Get a code point from a string at a random-access offset,
151
+ * without changing the offset.
152
+ * "Unsafe" macro, assumes well-formed UTF-16.
153
+ *
154
+ * The offset may point to either the lead or trail surrogate unit
155
+ * for a supplementary code point, in which case the macro will read
156
+ * the adjacent matching surrogate as well.
157
+ * The result is undefined if the offset points to a single, unpaired surrogate.
158
+ * Iteration through a string is more efficient with U16_NEXT_UNSAFE or U16_NEXT.
159
+ *
160
+ * @param s const UChar * string
161
+ * @param i string offset
162
+ * @param c output UChar32 variable
163
+ * @see U16_GET
164
+ * @stable ICU 2.4
165
+ */
166
+ #define U16_GET_UNSAFE(s, i, c) UPRV_BLOCK_MACRO_BEGIN { \
167
+ (c)=(s)[i]; \
168
+ if(U16_IS_SURROGATE(c)) { \
169
+ if(U16_IS_SURROGATE_LEAD(c)) { \
170
+ (c)=U16_GET_SUPPLEMENTARY((c), (s)[(i)+1]); \
171
+ } else { \
172
+ (c)=U16_GET_SUPPLEMENTARY((s)[(i)-1], (c)); \
173
+ } \
174
+ } \
175
+ } UPRV_BLOCK_MACRO_END
176
+
177
+ /**
178
+ * Get a code point from a string at a random-access offset,
179
+ * without changing the offset.
180
+ * "Safe" macro, handles unpaired surrogates and checks for string boundaries.
181
+ *
182
+ * The offset may point to either the lead or trail surrogate unit
183
+ * for a supplementary code point, in which case the macro will read
184
+ * the adjacent matching surrogate as well.
185
+ *
186
+ * The length can be negative for a NUL-terminated string.
187
+ *
188
+ * If the offset points to a single, unpaired surrogate, then
189
+ * c is set to that unpaired surrogate.
190
+ * Iteration through a string is more efficient with U16_NEXT_UNSAFE or U16_NEXT.
191
+ *
192
+ * @param s const UChar * string
193
+ * @param start starting string offset (usually 0)
194
+ * @param i string offset, must be start<=i<length
195
+ * @param length string length
196
+ * @param c output UChar32 variable
197
+ * @see U16_GET_UNSAFE
198
+ * @stable ICU 2.4
199
+ */
200
+ #define U16_GET(s, start, i, length, c) UPRV_BLOCK_MACRO_BEGIN { \
201
+ (c)=(s)[i]; \
202
+ if(U16_IS_SURROGATE(c)) { \
203
+ uint16_t __c2; \
204
+ if(U16_IS_SURROGATE_LEAD(c)) { \
205
+ if((i)+1!=(length) && U16_IS_TRAIL(__c2=(s)[(i)+1])) { \
206
+ (c)=U16_GET_SUPPLEMENTARY((c), __c2); \
207
+ } \
208
+ } else { \
209
+ if((i)>(start) && U16_IS_LEAD(__c2=(s)[(i)-1])) { \
210
+ (c)=U16_GET_SUPPLEMENTARY(__c2, (c)); \
211
+ } \
212
+ } \
213
+ } \
214
+ } UPRV_BLOCK_MACRO_END
215
+
216
+ /**
217
+ * Get a code point from a string at a random-access offset,
218
+ * without changing the offset.
219
+ * "Safe" macro, handles unpaired surrogates and checks for string boundaries.
220
+ *
221
+ * The offset may point to either the lead or trail surrogate unit
222
+ * for a supplementary code point, in which case the macro will read
223
+ * the adjacent matching surrogate as well.
224
+ *
225
+ * The length can be negative for a NUL-terminated string.
226
+ *
227
+ * If the offset points to a single, unpaired surrogate, then
228
+ * c is set to U+FFFD.
229
+ * Iteration through a string is more efficient with U16_NEXT_UNSAFE or U16_NEXT_OR_FFFD.
230
+ *
231
+ * @param s const UChar * string
232
+ * @param start starting string offset (usually 0)
233
+ * @param i string offset, must be start<=i<length
234
+ * @param length string length
235
+ * @param c output UChar32 variable
236
+ * @see U16_GET_UNSAFE
237
+ * @stable ICU 60
238
+ */
239
+ #define U16_GET_OR_FFFD(s, start, i, length, c) UPRV_BLOCK_MACRO_BEGIN { \
240
+ (c)=(s)[i]; \
241
+ if(U16_IS_SURROGATE(c)) { \
242
+ uint16_t __c2; \
243
+ if(U16_IS_SURROGATE_LEAD(c)) { \
244
+ if((i)+1!=(length) && U16_IS_TRAIL(__c2=(s)[(i)+1])) { \
245
+ (c)=U16_GET_SUPPLEMENTARY((c), __c2); \
246
+ } else { \
247
+ (c)=0xfffd; \
248
+ } \
249
+ } else { \
250
+ if((i)>(start) && U16_IS_LEAD(__c2=(s)[(i)-1])) { \
251
+ (c)=U16_GET_SUPPLEMENTARY(__c2, (c)); \
252
+ } else { \
253
+ (c)=0xfffd; \
254
+ } \
255
+ } \
256
+ } \
257
+ } UPRV_BLOCK_MACRO_END
258
+
259
+ /* definitions with forward iteration --------------------------------------- */
260
+
261
+ /**
262
+ * Get a code point from a string at a code point boundary offset,
263
+ * and advance the offset to the next code point boundary.
264
+ * (Post-incrementing forward iteration.)
265
+ * "Unsafe" macro, assumes well-formed UTF-16.
266
+ *
267
+ * The offset may point to the lead surrogate unit
268
+ * for a supplementary code point, in which case the macro will read
269
+ * the following trail surrogate as well.
270
+ * If the offset points to a trail surrogate, then that itself
271
+ * will be returned as the code point.
272
+ * The result is undefined if the offset points to a single, unpaired lead surrogate.
273
+ *
274
+ * @param s const UChar * string
275
+ * @param i string offset
276
+ * @param c output UChar32 variable
277
+ * @see U16_NEXT
278
+ * @stable ICU 2.4
279
+ */
280
+ #define U16_NEXT_UNSAFE(s, i, c) UPRV_BLOCK_MACRO_BEGIN { \
281
+ (c)=(s)[(i)++]; \
282
+ if(U16_IS_LEAD(c)) { \
283
+ (c)=U16_GET_SUPPLEMENTARY((c), (s)[(i)++]); \
284
+ } \
285
+ } UPRV_BLOCK_MACRO_END
286
+
287
+ /**
288
+ * Get a code point from a string at a code point boundary offset,
289
+ * and advance the offset to the next code point boundary.
290
+ * (Post-incrementing forward iteration.)
291
+ * "Safe" macro, handles unpaired surrogates and checks for string boundaries.
292
+ *
293
+ * The length can be negative for a NUL-terminated string.
294
+ *
295
+ * The offset may point to the lead surrogate unit
296
+ * for a supplementary code point, in which case the macro will read
297
+ * the following trail surrogate as well.
298
+ * If the offset points to a trail surrogate or
299
+ * to a single, unpaired lead surrogate, then c is set to that unpaired surrogate.
300
+ *
301
+ * @param s const UChar * string
302
+ * @param i string offset, must be i<length
303
+ * @param length string length
304
+ * @param c output UChar32 variable
305
+ * @see U16_NEXT_UNSAFE
306
+ * @stable ICU 2.4
307
+ */
308
+ #define U16_NEXT(s, i, length, c) UPRV_BLOCK_MACRO_BEGIN { \
309
+ (c)=(s)[(i)++]; \
310
+ if(U16_IS_LEAD(c)) { \
311
+ uint16_t __c2; \
312
+ if((i)!=(length) && U16_IS_TRAIL(__c2=(s)[(i)])) { \
313
+ ++(i); \
314
+ (c)=U16_GET_SUPPLEMENTARY((c), __c2); \
315
+ } \
316
+ } \
317
+ } UPRV_BLOCK_MACRO_END
318
+
319
+ /**
320
+ * Get a code point from a string at a code point boundary offset,
321
+ * and advance the offset to the next code point boundary.
322
+ * (Post-incrementing forward iteration.)
323
+ * "Safe" macro, handles unpaired surrogates and checks for string boundaries.
324
+ *
325
+ * The length can be negative for a NUL-terminated string.
326
+ *
327
+ * The offset may point to the lead surrogate unit
328
+ * for a supplementary code point, in which case the macro will read
329
+ * the following trail surrogate as well.
330
+ * If the offset points to a trail surrogate or
331
+ * to a single, unpaired lead surrogate, then c is set to U+FFFD.
332
+ *
333
+ * @param s const UChar * string
334
+ * @param i string offset, must be i<length
335
+ * @param length string length
336
+ * @param c output UChar32 variable
337
+ * @see U16_NEXT_UNSAFE
338
+ * @stable ICU 60
339
+ */
340
+ #define U16_NEXT_OR_FFFD(s, i, length, c) UPRV_BLOCK_MACRO_BEGIN { \
341
+ (c)=(s)[(i)++]; \
342
+ if(U16_IS_SURROGATE(c)) { \
343
+ uint16_t __c2; \
344
+ if(U16_IS_SURROGATE_LEAD(c) && (i)!=(length) && U16_IS_TRAIL(__c2=(s)[(i)])) { \
345
+ ++(i); \
346
+ (c)=U16_GET_SUPPLEMENTARY((c), __c2); \
347
+ } else { \
348
+ (c)=0xfffd; \
349
+ } \
350
+ } \
351
+ } UPRV_BLOCK_MACRO_END
352
+
353
+ /**
354
+ * Append a code point to a string, overwriting 1 or 2 code units.
355
+ * The offset points to the current end of the string contents
356
+ * and is advanced (post-increment).
357
+ * "Unsafe" macro, assumes a valid code point and sufficient space in the string.
358
+ * Otherwise, the result is undefined.
359
+ *
360
+ * @param s const UChar * string buffer
361
+ * @param i string offset
362
+ * @param c code point to append
363
+ * @see U16_APPEND
364
+ * @stable ICU 2.4
365
+ */
366
+ #define U16_APPEND_UNSAFE(s, i, c) UPRV_BLOCK_MACRO_BEGIN { \
367
+ if((uint32_t)(c)<=0xffff) { \
368
+ (s)[(i)++]=(uint16_t)(c); \
369
+ } else { \
370
+ (s)[(i)++]=(uint16_t)(((c)>>10)+0xd7c0); \
371
+ (s)[(i)++]=(uint16_t)(((c)&0x3ff)|0xdc00); \
372
+ } \
373
+ } UPRV_BLOCK_MACRO_END
374
+
375
+ /**
376
+ * Append a code point to a string, overwriting 1 or 2 code units.
377
+ * The offset points to the current end of the string contents
378
+ * and is advanced (post-increment).
379
+ * "Safe" macro, checks for a valid code point.
380
+ * If a surrogate pair is written, checks for sufficient space in the string.
381
+ * If the code point is not valid or a trail surrogate does not fit,
382
+ * then isError is set to TRUE.
383
+ *
384
+ * @param s const UChar * string buffer
385
+ * @param i string offset, must be i<capacity
386
+ * @param capacity size of the string buffer
387
+ * @param c code point to append
388
+ * @param isError output UBool set to TRUE if an error occurs, otherwise not modified
389
+ * @see U16_APPEND_UNSAFE
390
+ * @stable ICU 2.4
391
+ */
392
+ #define U16_APPEND(s, i, capacity, c, isError) UPRV_BLOCK_MACRO_BEGIN { \
393
+ if((uint32_t)(c)<=0xffff) { \
394
+ (s)[(i)++]=(uint16_t)(c); \
395
+ } else if((uint32_t)(c)<=0x10ffff && (i)+1<(capacity)) { \
396
+ (s)[(i)++]=(uint16_t)(((c)>>10)+0xd7c0); \
397
+ (s)[(i)++]=(uint16_t)(((c)&0x3ff)|0xdc00); \
398
+ } else /* c>0x10ffff or not enough space */ { \
399
+ (isError)=TRUE; \
400
+ } \
401
+ } UPRV_BLOCK_MACRO_END
402
+
403
+ /**
404
+ * Advance the string offset from one code point boundary to the next.
405
+ * (Post-incrementing iteration.)
406
+ * "Unsafe" macro, assumes well-formed UTF-16.
407
+ *
408
+ * @param s const UChar * string
409
+ * @param i string offset
410
+ * @see U16_FWD_1
411
+ * @stable ICU 2.4
412
+ */
413
+ #define U16_FWD_1_UNSAFE(s, i) UPRV_BLOCK_MACRO_BEGIN { \
414
+ if(U16_IS_LEAD((s)[(i)++])) { \
415
+ ++(i); \
416
+ } \
417
+ } UPRV_BLOCK_MACRO_END
418
+
419
+ /**
420
+ * Advance the string offset from one code point boundary to the next.
421
+ * (Post-incrementing iteration.)
422
+ * "Safe" macro, handles unpaired surrogates and checks for string boundaries.
423
+ *
424
+ * The length can be negative for a NUL-terminated string.
425
+ *
426
+ * @param s const UChar * string
427
+ * @param i string offset, must be i<length
428
+ * @param length string length
429
+ * @see U16_FWD_1_UNSAFE
430
+ * @stable ICU 2.4
431
+ */
432
+ #define U16_FWD_1(s, i, length) UPRV_BLOCK_MACRO_BEGIN { \
433
+ if(U16_IS_LEAD((s)[(i)++]) && (i)!=(length) && U16_IS_TRAIL((s)[i])) { \
434
+ ++(i); \
435
+ } \
436
+ } UPRV_BLOCK_MACRO_END
437
+
438
+ /**
439
+ * Advance the string offset from one code point boundary to the n-th next one,
440
+ * i.e., move forward by n code points.
441
+ * (Post-incrementing iteration.)
442
+ * "Unsafe" macro, assumes well-formed UTF-16.
443
+ *
444
+ * @param s const UChar * string
445
+ * @param i string offset
446
+ * @param n number of code points to skip
447
+ * @see U16_FWD_N
448
+ * @stable ICU 2.4
449
+ */
450
+ #define U16_FWD_N_UNSAFE(s, i, n) UPRV_BLOCK_MACRO_BEGIN { \
451
+ int32_t __N=(n); \
452
+ while(__N>0) { \
453
+ U16_FWD_1_UNSAFE(s, i); \
454
+ --__N; \
455
+ } \
456
+ } UPRV_BLOCK_MACRO_END
457
+
458
+ /**
459
+ * Advance the string offset from one code point boundary to the n-th next one,
460
+ * i.e., move forward by n code points.
461
+ * (Post-incrementing iteration.)
462
+ * "Safe" macro, handles unpaired surrogates and checks for string boundaries.
463
+ *
464
+ * The length can be negative for a NUL-terminated string.
465
+ *
466
+ * @param s const UChar * string
467
+ * @param i int32_t string offset, must be i<length
468
+ * @param length int32_t string length
469
+ * @param n number of code points to skip
470
+ * @see U16_FWD_N_UNSAFE
471
+ * @stable ICU 2.4
472
+ */
473
+ #define U16_FWD_N(s, i, length, n) UPRV_BLOCK_MACRO_BEGIN { \
474
+ int32_t __N=(n); \
475
+ while(__N>0 && ((i)<(length) || ((length)<0 && (s)[i]!=0))) { \
476
+ U16_FWD_1(s, i, length); \
477
+ --__N; \
478
+ } \
479
+ } UPRV_BLOCK_MACRO_END
480
+
481
+ /**
482
+ * Adjust a random-access offset to a code point boundary
483
+ * at the start of a code point.
484
+ * If the offset points to the trail surrogate of a surrogate pair,
485
+ * then the offset is decremented.
486
+ * Otherwise, it is not modified.
487
+ * "Unsafe" macro, assumes well-formed UTF-16.
488
+ *
489
+ * @param s const UChar * string
490
+ * @param i string offset
491
+ * @see U16_SET_CP_START
492
+ * @stable ICU 2.4
493
+ */
494
+ #define U16_SET_CP_START_UNSAFE(s, i) UPRV_BLOCK_MACRO_BEGIN { \
495
+ if(U16_IS_TRAIL((s)[i])) { \
496
+ --(i); \
497
+ } \
498
+ } UPRV_BLOCK_MACRO_END
499
+
500
+ /**
501
+ * Adjust a random-access offset to a code point boundary
502
+ * at the start of a code point.
503
+ * If the offset points to the trail surrogate of a surrogate pair,
504
+ * then the offset is decremented.
505
+ * Otherwise, it is not modified.
506
+ * "Safe" macro, handles unpaired surrogates and checks for string boundaries.
507
+ *
508
+ * @param s const UChar * string
509
+ * @param start starting string offset (usually 0)
510
+ * @param i string offset, must be start<=i
511
+ * @see U16_SET_CP_START_UNSAFE
512
+ * @stable ICU 2.4
513
+ */
514
+ #define U16_SET_CP_START(s, start, i) UPRV_BLOCK_MACRO_BEGIN { \
515
+ if(U16_IS_TRAIL((s)[i]) && (i)>(start) && U16_IS_LEAD((s)[(i)-1])) { \
516
+ --(i); \
517
+ } \
518
+ } UPRV_BLOCK_MACRO_END
519
+
520
+ /* definitions with backward iteration -------------------------------------- */
521
+
522
+ /**
523
+ * Move the string offset from one code point boundary to the previous one
524
+ * and get the code point between them.
525
+ * (Pre-decrementing backward iteration.)
526
+ * "Unsafe" macro, assumes well-formed UTF-16.
527
+ *
528
+ * The input offset may be the same as the string length.
529
+ * If the offset is behind a trail surrogate unit
530
+ * for a supplementary code point, then the macro will read
531
+ * the preceding lead surrogate as well.
532
+ * If the offset is behind a lead surrogate, then that itself
533
+ * will be returned as the code point.
534
+ * The result is undefined if the offset is behind a single, unpaired trail surrogate.
535
+ *
536
+ * @param s const UChar * string
537
+ * @param i string offset
538
+ * @param c output UChar32 variable
539
+ * @see U16_PREV
540
+ * @stable ICU 2.4
541
+ */
542
+ #define U16_PREV_UNSAFE(s, i, c) UPRV_BLOCK_MACRO_BEGIN { \
543
+ (c)=(s)[--(i)]; \
544
+ if(U16_IS_TRAIL(c)) { \
545
+ (c)=U16_GET_SUPPLEMENTARY((s)[--(i)], (c)); \
546
+ } \
547
+ } UPRV_BLOCK_MACRO_END
548
+
549
+ /**
550
+ * Move the string offset from one code point boundary to the previous one
551
+ * and get the code point between them.
552
+ * (Pre-decrementing backward iteration.)
553
+ * "Safe" macro, handles unpaired surrogates and checks for string boundaries.
554
+ *
555
+ * The input offset may be the same as the string length.
556
+ * If the offset is behind a trail surrogate unit
557
+ * for a supplementary code point, then the macro will read
558
+ * the preceding lead surrogate as well.
559
+ * If the offset is behind a lead surrogate or behind a single, unpaired
560
+ * trail surrogate, then c is set to that unpaired surrogate.
561
+ *
562
+ * @param s const UChar * string
563
+ * @param start starting string offset (usually 0)
564
+ * @param i string offset, must be start<i
565
+ * @param c output UChar32 variable
566
+ * @see U16_PREV_UNSAFE
567
+ * @stable ICU 2.4
568
+ */
569
+ #define U16_PREV(s, start, i, c) UPRV_BLOCK_MACRO_BEGIN { \
570
+ (c)=(s)[--(i)]; \
571
+ if(U16_IS_TRAIL(c)) { \
572
+ uint16_t __c2; \
573
+ if((i)>(start) && U16_IS_LEAD(__c2=(s)[(i)-1])) { \
574
+ --(i); \
575
+ (c)=U16_GET_SUPPLEMENTARY(__c2, (c)); \
576
+ } \
577
+ } \
578
+ } UPRV_BLOCK_MACRO_END
579
+
580
+ /**
581
+ * Move the string offset from one code point boundary to the previous one
582
+ * and get the code point between them.
583
+ * (Pre-decrementing backward iteration.)
584
+ * "Safe" macro, handles unpaired surrogates and checks for string boundaries.
585
+ *
586
+ * The input offset may be the same as the string length.
587
+ * If the offset is behind a trail surrogate unit
588
+ * for a supplementary code point, then the macro will read
589
+ * the preceding lead surrogate as well.
590
+ * If the offset is behind a lead surrogate or behind a single, unpaired
591
+ * trail surrogate, then c is set to U+FFFD.
592
+ *
593
+ * @param s const UChar * string
594
+ * @param start starting string offset (usually 0)
595
+ * @param i string offset, must be start<i
596
+ * @param c output UChar32 variable
597
+ * @see U16_PREV_UNSAFE
598
+ * @stable ICU 60
599
+ */
600
+ #define U16_PREV_OR_FFFD(s, start, i, c) UPRV_BLOCK_MACRO_BEGIN { \
601
+ (c)=(s)[--(i)]; \
602
+ if(U16_IS_SURROGATE(c)) { \
603
+ uint16_t __c2; \
604
+ if(U16_IS_SURROGATE_TRAIL(c) && (i)>(start) && U16_IS_LEAD(__c2=(s)[(i)-1])) { \
605
+ --(i); \
606
+ (c)=U16_GET_SUPPLEMENTARY(__c2, (c)); \
607
+ } else { \
608
+ (c)=0xfffd; \
609
+ } \
610
+ } \
611
+ } UPRV_BLOCK_MACRO_END
612
+
613
+ /**
614
+ * Move the string offset from one code point boundary to the previous one.
615
+ * (Pre-decrementing backward iteration.)
616
+ * The input offset may be the same as the string length.
617
+ * "Unsafe" macro, assumes well-formed UTF-16.
618
+ *
619
+ * @param s const UChar * string
620
+ * @param i string offset
621
+ * @see U16_BACK_1
622
+ * @stable ICU 2.4
623
+ */
624
+ #define U16_BACK_1_UNSAFE(s, i) UPRV_BLOCK_MACRO_BEGIN { \
625
+ if(U16_IS_TRAIL((s)[--(i)])) { \
626
+ --(i); \
627
+ } \
628
+ } UPRV_BLOCK_MACRO_END
629
+
630
+ /**
631
+ * Move the string offset from one code point boundary to the previous one.
632
+ * (Pre-decrementing backward iteration.)
633
+ * The input offset may be the same as the string length.
634
+ * "Safe" macro, handles unpaired surrogates and checks for string boundaries.
635
+ *
636
+ * @param s const UChar * string
637
+ * @param start starting string offset (usually 0)
638
+ * @param i string offset, must be start<i
639
+ * @see U16_BACK_1_UNSAFE
640
+ * @stable ICU 2.4
641
+ */
642
+ #define U16_BACK_1(s, start, i) UPRV_BLOCK_MACRO_BEGIN { \
643
+ if(U16_IS_TRAIL((s)[--(i)]) && (i)>(start) && U16_IS_LEAD((s)[(i)-1])) { \
644
+ --(i); \
645
+ } \
646
+ } UPRV_BLOCK_MACRO_END
647
+
648
+ /**
649
+ * Move the string offset from one code point boundary to the n-th one before it,
650
+ * i.e., move backward by n code points.
651
+ * (Pre-decrementing backward iteration.)
652
+ * The input offset may be the same as the string length.
653
+ * "Unsafe" macro, assumes well-formed UTF-16.
654
+ *
655
+ * @param s const UChar * string
656
+ * @param i string offset
657
+ * @param n number of code points to skip
658
+ * @see U16_BACK_N
659
+ * @stable ICU 2.4
660
+ */
661
+ #define U16_BACK_N_UNSAFE(s, i, n) UPRV_BLOCK_MACRO_BEGIN { \
662
+ int32_t __N=(n); \
663
+ while(__N>0) { \
664
+ U16_BACK_1_UNSAFE(s, i); \
665
+ --__N; \
666
+ } \
667
+ } UPRV_BLOCK_MACRO_END
668
+
669
+ /**
670
+ * Move the string offset from one code point boundary to the n-th one before it,
671
+ * i.e., move backward by n code points.
672
+ * (Pre-decrementing backward iteration.)
673
+ * The input offset may be the same as the string length.
674
+ * "Safe" macro, handles unpaired surrogates and checks for string boundaries.
675
+ *
676
+ * @param s const UChar * string
677
+ * @param start start of string
678
+ * @param i string offset, must be start<i
679
+ * @param n number of code points to skip
680
+ * @see U16_BACK_N_UNSAFE
681
+ * @stable ICU 2.4
682
+ */
683
+ #define U16_BACK_N(s, start, i, n) UPRV_BLOCK_MACRO_BEGIN { \
684
+ int32_t __N=(n); \
685
+ while(__N>0 && (i)>(start)) { \
686
+ U16_BACK_1(s, start, i); \
687
+ --__N; \
688
+ } \
689
+ } UPRV_BLOCK_MACRO_END
690
+
691
+ /**
692
+ * Adjust a random-access offset to a code point boundary after a code point.
693
+ * If the offset is behind the lead surrogate of a surrogate pair,
694
+ * then the offset is incremented.
695
+ * Otherwise, it is not modified.
696
+ * The input offset may be the same as the string length.
697
+ * "Unsafe" macro, assumes well-formed UTF-16.
698
+ *
699
+ * @param s const UChar * string
700
+ * @param i string offset
701
+ * @see U16_SET_CP_LIMIT
702
+ * @stable ICU 2.4
703
+ */
704
+ #define U16_SET_CP_LIMIT_UNSAFE(s, i) UPRV_BLOCK_MACRO_BEGIN { \
705
+ if(U16_IS_LEAD((s)[(i)-1])) { \
706
+ ++(i); \
707
+ } \
708
+ } UPRV_BLOCK_MACRO_END
709
+
710
+ /**
711
+ * Adjust a random-access offset to a code point boundary after a code point.
712
+ * If the offset is behind the lead surrogate of a surrogate pair,
713
+ * then the offset is incremented.
714
+ * Otherwise, it is not modified.
715
+ * The input offset may be the same as the string length.
716
+ * "Safe" macro, handles unpaired surrogates and checks for string boundaries.
717
+ *
718
+ * The length can be negative for a NUL-terminated string.
719
+ *
720
+ * @param s const UChar * string
721
+ * @param start int32_t starting string offset (usually 0)
722
+ * @param i int32_t string offset, start<=i<=length
723
+ * @param length int32_t string length
724
+ * @see U16_SET_CP_LIMIT_UNSAFE
725
+ * @stable ICU 2.4
726
+ */
727
+ #define U16_SET_CP_LIMIT(s, start, i, length) UPRV_BLOCK_MACRO_BEGIN { \
728
+ if((start)<(i) && ((i)<(length) || (length)<0) && U16_IS_LEAD((s)[(i)-1]) && U16_IS_TRAIL((s)[i])) { \
729
+ ++(i); \
730
+ } \
731
+ } UPRV_BLOCK_MACRO_END
732
+
733
+ #endif