@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.
- package/cli.mjs +1 -1
- package/package.json +1 -1
- package/reachability-analyzers-cli.mjs +1 -1
- 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,1042 @@
|
|
|
1
|
+
/** @module */
|
|
2
|
+
declare module "tree-sitter" {
|
|
3
|
+
class Parser {
|
|
4
|
+
/**
|
|
5
|
+
* Parse UTF8 text into a syntax tree.
|
|
6
|
+
*
|
|
7
|
+
* @param input - The text to parse, either as a string or a custom input function
|
|
8
|
+
* that provides text chunks. If providing a function, it should return text chunks
|
|
9
|
+
* based on byte index and position.
|
|
10
|
+
*
|
|
11
|
+
* @param oldTree - An optional previous syntax tree from the same document.
|
|
12
|
+
* If provided and the document has changed, you must first edit this tree using
|
|
13
|
+
* {@link Parser.Tree.edit} to match the new text.
|
|
14
|
+
*
|
|
15
|
+
* @param options - Optional parsing settings:
|
|
16
|
+
* - bufferSize: Size of internal parsing buffer
|
|
17
|
+
* - includedRanges: Array of ranges to parse within the input
|
|
18
|
+
*
|
|
19
|
+
* @returns A syntax tree representing the parsed text
|
|
20
|
+
*
|
|
21
|
+
* @throws May return null or fail if:
|
|
22
|
+
* - No language has been set via {@link Parser.setLanguage}
|
|
23
|
+
* - The parsing timeout (set via {@link Parser.setTimeoutMicros}) was reached
|
|
24
|
+
* - Parsing was cancelled via cancellation flag
|
|
25
|
+
*/
|
|
26
|
+
parse(input: string | Parser.Input, oldTree?: Parser.Tree | null, options?: Parser.Options): Parser.Tree;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Get the ranges of text that the parser will include when parsing.
|
|
30
|
+
*
|
|
31
|
+
* @returns An array of ranges that will be included in parsing
|
|
32
|
+
*/
|
|
33
|
+
getIncludedRanges(): Parser.Range[];
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Get the duration in microseconds that parsing is allowed to take.
|
|
37
|
+
*
|
|
38
|
+
* This timeout can be set via {@link Parser.setTimeoutMicros}.
|
|
39
|
+
*
|
|
40
|
+
* @returns The parsing timeout in microseconds
|
|
41
|
+
*/
|
|
42
|
+
getTimeoutMicros(): number;
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Set the maximum duration that parsing is allowed to take before halting.
|
|
46
|
+
*
|
|
47
|
+
* If parsing takes longer than this, it will halt early, returning null.
|
|
48
|
+
*
|
|
49
|
+
* @param timeout - The maximum parsing duration in microseconds
|
|
50
|
+
*/
|
|
51
|
+
setTimeoutMicros(timeout: number): void;
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Instruct the parser to start the next parse from the beginning.
|
|
55
|
+
*
|
|
56
|
+
* If the parser previously failed because of a timeout or cancellation,
|
|
57
|
+
* it will resume where it left off on the next parse by default.
|
|
58
|
+
* Call this method if you want to parse a different document instead
|
|
59
|
+
* of resuming.
|
|
60
|
+
*/
|
|
61
|
+
reset(): void;
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Get the parser's current language
|
|
65
|
+
*/
|
|
66
|
+
getLanguage(): Parser.Language;
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Set the language that the parser should use for parsing.
|
|
70
|
+
*
|
|
71
|
+
* The language must be compatible with the version of tree-sitter
|
|
72
|
+
* being used. A version mismatch will prevent the language from
|
|
73
|
+
* being assigned successfully.
|
|
74
|
+
*
|
|
75
|
+
* @param language - The language to use for parsing
|
|
76
|
+
*/
|
|
77
|
+
setLanguage(language?: Parser.Language): void;
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Get the parser's current logger
|
|
81
|
+
*
|
|
82
|
+
* @returns The current logging callback
|
|
83
|
+
*/
|
|
84
|
+
getLogger(): Parser.Logger;
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Set the logging callback that the parser should use during parsing.
|
|
88
|
+
*
|
|
89
|
+
* @param logFunc - The logging callback to use, or null/false to disable logging
|
|
90
|
+
*/
|
|
91
|
+
setLogger(logFunc?: Parser.Logger | string | false | null): void;
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Set the destination to which the parser should write debugging graphs during parsing.
|
|
95
|
+
*
|
|
96
|
+
* The graphs are formatted in the DOT language. You may want to pipe these graphs
|
|
97
|
+
* directly to a 'dot' process to generate SVG output.
|
|
98
|
+
*
|
|
99
|
+
* @param enabled - Whether to enable or disable graph output
|
|
100
|
+
* @param fd - Optional file descriptor for the output
|
|
101
|
+
*/
|
|
102
|
+
printDotGraphs(enabled?: boolean, fd?: number): void;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
namespace Parser {
|
|
106
|
+
/** Configuration options for parsing */
|
|
107
|
+
export type Options = {
|
|
108
|
+
/** Size of the internal parsing buffer */
|
|
109
|
+
bufferSize?: number;
|
|
110
|
+
|
|
111
|
+
/** Array of ranges to include when parsing the input */
|
|
112
|
+
includedRanges?: Range[];
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* A position in a multi-line text document, in terms of rows and columns.
|
|
117
|
+
* Both values are zero-based.
|
|
118
|
+
*/
|
|
119
|
+
export type Point = {
|
|
120
|
+
/** Zero-based row number */
|
|
121
|
+
row: number;
|
|
122
|
+
|
|
123
|
+
/** Zero-based column number */
|
|
124
|
+
column: number;
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* A range of positions in a multi-line text document, specified both in
|
|
129
|
+
* terms of byte offsets and row/column positions.
|
|
130
|
+
*/
|
|
131
|
+
export type Range = {
|
|
132
|
+
/** The byte offset of the start of the range */
|
|
133
|
+
startIndex: number;
|
|
134
|
+
|
|
135
|
+
/** The byte offset of the end of the range */
|
|
136
|
+
endIndex: number;
|
|
137
|
+
|
|
138
|
+
/** The row and column where the range starts */
|
|
139
|
+
startPosition: Point;
|
|
140
|
+
|
|
141
|
+
/** The row and column where the range ends */
|
|
142
|
+
endPosition: Point;
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* A summary of a change to a text document
|
|
147
|
+
*/
|
|
148
|
+
export type Edit = {
|
|
149
|
+
/** The byte offset where the edit starts */
|
|
150
|
+
startIndex: number;
|
|
151
|
+
|
|
152
|
+
/** The byte offset where the edit ends in the old document */
|
|
153
|
+
oldEndIndex: number;
|
|
154
|
+
|
|
155
|
+
/** The byte offset where the edit ends in the new document */
|
|
156
|
+
newEndIndex: number;
|
|
157
|
+
|
|
158
|
+
/** The row and column where the edit starts */
|
|
159
|
+
startPosition: Point;
|
|
160
|
+
|
|
161
|
+
/** The row and column where the edit ends in the old document */
|
|
162
|
+
oldEndPosition: Point;
|
|
163
|
+
|
|
164
|
+
/** The row and column where the edit ends in the new document */
|
|
165
|
+
newEndPosition: Point;
|
|
166
|
+
};
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* A callback that receives log messages during parser.
|
|
170
|
+
*
|
|
171
|
+
* @param message - The log message
|
|
172
|
+
* @param params - Parameters associated with the log message
|
|
173
|
+
* @param type - The type of log message
|
|
174
|
+
*/
|
|
175
|
+
export type Logger = (
|
|
176
|
+
message: string,
|
|
177
|
+
params: { [param: string]: string },
|
|
178
|
+
type: "parse" | "lex"
|
|
179
|
+
) => void;
|
|
180
|
+
|
|
181
|
+
/** A function that provides text content for parsing based on byte index and position */
|
|
182
|
+
export interface Input {
|
|
183
|
+
/**
|
|
184
|
+
* Get a chunk of text at the given byte offset.
|
|
185
|
+
*
|
|
186
|
+
* @param index - The byte index into the text
|
|
187
|
+
* @param position - Optional position in the text as {row, column}
|
|
188
|
+
* @returns A string chunk, or null/undefined if no text at this index
|
|
189
|
+
*/
|
|
190
|
+
(index: number, position?: Point): string | null | undefined | {};
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
/** The syntax tree that contains this node */
|
|
194
|
+
export interface SyntaxNode extends Readonly<{
|
|
195
|
+
/** The syntax tree that contains this node */
|
|
196
|
+
tree: Tree;
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* A unique numeric identifier for this node.
|
|
200
|
+
* Within a given syntax tree, no two nodes have the same id.
|
|
201
|
+
* If a new tree is created based on an older tree and reuses
|
|
202
|
+
* a node, that node will have the same id in both trees.
|
|
203
|
+
*/
|
|
204
|
+
id: number;
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* This node's type as a numeric id
|
|
208
|
+
*/
|
|
209
|
+
typeId: number;
|
|
210
|
+
|
|
211
|
+
/**
|
|
212
|
+
* This node's type as a numeric id as it appears in the grammar,
|
|
213
|
+
* ignoring aliases
|
|
214
|
+
*/
|
|
215
|
+
grammarId: number;
|
|
216
|
+
|
|
217
|
+
/**
|
|
218
|
+
* This node's type as a string
|
|
219
|
+
*/
|
|
220
|
+
type: string;
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
* This node's symbol name as it appears in the grammar,
|
|
224
|
+
* ignoring aliases
|
|
225
|
+
*/
|
|
226
|
+
grammarType: string;
|
|
227
|
+
|
|
228
|
+
/**
|
|
229
|
+
* Whether this node is named.
|
|
230
|
+
* Named nodes correspond to named rules in the grammar,
|
|
231
|
+
* whereas anonymous nodes correspond to string literals in the grammar.
|
|
232
|
+
*/
|
|
233
|
+
isNamed: boolean;
|
|
234
|
+
|
|
235
|
+
/**
|
|
236
|
+
* Whether this node is missing.
|
|
237
|
+
* Missing nodes are inserted by the parser in order to
|
|
238
|
+
* recover from certain kinds of syntax errors.
|
|
239
|
+
*/
|
|
240
|
+
isMissing: boolean;
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* Whether this node is extra.
|
|
244
|
+
* Extra nodes represent things like comments, which are not
|
|
245
|
+
* required by the grammar but can appear anywhere.
|
|
246
|
+
*/
|
|
247
|
+
isExtra: boolean;
|
|
248
|
+
|
|
249
|
+
/**
|
|
250
|
+
* Whether this node has been edited
|
|
251
|
+
*/
|
|
252
|
+
hasChanges: boolean;
|
|
253
|
+
|
|
254
|
+
/**
|
|
255
|
+
* Whether this node represents a syntax error or contains
|
|
256
|
+
* any syntax errors within it
|
|
257
|
+
*/
|
|
258
|
+
hasError: boolean;
|
|
259
|
+
|
|
260
|
+
/**
|
|
261
|
+
* Whether this node represents a syntax error.
|
|
262
|
+
* Syntax errors represent parts of the code that could not
|
|
263
|
+
* be incorporated into a valid syntax tree.
|
|
264
|
+
*/
|
|
265
|
+
isError: boolean;
|
|
266
|
+
|
|
267
|
+
/** The text content for this node from the source code */
|
|
268
|
+
text: string;
|
|
269
|
+
|
|
270
|
+
/** The parse state of this node */
|
|
271
|
+
parseState: number;
|
|
272
|
+
|
|
273
|
+
/** The parse state that follows this node */
|
|
274
|
+
nextParseState: number;
|
|
275
|
+
|
|
276
|
+
/** The position where this node starts in terms of rows and columns */
|
|
277
|
+
startPosition: Point;
|
|
278
|
+
|
|
279
|
+
/** The position where this node ends in terms of rows and columns */
|
|
280
|
+
endPosition: Point;
|
|
281
|
+
|
|
282
|
+
/** The byte offset where this node starts */
|
|
283
|
+
startIndex: number;
|
|
284
|
+
|
|
285
|
+
/** The byte offset where this node ends */
|
|
286
|
+
endIndex: number;
|
|
287
|
+
|
|
288
|
+
/**
|
|
289
|
+
* This node's immediate parent.
|
|
290
|
+
* For iterating over ancestors, prefer using {@link childWithDescendant}
|
|
291
|
+
*/
|
|
292
|
+
parent: SyntaxNode | null;
|
|
293
|
+
|
|
294
|
+
/** Array of all child nodes */
|
|
295
|
+
children: ReadonlyArray<SyntaxNode>;
|
|
296
|
+
|
|
297
|
+
/** Array of all named child nodes */
|
|
298
|
+
namedChildren: ReadonlyArray<SyntaxNode>;
|
|
299
|
+
|
|
300
|
+
/** The number of children this node has */
|
|
301
|
+
childCount: number;
|
|
302
|
+
|
|
303
|
+
/**
|
|
304
|
+
* The number of named children this node has.
|
|
305
|
+
* @see {@link isNamed}
|
|
306
|
+
*/
|
|
307
|
+
namedChildCount: number;
|
|
308
|
+
|
|
309
|
+
/** The first child of this node */
|
|
310
|
+
firstChild: SyntaxNode | null;
|
|
311
|
+
|
|
312
|
+
/** The first named child of this node */
|
|
313
|
+
firstNamedChild: SyntaxNode | null;
|
|
314
|
+
|
|
315
|
+
/** The last child of this node */
|
|
316
|
+
lastChild: SyntaxNode | null;
|
|
317
|
+
|
|
318
|
+
/** The last child of this node */
|
|
319
|
+
lastNamedChild: SyntaxNode | null;
|
|
320
|
+
|
|
321
|
+
/** This node's next sibling */
|
|
322
|
+
nextSibling: SyntaxNode | null;
|
|
323
|
+
|
|
324
|
+
/** This node's next named sibling */
|
|
325
|
+
nextNamedSibling: SyntaxNode | null;
|
|
326
|
+
|
|
327
|
+
/** This node's previous sibling */
|
|
328
|
+
previousSibling: SyntaxNode | null;
|
|
329
|
+
|
|
330
|
+
/** This node's previous named sibling */
|
|
331
|
+
previousNamedSibling: SyntaxNode | null;
|
|
332
|
+
|
|
333
|
+
/**
|
|
334
|
+
* The number of descendants this node has, including itself
|
|
335
|
+
*/
|
|
336
|
+
descendantCount: number;
|
|
337
|
+
|
|
338
|
+
/**
|
|
339
|
+
* Convert this node to its string representation
|
|
340
|
+
*/
|
|
341
|
+
toString(): string;
|
|
342
|
+
|
|
343
|
+
/**
|
|
344
|
+
* Get the node's child at the given index, where zero represents the first child.
|
|
345
|
+
*
|
|
346
|
+
* Note: While fairly fast, this method's cost is technically log(i).
|
|
347
|
+
* For iterating over many children, prefer using the children array.
|
|
348
|
+
*
|
|
349
|
+
* @param index - Zero-based index of the child to retrieve
|
|
350
|
+
* @returns The child node, or null if none exists at the given index
|
|
351
|
+
*/
|
|
352
|
+
child(index: number): SyntaxNode | null;
|
|
353
|
+
|
|
354
|
+
/**
|
|
355
|
+
* Get this node's named child at the given index.
|
|
356
|
+
*
|
|
357
|
+
* Note: While fairly fast, this method's cost is technically log(i).
|
|
358
|
+
* For iterating over many children, prefer using the namedChildren array.
|
|
359
|
+
*
|
|
360
|
+
* @param index - Zero-based index of the named child to retrieve
|
|
361
|
+
* @returns The named child node, or null if none exists at the given index
|
|
362
|
+
*/
|
|
363
|
+
namedChild(index: number): SyntaxNode | null;
|
|
364
|
+
|
|
365
|
+
/**
|
|
366
|
+
* Get the first child with the given field name.
|
|
367
|
+
*
|
|
368
|
+
* For fields that may have multiple children, use childrenForFieldName instead.
|
|
369
|
+
*
|
|
370
|
+
* @param fieldName - The field name to search for
|
|
371
|
+
* @returns The child node, or null if no child has the given field name
|
|
372
|
+
*/
|
|
373
|
+
childForFieldName(fieldName: string): SyntaxNode | null;
|
|
374
|
+
|
|
375
|
+
/**
|
|
376
|
+
* Get this node's child with the given numerical field id.
|
|
377
|
+
*
|
|
378
|
+
* Field IDs can be obtained from field names using the parser's language object.
|
|
379
|
+
*
|
|
380
|
+
* @param fieldId - The field ID to search for
|
|
381
|
+
* @returns The child node, or null if no child has the given field ID
|
|
382
|
+
*/
|
|
383
|
+
childForFieldId(fieldId: number): SyntaxNode | null;
|
|
384
|
+
|
|
385
|
+
/**
|
|
386
|
+
* Get the field name of the child at the given index
|
|
387
|
+
*
|
|
388
|
+
* @param childIndex - Zero-based index of the child
|
|
389
|
+
* @returns The field name, or null if the child has no field name
|
|
390
|
+
*/
|
|
391
|
+
fieldNameForChild(childIndex: number): string | null;
|
|
392
|
+
|
|
393
|
+
/**
|
|
394
|
+
* Get the field name of the named child at the given index
|
|
395
|
+
*
|
|
396
|
+
* @param namedChildIndex - Zero-based index of the named child
|
|
397
|
+
* @returns The field name, or null if the named child has no field name
|
|
398
|
+
*/
|
|
399
|
+
fieldNameForNamedChild(namedChildIndex: number): string | null;
|
|
400
|
+
|
|
401
|
+
/**
|
|
402
|
+
* Get all children that have the given field name
|
|
403
|
+
*
|
|
404
|
+
* @param fieldName - The field name to search for
|
|
405
|
+
* @returns Array of child nodes with the given field name
|
|
406
|
+
*/
|
|
407
|
+
childrenForFieldName(fieldName: string): Array<SyntaxNode>;
|
|
408
|
+
|
|
409
|
+
/**
|
|
410
|
+
* Get all children that have the given field ID
|
|
411
|
+
*
|
|
412
|
+
* @param fieldId - The field ID to search for
|
|
413
|
+
* @returns Array of child nodes with the given field ID
|
|
414
|
+
*/
|
|
415
|
+
childrenForFieldId(fieldId: number): Array<SyntaxNode>;
|
|
416
|
+
|
|
417
|
+
/**
|
|
418
|
+
* Get the node's first child that extends beyond the given byte offset
|
|
419
|
+
*
|
|
420
|
+
* @param index - The byte offset to search from
|
|
421
|
+
* @returns The first child extending beyond the offset, or null if none found
|
|
422
|
+
*/
|
|
423
|
+
firstChildForIndex(index: number): SyntaxNode | null;
|
|
424
|
+
|
|
425
|
+
/**
|
|
426
|
+
* Get the node's first named child that extends beyond the given byte offset
|
|
427
|
+
*
|
|
428
|
+
* @param index - The byte offset to search from
|
|
429
|
+
* @returns The first named child extending beyond the offset, or null if none found
|
|
430
|
+
*/
|
|
431
|
+
firstNamedChildForIndex(index: number): SyntaxNode | null;
|
|
432
|
+
|
|
433
|
+
/**
|
|
434
|
+
* Get the immediate child that contains the given descendant node.
|
|
435
|
+
* Note that this can return the descendant itself if it is an immediate child.
|
|
436
|
+
*
|
|
437
|
+
* @param descendant - The descendant node to find the parent of
|
|
438
|
+
* @returns The child containing the descendant, or null if not found
|
|
439
|
+
*/
|
|
440
|
+
childWithDescendant(descendant: SyntaxNode): SyntaxNode | null;
|
|
441
|
+
|
|
442
|
+
/**
|
|
443
|
+
* Get the smallest node within this node that spans the given byte offset.
|
|
444
|
+
*
|
|
445
|
+
* @param index - The byte offset to search for
|
|
446
|
+
* @returns The smallest node spanning the offset
|
|
447
|
+
*/
|
|
448
|
+
descendantForIndex(index: number): SyntaxNode;
|
|
449
|
+
|
|
450
|
+
/**
|
|
451
|
+
* Get the smallest node within this node that spans the given byte range.
|
|
452
|
+
*
|
|
453
|
+
* @param startIndex - The starting byte offset
|
|
454
|
+
* @param endIndex - The ending byte offset
|
|
455
|
+
* @returns The smallest node spanning the range
|
|
456
|
+
*/
|
|
457
|
+
descendantForIndex(startIndex: number, endIndex: number): SyntaxNode;
|
|
458
|
+
|
|
459
|
+
/**
|
|
460
|
+
* Get the smallest named node within this node that spans the given byte offset.
|
|
461
|
+
*
|
|
462
|
+
* @param index - The byte offset to search for
|
|
463
|
+
* @returns The smallest named node spanning the offset
|
|
464
|
+
*/
|
|
465
|
+
namedDescendantForIndex(index: number): SyntaxNode;
|
|
466
|
+
|
|
467
|
+
/**
|
|
468
|
+
* Get the smallest named node within this node that spans the given byte range.
|
|
469
|
+
*
|
|
470
|
+
* @param startIndex - The starting byte offset
|
|
471
|
+
* @param endIndex - The ending byte offset
|
|
472
|
+
* @returns The smallest named node spanning the range
|
|
473
|
+
*/
|
|
474
|
+
namedDescendantForIndex(startIndex: number, endIndex: number): SyntaxNode;
|
|
475
|
+
|
|
476
|
+
/**
|
|
477
|
+
* Get the smallest node within this node that spans the given position.
|
|
478
|
+
* When only one position is provided, it's used as both start and end.
|
|
479
|
+
*
|
|
480
|
+
* @param position - The point to search for
|
|
481
|
+
* @returns The smallest node spanning the position
|
|
482
|
+
*/
|
|
483
|
+
descendantForPosition(position: Point): SyntaxNode;
|
|
484
|
+
|
|
485
|
+
/**
|
|
486
|
+
* Get the smallest node within this node that spans the given position range.
|
|
487
|
+
*
|
|
488
|
+
* @param startPosition - The starting position
|
|
489
|
+
* @param endPosition - The ending position
|
|
490
|
+
* @returns The smallest node spanning the range
|
|
491
|
+
*/
|
|
492
|
+
descendantForPosition(startPosition: Point, endPosition: Point): SyntaxNode;
|
|
493
|
+
|
|
494
|
+
/**
|
|
495
|
+
* Get the smallest named node within this node that spans the given position.
|
|
496
|
+
* When only one position is provided, it's used as both start and end.
|
|
497
|
+
*
|
|
498
|
+
* @param position - The point to search for
|
|
499
|
+
* @returns The smallest named node spanning the position
|
|
500
|
+
*/
|
|
501
|
+
namedDescendantForPosition(position: Point): SyntaxNode;
|
|
502
|
+
|
|
503
|
+
/**
|
|
504
|
+
* Get the smallest named node within this node that spans the given position range.
|
|
505
|
+
*
|
|
506
|
+
* @param startPosition - The starting position
|
|
507
|
+
* @param endPosition - The ending position
|
|
508
|
+
* @returns The smallest named node spanning the range
|
|
509
|
+
*/
|
|
510
|
+
namedDescendantForPosition(startPosition: Point, endPosition: Point): SyntaxNode;
|
|
511
|
+
|
|
512
|
+
/**
|
|
513
|
+
* Get all descendants of this node that have the given type(s)
|
|
514
|
+
*
|
|
515
|
+
* @param types - A string or array of strings of node types to find
|
|
516
|
+
* @param startPosition - Optional starting position to search from
|
|
517
|
+
* @param endPosition - Optional ending position to search to
|
|
518
|
+
* @returns Array of descendant nodes matching the given types
|
|
519
|
+
*/
|
|
520
|
+
descendantsOfType(types: String | Array<String>, startPosition?: Point, endPosition?: Point): Array<SyntaxNode>;
|
|
521
|
+
|
|
522
|
+
/**
|
|
523
|
+
* Find the closest ancestor of the current node that matches the given type(s).
|
|
524
|
+
*
|
|
525
|
+
* Starting from the node's parent, walks up the tree until it finds a node
|
|
526
|
+
* whose type matches any of the given types.
|
|
527
|
+
*
|
|
528
|
+
* @example
|
|
529
|
+
* const property = tree.rootNode.descendantForIndex(5);
|
|
530
|
+
* // Find closest unary expression ancestor
|
|
531
|
+
* const unary = property.closest('unary_expression');
|
|
532
|
+
* // Find closest binary or call expression ancestor
|
|
533
|
+
* const expr = property.closest(['binary_expression', 'call_expression']);
|
|
534
|
+
*
|
|
535
|
+
* @param types - A string or array of strings representing the node types to search for
|
|
536
|
+
* @returns The closest matching ancestor node, or null if none found
|
|
537
|
+
* @throws If the argument is not a string or array of strings
|
|
538
|
+
*/
|
|
539
|
+
closest(types: String | ReadonlyArray<String>): SyntaxNode | null;
|
|
540
|
+
|
|
541
|
+
/**
|
|
542
|
+
* Create a new TreeCursor starting from this node.
|
|
543
|
+
*
|
|
544
|
+
* @returns A new cursor positioned at this node
|
|
545
|
+
*/
|
|
546
|
+
walk(): TreeCursor;
|
|
547
|
+
}> {}
|
|
548
|
+
|
|
549
|
+
/** A stateful object for walking a syntax {@link Tree} efficiently */
|
|
550
|
+
export interface TreeCursor {
|
|
551
|
+
/** The type of the current node as a string */
|
|
552
|
+
nodeType: string;
|
|
553
|
+
|
|
554
|
+
/** The type of the current node as a numeric ID */
|
|
555
|
+
nodeTypeId: number;
|
|
556
|
+
|
|
557
|
+
/** The parse state of the current node */
|
|
558
|
+
nodeStateId: number;
|
|
559
|
+
|
|
560
|
+
/** The text of the current node */
|
|
561
|
+
nodeText: string;
|
|
562
|
+
|
|
563
|
+
/** Whether the current node is named */
|
|
564
|
+
nodeIsNamed: boolean;
|
|
565
|
+
|
|
566
|
+
/** Whether the current node is missing from the source code */
|
|
567
|
+
nodeIsMissing: boolean;
|
|
568
|
+
|
|
569
|
+
/** The start position of the current node */
|
|
570
|
+
startPosition: Point;
|
|
571
|
+
|
|
572
|
+
/** The end position of the current node */
|
|
573
|
+
endPosition: Point;
|
|
574
|
+
|
|
575
|
+
/** The start byte index of the current node */
|
|
576
|
+
startIndex: number;
|
|
577
|
+
|
|
578
|
+
/** The end byte index of the current node */
|
|
579
|
+
endIndex: number;
|
|
580
|
+
|
|
581
|
+
/** The current node that the cursor is pointing to */
|
|
582
|
+
readonly currentNode: SyntaxNode;
|
|
583
|
+
|
|
584
|
+
/** The field name of the current node */
|
|
585
|
+
readonly currentFieldName: string;
|
|
586
|
+
|
|
587
|
+
/** The numerical field ID of the current node */
|
|
588
|
+
readonly currentFieldId: number;
|
|
589
|
+
|
|
590
|
+
/** The depth of the current node relative to the node where the cursor was created */
|
|
591
|
+
readonly currentDepth: number;
|
|
592
|
+
|
|
593
|
+
/** The index of the current node among all descendants of the original node */
|
|
594
|
+
readonly currentDescendantIndex: number;
|
|
595
|
+
|
|
596
|
+
/**
|
|
597
|
+
* Re-initialize this cursor to start at a new node
|
|
598
|
+
*
|
|
599
|
+
* @param node - The node to start from
|
|
600
|
+
*/
|
|
601
|
+
reset(node: SyntaxNode): void;
|
|
602
|
+
|
|
603
|
+
/**
|
|
604
|
+
* Re-initialize this cursor to the same position as another cursor.
|
|
605
|
+
* Unlike reset(), this will not lose parent information and allows
|
|
606
|
+
* reusing already created cursors.
|
|
607
|
+
*
|
|
608
|
+
* @param cursor - The cursor to copy the position from
|
|
609
|
+
*/
|
|
610
|
+
resetTo(cursor: TreeCursor): void;
|
|
611
|
+
|
|
612
|
+
/**
|
|
613
|
+
* Move this cursor to the parent of its current node.
|
|
614
|
+
*
|
|
615
|
+
* @returns true if cursor successfully moved, false if there was no parent
|
|
616
|
+
* (cursor was already at the root node)
|
|
617
|
+
*/
|
|
618
|
+
gotoParent(): boolean;
|
|
619
|
+
|
|
620
|
+
/**
|
|
621
|
+
* Move this cursor to the first child of its current node.
|
|
622
|
+
*
|
|
623
|
+
* @returns true if cursor successfully moved, false if there were no children
|
|
624
|
+
*/
|
|
625
|
+
gotoFirstChild(): boolean;
|
|
626
|
+
|
|
627
|
+
/**
|
|
628
|
+
* Move this cursor to the last child of its current node.
|
|
629
|
+
* Note: This may be slower than gotoFirstChild() as it needs to iterate
|
|
630
|
+
* through all children to compute the position.
|
|
631
|
+
*
|
|
632
|
+
* @returns true if cursor successfully moved, false if there were no children
|
|
633
|
+
*/
|
|
634
|
+
gotoLastChild(): boolean;
|
|
635
|
+
|
|
636
|
+
/**
|
|
637
|
+
* Move this cursor to the first child that extends beyond the given byte offset
|
|
638
|
+
*
|
|
639
|
+
* @param goalIndex - The byte offset to search for
|
|
640
|
+
* @returns true if a child was found and cursor moved, false otherwise
|
|
641
|
+
*/
|
|
642
|
+
gotoFirstChildForIndex(goalIndex: number): boolean;
|
|
643
|
+
|
|
644
|
+
/**
|
|
645
|
+
* Move this cursor to the first child that extends beyond the given position
|
|
646
|
+
*
|
|
647
|
+
* @param goalPosition - The position to search for
|
|
648
|
+
* @returns true if a child was found and cursor moved, false otherwise
|
|
649
|
+
*/
|
|
650
|
+
gotoFirstChildForPosition(goalPosition: Point): boolean;
|
|
651
|
+
|
|
652
|
+
/**
|
|
653
|
+
* Move this cursor to the next sibling of its current node
|
|
654
|
+
*
|
|
655
|
+
* @returns true if cursor successfully moved, false if there was no next sibling
|
|
656
|
+
*/
|
|
657
|
+
gotoNextSibling(): boolean;
|
|
658
|
+
|
|
659
|
+
/**
|
|
660
|
+
* Move this cursor to the previous sibling of its current node.
|
|
661
|
+
* Note: This may be slower than gotoNextSibling() due to how node positions
|
|
662
|
+
* are stored. In the worst case, it will need to iterate through all previous
|
|
663
|
+
* siblings to recalculate positions.
|
|
664
|
+
*
|
|
665
|
+
* @returns true if cursor successfully moved, false if there was no previous sibling
|
|
666
|
+
*/
|
|
667
|
+
gotoPreviousSibling(): boolean;
|
|
668
|
+
|
|
669
|
+
/**
|
|
670
|
+
* Move the cursor to the descendant node at the given index, where zero
|
|
671
|
+
* represents the original node the cursor was created with.
|
|
672
|
+
*
|
|
673
|
+
* @param goalDescendantIndex - The index of the descendant to move to
|
|
674
|
+
*/
|
|
675
|
+
gotoDescendant(goalDescendantIndex: number): void;
|
|
676
|
+
}
|
|
677
|
+
|
|
678
|
+
/**
|
|
679
|
+
* A tree that represents the syntactic structure of a source code file.
|
|
680
|
+
*/
|
|
681
|
+
export interface Tree {
|
|
682
|
+
/**
|
|
683
|
+
* The root node of the syntax tree
|
|
684
|
+
*/
|
|
685
|
+
readonly rootNode: SyntaxNode;
|
|
686
|
+
|
|
687
|
+
/**
|
|
688
|
+
* Get the root node of the syntax tree, but with its position shifted
|
|
689
|
+
* forward by the given offset.
|
|
690
|
+
*
|
|
691
|
+
* @param offsetBytes - The number of bytes to shift by
|
|
692
|
+
* @param offsetExtent - The number of rows/columns to shift by
|
|
693
|
+
* @returns The root node with its position offset
|
|
694
|
+
*/
|
|
695
|
+
rootNodeWithOffset(offsetBytes: number, offsetExtent: Point): SyntaxNode;
|
|
696
|
+
|
|
697
|
+
/**
|
|
698
|
+
* Edit the syntax tree to keep it in sync with source code that has been edited.
|
|
699
|
+
* The edit must be described both in terms of byte offsets and in terms of
|
|
700
|
+
* row/column coordinates.
|
|
701
|
+
*
|
|
702
|
+
* @param edit - The edit to apply to the tree
|
|
703
|
+
* @returns The edited tree
|
|
704
|
+
*/
|
|
705
|
+
edit(edit: Edit): Tree;
|
|
706
|
+
|
|
707
|
+
/**
|
|
708
|
+
* Create a new TreeCursor starting from the root of the tree.
|
|
709
|
+
*
|
|
710
|
+
* @returns A new cursor positioned at the root node
|
|
711
|
+
*/
|
|
712
|
+
walk(): TreeCursor;
|
|
713
|
+
|
|
714
|
+
/**
|
|
715
|
+
* Get the text for a node within this tree
|
|
716
|
+
*
|
|
717
|
+
* @param node - The syntax node to get text for
|
|
718
|
+
* @returns The source text for the node
|
|
719
|
+
*/
|
|
720
|
+
getText(node: SyntaxNode): string;
|
|
721
|
+
|
|
722
|
+
/**
|
|
723
|
+
* Compare this edited syntax tree to a new syntax tree representing the
|
|
724
|
+
* same document, returning ranges whose syntactic structure has changed.
|
|
725
|
+
*
|
|
726
|
+
* For this to work correctly, this tree must have been edited to match
|
|
727
|
+
* the new tree's ranges. Generally, you'll want to call this right after
|
|
728
|
+
* parsing, using the old tree that was passed to parse and the new tree
|
|
729
|
+
* that was returned.
|
|
730
|
+
*
|
|
731
|
+
* @param other - The new tree to compare against
|
|
732
|
+
* @returns Array of ranges that have changed
|
|
733
|
+
*/
|
|
734
|
+
getChangedRanges(other: Tree): Range[];
|
|
735
|
+
|
|
736
|
+
/**
|
|
737
|
+
* Get the ranges that were included when parsing this syntax tree
|
|
738
|
+
*
|
|
739
|
+
* @returns Array of included ranges
|
|
740
|
+
*/
|
|
741
|
+
getIncludedRanges(): Range[];
|
|
742
|
+
|
|
743
|
+
/**
|
|
744
|
+
* Get the range that was edited in this tree
|
|
745
|
+
*
|
|
746
|
+
* @returns The edited range
|
|
747
|
+
*/
|
|
748
|
+
getEditedRange(): Range;
|
|
749
|
+
|
|
750
|
+
/**
|
|
751
|
+
* Print a graph of the tree in the DOT language.
|
|
752
|
+
* You may want to pipe this to a 'dot' process to generate SVG output.
|
|
753
|
+
*
|
|
754
|
+
* @param fd - Optional file descriptor for the output
|
|
755
|
+
*/
|
|
756
|
+
printDotGraph(fd?: number): void;
|
|
757
|
+
}
|
|
758
|
+
|
|
759
|
+
/**
|
|
760
|
+
* A particular syntax node that was captured by a named pattern in a query.
|
|
761
|
+
*/
|
|
762
|
+
export interface QueryCapture {
|
|
763
|
+
/** The name that was used to capture the node in the query */
|
|
764
|
+
name: string;
|
|
765
|
+
|
|
766
|
+
/** The captured syntax node */
|
|
767
|
+
node: SyntaxNode;
|
|
768
|
+
}
|
|
769
|
+
|
|
770
|
+
/**
|
|
771
|
+
* A match of a {@link Query} to a particular set of {@link SyntaxNode}s.
|
|
772
|
+
*/
|
|
773
|
+
export interface QueryMatch {
|
|
774
|
+
/**
|
|
775
|
+
* The index of the pattern that was matched.
|
|
776
|
+
* Each pattern in a query is assigned a numeric index in sequence.
|
|
777
|
+
*/
|
|
778
|
+
pattern: number;
|
|
779
|
+
|
|
780
|
+
/** Array of nodes that were captured in the pattern match */
|
|
781
|
+
captures: QueryCapture[];
|
|
782
|
+
}
|
|
783
|
+
|
|
784
|
+
export type QueryOptions = {
|
|
785
|
+
/** The starting row/column position in which the query will be executed. */
|
|
786
|
+
startPosition?: Point;
|
|
787
|
+
|
|
788
|
+
/** The ending row/column position in which the query will be executed. */
|
|
789
|
+
endPosition?: Point;
|
|
790
|
+
|
|
791
|
+
/** The starting byte offset in which the query will be executed. */
|
|
792
|
+
startIndex?: number;
|
|
793
|
+
|
|
794
|
+
/** The ending byte offset in which the query will be executed. */
|
|
795
|
+
endIndex?: number;
|
|
796
|
+
|
|
797
|
+
/** The maximum number of in-progress matches for this cursor. The limit must be > 0 and <= 65536. */
|
|
798
|
+
matchLimit?: number;
|
|
799
|
+
|
|
800
|
+
/**
|
|
801
|
+
* The maximum start depth for a query cursor.
|
|
802
|
+
*
|
|
803
|
+
* This prevents cursors from exploring children nodes at a certain depth.
|
|
804
|
+
* Note if a pattern includes many children, then they will still be
|
|
805
|
+
* checked.
|
|
806
|
+
*
|
|
807
|
+
* The zero max start depth value can be used as a special behavior and
|
|
808
|
+
* it helps to destructure a subtree by staying on a node and using
|
|
809
|
+
* captures for interested parts. Note that the zero max start depth
|
|
810
|
+
* only limit a search depth for a pattern's root node but other nodes
|
|
811
|
+
* that are parts of the pattern may be searched at any depth what
|
|
812
|
+
* defined by the pattern structure.
|
|
813
|
+
*/
|
|
814
|
+
maxStartDepth?: number;
|
|
815
|
+
|
|
816
|
+
/**
|
|
817
|
+
* The maximum duration in microseconds that query execution should be allowed to
|
|
818
|
+
* take before halting.
|
|
819
|
+
*
|
|
820
|
+
* If query execution takes longer than this, it will halt early, returning None.
|
|
821
|
+
*/
|
|
822
|
+
timeoutMicros?: number;
|
|
823
|
+
};
|
|
824
|
+
|
|
825
|
+
export class Query {
|
|
826
|
+
/** The maximum number of in-progress matches for this cursor. */
|
|
827
|
+
readonly matchLimit: number;
|
|
828
|
+
|
|
829
|
+
/**
|
|
830
|
+
* Create a new query from a string containing one or more S-expression
|
|
831
|
+
* patterns.
|
|
832
|
+
*
|
|
833
|
+
* The query is associated with a particular language, and can only be run
|
|
834
|
+
* on syntax nodes parsed with that language. References to Queries can be
|
|
835
|
+
* shared between multiple threads.
|
|
836
|
+
*/
|
|
837
|
+
constructor(language: Language, source: string | Buffer);
|
|
838
|
+
|
|
839
|
+
/**
|
|
840
|
+
* Iterate over all of the individual captures in the order that they
|
|
841
|
+
* appear.
|
|
842
|
+
*
|
|
843
|
+
* This is useful if you don't care about which pattern matched, and just
|
|
844
|
+
* want a single, ordered sequence of captures.
|
|
845
|
+
*
|
|
846
|
+
* @param node - The syntax node to query
|
|
847
|
+
* @param options - Optional query options
|
|
848
|
+
*
|
|
849
|
+
* @returns An array of captures
|
|
850
|
+
*/
|
|
851
|
+
captures(node: SyntaxNode, options?: QueryOptions): QueryCapture[];
|
|
852
|
+
|
|
853
|
+
/**
|
|
854
|
+
* Iterate over all of the matches in the order that they were found.
|
|
855
|
+
*
|
|
856
|
+
* Each match contains the index of the pattern that matched, and a list of
|
|
857
|
+
* captures. Because multiple patterns can match the same set of nodes,
|
|
858
|
+
* one match may contain captures that appear *before* some of the
|
|
859
|
+
* captures from a previous match.
|
|
860
|
+
*
|
|
861
|
+
* @param node - The syntax node to query
|
|
862
|
+
* @param options - Optional query options
|
|
863
|
+
*
|
|
864
|
+
* @returns An array of matches
|
|
865
|
+
*/
|
|
866
|
+
matches(node: SyntaxNode, options?: QueryOptions): QueryMatch[];
|
|
867
|
+
|
|
868
|
+
/**
|
|
869
|
+
* Disable a certain capture within a query.
|
|
870
|
+
*
|
|
871
|
+
* This prevents the capture from being returned in matches, and also
|
|
872
|
+
* avoids any resource usage associated with recording the capture.
|
|
873
|
+
*
|
|
874
|
+
* @param captureName - The name of the capture to disable
|
|
875
|
+
*/
|
|
876
|
+
disableCapture(captureName: string): void;
|
|
877
|
+
|
|
878
|
+
/**
|
|
879
|
+
* Disable a certain pattern within a query.
|
|
880
|
+
*
|
|
881
|
+
* This prevents the pattern from matching, and also avoids any resource
|
|
882
|
+
* usage associated with the pattern.
|
|
883
|
+
*
|
|
884
|
+
* @param patternIndex - The index of the pattern to disable
|
|
885
|
+
*/
|
|
886
|
+
disablePattern(patternIndex: number): void;
|
|
887
|
+
|
|
888
|
+
/**
|
|
889
|
+
* Check if a given step in a query is 'definite'.
|
|
890
|
+
*
|
|
891
|
+
* A query step is 'definite' if its parent pattern will be guaranteed to
|
|
892
|
+
* match successfully once it reaches the step.
|
|
893
|
+
*
|
|
894
|
+
* @param byteOffset - The byte offset of the step to check
|
|
895
|
+
*/
|
|
896
|
+
isPatternGuaranteedAtStep(byteOffset: number): boolean;
|
|
897
|
+
|
|
898
|
+
/**
|
|
899
|
+
* Check if a given pattern within a query has a single root node.
|
|
900
|
+
*
|
|
901
|
+
* @param patternIndex - The index of the pattern to check
|
|
902
|
+
*/
|
|
903
|
+
isPatternRooted(patternIndex: number): boolean;
|
|
904
|
+
|
|
905
|
+
/**
|
|
906
|
+
* Check if a given pattern within a query has a single root node.
|
|
907
|
+
*
|
|
908
|
+
* @param patternIndex - The index of the pattern to check
|
|
909
|
+
*/
|
|
910
|
+
isPatternNonLocal(patternIndex: number): boolean;
|
|
911
|
+
|
|
912
|
+
/**
|
|
913
|
+
* Get the byte offset where the given pattern starts in the query's
|
|
914
|
+
* source.
|
|
915
|
+
*
|
|
916
|
+
* @param patternIndex - The index of the pattern to check
|
|
917
|
+
*
|
|
918
|
+
* @returns The byte offset where the pattern starts
|
|
919
|
+
*/
|
|
920
|
+
startIndexForPattern(patternIndex: number): number;
|
|
921
|
+
|
|
922
|
+
/**
|
|
923
|
+
* Get the byte offset where the given pattern ends in the query's
|
|
924
|
+
* source.
|
|
925
|
+
*
|
|
926
|
+
* @param patternIndex - The index of the pattern to check
|
|
927
|
+
*
|
|
928
|
+
* @returns The byte offset where the pattern ends
|
|
929
|
+
*/
|
|
930
|
+
endIndexForPattern(patternIndex: number): number;
|
|
931
|
+
|
|
932
|
+
/**
|
|
933
|
+
* Check if, on its last execution, this cursor exceeded its maximum number
|
|
934
|
+
* of in-progress matches.
|
|
935
|
+
*
|
|
936
|
+
* @returns true if the cursor exceeded its match limit
|
|
937
|
+
*/
|
|
938
|
+
didExceedMatchLimit(): boolean;
|
|
939
|
+
}
|
|
940
|
+
|
|
941
|
+
export class LookaheadIterator {
|
|
942
|
+
/** The current symbol of the lookahead iterator. */
|
|
943
|
+
readonly currentTypeId: number;
|
|
944
|
+
/** The current symbol name of the lookahead iterator. */
|
|
945
|
+
readonly currentType: string;
|
|
946
|
+
|
|
947
|
+
/**
|
|
948
|
+
* Create a new lookahead iterator for this language and parse state.
|
|
949
|
+
*
|
|
950
|
+
* This returns `null` if the state is invalid for this language.
|
|
951
|
+
*
|
|
952
|
+
* Iterating {@link LookaheadIterator} will yield valid symbols in the given
|
|
953
|
+
* parse state. Newly created lookahead iterators will have {@link currentType}
|
|
954
|
+
* populated with the `ERROR` symbol.
|
|
955
|
+
*
|
|
956
|
+
* Lookahead iterators can be useful to generate suggestions and improve
|
|
957
|
+
* syntax error diagnostics. To get symbols valid in an ERROR node, use the
|
|
958
|
+
* lookahead iterator on its first leaf node state. For `MISSING` nodes, a
|
|
959
|
+
* lookahead iterator created on the previous non-extra leaf node may be
|
|
960
|
+
* appropriate.
|
|
961
|
+
*
|
|
962
|
+
* @param language - The language to use for the lookahead iterator
|
|
963
|
+
* @param state - The parse state to use for the lookahead iterator
|
|
964
|
+
*/
|
|
965
|
+
constructor(language: Language, state: number);
|
|
966
|
+
|
|
967
|
+
/**
|
|
968
|
+
* Reset the lookahead iterator.
|
|
969
|
+
*
|
|
970
|
+
* This returns `true` if the language was set successfully and `false`
|
|
971
|
+
* otherwise.
|
|
972
|
+
*
|
|
973
|
+
* @param language - The language to use for the lookahead iterator
|
|
974
|
+
* @param stateId - The parse state to use for the lookahead iterator
|
|
975
|
+
*/
|
|
976
|
+
reset(language: Language, stateId: number): boolean;
|
|
977
|
+
|
|
978
|
+
/**
|
|
979
|
+
* Reset the lookahead iterator to another state.
|
|
980
|
+
*
|
|
981
|
+
* This returns `true` if the iterator was reset to the given state and
|
|
982
|
+
* `false` otherwise.
|
|
983
|
+
*
|
|
984
|
+
* @param stateId - The parse state to reset the lookahead iterator to
|
|
985
|
+
*/
|
|
986
|
+
resetState(stateId: number): boolean;
|
|
987
|
+
|
|
988
|
+
/**
|
|
989
|
+
* Get an iterator for the lookahead iterator.
|
|
990
|
+
*
|
|
991
|
+
* This allows the lookahead iterator to be used in a for-of loop,
|
|
992
|
+
* iterating over the valid symbols in the current parse state.
|
|
993
|
+
*
|
|
994
|
+
* @returns An iterator over the symbol names
|
|
995
|
+
*/
|
|
996
|
+
[Symbol.iterator](): Iterator<string>;
|
|
997
|
+
}
|
|
998
|
+
|
|
999
|
+
/** The base node type */
|
|
1000
|
+
type BaseNode = {
|
|
1001
|
+
/** The node's type */
|
|
1002
|
+
type: string;
|
|
1003
|
+
/** Whether the node is named */
|
|
1004
|
+
named: boolean;
|
|
1005
|
+
};
|
|
1006
|
+
|
|
1007
|
+
/** A child within a node */
|
|
1008
|
+
type ChildNode = {
|
|
1009
|
+
/** Whether the child is repeated */
|
|
1010
|
+
multiple: boolean;
|
|
1011
|
+
/** Whether the child is required */
|
|
1012
|
+
required: boolean;
|
|
1013
|
+
/** The child's type */
|
|
1014
|
+
types: BaseNode[];
|
|
1015
|
+
};
|
|
1016
|
+
|
|
1017
|
+
/** Information about a language's node types */
|
|
1018
|
+
type NodeInfo =
|
|
1019
|
+
| (BaseNode & {
|
|
1020
|
+
/** The subtypes of this node if it's a supertype */
|
|
1021
|
+
subtypes: BaseNode[];
|
|
1022
|
+
})
|
|
1023
|
+
| (BaseNode & {
|
|
1024
|
+
/** The fields within this node */
|
|
1025
|
+
fields: { [name: string]: ChildNode };
|
|
1026
|
+
/** The child nodes of this node */
|
|
1027
|
+
children: ChildNode[];
|
|
1028
|
+
});
|
|
1029
|
+
|
|
1030
|
+
/** Information about a language */
|
|
1031
|
+
interface Language {
|
|
1032
|
+
/** The name of the language */
|
|
1033
|
+
name: string;
|
|
1034
|
+
/** The inner language object */
|
|
1035
|
+
language: Language;
|
|
1036
|
+
/** The node type information of the language */
|
|
1037
|
+
nodeTypeInfo: NodeInfo[];
|
|
1038
|
+
}
|
|
1039
|
+
}
|
|
1040
|
+
|
|
1041
|
+
export = Parser
|
|
1042
|
+
}
|