@coana-tech/cli 14.12.76 → 14.12.78
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.
- package/cli.mjs +1 -1
- package/package.json +1 -1
- package/reachability-analyzers-cli.mjs +1 -2
- package/repos/coana-tech/alucard/alucard.jar +0 -0
- package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/cli.mjs +24669 -0
- package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/node-addon-api/LICENSE.md +9 -0
- package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/node-addon-api/README.md +95 -0
- package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/node-addon-api/common.gypi +21 -0
- package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/node-addon-api/except.gypi +25 -0
- package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/node-addon-api/index.js +14 -0
- package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/node-addon-api/napi-inl.deprecated.h +186 -0
- package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/node-addon-api/napi-inl.h +6941 -0
- package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/node-addon-api/napi.h +3295 -0
- package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/node-addon-api/node_addon_api.gyp +42 -0
- package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/node-addon-api/node_api.gyp +9 -0
- package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/node-addon-api/noexcept.gypi +26 -0
- package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/node-addon-api/nothing.c +0 -0
- package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/node-addon-api/package-support.json +21 -0
- package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/node-addon-api/package.json +480 -0
- package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/node-addon-api/tools/README.md +73 -0
- package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/node-addon-api/tools/check-napi.js +99 -0
- package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/node-addon-api/tools/clang-format.js +71 -0
- package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/node-addon-api/tools/conversion.js +301 -0
- package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/node-gyp-build/LICENSE +21 -0
- package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/node-gyp-build/README.md +58 -0
- package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/node-gyp-build/SECURITY.md +5 -0
- package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/node-gyp-build/bin.js +84 -0
- package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/node-gyp-build/build-test.js +19 -0
- package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/node-gyp-build/index.js +6 -0
- package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/node-gyp-build/node-gyp-build.js +207 -0
- package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/node-gyp-build/optional.js +7 -0
- package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/node-gyp-build/package.json +43 -0
- package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/LICENSE +21 -0
- package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/README.md +128 -0
- package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/binding.gyp +80 -0
- package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/index.js +919 -0
- package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/node_modules/.bin/node-gyp-build +16 -0
- package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/node_modules/.bin/node-gyp-build-optional +16 -0
- package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/node_modules/.bin/node-gyp-build-test +16 -0
- package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/package.json +76 -0
- package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/prebuilds/darwin-arm64/tree-sitter.node +0 -0
- package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/prebuilds/darwin-x64/tree-sitter.node +0 -0
- package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/prebuilds/linux-arm64/tree-sitter.node +0 -0
- package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/prebuilds/linux-x64/tree-sitter.node +0 -0
- package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/prebuilds/win32-arm64/tree-sitter.node +0 -0
- package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/prebuilds/win32-x64/tree-sitter.node +0 -0
- package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/src/addon_data.h +47 -0
- package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/src/binding.cc +35 -0
- package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/src/conversions.cc +140 -0
- package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/src/conversions.h +22 -0
- package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/src/language.cc +106 -0
- package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/src/language.h +17 -0
- package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/src/logger.cc +70 -0
- package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/src/logger.h +19 -0
- package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/src/lookaheaditerator.cc +122 -0
- package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/src/lookaheaditerator.h +33 -0
- package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/src/node.cc +1088 -0
- package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/src/node.h +30 -0
- package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/src/parser.cc +306 -0
- package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/src/parser.h +35 -0
- package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/src/query.cc +397 -0
- package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/src/query.h +40 -0
- package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/src/tree.cc +316 -0
- package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/src/tree.h +45 -0
- package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/src/tree_cursor.cc +213 -0
- package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/src/tree_cursor.h +52 -0
- package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/tree-sitter.d.ts +1042 -0
- 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
- package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/vendor/tree-sitter/lib/src/alloc.c +48 -0
- package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/vendor/tree-sitter/lib/src/alloc.h +41 -0
- package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/vendor/tree-sitter/lib/src/array.h +291 -0
- package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/vendor/tree-sitter/lib/src/atomic.h +68 -0
- package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/vendor/tree-sitter/lib/src/clock.h +146 -0
- 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
- 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
- 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
- package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/vendor/tree-sitter/lib/src/host.h +21 -0
- package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/vendor/tree-sitter/lib/src/language.c +223 -0
- package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/vendor/tree-sitter/lib/src/language.h +297 -0
- package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/vendor/tree-sitter/lib/src/length.h +52 -0
- package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/vendor/tree-sitter/lib/src/lexer.c +435 -0
- package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/vendor/tree-sitter/lib/src/lexer.h +49 -0
- package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/vendor/tree-sitter/lib/src/lib.c +12 -0
- package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/vendor/tree-sitter/lib/src/node.c +920 -0
- package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/vendor/tree-sitter/lib/src/parser.c +2165 -0
- package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/vendor/tree-sitter/lib/src/parser.h +266 -0
- package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/vendor/tree-sitter/lib/src/point.h +62 -0
- 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
- package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/vendor/tree-sitter/lib/src/query.c +4187 -0
- 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
- 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
- package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/vendor/tree-sitter/lib/src/stack.c +899 -0
- package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/vendor/tree-sitter/lib/src/stack.h +130 -0
- package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/vendor/tree-sitter/lib/src/subtree.c +1066 -0
- package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/vendor/tree-sitter/lib/src/subtree.h +399 -0
- package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/vendor/tree-sitter/lib/src/tree.c +170 -0
- package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/vendor/tree-sitter/lib/src/tree.h +31 -0
- 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
- 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
- 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
- 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
- package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode/LICENSE +414 -0
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode.h +83 -0
- 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
- 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
- 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
- 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
- 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
- package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter-ruby/LICENSE +22 -0
- package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter-ruby/README.md +21 -0
- package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter-ruby/binding.gyp +30 -0
- package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter-ruby/bindings/node/binding.cc +20 -0
- package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter-ruby/bindings/node/binding_test.js +9 -0
- package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter-ruby/bindings/node/index.d.ts +28 -0
- package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter-ruby/bindings/node/index.js +11 -0
- package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter-ruby/grammar.js +1281 -0
- package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter-ruby/node_modules/.bin/node-gyp-build +16 -0
- 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
- 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
- package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter-ruby/package.json +77 -0
- 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
- 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
- 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
- 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
- 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
- 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
- package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter-ruby/queries/highlights.scm +154 -0
- package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter-ruby/queries/locals.scm +27 -0
- package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter-ruby/queries/tags.scm +64 -0
- package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter-ruby/src/grammar.json +8364 -0
- package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter-ruby/src/node-types.json +4108 -0
- package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter-ruby/src/parser.c +471247 -0
- package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter-ruby/src/scanner.c +1107 -0
- package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter-ruby/src/tree_sitter/alloc.h +54 -0
- package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter-ruby/src/tree_sitter/array.h +290 -0
- package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter-ruby/src/tree_sitter/parser.h +266 -0
- package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter-ruby/tree-sitter-ruby.wasm +0 -0
- package/repos/coana-tech/callgraph-reachability-analyzers/packages/cli/dist/bundle/node_modules/tree-sitter-ruby/tree-sitter.json +46 -0
- package/repos/coana-tech/goana/bin/goana-darwin-amd64.gz +0 -0
- package/repos/coana-tech/goana/bin/goana-darwin-arm64.gz +0 -0
- package/repos/coana-tech/goana/bin/goana-linux-amd64.gz +0 -0
- package/repos/coana-tech/goana/bin/goana-linux-arm64.gz +0 -0
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
#include "./language.h"
|
|
2
|
+
#include "./wasm_store.h"
|
|
3
|
+
#include "tree_sitter/api.h"
|
|
4
|
+
#include <string.h>
|
|
5
|
+
|
|
6
|
+
const TSLanguage *ts_language_copy(const TSLanguage *self) {
|
|
7
|
+
if (self && ts_language_is_wasm(self)) {
|
|
8
|
+
ts_wasm_language_retain(self);
|
|
9
|
+
}
|
|
10
|
+
return self;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
void ts_language_delete(const TSLanguage *self) {
|
|
14
|
+
if (self && ts_language_is_wasm(self)) {
|
|
15
|
+
ts_wasm_language_release(self);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
uint32_t ts_language_symbol_count(const TSLanguage *self) {
|
|
20
|
+
return self->symbol_count + self->alias_count;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
uint32_t ts_language_state_count(const TSLanguage *self) {
|
|
24
|
+
return self->state_count;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
uint32_t ts_language_version(const TSLanguage *self) {
|
|
28
|
+
return self->version;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
uint32_t ts_language_field_count(const TSLanguage *self) {
|
|
32
|
+
return self->field_count;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
void ts_language_table_entry(
|
|
36
|
+
const TSLanguage *self,
|
|
37
|
+
TSStateId state,
|
|
38
|
+
TSSymbol symbol,
|
|
39
|
+
TableEntry *result
|
|
40
|
+
) {
|
|
41
|
+
if (symbol == ts_builtin_sym_error || symbol == ts_builtin_sym_error_repeat) {
|
|
42
|
+
result->action_count = 0;
|
|
43
|
+
result->is_reusable = false;
|
|
44
|
+
result->actions = NULL;
|
|
45
|
+
} else {
|
|
46
|
+
ts_assert(symbol < self->token_count);
|
|
47
|
+
uint32_t action_index = ts_language_lookup(self, state, symbol);
|
|
48
|
+
const TSParseActionEntry *entry = &self->parse_actions[action_index];
|
|
49
|
+
result->action_count = entry->entry.count;
|
|
50
|
+
result->is_reusable = entry->entry.reusable;
|
|
51
|
+
result->actions = (const TSParseAction *)(entry + 1);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
TSSymbolMetadata ts_language_symbol_metadata(
|
|
56
|
+
const TSLanguage *self,
|
|
57
|
+
TSSymbol symbol
|
|
58
|
+
) {
|
|
59
|
+
if (symbol == ts_builtin_sym_error) {
|
|
60
|
+
return (TSSymbolMetadata) {.visible = true, .named = true};
|
|
61
|
+
} else if (symbol == ts_builtin_sym_error_repeat) {
|
|
62
|
+
return (TSSymbolMetadata) {.visible = false, .named = false};
|
|
63
|
+
} else {
|
|
64
|
+
return self->symbol_metadata[symbol];
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
TSSymbol ts_language_public_symbol(
|
|
69
|
+
const TSLanguage *self,
|
|
70
|
+
TSSymbol symbol
|
|
71
|
+
) {
|
|
72
|
+
if (symbol == ts_builtin_sym_error) return symbol;
|
|
73
|
+
return self->public_symbol_map[symbol];
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
TSStateId ts_language_next_state(
|
|
77
|
+
const TSLanguage *self,
|
|
78
|
+
TSStateId state,
|
|
79
|
+
TSSymbol symbol
|
|
80
|
+
) {
|
|
81
|
+
if (symbol == ts_builtin_sym_error || symbol == ts_builtin_sym_error_repeat) {
|
|
82
|
+
return 0;
|
|
83
|
+
} else if (symbol < self->token_count) {
|
|
84
|
+
uint32_t count;
|
|
85
|
+
const TSParseAction *actions = ts_language_actions(self, state, symbol, &count);
|
|
86
|
+
if (count > 0) {
|
|
87
|
+
TSParseAction action = actions[count - 1];
|
|
88
|
+
if (action.type == TSParseActionTypeShift) {
|
|
89
|
+
return action.shift.extra ? state : action.shift.state;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
return 0;
|
|
93
|
+
} else {
|
|
94
|
+
return ts_language_lookup(self, state, symbol);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
const char *ts_language_symbol_name(
|
|
99
|
+
const TSLanguage *self,
|
|
100
|
+
TSSymbol symbol
|
|
101
|
+
) {
|
|
102
|
+
if (symbol == ts_builtin_sym_error) {
|
|
103
|
+
return "ERROR";
|
|
104
|
+
} else if (symbol == ts_builtin_sym_error_repeat) {
|
|
105
|
+
return "_ERROR";
|
|
106
|
+
} else if (symbol < ts_language_symbol_count(self)) {
|
|
107
|
+
return self->symbol_names[symbol];
|
|
108
|
+
} else {
|
|
109
|
+
return NULL;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
TSSymbol ts_language_symbol_for_name(
|
|
114
|
+
const TSLanguage *self,
|
|
115
|
+
const char *string,
|
|
116
|
+
uint32_t length,
|
|
117
|
+
bool is_named
|
|
118
|
+
) {
|
|
119
|
+
if (!strncmp(string, "ERROR", length)) return ts_builtin_sym_error;
|
|
120
|
+
uint16_t count = (uint16_t)ts_language_symbol_count(self);
|
|
121
|
+
for (TSSymbol i = 0; i < count; i++) {
|
|
122
|
+
TSSymbolMetadata metadata = ts_language_symbol_metadata(self, i);
|
|
123
|
+
if ((!metadata.visible && !metadata.supertype) || metadata.named != is_named) continue;
|
|
124
|
+
const char *symbol_name = self->symbol_names[i];
|
|
125
|
+
if (!strncmp(symbol_name, string, length) && !symbol_name[length]) {
|
|
126
|
+
return self->public_symbol_map[i];
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
return 0;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
TSSymbolType ts_language_symbol_type(
|
|
133
|
+
const TSLanguage *self,
|
|
134
|
+
TSSymbol symbol
|
|
135
|
+
) {
|
|
136
|
+
TSSymbolMetadata metadata = ts_language_symbol_metadata(self, symbol);
|
|
137
|
+
if (metadata.named && metadata.visible) {
|
|
138
|
+
return TSSymbolTypeRegular;
|
|
139
|
+
} else if (metadata.visible) {
|
|
140
|
+
return TSSymbolTypeAnonymous;
|
|
141
|
+
} else if (metadata.supertype) {
|
|
142
|
+
return TSSymbolTypeSupertype;
|
|
143
|
+
} else {
|
|
144
|
+
return TSSymbolTypeAuxiliary;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
const char *ts_language_field_name_for_id(
|
|
149
|
+
const TSLanguage *self,
|
|
150
|
+
TSFieldId id
|
|
151
|
+
) {
|
|
152
|
+
uint32_t count = ts_language_field_count(self);
|
|
153
|
+
if (count && id <= count) {
|
|
154
|
+
return self->field_names[id];
|
|
155
|
+
} else {
|
|
156
|
+
return NULL;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
TSFieldId ts_language_field_id_for_name(
|
|
161
|
+
const TSLanguage *self,
|
|
162
|
+
const char *name,
|
|
163
|
+
uint32_t name_length
|
|
164
|
+
) {
|
|
165
|
+
uint16_t count = (uint16_t)ts_language_field_count(self);
|
|
166
|
+
for (TSSymbol i = 1; i < count + 1; i++) {
|
|
167
|
+
switch (strncmp(name, self->field_names[i], name_length)) {
|
|
168
|
+
case 0:
|
|
169
|
+
if (self->field_names[i][name_length] == 0) return i;
|
|
170
|
+
break;
|
|
171
|
+
case -1:
|
|
172
|
+
return 0;
|
|
173
|
+
default:
|
|
174
|
+
break;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
return 0;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
TSLookaheadIterator *ts_lookahead_iterator_new(const TSLanguage *self, TSStateId state) {
|
|
181
|
+
if (state >= self->state_count) return NULL;
|
|
182
|
+
LookaheadIterator *iterator = ts_malloc(sizeof(LookaheadIterator));
|
|
183
|
+
*iterator = ts_language_lookaheads(self, state);
|
|
184
|
+
return (TSLookaheadIterator *)iterator;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
void ts_lookahead_iterator_delete(TSLookaheadIterator *self) {
|
|
188
|
+
ts_free(self);
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
bool ts_lookahead_iterator_reset_state(TSLookaheadIterator * self, TSStateId state) {
|
|
192
|
+
LookaheadIterator *iterator = (LookaheadIterator *)self;
|
|
193
|
+
if (state >= iterator->language->state_count) return false;
|
|
194
|
+
*iterator = ts_language_lookaheads(iterator->language, state);
|
|
195
|
+
return true;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
const TSLanguage *ts_lookahead_iterator_language(const TSLookaheadIterator *self) {
|
|
199
|
+
const LookaheadIterator *iterator = (const LookaheadIterator *)self;
|
|
200
|
+
return iterator->language;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
bool ts_lookahead_iterator_reset(TSLookaheadIterator *self, const TSLanguage *language, TSStateId state) {
|
|
204
|
+
if (state >= language->state_count) return false;
|
|
205
|
+
LookaheadIterator *iterator = (LookaheadIterator *)self;
|
|
206
|
+
*iterator = ts_language_lookaheads(language, state);
|
|
207
|
+
return true;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
bool ts_lookahead_iterator_next(TSLookaheadIterator *self) {
|
|
211
|
+
LookaheadIterator *iterator = (LookaheadIterator *)self;
|
|
212
|
+
return ts_lookahead_iterator__next(iterator);
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
TSSymbol ts_lookahead_iterator_current_symbol(const TSLookaheadIterator *self) {
|
|
216
|
+
const LookaheadIterator *iterator = (const LookaheadIterator *)self;
|
|
217
|
+
return iterator->symbol;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
const char *ts_lookahead_iterator_current_symbol_name(const TSLookaheadIterator *self) {
|
|
221
|
+
const LookaheadIterator *iterator = (const LookaheadIterator *)self;
|
|
222
|
+
return ts_language_symbol_name(iterator->language, iterator->symbol);
|
|
223
|
+
}
|
|
@@ -0,0 +1,297 @@
|
|
|
1
|
+
#ifndef TREE_SITTER_LANGUAGE_H_
|
|
2
|
+
#define TREE_SITTER_LANGUAGE_H_
|
|
3
|
+
|
|
4
|
+
#ifdef __cplusplus
|
|
5
|
+
extern "C" {
|
|
6
|
+
#endif
|
|
7
|
+
|
|
8
|
+
#include "./subtree.h"
|
|
9
|
+
#include "./parser.h"
|
|
10
|
+
|
|
11
|
+
#define ts_builtin_sym_error_repeat (ts_builtin_sym_error - 1)
|
|
12
|
+
|
|
13
|
+
#define LANGUAGE_VERSION_WITH_PRIMARY_STATES 14
|
|
14
|
+
#define LANGUAGE_VERSION_USABLE_VIA_WASM 13
|
|
15
|
+
|
|
16
|
+
typedef struct {
|
|
17
|
+
const TSParseAction *actions;
|
|
18
|
+
uint32_t action_count;
|
|
19
|
+
bool is_reusable;
|
|
20
|
+
} TableEntry;
|
|
21
|
+
|
|
22
|
+
typedef struct {
|
|
23
|
+
const TSLanguage *language;
|
|
24
|
+
const uint16_t *data;
|
|
25
|
+
const uint16_t *group_end;
|
|
26
|
+
TSStateId state;
|
|
27
|
+
uint16_t table_value;
|
|
28
|
+
uint16_t section_index;
|
|
29
|
+
uint16_t group_count;
|
|
30
|
+
bool is_small_state;
|
|
31
|
+
|
|
32
|
+
const TSParseAction *actions;
|
|
33
|
+
TSSymbol symbol;
|
|
34
|
+
TSStateId next_state;
|
|
35
|
+
uint16_t action_count;
|
|
36
|
+
} LookaheadIterator;
|
|
37
|
+
|
|
38
|
+
void ts_language_table_entry(const TSLanguage *self, TSStateId state, TSSymbol symbol, TableEntry *result);
|
|
39
|
+
|
|
40
|
+
TSSymbolMetadata ts_language_symbol_metadata(const TSLanguage *self, TSSymbol symbol);
|
|
41
|
+
|
|
42
|
+
TSSymbol ts_language_public_symbol(const TSLanguage *self, TSSymbol symbol);
|
|
43
|
+
|
|
44
|
+
static inline bool ts_language_is_symbol_external(const TSLanguage *self, TSSymbol symbol) {
|
|
45
|
+
return 0 < symbol && symbol < self->external_token_count + 1;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
static inline const TSParseAction *ts_language_actions(
|
|
49
|
+
const TSLanguage *self,
|
|
50
|
+
TSStateId state,
|
|
51
|
+
TSSymbol symbol,
|
|
52
|
+
uint32_t *count
|
|
53
|
+
) {
|
|
54
|
+
TableEntry entry;
|
|
55
|
+
ts_language_table_entry(self, state, symbol, &entry);
|
|
56
|
+
*count = entry.action_count;
|
|
57
|
+
return entry.actions;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
static inline bool ts_language_has_reduce_action(
|
|
61
|
+
const TSLanguage *self,
|
|
62
|
+
TSStateId state,
|
|
63
|
+
TSSymbol symbol
|
|
64
|
+
) {
|
|
65
|
+
TableEntry entry;
|
|
66
|
+
ts_language_table_entry(self, state, symbol, &entry);
|
|
67
|
+
return entry.action_count > 0 && entry.actions[0].type == TSParseActionTypeReduce;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// Lookup the table value for a given symbol and state.
|
|
71
|
+
//
|
|
72
|
+
// For non-terminal symbols, the table value represents a successor state.
|
|
73
|
+
// For terminal symbols, it represents an index in the actions table.
|
|
74
|
+
// For 'large' parse states, this is a direct lookup. For 'small' parse
|
|
75
|
+
// states, this requires searching through the symbol groups to find
|
|
76
|
+
// the given symbol.
|
|
77
|
+
static inline uint16_t ts_language_lookup(
|
|
78
|
+
const TSLanguage *self,
|
|
79
|
+
TSStateId state,
|
|
80
|
+
TSSymbol symbol
|
|
81
|
+
) {
|
|
82
|
+
if (state >= self->large_state_count) {
|
|
83
|
+
uint32_t index = self->small_parse_table_map[state - self->large_state_count];
|
|
84
|
+
const uint16_t *data = &self->small_parse_table[index];
|
|
85
|
+
uint16_t group_count = *(data++);
|
|
86
|
+
for (unsigned i = 0; i < group_count; i++) {
|
|
87
|
+
uint16_t section_value = *(data++);
|
|
88
|
+
uint16_t symbol_count = *(data++);
|
|
89
|
+
for (unsigned j = 0; j < symbol_count; j++) {
|
|
90
|
+
if (*(data++) == symbol) return section_value;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
return 0;
|
|
94
|
+
} else {
|
|
95
|
+
return self->parse_table[state * self->symbol_count + symbol];
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
static inline bool ts_language_has_actions(
|
|
100
|
+
const TSLanguage *self,
|
|
101
|
+
TSStateId state,
|
|
102
|
+
TSSymbol symbol
|
|
103
|
+
) {
|
|
104
|
+
return ts_language_lookup(self, state, symbol) != 0;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
// Iterate over all of the symbols that are valid in the given state.
|
|
108
|
+
//
|
|
109
|
+
// For 'large' parse states, this just requires iterating through
|
|
110
|
+
// all possible symbols and checking the parse table for each one.
|
|
111
|
+
// For 'small' parse states, this exploits the structure of the
|
|
112
|
+
// table to only visit the valid symbols.
|
|
113
|
+
static inline LookaheadIterator ts_language_lookaheads(
|
|
114
|
+
const TSLanguage *self,
|
|
115
|
+
TSStateId state
|
|
116
|
+
) {
|
|
117
|
+
bool is_small_state = state >= self->large_state_count;
|
|
118
|
+
const uint16_t *data;
|
|
119
|
+
const uint16_t *group_end = NULL;
|
|
120
|
+
uint16_t group_count = 0;
|
|
121
|
+
if (is_small_state) {
|
|
122
|
+
uint32_t index = self->small_parse_table_map[state - self->large_state_count];
|
|
123
|
+
data = &self->small_parse_table[index];
|
|
124
|
+
group_end = data + 1;
|
|
125
|
+
group_count = *data;
|
|
126
|
+
} else {
|
|
127
|
+
data = &self->parse_table[state * self->symbol_count] - 1;
|
|
128
|
+
}
|
|
129
|
+
return (LookaheadIterator) {
|
|
130
|
+
.language = self,
|
|
131
|
+
.data = data,
|
|
132
|
+
.group_end = group_end,
|
|
133
|
+
.group_count = group_count,
|
|
134
|
+
.is_small_state = is_small_state,
|
|
135
|
+
.symbol = UINT16_MAX,
|
|
136
|
+
.next_state = 0,
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
static inline bool ts_lookahead_iterator__next(LookaheadIterator *self) {
|
|
141
|
+
// For small parse states, valid symbols are listed explicitly,
|
|
142
|
+
// grouped by their value. There's no need to look up the actions
|
|
143
|
+
// again until moving to the next group.
|
|
144
|
+
if (self->is_small_state) {
|
|
145
|
+
self->data++;
|
|
146
|
+
if (self->data == self->group_end) {
|
|
147
|
+
if (self->group_count == 0) return false;
|
|
148
|
+
self->group_count--;
|
|
149
|
+
self->table_value = *(self->data++);
|
|
150
|
+
unsigned symbol_count = *(self->data++);
|
|
151
|
+
self->group_end = self->data + symbol_count;
|
|
152
|
+
self->symbol = *self->data;
|
|
153
|
+
} else {
|
|
154
|
+
self->symbol = *self->data;
|
|
155
|
+
return true;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
// For large parse states, iterate through every symbol until one
|
|
160
|
+
// is found that has valid actions.
|
|
161
|
+
else {
|
|
162
|
+
do {
|
|
163
|
+
self->data++;
|
|
164
|
+
self->symbol++;
|
|
165
|
+
if (self->symbol >= self->language->symbol_count) return false;
|
|
166
|
+
self->table_value = *self->data;
|
|
167
|
+
} while (!self->table_value);
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
// Depending on if the symbols is terminal or non-terminal, the table value either
|
|
171
|
+
// represents a list of actions or a successor state.
|
|
172
|
+
if (self->symbol < self->language->token_count) {
|
|
173
|
+
const TSParseActionEntry *entry = &self->language->parse_actions[self->table_value];
|
|
174
|
+
self->action_count = entry->entry.count;
|
|
175
|
+
self->actions = (const TSParseAction *)(entry + 1);
|
|
176
|
+
self->next_state = 0;
|
|
177
|
+
} else {
|
|
178
|
+
self->action_count = 0;
|
|
179
|
+
self->next_state = self->table_value;
|
|
180
|
+
}
|
|
181
|
+
return true;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
// Whether the state is a "primary state". If this returns false, it indicates that there exists
|
|
185
|
+
// another state that behaves identically to this one with respect to query analysis.
|
|
186
|
+
static inline bool ts_language_state_is_primary(
|
|
187
|
+
const TSLanguage *self,
|
|
188
|
+
TSStateId state
|
|
189
|
+
) {
|
|
190
|
+
if (self->version >= LANGUAGE_VERSION_WITH_PRIMARY_STATES) {
|
|
191
|
+
return state == self->primary_state_ids[state];
|
|
192
|
+
} else {
|
|
193
|
+
return true;
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
static inline const bool *ts_language_enabled_external_tokens(
|
|
198
|
+
const TSLanguage *self,
|
|
199
|
+
unsigned external_scanner_state
|
|
200
|
+
) {
|
|
201
|
+
if (external_scanner_state == 0) {
|
|
202
|
+
return NULL;
|
|
203
|
+
} else {
|
|
204
|
+
return self->external_scanner.states + self->external_token_count * external_scanner_state;
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
static inline const TSSymbol *ts_language_alias_sequence(
|
|
209
|
+
const TSLanguage *self,
|
|
210
|
+
uint32_t production_id
|
|
211
|
+
) {
|
|
212
|
+
return production_id ?
|
|
213
|
+
&self->alias_sequences[production_id * self->max_alias_sequence_length] :
|
|
214
|
+
NULL;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
static inline TSSymbol ts_language_alias_at(
|
|
218
|
+
const TSLanguage *self,
|
|
219
|
+
uint32_t production_id,
|
|
220
|
+
uint32_t child_index
|
|
221
|
+
) {
|
|
222
|
+
return production_id ?
|
|
223
|
+
self->alias_sequences[production_id * self->max_alias_sequence_length + child_index] :
|
|
224
|
+
0;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
static inline void ts_language_field_map(
|
|
228
|
+
const TSLanguage *self,
|
|
229
|
+
uint32_t production_id,
|
|
230
|
+
const TSFieldMapEntry **start,
|
|
231
|
+
const TSFieldMapEntry **end
|
|
232
|
+
) {
|
|
233
|
+
if (self->field_count == 0) {
|
|
234
|
+
*start = NULL;
|
|
235
|
+
*end = NULL;
|
|
236
|
+
return;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
TSFieldMapSlice slice = self->field_map_slices[production_id];
|
|
240
|
+
*start = &self->field_map_entries[slice.index];
|
|
241
|
+
*end = &self->field_map_entries[slice.index] + slice.length;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
static inline void ts_language_aliases_for_symbol(
|
|
245
|
+
const TSLanguage *self,
|
|
246
|
+
TSSymbol original_symbol,
|
|
247
|
+
const TSSymbol **start,
|
|
248
|
+
const TSSymbol **end
|
|
249
|
+
) {
|
|
250
|
+
*start = &self->public_symbol_map[original_symbol];
|
|
251
|
+
*end = *start + 1;
|
|
252
|
+
|
|
253
|
+
unsigned idx = 0;
|
|
254
|
+
for (;;) {
|
|
255
|
+
TSSymbol symbol = self->alias_map[idx++];
|
|
256
|
+
if (symbol == 0 || symbol > original_symbol) break;
|
|
257
|
+
uint16_t count = self->alias_map[idx++];
|
|
258
|
+
if (symbol == original_symbol) {
|
|
259
|
+
*start = &self->alias_map[idx];
|
|
260
|
+
*end = &self->alias_map[idx + count];
|
|
261
|
+
break;
|
|
262
|
+
}
|
|
263
|
+
idx += count;
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
static inline void ts_language_write_symbol_as_dot_string(
|
|
268
|
+
const TSLanguage *self,
|
|
269
|
+
FILE *f,
|
|
270
|
+
TSSymbol symbol
|
|
271
|
+
) {
|
|
272
|
+
const char *name = ts_language_symbol_name(self, symbol);
|
|
273
|
+
for (const char *chr = name; *chr; chr++) {
|
|
274
|
+
switch (*chr) {
|
|
275
|
+
case '"':
|
|
276
|
+
case '\\':
|
|
277
|
+
fputc('\\', f);
|
|
278
|
+
fputc(*chr, f);
|
|
279
|
+
break;
|
|
280
|
+
case '\n':
|
|
281
|
+
fputs("\\n", f);
|
|
282
|
+
break;
|
|
283
|
+
case '\t':
|
|
284
|
+
fputs("\\t", f);
|
|
285
|
+
break;
|
|
286
|
+
default:
|
|
287
|
+
fputc(*chr, f);
|
|
288
|
+
break;
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
#ifdef __cplusplus
|
|
294
|
+
}
|
|
295
|
+
#endif
|
|
296
|
+
|
|
297
|
+
#endif // TREE_SITTER_LANGUAGE_H_
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
#ifndef TREE_SITTER_LENGTH_H_
|
|
2
|
+
#define TREE_SITTER_LENGTH_H_
|
|
3
|
+
|
|
4
|
+
#include <stdlib.h>
|
|
5
|
+
#include <stdbool.h>
|
|
6
|
+
#include "./point.h"
|
|
7
|
+
#include "tree_sitter/api.h"
|
|
8
|
+
|
|
9
|
+
typedef struct {
|
|
10
|
+
uint32_t bytes;
|
|
11
|
+
TSPoint extent;
|
|
12
|
+
} Length;
|
|
13
|
+
|
|
14
|
+
static const Length LENGTH_UNDEFINED = {0, {0, 1}};
|
|
15
|
+
static const Length LENGTH_MAX = {UINT32_MAX, {UINT32_MAX, UINT32_MAX}};
|
|
16
|
+
|
|
17
|
+
static inline bool length_is_undefined(Length length) {
|
|
18
|
+
return length.bytes == 0 && length.extent.column != 0;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
static inline Length length_min(Length len1, Length len2) {
|
|
22
|
+
return (len1.bytes < len2.bytes) ? len1 : len2;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
static inline Length length_add(Length len1, Length len2) {
|
|
26
|
+
Length result;
|
|
27
|
+
result.bytes = len1.bytes + len2.bytes;
|
|
28
|
+
result.extent = point_add(len1.extent, len2.extent);
|
|
29
|
+
return result;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
static inline Length length_sub(Length len1, Length len2) {
|
|
33
|
+
Length result;
|
|
34
|
+
result.bytes = len1.bytes - len2.bytes;
|
|
35
|
+
result.extent = point_sub(len1.extent, len2.extent);
|
|
36
|
+
return result;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
static inline Length length_zero(void) {
|
|
40
|
+
Length result = {0, {0, 0}};
|
|
41
|
+
return result;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
static inline Length length_saturating_sub(Length len1, Length len2) {
|
|
45
|
+
if (len1.bytes > len2.bytes) {
|
|
46
|
+
return length_sub(len1, len2);
|
|
47
|
+
} else {
|
|
48
|
+
return length_zero();
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
#endif
|