@kkvcrobatz107/codegraph 0.9.6-pkm.1
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/LICENSE +21 -0
- package/README.md +595 -0
- package/dist/bin/codegraph.d.ts +25 -0
- package/dist/bin/codegraph.d.ts.map +1 -0
- package/dist/bin/codegraph.js +1563 -0
- package/dist/bin/codegraph.js.map +1 -0
- package/dist/bin/node-version-check.d.ts +37 -0
- package/dist/bin/node-version-check.d.ts.map +1 -0
- package/dist/bin/node-version-check.js +79 -0
- package/dist/bin/node-version-check.js.map +1 -0
- package/dist/bin/uninstall.d.ts +14 -0
- package/dist/bin/uninstall.d.ts.map +1 -0
- package/dist/bin/uninstall.js +36 -0
- package/dist/bin/uninstall.js.map +1 -0
- package/dist/context/formatter.d.ts +30 -0
- package/dist/context/formatter.d.ts.map +1 -0
- package/dist/context/formatter.js +244 -0
- package/dist/context/formatter.js.map +1 -0
- package/dist/context/index.d.ts +110 -0
- package/dist/context/index.d.ts.map +1 -0
- package/dist/context/index.js +1169 -0
- package/dist/context/index.js.map +1 -0
- package/dist/db/index.d.ts +101 -0
- package/dist/db/index.d.ts.map +1 -0
- package/dist/db/index.js +251 -0
- package/dist/db/index.js.map +1 -0
- package/dist/db/migrations.d.ts +44 -0
- package/dist/db/migrations.d.ts.map +1 -0
- package/dist/db/migrations.js +131 -0
- package/dist/db/migrations.js.map +1 -0
- package/dist/db/queries.d.ts +281 -0
- package/dist/db/queries.d.ts.map +1 -0
- package/dist/db/queries.js +1300 -0
- package/dist/db/queries.js.map +1 -0
- package/dist/db/schema.sql +151 -0
- package/dist/db/sqlite-adapter.d.ts +46 -0
- package/dist/db/sqlite-adapter.d.ts.map +1 -0
- package/dist/db/sqlite-adapter.js +114 -0
- package/dist/db/sqlite-adapter.js.map +1 -0
- package/dist/directory.d.ts +57 -0
- package/dist/directory.d.ts.map +1 -0
- package/dist/directory.js +264 -0
- package/dist/directory.js.map +1 -0
- package/dist/errors.d.ts +136 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +219 -0
- package/dist/errors.js.map +1 -0
- package/dist/extraction/dfm-extractor.d.ts +31 -0
- package/dist/extraction/dfm-extractor.d.ts.map +1 -0
- package/dist/extraction/dfm-extractor.js +151 -0
- package/dist/extraction/dfm-extractor.js.map +1 -0
- package/dist/extraction/grammars.d.ts +90 -0
- package/dist/extraction/grammars.d.ts.map +1 -0
- package/dist/extraction/grammars.js +407 -0
- package/dist/extraction/grammars.js.map +1 -0
- package/dist/extraction/index.d.ts +138 -0
- package/dist/extraction/index.d.ts.map +1 -0
- package/dist/extraction/index.js +1378 -0
- package/dist/extraction/index.js.map +1 -0
- package/dist/extraction/languages/c-cpp.d.ts +4 -0
- package/dist/extraction/languages/c-cpp.d.ts.map +1 -0
- package/dist/extraction/languages/c-cpp.js +171 -0
- package/dist/extraction/languages/c-cpp.js.map +1 -0
- package/dist/extraction/languages/csharp.d.ts +3 -0
- package/dist/extraction/languages/csharp.d.ts.map +1 -0
- package/dist/extraction/languages/csharp.js +73 -0
- package/dist/extraction/languages/csharp.js.map +1 -0
- package/dist/extraction/languages/dart.d.ts +3 -0
- package/dist/extraction/languages/dart.d.ts.map +1 -0
- package/dist/extraction/languages/dart.js +192 -0
- package/dist/extraction/languages/dart.js.map +1 -0
- package/dist/extraction/languages/go.d.ts +3 -0
- package/dist/extraction/languages/go.d.ts.map +1 -0
- package/dist/extraction/languages/go.js +70 -0
- package/dist/extraction/languages/go.js.map +1 -0
- package/dist/extraction/languages/index.d.ts +10 -0
- package/dist/extraction/languages/index.d.ts.map +1 -0
- package/dist/extraction/languages/index.js +51 -0
- package/dist/extraction/languages/index.js.map +1 -0
- package/dist/extraction/languages/java.d.ts +3 -0
- package/dist/extraction/languages/java.d.ts.map +1 -0
- package/dist/extraction/languages/java.js +70 -0
- package/dist/extraction/languages/java.js.map +1 -0
- package/dist/extraction/languages/javascript.d.ts +3 -0
- package/dist/extraction/languages/javascript.d.ts.map +1 -0
- package/dist/extraction/languages/javascript.js +90 -0
- package/dist/extraction/languages/javascript.js.map +1 -0
- package/dist/extraction/languages/kotlin.d.ts +3 -0
- package/dist/extraction/languages/kotlin.d.ts.map +1 -0
- package/dist/extraction/languages/kotlin.js +259 -0
- package/dist/extraction/languages/kotlin.js.map +1 -0
- package/dist/extraction/languages/lua.d.ts +3 -0
- package/dist/extraction/languages/lua.d.ts.map +1 -0
- package/dist/extraction/languages/lua.js +150 -0
- package/dist/extraction/languages/lua.js.map +1 -0
- package/dist/extraction/languages/luau.d.ts +3 -0
- package/dist/extraction/languages/luau.d.ts.map +1 -0
- package/dist/extraction/languages/luau.js +37 -0
- package/dist/extraction/languages/luau.js.map +1 -0
- package/dist/extraction/languages/objc.d.ts +3 -0
- package/dist/extraction/languages/objc.d.ts.map +1 -0
- package/dist/extraction/languages/objc.js +133 -0
- package/dist/extraction/languages/objc.js.map +1 -0
- package/dist/extraction/languages/pascal.d.ts +3 -0
- package/dist/extraction/languages/pascal.d.ts.map +1 -0
- package/dist/extraction/languages/pascal.js +66 -0
- package/dist/extraction/languages/pascal.js.map +1 -0
- package/dist/extraction/languages/php.d.ts +3 -0
- package/dist/extraction/languages/php.d.ts.map +1 -0
- package/dist/extraction/languages/php.js +107 -0
- package/dist/extraction/languages/php.js.map +1 -0
- package/dist/extraction/languages/python.d.ts +3 -0
- package/dist/extraction/languages/python.d.ts.map +1 -0
- package/dist/extraction/languages/python.js +56 -0
- package/dist/extraction/languages/python.js.map +1 -0
- package/dist/extraction/languages/ruby.d.ts +3 -0
- package/dist/extraction/languages/ruby.d.ts.map +1 -0
- package/dist/extraction/languages/ruby.js +114 -0
- package/dist/extraction/languages/ruby.js.map +1 -0
- package/dist/extraction/languages/rust.d.ts +3 -0
- package/dist/extraction/languages/rust.d.ts.map +1 -0
- package/dist/extraction/languages/rust.js +109 -0
- package/dist/extraction/languages/rust.js.map +1 -0
- package/dist/extraction/languages/scala.d.ts +3 -0
- package/dist/extraction/languages/scala.d.ts.map +1 -0
- package/dist/extraction/languages/scala.js +139 -0
- package/dist/extraction/languages/scala.js.map +1 -0
- package/dist/extraction/languages/swift.d.ts +3 -0
- package/dist/extraction/languages/swift.d.ts.map +1 -0
- package/dist/extraction/languages/swift.js +91 -0
- package/dist/extraction/languages/swift.js.map +1 -0
- package/dist/extraction/languages/typescript.d.ts +3 -0
- package/dist/extraction/languages/typescript.d.ts.map +1 -0
- package/dist/extraction/languages/typescript.js +129 -0
- package/dist/extraction/languages/typescript.js.map +1 -0
- package/dist/extraction/liquid-extractor.d.ts +52 -0
- package/dist/extraction/liquid-extractor.d.ts.map +1 -0
- package/dist/extraction/liquid-extractor.js +313 -0
- package/dist/extraction/liquid-extractor.js.map +1 -0
- package/dist/extraction/mybatis-extractor.d.ts +48 -0
- package/dist/extraction/mybatis-extractor.d.ts.map +1 -0
- package/dist/extraction/mybatis-extractor.js +198 -0
- package/dist/extraction/mybatis-extractor.js.map +1 -0
- package/dist/extraction/parse-worker.d.ts +8 -0
- package/dist/extraction/parse-worker.d.ts.map +1 -0
- package/dist/extraction/parse-worker.js +94 -0
- package/dist/extraction/parse-worker.js.map +1 -0
- package/dist/extraction/svelte-extractor.d.ts +56 -0
- package/dist/extraction/svelte-extractor.d.ts.map +1 -0
- package/dist/extraction/svelte-extractor.js +272 -0
- package/dist/extraction/svelte-extractor.js.map +1 -0
- package/dist/extraction/tree-sitter-helpers.d.ts +28 -0
- package/dist/extraction/tree-sitter-helpers.d.ts.map +1 -0
- package/dist/extraction/tree-sitter-helpers.js +103 -0
- package/dist/extraction/tree-sitter-helpers.js.map +1 -0
- package/dist/extraction/tree-sitter-types.d.ts +193 -0
- package/dist/extraction/tree-sitter-types.d.ts.map +1 -0
- package/dist/extraction/tree-sitter-types.js +10 -0
- package/dist/extraction/tree-sitter-types.js.map +1 -0
- package/dist/extraction/tree-sitter.d.ts +291 -0
- package/dist/extraction/tree-sitter.d.ts.map +1 -0
- package/dist/extraction/tree-sitter.js +2961 -0
- package/dist/extraction/tree-sitter.js.map +1 -0
- package/dist/extraction/vue-extractor.d.ts +36 -0
- package/dist/extraction/vue-extractor.d.ts.map +1 -0
- package/dist/extraction/vue-extractor.js +163 -0
- package/dist/extraction/vue-extractor.js.map +1 -0
- package/dist/extraction/wasm/tree-sitter-lua.wasm +0 -0
- package/dist/extraction/wasm/tree-sitter-luau.wasm +0 -0
- package/dist/extraction/wasm/tree-sitter-pascal.wasm +0 -0
- package/dist/extraction/wasm/tree-sitter-scala.wasm +0 -0
- package/dist/extraction/wasm-runtime-flags.d.ts +38 -0
- package/dist/extraction/wasm-runtime-flags.d.ts.map +1 -0
- package/dist/extraction/wasm-runtime-flags.js +105 -0
- package/dist/extraction/wasm-runtime-flags.js.map +1 -0
- package/dist/graph/index.d.ts +8 -0
- package/dist/graph/index.d.ts.map +1 -0
- package/dist/graph/index.js +13 -0
- package/dist/graph/index.js.map +1 -0
- package/dist/graph/queries.d.ts +106 -0
- package/dist/graph/queries.d.ts.map +1 -0
- package/dist/graph/queries.js +366 -0
- package/dist/graph/queries.js.map +1 -0
- package/dist/graph/traversal.d.ts +127 -0
- package/dist/graph/traversal.d.ts.map +1 -0
- package/dist/graph/traversal.js +528 -0
- package/dist/graph/traversal.js.map +1 -0
- package/dist/index.d.ts +460 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +863 -0
- package/dist/index.js.map +1 -0
- package/dist/installer/claude-md-template.d.ts +14 -0
- package/dist/installer/claude-md-template.d.ts.map +1 -0
- package/dist/installer/claude-md-template.js +21 -0
- package/dist/installer/claude-md-template.js.map +1 -0
- package/dist/installer/config-writer.d.ts +29 -0
- package/dist/installer/config-writer.d.ts.map +1 -0
- package/dist/installer/config-writer.js +111 -0
- package/dist/installer/config-writer.js.map +1 -0
- package/dist/installer/index.d.ts +117 -0
- package/dist/installer/index.d.ts.map +1 -0
- package/dist/installer/index.js +528 -0
- package/dist/installer/index.js.map +1 -0
- package/dist/installer/instructions-template.d.ts +28 -0
- package/dist/installer/instructions-template.d.ts.map +1 -0
- package/dist/installer/instructions-template.js +65 -0
- package/dist/installer/instructions-template.js.map +1 -0
- package/dist/installer/targets/antigravity.d.ts +57 -0
- package/dist/installer/targets/antigravity.d.ts.map +1 -0
- package/dist/installer/targets/antigravity.js +307 -0
- package/dist/installer/targets/antigravity.js.map +1 -0
- package/dist/installer/targets/claude.d.ts +47 -0
- package/dist/installer/targets/claude.d.ts.map +1 -0
- package/dist/installer/targets/claude.js +401 -0
- package/dist/installer/targets/claude.js.map +1 -0
- package/dist/installer/targets/codex.d.ts +18 -0
- package/dist/installer/targets/codex.d.ts.map +1 -0
- package/dist/installer/targets/codex.js +185 -0
- package/dist/installer/targets/codex.js.map +1 -0
- package/dist/installer/targets/cursor.d.ts +35 -0
- package/dist/installer/targets/cursor.d.ts.map +1 -0
- package/dist/installer/targets/cursor.js +283 -0
- package/dist/installer/targets/cursor.js.map +1 -0
- package/dist/installer/targets/gemini.d.ts +26 -0
- package/dist/installer/targets/gemini.d.ts.map +1 -0
- package/dist/installer/targets/gemini.js +165 -0
- package/dist/installer/targets/gemini.js.map +1 -0
- package/dist/installer/targets/hermes.d.ts +18 -0
- package/dist/installer/targets/hermes.d.ts.map +1 -0
- package/dist/installer/targets/hermes.js +359 -0
- package/dist/installer/targets/hermes.js.map +1 -0
- package/dist/installer/targets/kiro.d.ts +27 -0
- package/dist/installer/targets/kiro.d.ts.map +1 -0
- package/dist/installer/targets/kiro.js +196 -0
- package/dist/installer/targets/kiro.js.map +1 -0
- package/dist/installer/targets/opencode.d.ts +30 -0
- package/dist/installer/targets/opencode.d.ts.map +1 -0
- package/dist/installer/targets/opencode.js +235 -0
- package/dist/installer/targets/opencode.js.map +1 -0
- package/dist/installer/targets/registry.d.ts +35 -0
- package/dist/installer/targets/registry.d.ts.map +1 -0
- package/dist/installer/targets/registry.js +91 -0
- package/dist/installer/targets/registry.js.map +1 -0
- package/dist/installer/targets/shared.d.ts +77 -0
- package/dist/installer/targets/shared.d.ts.map +1 -0
- package/dist/installer/targets/shared.js +246 -0
- package/dist/installer/targets/shared.js.map +1 -0
- package/dist/installer/targets/toml.d.ts +52 -0
- package/dist/installer/targets/toml.d.ts.map +1 -0
- package/dist/installer/targets/toml.js +147 -0
- package/dist/installer/targets/toml.js.map +1 -0
- package/dist/installer/targets/types.d.ts +116 -0
- package/dist/installer/targets/types.d.ts.map +1 -0
- package/dist/installer/targets/types.js +16 -0
- package/dist/installer/targets/types.js.map +1 -0
- package/dist/mcp/daemon-paths.d.ts +46 -0
- package/dist/mcp/daemon-paths.d.ts.map +1 -0
- package/dist/mcp/daemon-paths.js +125 -0
- package/dist/mcp/daemon-paths.js.map +1 -0
- package/dist/mcp/daemon.d.ts +161 -0
- package/dist/mcp/daemon.d.ts.map +1 -0
- package/dist/mcp/daemon.js +403 -0
- package/dist/mcp/daemon.js.map +1 -0
- package/dist/mcp/engine.d.ts +100 -0
- package/dist/mcp/engine.d.ts.map +1 -0
- package/dist/mcp/engine.js +291 -0
- package/dist/mcp/engine.js.map +1 -0
- package/dist/mcp/index.d.ts +109 -0
- package/dist/mcp/index.d.ts.map +1 -0
- package/dist/mcp/index.js +470 -0
- package/dist/mcp/index.js.map +1 -0
- package/dist/mcp/proxy.d.ts +46 -0
- package/dist/mcp/proxy.d.ts.map +1 -0
- package/dist/mcp/proxy.js +276 -0
- package/dist/mcp/proxy.js.map +1 -0
- package/dist/mcp/server-instructions.d.ts +19 -0
- package/dist/mcp/server-instructions.d.ts.map +1 -0
- package/dist/mcp/server-instructions.js +73 -0
- package/dist/mcp/server-instructions.js.map +1 -0
- package/dist/mcp/session.d.ts +67 -0
- package/dist/mcp/session.d.ts.map +1 -0
- package/dist/mcp/session.js +276 -0
- package/dist/mcp/session.js.map +1 -0
- package/dist/mcp/tools.d.ts +385 -0
- package/dist/mcp/tools.d.ts.map +1 -0
- package/dist/mcp/tools.js +2545 -0
- package/dist/mcp/tools.js.map +1 -0
- package/dist/mcp/transport.d.ts +188 -0
- package/dist/mcp/transport.d.ts.map +1 -0
- package/dist/mcp/transport.js +343 -0
- package/dist/mcp/transport.js.map +1 -0
- package/dist/mcp/version.d.ts +19 -0
- package/dist/mcp/version.d.ts.map +1 -0
- package/dist/mcp/version.js +71 -0
- package/dist/mcp/version.js.map +1 -0
- package/dist/resolution/callback-synthesizer.d.ts +10 -0
- package/dist/resolution/callback-synthesizer.d.ts.map +1 -0
- package/dist/resolution/callback-synthesizer.js +924 -0
- package/dist/resolution/callback-synthesizer.js.map +1 -0
- package/dist/resolution/frameworks/cargo-workspace.d.ts +18 -0
- package/dist/resolution/frameworks/cargo-workspace.d.ts.map +1 -0
- package/dist/resolution/frameworks/cargo-workspace.js +225 -0
- package/dist/resolution/frameworks/cargo-workspace.js.map +1 -0
- package/dist/resolution/frameworks/csharp.d.ts +8 -0
- package/dist/resolution/frameworks/csharp.d.ts.map +1 -0
- package/dist/resolution/frameworks/csharp.js +241 -0
- package/dist/resolution/frameworks/csharp.js.map +1 -0
- package/dist/resolution/frameworks/drupal.d.ts +51 -0
- package/dist/resolution/frameworks/drupal.d.ts.map +1 -0
- package/dist/resolution/frameworks/drupal.js +367 -0
- package/dist/resolution/frameworks/drupal.js.map +1 -0
- package/dist/resolution/frameworks/expo-modules.d.ts +3 -0
- package/dist/resolution/frameworks/expo-modules.d.ts.map +1 -0
- package/dist/resolution/frameworks/expo-modules.js +143 -0
- package/dist/resolution/frameworks/expo-modules.js.map +1 -0
- package/dist/resolution/frameworks/express.d.ts +8 -0
- package/dist/resolution/frameworks/express.d.ts.map +1 -0
- package/dist/resolution/frameworks/express.js +308 -0
- package/dist/resolution/frameworks/express.js.map +1 -0
- package/dist/resolution/frameworks/fabric.d.ts +3 -0
- package/dist/resolution/frameworks/fabric.d.ts.map +1 -0
- package/dist/resolution/frameworks/fabric.js +354 -0
- package/dist/resolution/frameworks/fabric.js.map +1 -0
- package/dist/resolution/frameworks/go.d.ts +8 -0
- package/dist/resolution/frameworks/go.d.ts.map +1 -0
- package/dist/resolution/frameworks/go.js +161 -0
- package/dist/resolution/frameworks/go.js.map +1 -0
- package/dist/resolution/frameworks/index.d.ts +48 -0
- package/dist/resolution/frameworks/index.d.ts.map +1 -0
- package/dist/resolution/frameworks/index.js +161 -0
- package/dist/resolution/frameworks/index.js.map +1 -0
- package/dist/resolution/frameworks/java.d.ts +8 -0
- package/dist/resolution/frameworks/java.d.ts.map +1 -0
- package/dist/resolution/frameworks/java.js +504 -0
- package/dist/resolution/frameworks/java.js.map +1 -0
- package/dist/resolution/frameworks/laravel.d.ts +13 -0
- package/dist/resolution/frameworks/laravel.d.ts.map +1 -0
- package/dist/resolution/frameworks/laravel.js +257 -0
- package/dist/resolution/frameworks/laravel.js.map +1 -0
- package/dist/resolution/frameworks/nestjs.d.ts +26 -0
- package/dist/resolution/frameworks/nestjs.d.ts.map +1 -0
- package/dist/resolution/frameworks/nestjs.js +698 -0
- package/dist/resolution/frameworks/nestjs.js.map +1 -0
- package/dist/resolution/frameworks/play.d.ts +19 -0
- package/dist/resolution/frameworks/play.d.ts.map +1 -0
- package/dist/resolution/frameworks/play.js +111 -0
- package/dist/resolution/frameworks/play.js.map +1 -0
- package/dist/resolution/frameworks/python.d.ts +10 -0
- package/dist/resolution/frameworks/python.d.ts.map +1 -0
- package/dist/resolution/frameworks/python.js +396 -0
- package/dist/resolution/frameworks/python.js.map +1 -0
- package/dist/resolution/frameworks/react-native.d.ts +3 -0
- package/dist/resolution/frameworks/react-native.d.ts.map +1 -0
- package/dist/resolution/frameworks/react-native.js +360 -0
- package/dist/resolution/frameworks/react-native.js.map +1 -0
- package/dist/resolution/frameworks/react.d.ts +8 -0
- package/dist/resolution/frameworks/react.d.ts.map +1 -0
- package/dist/resolution/frameworks/react.js +365 -0
- package/dist/resolution/frameworks/react.js.map +1 -0
- package/dist/resolution/frameworks/ruby.d.ts +8 -0
- package/dist/resolution/frameworks/ruby.d.ts.map +1 -0
- package/dist/resolution/frameworks/ruby.js +302 -0
- package/dist/resolution/frameworks/ruby.js.map +1 -0
- package/dist/resolution/frameworks/rust.d.ts +8 -0
- package/dist/resolution/frameworks/rust.d.ts.map +1 -0
- package/dist/resolution/frameworks/rust.js +304 -0
- package/dist/resolution/frameworks/rust.js.map +1 -0
- package/dist/resolution/frameworks/svelte.d.ts +9 -0
- package/dist/resolution/frameworks/svelte.d.ts.map +1 -0
- package/dist/resolution/frameworks/svelte.js +249 -0
- package/dist/resolution/frameworks/svelte.js.map +1 -0
- package/dist/resolution/frameworks/swift-objc.d.ts +37 -0
- package/dist/resolution/frameworks/swift-objc.d.ts.map +1 -0
- package/dist/resolution/frameworks/swift-objc.js +252 -0
- package/dist/resolution/frameworks/swift-objc.js.map +1 -0
- package/dist/resolution/frameworks/swift.d.ts +10 -0
- package/dist/resolution/frameworks/swift.d.ts.map +1 -0
- package/dist/resolution/frameworks/swift.js +400 -0
- package/dist/resolution/frameworks/swift.js.map +1 -0
- package/dist/resolution/frameworks/vue.d.ts +9 -0
- package/dist/resolution/frameworks/vue.d.ts.map +1 -0
- package/dist/resolution/frameworks/vue.js +306 -0
- package/dist/resolution/frameworks/vue.js.map +1 -0
- package/dist/resolution/go-module.d.ts +26 -0
- package/dist/resolution/go-module.d.ts.map +1 -0
- package/dist/resolution/go-module.js +78 -0
- package/dist/resolution/go-module.js.map +1 -0
- package/dist/resolution/import-resolver.d.ts +68 -0
- package/dist/resolution/import-resolver.d.ts.map +1 -0
- package/dist/resolution/import-resolver.js +1231 -0
- package/dist/resolution/import-resolver.js.map +1 -0
- package/dist/resolution/index.d.ts +116 -0
- package/dist/resolution/index.d.ts.map +1 -0
- package/dist/resolution/index.js +878 -0
- package/dist/resolution/index.js.map +1 -0
- package/dist/resolution/lru-cache.d.ts +24 -0
- package/dist/resolution/lru-cache.d.ts.map +1 -0
- package/dist/resolution/lru-cache.js +62 -0
- package/dist/resolution/lru-cache.js.map +1 -0
- package/dist/resolution/name-matcher.d.ts +32 -0
- package/dist/resolution/name-matcher.d.ts.map +1 -0
- package/dist/resolution/name-matcher.js +596 -0
- package/dist/resolution/name-matcher.js.map +1 -0
- package/dist/resolution/path-aliases.d.ts +68 -0
- package/dist/resolution/path-aliases.d.ts.map +1 -0
- package/dist/resolution/path-aliases.js +238 -0
- package/dist/resolution/path-aliases.js.map +1 -0
- package/dist/resolution/strip-comments.d.ts +27 -0
- package/dist/resolution/strip-comments.d.ts.map +1 -0
- package/dist/resolution/strip-comments.js +441 -0
- package/dist/resolution/strip-comments.js.map +1 -0
- package/dist/resolution/swift-objc-bridge.d.ts +134 -0
- package/dist/resolution/swift-objc-bridge.d.ts.map +1 -0
- package/dist/resolution/swift-objc-bridge.js +256 -0
- package/dist/resolution/swift-objc-bridge.js.map +1 -0
- package/dist/resolution/types.d.ts +209 -0
- package/dist/resolution/types.d.ts.map +1 -0
- package/dist/resolution/types.js +8 -0
- package/dist/resolution/types.js.map +1 -0
- package/dist/search/query-parser.d.ts +57 -0
- package/dist/search/query-parser.d.ts.map +1 -0
- package/dist/search/query-parser.js +177 -0
- package/dist/search/query-parser.js.map +1 -0
- package/dist/search/query-utils.d.ts +53 -0
- package/dist/search/query-utils.d.ts.map +1 -0
- package/dist/search/query-utils.js +350 -0
- package/dist/search/query-utils.js.map +1 -0
- package/dist/sync/git-hooks.d.ts +45 -0
- package/dist/sync/git-hooks.d.ts.map +1 -0
- package/dist/sync/git-hooks.js +223 -0
- package/dist/sync/git-hooks.js.map +1 -0
- package/dist/sync/index.d.ts +19 -0
- package/dist/sync/index.d.ts.map +1 -0
- package/dist/sync/index.js +35 -0
- package/dist/sync/index.js.map +1 -0
- package/dist/sync/watch-policy.d.ts +48 -0
- package/dist/sync/watch-policy.d.ts.map +1 -0
- package/dist/sync/watch-policy.js +124 -0
- package/dist/sync/watch-policy.js.map +1 -0
- package/dist/sync/watcher.d.ts +191 -0
- package/dist/sync/watcher.d.ts.map +1 -0
- package/dist/sync/watcher.js +398 -0
- package/dist/sync/watcher.js.map +1 -0
- package/dist/sync/worktree.d.ts +54 -0
- package/dist/sync/worktree.d.ts.map +1 -0
- package/dist/sync/worktree.js +136 -0
- package/dist/sync/worktree.js.map +1 -0
- package/dist/types.d.ts +369 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +78 -0
- package/dist/types.js.map +1 -0
- package/dist/ui/glyphs.d.ts +42 -0
- package/dist/ui/glyphs.d.ts.map +1 -0
- package/dist/ui/glyphs.js +78 -0
- package/dist/ui/glyphs.js.map +1 -0
- package/dist/ui/shimmer-progress.d.ts +11 -0
- package/dist/ui/shimmer-progress.d.ts.map +1 -0
- package/dist/ui/shimmer-progress.js +90 -0
- package/dist/ui/shimmer-progress.js.map +1 -0
- package/dist/ui/shimmer-worker.d.ts +2 -0
- package/dist/ui/shimmer-worker.d.ts.map +1 -0
- package/dist/ui/shimmer-worker.js +118 -0
- package/dist/ui/shimmer-worker.js.map +1 -0
- package/dist/ui/types.d.ts +17 -0
- package/dist/ui/types.d.ts.map +1 -0
- package/dist/ui/types.js +3 -0
- package/dist/ui/types.js.map +1 -0
- package/dist/utils.d.ts +205 -0
- package/dist/utils.d.ts.map +1 -0
- package/dist/utils.js +549 -0
- package/dist/utils.js.map +1 -0
- package/package.json +59 -0
- package/scripts/add-lang/bench.sh +60 -0
- package/scripts/add-lang/check-grammar.mjs +75 -0
- package/scripts/add-lang/dump-ast.mjs +103 -0
- package/scripts/add-lang/verify-extraction.mjs +70 -0
- package/scripts/agent-eval/arms-F.sh +21 -0
- package/scripts/agent-eval/arms-matrix.sh +37 -0
- package/scripts/agent-eval/audit.sh +68 -0
- package/scripts/agent-eval/bench-readme.sh +28 -0
- package/scripts/agent-eval/block-read-hook.sh +19 -0
- package/scripts/agent-eval/hook-settings.json +15 -0
- package/scripts/agent-eval/itrun.sh +107 -0
- package/scripts/agent-eval/parse-arms.mjs +116 -0
- package/scripts/agent-eval/parse-bench-readme.mjs +67 -0
- package/scripts/agent-eval/parse-run.mjs +45 -0
- package/scripts/agent-eval/parse-session.mjs +93 -0
- package/scripts/agent-eval/probe-context.mjs +21 -0
- package/scripts/agent-eval/probe-explore.mjs +40 -0
- package/scripts/agent-eval/probe-node.mjs +20 -0
- package/scripts/agent-eval/probe-trace.mjs +20 -0
- package/scripts/agent-eval/run-agent.sh +34 -0
- package/scripts/agent-eval/run-all.sh +67 -0
- package/scripts/agent-eval/run-arms.sh +56 -0
- package/scripts/agent-eval/seq-matrix.mjs +137 -0
- package/scripts/build-bundle.sh +118 -0
- package/scripts/extract-release-notes.mjs +130 -0
- package/scripts/local-install.sh +41 -0
- package/scripts/npm-shim.js +246 -0
- package/scripts/pack-npm.sh +95 -0
- package/scripts/prepare-release.mjs +270 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"svelte-extractor.js","sourceRoot":"","sources":["../../src/extraction/svelte-extractor.ts"],"names":[],"mappings":";;;AACA,+DAAuD;AACvD,+CAAoD;AACpD,yCAAiD;AAEjD,kEAAkE;AAClE,MAAM,YAAY,GAAG,IAAI,GAAG,CAAC;IAC3B,QAAQ,EAAE,QAAQ,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW;IACtD,UAAU,EAAE,OAAO,EAAE,UAAU;CAChC,CAAC,CAAC;AAEH;;;;;;;;;;;GAWG;AACH,MAAa,eAAe;IAClB,QAAQ,CAAS;IACjB,MAAM,CAAS;IACf,KAAK,GAAW,EAAE,CAAC;IACnB,KAAK,GAAW,EAAE,CAAC;IACnB,oBAAoB,GAA0B,EAAE,CAAC;IACjD,MAAM,GAAsB,EAAE,CAAC;IAEvC,YAAY,QAAgB,EAAE,MAAc;QAC1C,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;OAEG;IACH,OAAO;QACL,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;QAE7B,IAAI,CAAC;YACH,oDAAoD;YACpD,MAAM,aAAa,GAAG,IAAI,CAAC,mBAAmB,EAAE,CAAC;YAEjD,oCAAo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,GAAG,KAAK,CAAC,CAAC,CAAE,CAAC;gBAEhC,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC;oBAC7B,UAAU,EAAE,eAAe;oBAC3B,aAAa,EAAE,aAAa;oBAC5B,aAAa,EAAE,YAAY;oBAC3B,IAAI,EAAE,OAAO,GAAG,CAAC,EAAE,YAAY;oBAC/B,MAAM,EAAE,KAAK,CAAC,KAAK,GAAG,CAAC;oBACvB,QAAQ,EAAE,IAAI,CAAC,QAAQ;oBACvB,QAAQ,EAAE,QAAQ;iBACnB,CAAC,CAAC;YACL,CAAC;QACH,CAAC;IACH,CAAC;CACF;AA3SD,0CA2SC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tree-sitter Shared Helpers
|
|
3
|
+
*
|
|
4
|
+
* Utility functions used by the core TreeSitterExtractor and per-language extractors.
|
|
5
|
+
* Extracted to a leaf module to avoid circular imports between tree-sitter.ts and languages/.
|
|
6
|
+
*/
|
|
7
|
+
import { Node as SyntaxNode } from 'web-tree-sitter';
|
|
8
|
+
import { NodeKind } from '../types';
|
|
9
|
+
/**
|
|
10
|
+
* Generate a unique node ID
|
|
11
|
+
*
|
|
12
|
+
* Uses a 32-character (128-bit) hash to avoid collisions when indexing
|
|
13
|
+
* large codebases with many files containing similar symbols.
|
|
14
|
+
*/
|
|
15
|
+
export declare function generateNodeId(filePath: string, kind: NodeKind, name: string, line: number): string;
|
|
16
|
+
/**
|
|
17
|
+
* Extract text from a syntax node
|
|
18
|
+
*/
|
|
19
|
+
export declare function getNodeText(node: SyntaxNode, source: string): string;
|
|
20
|
+
/**
|
|
21
|
+
* Find a child node by field name
|
|
22
|
+
*/
|
|
23
|
+
export declare function getChildByField(node: SyntaxNode, fieldName: string): SyntaxNode | null;
|
|
24
|
+
/**
|
|
25
|
+
* Get the docstring/comment preceding a node
|
|
26
|
+
*/
|
|
27
|
+
export declare function getPrecedingDocstring(node: SyntaxNode, source: string): string | undefined;
|
|
28
|
+
//# sourceMappingURL=tree-sitter-helpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tree-sitter-helpers.d.ts","sourceRoot":"","sources":["../../src/extraction/tree-sitter-helpers.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,IAAI,IAAI,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAErD,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEpC;;;;;GAKG;AACH,wBAAgB,cAAc,CAC5B,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,QAAQ,EACd,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,GACX,MAAM,CAOR;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAEpE;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,GAAG,UAAU,GAAG,IAAI,CAEtF;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CA+B1F"}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Tree-sitter Shared Helpers
|
|
4
|
+
*
|
|
5
|
+
* Utility functions used by the core TreeSitterExtractor and per-language extractors.
|
|
6
|
+
* Extracted to a leaf module to avoid circular imports between tree-sitter.ts and languages/.
|
|
7
|
+
*/
|
|
8
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
9
|
+
if (k2 === undefined) k2 = k;
|
|
10
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
11
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
12
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
13
|
+
}
|
|
14
|
+
Object.defineProperty(o, k2, desc);
|
|
15
|
+
}) : (function(o, m, k, k2) {
|
|
16
|
+
if (k2 === undefined) k2 = k;
|
|
17
|
+
o[k2] = m[k];
|
|
18
|
+
}));
|
|
19
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
20
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
21
|
+
}) : function(o, v) {
|
|
22
|
+
o["default"] = v;
|
|
23
|
+
});
|
|
24
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
25
|
+
var ownKeys = function(o) {
|
|
26
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
27
|
+
var ar = [];
|
|
28
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
29
|
+
return ar;
|
|
30
|
+
};
|
|
31
|
+
return ownKeys(o);
|
|
32
|
+
};
|
|
33
|
+
return function (mod) {
|
|
34
|
+
if (mod && mod.__esModule) return mod;
|
|
35
|
+
var result = {};
|
|
36
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
37
|
+
__setModuleDefault(result, mod);
|
|
38
|
+
return result;
|
|
39
|
+
};
|
|
40
|
+
})();
|
|
41
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42
|
+
exports.generateNodeId = generateNodeId;
|
|
43
|
+
exports.getNodeText = getNodeText;
|
|
44
|
+
exports.getChildByField = getChildByField;
|
|
45
|
+
exports.getPrecedingDocstring = getPrecedingDocstring;
|
|
46
|
+
const crypto = __importStar(require("crypto"));
|
|
47
|
+
/**
|
|
48
|
+
* Generate a unique node ID
|
|
49
|
+
*
|
|
50
|
+
* Uses a 32-character (128-bit) hash to avoid collisions when indexing
|
|
51
|
+
* large codebases with many files containing similar symbols.
|
|
52
|
+
*/
|
|
53
|
+
function generateNodeId(filePath, kind, name, line) {
|
|
54
|
+
const hash = crypto
|
|
55
|
+
.createHash('sha256')
|
|
56
|
+
.update(`${filePath}:${kind}:${name}:${line}`)
|
|
57
|
+
.digest('hex')
|
|
58
|
+
.substring(0, 32);
|
|
59
|
+
return `${kind}:${hash}`;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Extract text from a syntax node
|
|
63
|
+
*/
|
|
64
|
+
function getNodeText(node, source) {
|
|
65
|
+
return source.substring(node.startIndex, node.endIndex);
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Find a child node by field name
|
|
69
|
+
*/
|
|
70
|
+
function getChildByField(node, fieldName) {
|
|
71
|
+
return node.childForFieldName(fieldName);
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Get the docstring/comment preceding a node
|
|
75
|
+
*/
|
|
76
|
+
function getPrecedingDocstring(node, source) {
|
|
77
|
+
let sibling = node.previousNamedSibling;
|
|
78
|
+
const comments = [];
|
|
79
|
+
while (sibling) {
|
|
80
|
+
if (sibling.type === 'comment' ||
|
|
81
|
+
sibling.type === 'line_comment' ||
|
|
82
|
+
sibling.type === 'block_comment' ||
|
|
83
|
+
sibling.type === 'documentation_comment') {
|
|
84
|
+
comments.unshift(getNodeText(sibling, source));
|
|
85
|
+
sibling = sibling.previousNamedSibling;
|
|
86
|
+
}
|
|
87
|
+
else {
|
|
88
|
+
break;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
if (comments.length === 0)
|
|
92
|
+
return undefined;
|
|
93
|
+
// Clean up comment markers
|
|
94
|
+
return comments
|
|
95
|
+
.map((c) => c
|
|
96
|
+
.replace(/^\/\*\*?|\*\/$/g, '')
|
|
97
|
+
.replace(/^\/\/\s?/gm, '')
|
|
98
|
+
.replace(/^\s*\*\s?/gm, '')
|
|
99
|
+
.trim())
|
|
100
|
+
.join('\n')
|
|
101
|
+
.trim();
|
|
102
|
+
}
|
|
103
|
+
//# sourceMappingURL=tree-sitter-helpers.js.map
|
|
@@ -0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YACD,QAAQ,CAAC,OAAO,CAAC,WAAW,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC;YAC/C,OAAO,GAAG,OAAO,CAAC,oBAAoB,CAAC;QACzC,CAAC;aAAM,CAAC;YACN,MAAM;QACR,CAAC;IACH,CAAC;IAED,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,SAAS,CAAC;IAE5C,2BAA2B;IAC3B,OAAO,QAAQ;SACZ,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CACT,CAAC;SACE,OAAO,CAAC,iBAAiB,EAAE,EAAE,CAAC;SAC9B,OAAO,CAAC,YAAY,EAAE,EAAE,CAAC;SACzB,OAAO,CAAC,aAAa,EAAE,EAAE,CAAC;SAC1B,IAAI,EAAE,CACV;SACA,IAAI,CAAC,IAAI,CAAC;SACV,IAAI,EAAE,CAAC;AACZ,CAAC"}
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tree-sitter Extraction Types
|
|
3
|
+
*
|
|
4
|
+
* Defines the LanguageExtractor interface and related types used by
|
|
5
|
+
* the core TreeSitterExtractor and per-language extraction configs.
|
|
6
|
+
* Extracted to a leaf module to avoid circular imports.
|
|
7
|
+
*/
|
|
8
|
+
import { Node as SyntaxNode } from 'web-tree-sitter';
|
|
9
|
+
import { Node, NodeKind, UnresolvedReference } from '../types';
|
|
10
|
+
/**
|
|
11
|
+
* Information returned by a language's extractImport hook.
|
|
12
|
+
*/
|
|
13
|
+
export interface ImportInfo {
|
|
14
|
+
/** The module/package name being imported */
|
|
15
|
+
moduleName: string;
|
|
16
|
+
/** Full import statement text for display */
|
|
17
|
+
signature: string;
|
|
18
|
+
/** If true, the hook already created unresolved references itself */
|
|
19
|
+
handledRefs?: boolean;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Information about a single variable within a declaration.
|
|
23
|
+
* Returned by a language's extractVariables hook.
|
|
24
|
+
*/
|
|
25
|
+
export interface VariableInfo {
|
|
26
|
+
/** Variable name */
|
|
27
|
+
name: string;
|
|
28
|
+
/** Node kind: 'variable' or 'constant' */
|
|
29
|
+
kind: NodeKind;
|
|
30
|
+
/** Optional signature string */
|
|
31
|
+
signature?: string;
|
|
32
|
+
/** If set, this declarator is actually a function and should be extracted as such */
|
|
33
|
+
delegateToFunction?: SyntaxNode;
|
|
34
|
+
/** The AST node to use for positioning (may differ from the declaration node) */
|
|
35
|
+
positionNode?: SyntaxNode;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Context object passed to language hooks that need to call back into the core extractor.
|
|
39
|
+
* Provides a controlled API surface — hooks can create nodes, visit children, and add
|
|
40
|
+
* references without accessing the full TreeSitterExtractor internals.
|
|
41
|
+
*/
|
|
42
|
+
export interface ExtractorContext {
|
|
43
|
+
/** Create a node and add it to the extraction result */
|
|
44
|
+
createNode(kind: NodeKind, name: string, node: SyntaxNode, extra?: Partial<Node>): Node | null;
|
|
45
|
+
/** Visit a child node (dispatches through the standard visitNode logic) */
|
|
46
|
+
visitNode(node: SyntaxNode): void;
|
|
47
|
+
/** Visit a function body to extract calls */
|
|
48
|
+
visitFunctionBody(body: SyntaxNode, functionId: string): void;
|
|
49
|
+
/** Add an unresolved reference */
|
|
50
|
+
addUnresolvedReference(ref: UnresolvedReference): void;
|
|
51
|
+
/** Push a node ID onto the scope stack (for containment/qualified name building) */
|
|
52
|
+
pushScope(nodeId: string): void;
|
|
53
|
+
/** Pop the last node ID from the scope stack */
|
|
54
|
+
popScope(): void;
|
|
55
|
+
/** Current file path */
|
|
56
|
+
readonly filePath: string;
|
|
57
|
+
/** Current source text */
|
|
58
|
+
readonly source: string;
|
|
59
|
+
/** Stack of parent node IDs (current scope) */
|
|
60
|
+
readonly nodeStack: readonly string[];
|
|
61
|
+
/** All nodes extracted so far */
|
|
62
|
+
readonly nodes: readonly Node[];
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Language-specific extraction configuration.
|
|
66
|
+
*
|
|
67
|
+
* Each supported language provides an implementation of this interface
|
|
68
|
+
* that configures which AST node types to look for and how to extract
|
|
69
|
+
* language-specific details like signatures, visibility, and imports.
|
|
70
|
+
*/
|
|
71
|
+
export interface LanguageExtractor {
|
|
72
|
+
/** Node types that represent functions */
|
|
73
|
+
functionTypes: string[];
|
|
74
|
+
/** Node types that represent classes */
|
|
75
|
+
classTypes: string[];
|
|
76
|
+
/** Node types that represent methods */
|
|
77
|
+
methodTypes: string[];
|
|
78
|
+
/** Node types that represent interfaces/protocols/traits */
|
|
79
|
+
interfaceTypes: string[];
|
|
80
|
+
/** Node types that represent structs */
|
|
81
|
+
structTypes: string[];
|
|
82
|
+
/** Node types that represent enums */
|
|
83
|
+
enumTypes: string[];
|
|
84
|
+
/** Node types that represent enum members/cases (e.g. Swift: 'enum_entry', Rust: 'enum_variant') */
|
|
85
|
+
enumMemberTypes?: string[];
|
|
86
|
+
/** Node types that represent type aliases (e.g. `type X = ...`) */
|
|
87
|
+
typeAliasTypes: string[];
|
|
88
|
+
/** Node types that represent imports */
|
|
89
|
+
importTypes: string[];
|
|
90
|
+
/** Node types that represent function calls */
|
|
91
|
+
callTypes: string[];
|
|
92
|
+
/** Node types that represent variable declarations (const, let, var, etc.) */
|
|
93
|
+
variableTypes: string[];
|
|
94
|
+
/** Node types that represent class fields (extracted as 'field' kind inside class bodies) */
|
|
95
|
+
fieldTypes?: string[];
|
|
96
|
+
/** Node types that represent class properties (extracted as 'property' kind inside class bodies) */
|
|
97
|
+
propertyTypes?: string[];
|
|
98
|
+
/** Field name for identifier/name */
|
|
99
|
+
nameField: string;
|
|
100
|
+
/** Field name for body */
|
|
101
|
+
bodyField: string;
|
|
102
|
+
/** Field name for parameters */
|
|
103
|
+
paramsField: string;
|
|
104
|
+
/** Field name for return type */
|
|
105
|
+
returnField?: string;
|
|
106
|
+
/** Override symbol name extraction (e.g. ObjC multi-part selectors). */
|
|
107
|
+
resolveName?: (node: SyntaxNode, source: string) => string | undefined;
|
|
108
|
+
/** Extract property name when the generic name walk fails (e.g. ObjC @property). */
|
|
109
|
+
extractPropertyName?: (node: SyntaxNode, source: string) => string | null;
|
|
110
|
+
/** Extract signature from node */
|
|
111
|
+
getSignature?: (node: SyntaxNode, source: string) => string | undefined;
|
|
112
|
+
/** Extract visibility from node */
|
|
113
|
+
getVisibility?: (node: SyntaxNode) => 'public' | 'private' | 'protected' | 'internal' | undefined;
|
|
114
|
+
/** Check if node is exported */
|
|
115
|
+
isExported?: (node: SyntaxNode, source: string) => boolean;
|
|
116
|
+
/** Check if node is async */
|
|
117
|
+
isAsync?: (node: SyntaxNode) => boolean;
|
|
118
|
+
/** Check if node is static */
|
|
119
|
+
isStatic?: (node: SyntaxNode) => boolean;
|
|
120
|
+
/** Check if variable declaration is a constant (const vs let/var) */
|
|
121
|
+
isConst?: (node: SyntaxNode) => boolean;
|
|
122
|
+
/** Additional node types to treat as class declarations (e.g. Dart: 'mixin_declaration') */
|
|
123
|
+
extraClassNodeTypes?: string[];
|
|
124
|
+
/** Whether methods can be top-level without enclosing class (Go: true) */
|
|
125
|
+
methodsAreTopLevel?: boolean;
|
|
126
|
+
/** NodeKind to use for interface-like declarations (Rust: 'trait'). Default: 'interface' */
|
|
127
|
+
interfaceKind?: NodeKind;
|
|
128
|
+
/**
|
|
129
|
+
* Custom node visitor. Return true if the node was fully handled (skip default dispatch).
|
|
130
|
+
* Used by languages with fundamentally different AST structures (e.g. Pascal).
|
|
131
|
+
*/
|
|
132
|
+
visitNode?: (node: SyntaxNode, ctx: ExtractorContext) => boolean;
|
|
133
|
+
/**
|
|
134
|
+
* Classify a class_declaration node when the grammar reuses one node type
|
|
135
|
+
* for multiple concepts (e.g. Swift uses class_declaration for classes, structs, and enums).
|
|
136
|
+
*/
|
|
137
|
+
classifyClassNode?: (node: SyntaxNode) => 'class' | 'struct' | 'enum' | 'interface' | 'trait';
|
|
138
|
+
/**
|
|
139
|
+
* Resolve the body node for a function/method/class when it's not a child field.
|
|
140
|
+
* (e.g. Dart puts function_body as a sibling, not a child.)
|
|
141
|
+
*/
|
|
142
|
+
resolveBody?: (node: SyntaxNode, bodyField: string) => SyntaxNode | null;
|
|
143
|
+
/**
|
|
144
|
+
* Extract import information from an import node.
|
|
145
|
+
* Return null if the node isn't a recognized import form.
|
|
146
|
+
*/
|
|
147
|
+
extractImport?: (node: SyntaxNode, source: string) => ImportInfo | null;
|
|
148
|
+
/**
|
|
149
|
+
* Extract variable declarations from a variable declaration node.
|
|
150
|
+
* Returns info about each declared variable, allowing the core to create nodes.
|
|
151
|
+
*/
|
|
152
|
+
extractVariables?: (node: SyntaxNode, source: string) => VariableInfo[];
|
|
153
|
+
/**
|
|
154
|
+
* Extract receiver/owner type name from a method declaration.
|
|
155
|
+
* Used by Go to get the struct receiver (e.g., "scrapeLoop" from "func (sl *scrapeLoop) run()").
|
|
156
|
+
* When present, the receiver type is included in the qualified name for better searchability.
|
|
157
|
+
*/
|
|
158
|
+
getReceiverType?: (node: SyntaxNode, source: string) => string | undefined;
|
|
159
|
+
/**
|
|
160
|
+
* Resolve the actual node kind for a type alias declaration.
|
|
161
|
+
* Used by Go where `type_spec` is the named declaration wrapper for structs/interfaces:
|
|
162
|
+
* `type Foo struct { ... }` → type_spec (name: "Foo") → struct_type
|
|
163
|
+
* Returns 'struct', 'interface', etc. to override the default 'type_alias' kind,
|
|
164
|
+
* or undefined to keep it as a type alias.
|
|
165
|
+
*/
|
|
166
|
+
resolveTypeAliasKind?: (node: SyntaxNode, source: string) => NodeKind | undefined;
|
|
167
|
+
/**
|
|
168
|
+
* Check if a function/method name is a misparse artifact that should be skipped.
|
|
169
|
+
* Used by C/C++ where macros (e.g. NLOHMANN_JSON_NAMESPACE_BEGIN) cause tree-sitter
|
|
170
|
+
* to misparse namespace blocks as function_definitions. When this returns true,
|
|
171
|
+
* the function node is NOT created, but the body is still visited for calls and
|
|
172
|
+
* structural nodes (classes, structs, enums).
|
|
173
|
+
*/
|
|
174
|
+
isMisparsedFunction?: (name: string, node: SyntaxNode) => boolean;
|
|
175
|
+
/**
|
|
176
|
+
* Detect bare method calls that don't use call expression syntax.
|
|
177
|
+
* Used by Ruby where `reset` (no parens, no receiver) is a method call but
|
|
178
|
+
* tree-sitter parses it as a plain `identifier` node instead of `call`/`method_call`.
|
|
179
|
+
* Returns the callee name if this node is a bare call, or undefined if not.
|
|
180
|
+
*/
|
|
181
|
+
extractBareCall?: (node: SyntaxNode, source: string) => string | undefined;
|
|
182
|
+
/**
|
|
183
|
+
* Node types representing a file-level package/namespace declaration
|
|
184
|
+
* (e.g. Kotlin `package_header`, Java `package_declaration`). When set,
|
|
185
|
+
* the core wraps every top-level declaration in an implicit `namespace`
|
|
186
|
+
* node carrying the FQN, so cross-file import resolution can match by
|
|
187
|
+
* qualifiedName instead of filename (Kotlin filename ≠ class name).
|
|
188
|
+
*/
|
|
189
|
+
packageTypes?: string[];
|
|
190
|
+
/** Extract the dotted package name from a package declaration node. */
|
|
191
|
+
extractPackage?: (node: SyntaxNode, source: string) => string | null;
|
|
192
|
+
}
|
|
193
|
+
//# sourceMappingURL=tree-sitter-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tree-sitter-types.d.ts","sourceRoot":"","sources":["../../src/extraction/tree-sitter-types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,IAAI,IAAI,UAAU,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EACL,IAAI,EACJ,QAAQ,EACR,mBAAmB,EACpB,MAAM,UAAU,CAAC;AAElB;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,6CAA6C;IAC7C,UAAU,EAAE,MAAM,CAAC;IACnB,6CAA6C;IAC7C,SAAS,EAAE,MAAM,CAAC;IAClB,qEAAqE;IACrE,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED;;;GAGG;AACH,MAAM,WAAW,YAAY;IAC3B,oBAAoB;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,0C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AC,EAAE,CAAC,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,KAAK,QAAQ,GAAG,SAAS,CAAC;IAElF;;;;;;OAMG;IACH,mBAAmB,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,KAAK,OAAO,CAAC;IAElE;;;;;OAKG;IACH,eAAe,CAAC,EAAE,CAAC,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC;IAE3E;;;;;;OAMG;IACH,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IAExB,uEAAuE;IACvE,cAAc,CAAC,EAAE,CAAC,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,CAAC;CACtE"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Tree-sitter Extraction Types
|
|
4
|
+
*
|
|
5
|
+
* Defines the LanguageExtractor interface and related types used by
|
|
6
|
+
* the core TreeSitterExtractor and per-language extraction configs.
|
|
7
|
+
* Extracted to a leaf module to avoid circular imports.
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
//# sourceMappingURL=tree-sitter-types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tree-sitter-types.js","sourceRoot":"","sources":["../../src/extraction/tree-sitter-types.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG"}
|
|
@@ -0,0 +1,291 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tree-sitter Parser Wrapper
|
|
3
|
+
*
|
|
4
|
+
* Handles parsing source code and extracting structural information.
|
|
5
|
+
*/
|
|
6
|
+
import { Language, ExtractionResult } from '../types';
|
|
7
|
+
export { generateNodeId } from './tree-sitter-helpers';
|
|
8
|
+
/**
|
|
9
|
+
* TreeSitterExtractor - Main extraction class
|
|
10
|
+
*/
|
|
11
|
+
export declare class TreeSitterExtractor {
|
|
12
|
+
private filePath;
|
|
13
|
+
private language;
|
|
14
|
+
private source;
|
|
15
|
+
private tree;
|
|
16
|
+
private nodes;
|
|
17
|
+
private edges;
|
|
18
|
+
private unresolvedReferences;
|
|
19
|
+
private errors;
|
|
20
|
+
private extractor;
|
|
21
|
+
private nodeStack;
|
|
22
|
+
private methodIndex;
|
|
23
|
+
constructor(filePath: string, source: string, language?: Language);
|
|
24
|
+
/**
|
|
25
|
+
* Parse and extract from the source code
|
|
26
|
+
*/
|
|
27
|
+
extract(): ExtractionResult;
|
|
28
|
+
/**
|
|
29
|
+
* Visit a node and extract information
|
|
30
|
+
*/
|
|
31
|
+
private visitNode;
|
|
32
|
+
/**
|
|
33
|
+
* Create a Node object
|
|
34
|
+
*/
|
|
35
|
+
private createNode;
|
|
36
|
+
/**
|
|
37
|
+
* Find first named child whose type is in the given list.
|
|
38
|
+
* Used to locate inner type nodes (e.g. enum_specifier inside a typedef).
|
|
39
|
+
*/
|
|
40
|
+
private findChildByTypes;
|
|
41
|
+
/**
|
|
42
|
+
* Find a `packageTypes` child under the root, create a `namespace` node
|
|
43
|
+
* for it, and return its id so the caller can scope top-level
|
|
44
|
+
* declarations underneath. Returns null when no package header is
|
|
45
|
+
* present (script files, .kts without a package).
|
|
46
|
+
*/
|
|
47
|
+
private extractFilePackage;
|
|
48
|
+
/**
|
|
49
|
+
* Build qualified name from node stack
|
|
50
|
+
*/
|
|
51
|
+
private buildQualifiedName;
|
|
52
|
+
/**
|
|
53
|
+
* Build an ExtractorContext for passing to language-specific visitNode hooks.
|
|
54
|
+
*/
|
|
55
|
+
private makeExtractorContext;
|
|
56
|
+
/**
|
|
57
|
+
* Check if the current node stack indicates we are inside a class-like node
|
|
58
|
+
* (class, struct, interface, trait). File nodes do not count as class-like.
|
|
59
|
+
*/
|
|
60
|
+
private isInsideClassLikeNode;
|
|
61
|
+
/**
|
|
62
|
+
* Extract a function
|
|
63
|
+
*/
|
|
64
|
+
private extractFunction;
|
|
65
|
+
/**
|
|
66
|
+
* Extract a class
|
|
67
|
+
*/
|
|
68
|
+
private extractClass;
|
|
69
|
+
/**
|
|
70
|
+
* Extract a method
|
|
71
|
+
*/
|
|
72
|
+
private extractMethod;
|
|
73
|
+
/**
|
|
74
|
+
* Extract an interface/protocol/trait
|
|
75
|
+
*/
|
|
76
|
+
private extractInterface;
|
|
77
|
+
/**
|
|
78
|
+
* Extract a struct
|
|
79
|
+
*/
|
|
80
|
+
private extractStruct;
|
|
81
|
+
/**
|
|
82
|
+
* Extract an enum
|
|
83
|
+
*/
|
|
84
|
+
private extractEnum;
|
|
85
|
+
/**
|
|
86
|
+
* Extract enum member names from an enum member node.
|
|
87
|
+
* Handles multi-case declarations (Swift: `case put, delete`) and single-case patterns.
|
|
88
|
+
*/
|
|
89
|
+
private extractEnumMembers;
|
|
90
|
+
/**
|
|
91
|
+
* Extract a class property declaration (e.g. C# `public string Name { get; set; }`).
|
|
92
|
+
* Extracts as 'property' kind node inside the owning class.
|
|
93
|
+
*/
|
|
94
|
+
private extractProperty;
|
|
95
|
+
/**
|
|
96
|
+
* Extract a class field declaration (e.g. Java field_declaration, C# field_declaration).
|
|
97
|
+
* Extracts each declarator as a 'field' kind node inside the owning class.
|
|
98
|
+
*/
|
|
99
|
+
private extractField;
|
|
100
|
+
/**
|
|
101
|
+
* Extract a variable declaration (const, let, var, etc.)
|
|
102
|
+
*
|
|
103
|
+
* Extracts top-level and module-level variable declarations.
|
|
104
|
+
* Captures the variable name and first 100 chars of initializer in signature for searchability.
|
|
105
|
+
*/
|
|
106
|
+
private extractVariable;
|
|
107
|
+
/**
|
|
108
|
+
* Extract a type alias (e.g. `export type X = ...` in TypeScript).
|
|
109
|
+
* For languages like Go, resolveTypeAliasKind detects when the type_spec
|
|
110
|
+
* wraps a struct or interface definition and creates the correct node kind.
|
|
111
|
+
* Returns true if children should be skipped (struct/interface handled body visiting).
|
|
112
|
+
*/
|
|
113
|
+
private extractTypeAlias;
|
|
114
|
+
/**
|
|
115
|
+
* Surface the members of a TypeScript `type X = { ... }` (or intersection
|
|
116
|
+
* thereof) as `property` / `method` nodes under the type-alias node. Only
|
|
117
|
+
* walks the immediate object_type / intersection operands so anonymous
|
|
118
|
+
* nested object types inside generic arguments (`Promise<{ ok: true }>`)
|
|
119
|
+
* don't produce phantom members.
|
|
120
|
+
*/
|
|
121
|
+
private extractTsTypeAliasMembers;
|
|
122
|
+
/**
|
|
123
|
+
* `foo: () => T` → property_signature whose type_annotation contains a
|
|
124
|
+
* `function_type`. Treat that as a method-shaped contract member, since
|
|
125
|
+
* the call site `obj.foo()` has identical semantics to `bar(): T`.
|
|
126
|
+
*/
|
|
127
|
+
private isTsFunctionTypedProperty;
|
|
128
|
+
/**
|
|
129
|
+
* Extract an import
|
|
130
|
+
*
|
|
131
|
+
* Creates an import node with the full import statement stored in signature for searchability.
|
|
132
|
+
* Also creates unresolved references for resolution purposes.
|
|
133
|
+
*/
|
|
134
|
+
private extractImport;
|
|
135
|
+
/**
|
|
136
|
+
* Extract a function call
|
|
137
|
+
*/
|
|
138
|
+
private extractCall;
|
|
139
|
+
/**
|
|
140
|
+
* `new Foo(...)` / `Foo::new(...)` / object_creation_expression —
|
|
141
|
+
* emit an `instantiates` reference to the class name. The resolver
|
|
142
|
+
* then links it to the class node, producing the `instantiates`
|
|
143
|
+
* edge that powers "what creates instances of X" queries.
|
|
144
|
+
*
|
|
145
|
+
* Children are still walked so nested calls inside the constructor
|
|
146
|
+
* arguments (`new Foo(bar())`) get their own `calls` references.
|
|
147
|
+
*/
|
|
148
|
+
private extractInstantiation;
|
|
149
|
+
/**
|
|
150
|
+
* Find a `class_body` child of an `object_creation_expression` — the
|
|
151
|
+
* marker for an anonymous class (`new T() { ... }`). Returns the body
|
|
152
|
+
* node so the caller can walk it as the anon class's members.
|
|
153
|
+
*/
|
|
154
|
+
private findAnonymousClassBody;
|
|
155
|
+
/**
|
|
156
|
+
* Extract a Java/C# anonymous class — `new T() { ...members }`. Emits a
|
|
157
|
+
* `class` node named `<T$anon@line>`, an `extends` reference to T (so
|
|
158
|
+
* Phase 5.5 interface-impl can bridge), and walks the body so its
|
|
159
|
+
* `method_declaration` members become method nodes under the anon class.
|
|
160
|
+
*
|
|
161
|
+
* Why this matters: without anon-class extraction, the overrides inside
|
|
162
|
+
* a lambda-returned `new T() { @Override int foo(){...} }` are not nodes,
|
|
163
|
+
* so a call through T.foo (the abstract parent method) has no static
|
|
164
|
+
* target — the agent has to Read the file to find the implementation.
|
|
165
|
+
*/
|
|
166
|
+
private extractAnonymousClass;
|
|
167
|
+
/**
|
|
168
|
+
* Scan `declNode` and its preceding siblings (within the parent's
|
|
169
|
+
* named children) for decorator nodes, emitting a `decorates`
|
|
170
|
+
* reference from `decoratedId` to each decorator's function name.
|
|
171
|
+
*
|
|
172
|
+
* Why preceding siblings: in TypeScript, `@Foo class Bar {}` parses
|
|
173
|
+
* as an `export_statement` (or top-level wrapper) with the
|
|
174
|
+
* `decorator` as a child *before* the `class_declaration` — so the
|
|
175
|
+
* decorator isn't a child of the class itself. For methods/
|
|
176
|
+
* properties, the decorator IS a direct child of the declaration,
|
|
177
|
+
* so we also scan declNode.namedChildren.
|
|
178
|
+
*
|
|
179
|
+
* Idempotent across grammars: if neither location yields decorators
|
|
180
|
+
* (most non-decorator-using languages), the function is a no-op.
|
|
181
|
+
*/
|
|
182
|
+
private extractDecoratorsFor;
|
|
183
|
+
/**
|
|
184
|
+
* Visit function body and extract calls (and structural nodes).
|
|
185
|
+
*
|
|
186
|
+
* In addition to call expressions, this also detects class/struct/enum
|
|
187
|
+
* definitions inside function bodies. This handles two cases:
|
|
188
|
+
* 1. Local class/struct/enum definitions (valid in C++, Java, etc.)
|
|
189
|
+
* 2. C++ macro misparsing — macros like NLOHMANN_JSON_NAMESPACE_BEGIN cause
|
|
190
|
+
* tree-sitter to interpret the namespace block as a function_definition,
|
|
191
|
+
* hiding real class/struct/enum nodes inside the "function body".
|
|
192
|
+
*/
|
|
193
|
+
private visitFunctionBody;
|
|
194
|
+
/**
|
|
195
|
+
* Extract inheritance relationships
|
|
196
|
+
*/
|
|
197
|
+
private extractInheritance;
|
|
198
|
+
/**
|
|
199
|
+
* Rust `impl Trait for Type` — creates an implements edge from Type to Trait.
|
|
200
|
+
* For plain `impl Type { ... }` (no trait), no inheritance edge is needed.
|
|
201
|
+
*/
|
|
202
|
+
private extractRustImplItem;
|
|
203
|
+
/**
|
|
204
|
+
* Find a previously-extracted node by name (used for back-references like impl blocks)
|
|
205
|
+
*/
|
|
206
|
+
private findNodeByName;
|
|
207
|
+
/**
|
|
208
|
+
* Languages that support type annotations (TypeScript, etc.)
|
|
209
|
+
*/
|
|
210
|
+
private readonly TYPE_ANNOTATION_LANGUAGES;
|
|
211
|
+
/**
|
|
212
|
+
* Built-in/primitive type names that shouldn't create references
|
|
213
|
+
*/
|
|
214
|
+
private readonly BUILTIN_TYPES;
|
|
215
|
+
/**
|
|
216
|
+
* Extract type references from type annotations on a function/method/field node.
|
|
217
|
+
* Creates 'references' edges for parameter types, return types, and field types.
|
|
218
|
+
*/
|
|
219
|
+
private extractTypeAnnotations;
|
|
220
|
+
/**
|
|
221
|
+
* Extract C# type references from a node that owns a type position —
|
|
222
|
+
* a method/constructor declaration, a property declaration, or a
|
|
223
|
+
* field declaration (which wraps `variable_declaration → type`).
|
|
224
|
+
*
|
|
225
|
+
* Walks ONLY into known type fields, so parameter names like
|
|
226
|
+
* `request` in `Build(UserDto request)` are never mis-emitted as
|
|
227
|
+
* type references. Once inside a type subtree, `walkCsharpTypePosition`
|
|
228
|
+
* recognizes C#'s actual type-leaf node kinds (`identifier`,
|
|
229
|
+
* `qualified_name`, `generic_name`, `array_type`, `nullable_type`,
|
|
230
|
+
* `tuple_type`, …) — none of which are `type_identifier`. Closes #381.
|
|
231
|
+
*/
|
|
232
|
+
private extractCsharpTypeRefs;
|
|
233
|
+
/**
|
|
234
|
+
* Walk a C# subtree that is KNOWN to be in a type position
|
|
235
|
+
* (return type, parameter type, property type, field type, generic
|
|
236
|
+
* argument). Identifiers here are type names, not parameter names.
|
|
237
|
+
*/
|
|
238
|
+
private walkCsharpTypePosition;
|
|
239
|
+
/**
|
|
240
|
+
* Extract type references from a variable's type annotation.
|
|
241
|
+
*/
|
|
242
|
+
private extractVariableTypeAnnotation;
|
|
243
|
+
/**
|
|
244
|
+
* Recursively walk a subtree and extract all type_identifier references.
|
|
245
|
+
* Handles unions, intersections, generics, arrays, etc.
|
|
246
|
+
*/
|
|
247
|
+
private extractTypeRefsFromSubtree;
|
|
248
|
+
/**
|
|
249
|
+
* Handle Pascal-specific AST structures.
|
|
250
|
+
* Returns true if the node was fully handled and children should be skipped.
|
|
251
|
+
*/
|
|
252
|
+
private visitPascalNode;
|
|
253
|
+
/**
|
|
254
|
+
* Extract a Pascal declType node (class, interface, enum, or type alias)
|
|
255
|
+
*/
|
|
256
|
+
private extractPascalDeclType;
|
|
257
|
+
/**
|
|
258
|
+
* Extract Pascal uses clause into individual import nodes
|
|
259
|
+
*/
|
|
260
|
+
private extractPascalUses;
|
|
261
|
+
/**
|
|
262
|
+
* Extract a Pascal constant declaration
|
|
263
|
+
*/
|
|
264
|
+
private extractPascalConst;
|
|
265
|
+
/**
|
|
266
|
+
* Extract Pascal inheritance (extends/implements) from declClass typeref children
|
|
267
|
+
*/
|
|
268
|
+
private extractPascalInheritance;
|
|
269
|
+
/**
|
|
270
|
+
* Extract calls and resolve method context from a Pascal defProc (implementation body).
|
|
271
|
+
* Does not create a new node — the declaration was already captured from the interface section.
|
|
272
|
+
*/
|
|
273
|
+
private extractPascalDefProc;
|
|
274
|
+
/**
|
|
275
|
+
* Extract function calls from a Pascal expression
|
|
276
|
+
*/
|
|
277
|
+
private extractPascalCall;
|
|
278
|
+
/**
|
|
279
|
+
* Recursively visit a Pascal block/statement tree for call expressions
|
|
280
|
+
*/
|
|
281
|
+
private visitPascalBlock;
|
|
282
|
+
}
|
|
283
|
+
/**
|
|
284
|
+
* Extract nodes and edges from source code.
|
|
285
|
+
*
|
|
286
|
+
* If `frameworkNames` is provided, framework-specific extractors matching
|
|
287
|
+
* those names and the file's language are run after the tree-sitter pass.
|
|
288
|
+
* Their nodes/references/errors are merged into the returned result.
|
|
289
|
+
*/
|
|
290
|
+
export declare function extractFromSource(filePath: string, source: string, language?: Language, frameworkNames?: string[]): ExtractionResult;
|
|
291
|
+
//# sourceMappingURL=tree-sitter.d.ts.map
|