@colbymchenry/codegraph-win32-arm64 1.6.0 → 1.6.2
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/bin/codegraph +5 -0
- package/lib/dist/.test-build-engine.json +1 -0
- package/lib/dist/.test-build-viewer.json +1 -0
- package/lib/dist/bin/codegraph.d.ts +1 -0
- package/lib/dist/bin/codegraph.d.ts.map +1 -1
- package/lib/dist/bin/codegraph.js +605 -291
- package/lib/dist/bin/codegraph.js.map +1 -1
- package/lib/dist/bin/command-supervision.d.ts +7 -0
- package/lib/dist/bin/command-supervision.d.ts.map +1 -1
- package/lib/dist/bin/command-supervision.js +39 -27
- package/lib/dist/bin/command-supervision.js.map +1 -1
- package/lib/dist/bin/viewer-gate.d.ts +17 -0
- package/lib/dist/bin/viewer-gate.d.ts.map +1 -0
- package/lib/dist/bin/viewer-gate.js +31 -0
- package/lib/dist/bin/viewer-gate.js.map +1 -0
- package/lib/dist/context/index.d.ts.map +1 -1
- package/lib/dist/context/index.js +43 -2
- package/lib/dist/context/index.js.map +1 -1
- package/lib/dist/db/index.d.ts +21 -2
- package/lib/dist/db/index.d.ts.map +1 -1
- package/lib/dist/db/index.js +86 -31
- package/lib/dist/db/index.js.map +1 -1
- package/lib/dist/db/migrations.d.ts +1 -1
- package/lib/dist/db/migrations.d.ts.map +1 -1
- package/lib/dist/db/migrations.js +40 -1
- package/lib/dist/db/migrations.js.map +1 -1
- package/lib/dist/db/queries.d.ts +454 -10
- package/lib/dist/db/queries.d.ts.map +1 -1
- package/lib/dist/db/queries.js +1080 -41
- package/lib/dist/db/queries.js.map +1 -1
- package/lib/dist/db/schema.sql +11 -1
- package/lib/dist/db/sqlite-adapter.d.ts +2 -0
- package/lib/dist/db/sqlite-adapter.d.ts.map +1 -1
- package/lib/dist/db/sqlite-adapter.js +56 -7
- package/lib/dist/db/sqlite-adapter.js.map +1 -1
- package/lib/dist/db/synthesis-stage.d.ts +12 -0
- package/lib/dist/db/synthesis-stage.d.ts.map +1 -0
- package/lib/dist/db/synthesis-stage.js +89 -0
- package/lib/dist/db/synthesis-stage.js.map +1 -0
- package/lib/dist/db/wal-valve.d.ts +32 -12
- package/lib/dist/db/wal-valve.d.ts.map +1 -1
- package/lib/dist/db/wal-valve.js +65 -22
- package/lib/dist/db/wal-valve.js.map +1 -1
- package/lib/dist/db/wsl-shared-index.d.ts +53 -0
- package/lib/dist/db/wsl-shared-index.d.ts.map +1 -0
- package/lib/dist/db/wsl-shared-index.js +121 -0
- package/lib/dist/db/wsl-shared-index.js.map +1 -0
- package/lib/dist/directory.d.ts +131 -2
- package/lib/dist/directory.d.ts.map +1 -1
- package/lib/dist/directory.js +299 -23
- package/lib/dist/directory.js.map +1 -1
- package/lib/dist/errors.d.ts +14 -0
- package/lib/dist/errors.d.ts.map +1 -1
- package/lib/dist/errors.js +16 -1
- package/lib/dist/errors.js.map +1 -1
- package/lib/dist/extraction/astro-extractor.d.ts.map +1 -1
- package/lib/dist/extraction/astro-extractor.js +7 -35
- package/lib/dist/extraction/astro-extractor.js.map +1 -1
- package/lib/dist/extraction/cfml-extractor.d.ts +77 -10
- package/lib/dist/extraction/cfml-extractor.d.ts.map +1 -1
- package/lib/dist/extraction/cfml-extractor.js +302 -71
- package/lib/dist/extraction/cfml-extractor.js.map +1 -1
- package/lib/dist/extraction/commonjs-requires.d.ts +23 -0
- package/lib/dist/extraction/commonjs-requires.d.ts.map +1 -0
- package/lib/dist/extraction/commonjs-requires.js +68 -0
- package/lib/dist/extraction/commonjs-requires.js.map +1 -0
- package/lib/dist/extraction/dfm-extractor.d.ts.map +1 -1
- package/lib/dist/extraction/dfm-extractor.js +14 -10
- package/lib/dist/extraction/dfm-extractor.js.map +1 -1
- package/lib/dist/extraction/extraction-version.d.ts +1 -1
- package/lib/dist/extraction/extraction-version.js +1 -1
- package/lib/dist/extraction/function-ref.d.ts +6 -4
- package/lib/dist/extraction/function-ref.d.ts.map +1 -1
- package/lib/dist/extraction/function-ref.js +35 -14
- package/lib/dist/extraction/function-ref.js.map +1 -1
- package/lib/dist/extraction/generated-detection.d.ts +9 -0
- package/lib/dist/extraction/generated-detection.d.ts.map +1 -1
- package/lib/dist/extraction/generated-detection.js +42 -2
- package/lib/dist/extraction/generated-detection.js.map +1 -1
- package/lib/dist/extraction/grammars.d.ts +40 -0
- package/lib/dist/extraction/grammars.d.ts.map +1 -1
- package/lib/dist/extraction/grammars.js +171 -1
- package/lib/dist/extraction/grammars.js.map +1 -1
- package/lib/dist/extraction/index.d.ts +132 -19
- package/lib/dist/extraction/index.d.ts.map +1 -1
- package/lib/dist/extraction/index.js +825 -195
- package/lib/dist/extraction/index.js.map +1 -1
- package/lib/dist/extraction/kernel/index.d.ts.map +1 -1
- package/lib/dist/extraction/kernel/index.js +6 -0
- package/lib/dist/extraction/kernel/index.js.map +1 -1
- package/lib/dist/extraction/languages/c-cpp.d.ts +73 -0
- package/lib/dist/extraction/languages/c-cpp.d.ts.map +1 -1
- package/lib/dist/extraction/languages/c-cpp.js +412 -16
- package/lib/dist/extraction/languages/c-cpp.js.map +1 -1
- package/lib/dist/extraction/languages/csharp.d.ts.map +1 -1
- package/lib/dist/extraction/languages/csharp.js +14 -5
- package/lib/dist/extraction/languages/csharp.js.map +1 -1
- package/lib/dist/extraction/languages/dart.d.ts.map +1 -1
- package/lib/dist/extraction/languages/dart.js +16 -3
- package/lib/dist/extraction/languages/dart.js.map +1 -1
- package/lib/dist/extraction/languages/javascript.js +1 -1
- package/lib/dist/extraction/languages/javascript.js.map +1 -1
- package/lib/dist/extraction/languages/kotlin.d.ts +4 -0
- package/lib/dist/extraction/languages/kotlin.d.ts.map +1 -1
- package/lib/dist/extraction/languages/kotlin.js +237 -36
- package/lib/dist/extraction/languages/kotlin.js.map +1 -1
- package/lib/dist/extraction/languages/lua.d.ts.map +1 -1
- package/lib/dist/extraction/languages/lua.js +4 -1
- package/lib/dist/extraction/languages/lua.js.map +1 -1
- package/lib/dist/extraction/languages/python.d.ts.map +1 -1
- package/lib/dist/extraction/languages/python.js +71 -0
- package/lib/dist/extraction/languages/python.js.map +1 -1
- package/lib/dist/extraction/languages/rust.d.ts.map +1 -1
- package/lib/dist/extraction/languages/rust.js +3 -0
- package/lib/dist/extraction/languages/rust.js.map +1 -1
- package/lib/dist/extraction/languages/scala.d.ts.map +1 -1
- package/lib/dist/extraction/languages/scala.js +18 -3
- package/lib/dist/extraction/languages/scala.js.map +1 -1
- package/lib/dist/extraction/languages/swift.d.ts +15 -0
- package/lib/dist/extraction/languages/swift.d.ts.map +1 -1
- package/lib/dist/extraction/languages/swift.js +50 -0
- package/lib/dist/extraction/languages/swift.js.map +1 -1
- package/lib/dist/extraction/languages/typescript.d.ts +7 -0
- package/lib/dist/extraction/languages/typescript.d.ts.map +1 -1
- package/lib/dist/extraction/languages/typescript.js +30 -2
- package/lib/dist/extraction/languages/typescript.js.map +1 -1
- package/lib/dist/extraction/liquid-extractor.d.ts +18 -0
- package/lib/dist/extraction/liquid-extractor.d.ts.map +1 -1
- package/lib/dist/extraction/liquid-extractor.js +98 -22
- package/lib/dist/extraction/liquid-extractor.js.map +1 -1
- package/lib/dist/extraction/mybatis-extractor.d.ts.map +1 -1
- package/lib/dist/extraction/mybatis-extractor.js +6 -4
- package/lib/dist/extraction/mybatis-extractor.js.map +1 -1
- package/lib/dist/extraction/parse-budget.d.ts +16 -0
- package/lib/dist/extraction/parse-budget.d.ts.map +1 -0
- package/lib/dist/extraction/parse-budget.js +24 -0
- package/lib/dist/extraction/parse-budget.js.map +1 -0
- package/lib/dist/extraction/parse-pool.d.ts +12 -0
- package/lib/dist/extraction/parse-pool.d.ts.map +1 -1
- package/lib/dist/extraction/parse-pool.js +51 -3
- package/lib/dist/extraction/parse-pool.js.map +1 -1
- package/lib/dist/extraction/parse-worker.js +3 -1
- package/lib/dist/extraction/parse-worker.js.map +1 -1
- package/lib/dist/extraction/sfc-script.d.ts +43 -0
- package/lib/dist/extraction/sfc-script.d.ts.map +1 -0
- package/lib/dist/extraction/sfc-script.js +135 -0
- package/lib/dist/extraction/sfc-script.js.map +1 -0
- package/lib/dist/extraction/store-worker.js +5 -0
- package/lib/dist/extraction/store-worker.js.map +1 -1
- package/lib/dist/extraction/store-writer.d.ts +10 -2
- package/lib/dist/extraction/store-writer.d.ts.map +1 -1
- package/lib/dist/extraction/store-writer.js +12 -4
- package/lib/dist/extraction/store-writer.js.map +1 -1
- package/lib/dist/extraction/svelte-extractor.d.ts.map +1 -1
- package/lib/dist/extraction/svelte-extractor.js +7 -37
- package/lib/dist/extraction/svelte-extractor.js.map +1 -1
- package/lib/dist/extraction/syntax-tokens.d.ts +103 -0
- package/lib/dist/extraction/syntax-tokens.d.ts.map +1 -0
- package/lib/dist/extraction/syntax-tokens.js +382 -0
- package/lib/dist/extraction/syntax-tokens.js.map +1 -0
- package/lib/dist/extraction/tree-sitter-helpers.d.ts +5 -0
- package/lib/dist/extraction/tree-sitter-helpers.d.ts.map +1 -1
- package/lib/dist/extraction/tree-sitter-helpers.js +17 -0
- package/lib/dist/extraction/tree-sitter-helpers.js.map +1 -1
- package/lib/dist/extraction/tree-sitter-types.d.ts +29 -3
- package/lib/dist/extraction/tree-sitter-types.d.ts.map +1 -1
- package/lib/dist/extraction/tree-sitter.d.ts +104 -17
- package/lib/dist/extraction/tree-sitter.d.ts.map +1 -1
- package/lib/dist/extraction/tree-sitter.js +943 -88
- package/lib/dist/extraction/tree-sitter.js.map +1 -1
- package/lib/dist/extraction/vue-extractor.d.ts +7 -0
- package/lib/dist/extraction/vue-extractor.d.ts.map +1 -1
- package/lib/dist/extraction/vue-extractor.js +73 -35
- package/lib/dist/extraction/vue-extractor.js.map +1 -1
- package/lib/dist/extraction/vue-options-api.d.ts +28 -0
- package/lib/dist/extraction/vue-options-api.d.ts.map +1 -0
- package/lib/dist/extraction/vue-options-api.js +196 -0
- package/lib/dist/extraction/vue-options-api.js.map +1 -0
- package/lib/dist/extraction/wasm/tree-sitter-cobol.wasm +0 -0
- package/lib/dist/extraction/wasm/tree-sitter-kotlin.wasm +0 -0
- package/lib/dist/extraction/wasm/tree-sitter-scala.wasm +0 -0
- package/lib/dist/file-limits.d.ts +40 -0
- package/lib/dist/file-limits.d.ts.map +1 -0
- package/lib/dist/file-limits.js +147 -0
- package/lib/dist/file-limits.js.map +1 -0
- package/lib/dist/graph/branch-guards.d.ts +265 -0
- package/lib/dist/graph/branch-guards.d.ts.map +1 -0
- package/lib/dist/graph/branch-guards.js +2326 -0
- package/lib/dist/graph/branch-guards.js.map +1 -0
- package/lib/dist/graph/dead-code.d.ts +251 -0
- package/lib/dist/graph/dead-code.d.ts.map +1 -0
- package/lib/dist/graph/dead-code.js +776 -0
- package/lib/dist/graph/dead-code.js.map +1 -0
- package/lib/dist/graph/dynamic-boundary-report.d.ts +121 -0
- package/lib/dist/graph/dynamic-boundary-report.d.ts.map +1 -0
- package/lib/dist/graph/dynamic-boundary-report.js +283 -0
- package/lib/dist/graph/dynamic-boundary-report.js.map +1 -0
- package/lib/dist/graph/index.d.ts +4 -0
- package/lib/dist/graph/index.d.ts.map +1 -1
- package/lib/dist/graph/index.js +16 -1
- package/lib/dist/graph/index.js.map +1 -1
- package/lib/dist/graph/named-symbol-flow.d.ts +125 -0
- package/lib/dist/graph/named-symbol-flow.d.ts.map +1 -0
- package/lib/dist/graph/named-symbol-flow.js +559 -0
- package/lib/dist/graph/named-symbol-flow.js.map +1 -0
- package/lib/dist/graph/symbol-lookup.d.ts +83 -0
- package/lib/dist/graph/symbol-lookup.d.ts.map +1 -0
- package/lib/dist/graph/symbol-lookup.js +181 -0
- package/lib/dist/graph/symbol-lookup.js.map +1 -0
- package/lib/dist/graph/traversal.d.ts +9 -0
- package/lib/dist/graph/traversal.d.ts.map +1 -1
- package/lib/dist/graph/traversal.js +61 -35
- package/lib/dist/graph/traversal.js.map +1 -1
- package/lib/dist/graph/type-hierarchy.d.ts +155 -0
- package/lib/dist/graph/type-hierarchy.d.ts.map +1 -0
- package/lib/dist/graph/type-hierarchy.js +382 -0
- package/lib/dist/graph/type-hierarchy.js.map +1 -0
- package/lib/dist/index.d.ts +256 -11
- package/lib/dist/index.d.ts.map +1 -1
- package/lib/dist/index.js +402 -34
- package/lib/dist/index.js.map +1 -1
- package/lib/dist/installer/index.d.ts.map +1 -1
- package/lib/dist/installer/index.js +3 -2
- package/lib/dist/installer/index.js.map +1 -1
- package/lib/dist/installer/targets/antigravity.d.ts.map +1 -1
- package/lib/dist/installer/targets/antigravity.js +14 -2
- package/lib/dist/installer/targets/antigravity.js.map +1 -1
- package/lib/dist/installer/targets/claude.d.ts +3 -0
- package/lib/dist/installer/targets/claude.d.ts.map +1 -1
- package/lib/dist/installer/targets/claude.js +35 -7
- package/lib/dist/installer/targets/claude.js.map +1 -1
- package/lib/dist/installer/targets/codex.d.ts +2 -1
- package/lib/dist/installer/targets/codex.d.ts.map +1 -1
- package/lib/dist/installer/targets/codex.js +14 -4
- package/lib/dist/installer/targets/codex.js.map +1 -1
- package/lib/dist/installer/targets/copilot-cli.d.ts.map +1 -1
- package/lib/dist/installer/targets/copilot-cli.js +7 -1
- package/lib/dist/installer/targets/copilot-cli.js.map +1 -1
- package/lib/dist/installer/targets/opencode.d.ts +16 -5
- package/lib/dist/installer/targets/opencode.d.ts.map +1 -1
- package/lib/dist/installer/targets/opencode.js +73 -22
- package/lib/dist/installer/targets/opencode.js.map +1 -1
- package/lib/dist/installer/targets/shared.d.ts +14 -3
- package/lib/dist/installer/targets/shared.d.ts.map +1 -1
- package/lib/dist/installer/targets/shared.js +39 -11
- package/lib/dist/installer/targets/shared.js.map +1 -1
- package/lib/dist/installer/targets/types.d.ts +7 -0
- package/lib/dist/installer/targets/types.d.ts.map +1 -1
- package/lib/dist/mcp/answer-freshness.d.ts +10 -0
- package/lib/dist/mcp/answer-freshness.d.ts.map +1 -0
- package/lib/dist/mcp/answer-freshness.js +68 -0
- package/lib/dist/mcp/answer-freshness.js.map +1 -0
- package/lib/dist/mcp/daemon-manager.d.ts.map +1 -1
- package/lib/dist/mcp/daemon-manager.js +16 -0
- package/lib/dist/mcp/daemon-manager.js.map +1 -1
- package/lib/dist/mcp/daemon-paths.d.ts +2 -0
- package/lib/dist/mcp/daemon-paths.d.ts.map +1 -1
- package/lib/dist/mcp/daemon-paths.js +20 -5
- package/lib/dist/mcp/daemon-paths.js.map +1 -1
- package/lib/dist/mcp/daemon-registry.d.ts +11 -4
- package/lib/dist/mcp/daemon-registry.d.ts.map +1 -1
- package/lib/dist/mcp/daemon-registry.js +132 -36
- package/lib/dist/mcp/daemon-registry.js.map +1 -1
- package/lib/dist/mcp/daemon.d.ts +17 -7
- package/lib/dist/mcp/daemon.d.ts.map +1 -1
- package/lib/dist/mcp/daemon.js +116 -24
- package/lib/dist/mcp/daemon.js.map +1 -1
- package/lib/dist/mcp/dynamic-boundaries.d.ts +1 -10
- package/lib/dist/mcp/dynamic-boundaries.d.ts.map +1 -1
- package/lib/dist/mcp/dynamic-boundaries.js +46 -42
- package/lib/dist/mcp/dynamic-boundaries.js.map +1 -1
- package/lib/dist/mcp/engine.d.ts +30 -9
- package/lib/dist/mcp/engine.d.ts.map +1 -1
- package/lib/dist/mcp/engine.js +158 -66
- package/lib/dist/mcp/engine.js.map +1 -1
- package/lib/dist/mcp/explore-dedup.d.ts +5 -2
- package/lib/dist/mcp/explore-dedup.d.ts.map +1 -1
- package/lib/dist/mcp/explore-dedup.js +8 -5
- package/lib/dist/mcp/explore-dedup.js.map +1 -1
- package/lib/dist/mcp/index-freshness-worker.d.ts +2 -0
- package/lib/dist/mcp/index-freshness-worker.d.ts.map +1 -0
- package/lib/dist/mcp/index-freshness-worker.js +36 -0
- package/lib/dist/mcp/index-freshness-worker.js.map +1 -0
- package/lib/dist/mcp/index-freshness.d.ts +13 -0
- package/lib/dist/mcp/index-freshness.d.ts.map +1 -0
- package/lib/dist/mcp/index-freshness.js +117 -0
- package/lib/dist/mcp/index-freshness.js.map +1 -0
- package/lib/dist/mcp/index.d.ts +3 -1
- package/lib/dist/mcp/index.d.ts.map +1 -1
- package/lib/dist/mcp/index.js +95 -11
- package/lib/dist/mcp/index.js.map +1 -1
- package/lib/dist/mcp/liveness-watchdog.d.ts +4 -1
- package/lib/dist/mcp/liveness-watchdog.d.ts.map +1 -1
- package/lib/dist/mcp/liveness-watchdog.js +11 -2
- package/lib/dist/mcp/liveness-watchdog.js.map +1 -1
- package/lib/dist/mcp/project-lifecycle.d.ts +9 -0
- package/lib/dist/mcp/project-lifecycle.d.ts.map +1 -0
- package/lib/dist/mcp/project-lifecycle.js +182 -0
- package/lib/dist/mcp/project-lifecycle.js.map +1 -0
- package/lib/dist/mcp/proxy.d.ts +9 -2
- package/lib/dist/mcp/proxy.d.ts.map +1 -1
- package/lib/dist/mcp/proxy.js +201 -32
- package/lib/dist/mcp/proxy.js.map +1 -1
- package/lib/dist/mcp/query-pool.d.ts +18 -3
- package/lib/dist/mcp/query-pool.d.ts.map +1 -1
- package/lib/dist/mcp/query-pool.js +67 -11
- package/lib/dist/mcp/query-pool.js.map +1 -1
- package/lib/dist/mcp/query-worker.js +2 -2
- package/lib/dist/mcp/query-worker.js.map +1 -1
- package/lib/dist/mcp/server-instructions.d.ts +1 -1
- package/lib/dist/mcp/server-instructions.d.ts.map +1 -1
- package/lib/dist/mcp/server-instructions.js +6 -3
- package/lib/dist/mcp/server-instructions.js.map +1 -1
- package/lib/dist/mcp/startup-handshake.d.ts +3 -1
- package/lib/dist/mcp/startup-handshake.d.ts.map +1 -1
- package/lib/dist/mcp/startup-handshake.js +10 -2
- package/lib/dist/mcp/startup-handshake.js.map +1 -1
- package/lib/dist/mcp/tools.d.ts +306 -36
- package/lib/dist/mcp/tools.d.ts.map +1 -1
- package/lib/dist/mcp/tools.js +2395 -966
- package/lib/dist/mcp/tools.js.map +1 -1
- package/lib/dist/mcp/writer-lock.d.ts +61 -0
- package/lib/dist/mcp/writer-lock.d.ts.map +1 -0
- package/lib/dist/mcp/writer-lock.js +260 -0
- package/lib/dist/mcp/writer-lock.js.map +1 -0
- package/lib/dist/resolution/alias-binding.d.ts +56 -0
- package/lib/dist/resolution/alias-binding.d.ts.map +1 -0
- package/lib/dist/resolution/alias-binding.js +143 -0
- package/lib/dist/resolution/alias-binding.js.map +1 -0
- package/lib/dist/resolution/angular-template-synthesizer.d.ts +49 -0
- package/lib/dist/resolution/angular-template-synthesizer.d.ts.map +1 -0
- package/lib/dist/resolution/angular-template-synthesizer.js +359 -0
- package/lib/dist/resolution/angular-template-synthesizer.js.map +1 -0
- package/lib/dist/resolution/callback-synthesizer.d.ts +23 -1
- package/lib/dist/resolution/callback-synthesizer.d.ts.map +1 -1
- package/lib/dist/resolution/callback-synthesizer.js +460 -144
- package/lib/dist/resolution/callback-synthesizer.js.map +1 -1
- package/lib/dist/resolution/cpp-constructor.d.ts +4 -0
- package/lib/dist/resolution/cpp-constructor.d.ts.map +1 -0
- package/lib/dist/resolution/cpp-constructor.js +123 -0
- package/lib/dist/resolution/cpp-constructor.js.map +1 -0
- package/lib/dist/resolution/cpp-macro-visibility.d.ts +12 -0
- package/lib/dist/resolution/cpp-macro-visibility.d.ts.map +1 -0
- package/lib/dist/resolution/cpp-macro-visibility.js +392 -0
- package/lib/dist/resolution/cpp-macro-visibility.js.map +1 -0
- package/lib/dist/resolution/expo-router-synthesizer.d.ts +32 -0
- package/lib/dist/resolution/expo-router-synthesizer.d.ts.map +1 -0
- package/lib/dist/resolution/expo-router-synthesizer.js +189 -0
- package/lib/dist/resolution/expo-router-synthesizer.js.map +1 -0
- package/lib/dist/resolution/frameworks/angular-router.d.ts +142 -0
- package/lib/dist/resolution/frameworks/angular-router.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/angular-router.js +1126 -0
- package/lib/dist/resolution/frameworks/angular-router.js.map +1 -0
- package/lib/dist/resolution/frameworks/astro.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/astro.js +32 -6
- package/lib/dist/resolution/frameworks/astro.js.map +1 -1
- package/lib/dist/resolution/frameworks/csharp.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/csharp.js +186 -24
- package/lib/dist/resolution/frameworks/csharp.js.map +1 -1
- package/lib/dist/resolution/frameworks/expo-modules.d.ts +10 -0
- package/lib/dist/resolution/frameworks/expo-modules.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/expo-modules.js +95 -1
- package/lib/dist/resolution/frameworks/expo-modules.js.map +1 -1
- package/lib/dist/resolution/frameworks/expo-router.d.ts +195 -0
- package/lib/dist/resolution/frameworks/expo-router.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/expo-router.js +847 -0
- package/lib/dist/resolution/frameworks/expo-router.js.map +1 -0
- package/lib/dist/resolution/frameworks/express.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/express.js +339 -45
- package/lib/dist/resolution/frameworks/express.js.map +1 -1
- package/lib/dist/resolution/frameworks/fabric.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/fabric.js +13 -11
- package/lib/dist/resolution/frameworks/fabric.js.map +1 -1
- package/lib/dist/resolution/frameworks/go.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/go.js +11 -28
- package/lib/dist/resolution/frameworks/go.js.map +1 -1
- package/lib/dist/resolution/frameworks/index.d.ts +8 -2
- package/lib/dist/resolution/frameworks/index.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/index.js +39 -1
- package/lib/dist/resolution/frameworks/index.js.map +1 -1
- package/lib/dist/resolution/frameworks/java.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/java.js +88 -68
- package/lib/dist/resolution/frameworks/java.js.map +1 -1
- package/lib/dist/resolution/frameworks/laravel.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/laravel.js +369 -26
- package/lib/dist/resolution/frameworks/laravel.js.map +1 -1
- package/lib/dist/resolution/frameworks/name-heuristic.d.ts +35 -0
- package/lib/dist/resolution/frameworks/name-heuristic.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/name-heuristic.js +45 -0
- package/lib/dist/resolution/frameworks/name-heuristic.js.map +1 -0
- package/lib/dist/resolution/frameworks/nestjs.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/nestjs.js +288 -55
- package/lib/dist/resolution/frameworks/nestjs.js.map +1 -1
- package/lib/dist/resolution/frameworks/nextjs.d.ts +76 -0
- package/lib/dist/resolution/frameworks/nextjs.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/nextjs.js +329 -0
- package/lib/dist/resolution/frameworks/nextjs.js.map +1 -0
- package/lib/dist/resolution/frameworks/object-literal.d.ts +32 -0
- package/lib/dist/resolution/frameworks/object-literal.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/object-literal.js +139 -0
- package/lib/dist/resolution/frameworks/object-literal.js.map +1 -0
- package/lib/dist/resolution/frameworks/package-deps.d.ts +14 -0
- package/lib/dist/resolution/frameworks/package-deps.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/package-deps.js +78 -0
- package/lib/dist/resolution/frameworks/package-deps.js.map +1 -0
- package/lib/dist/resolution/frameworks/page-component.d.ts +20 -0
- package/lib/dist/resolution/frameworks/page-component.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/page-component.js +45 -0
- package/lib/dist/resolution/frameworks/page-component.js.map +1 -0
- package/lib/dist/resolution/frameworks/play.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/play.js +3 -1
- package/lib/dist/resolution/frameworks/play.js.map +1 -1
- package/lib/dist/resolution/frameworks/python.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/python.js +279 -26
- package/lib/dist/resolution/frameworks/python.js.map +1 -1
- package/lib/dist/resolution/frameworks/react-native.d.ts +26 -0
- package/lib/dist/resolution/frameworks/react-native.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/react-native.js +153 -14
- package/lib/dist/resolution/frameworks/react-native.js.map +1 -1
- package/lib/dist/resolution/frameworks/react-router.d.ts +47 -0
- package/lib/dist/resolution/frameworks/react-router.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/react-router.js +201 -0
- package/lib/dist/resolution/frameworks/react-router.js.map +1 -0
- package/lib/dist/resolution/frameworks/react.d.ts +13 -2
- package/lib/dist/resolution/frameworks/react.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/react.js +542 -144
- package/lib/dist/resolution/frameworks/react.js.map +1 -1
- package/lib/dist/resolution/frameworks/ruby.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/ruby.js +177 -17
- package/lib/dist/resolution/frameworks/ruby.js.map +1 -1
- package/lib/dist/resolution/frameworks/rust.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/rust.js +24 -22
- package/lib/dist/resolution/frameworks/rust.js.map +1 -1
- package/lib/dist/resolution/frameworks/svelte.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/svelte.js +14 -6
- package/lib/dist/resolution/frameworks/svelte.js.map +1 -1
- package/lib/dist/resolution/frameworks/sveltekit-router.d.ts +36 -0
- package/lib/dist/resolution/frameworks/sveltekit-router.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/sveltekit-router.js +156 -0
- package/lib/dist/resolution/frameworks/sveltekit-router.js.map +1 -0
- package/lib/dist/resolution/frameworks/swift.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/swift.js +253 -124
- package/lib/dist/resolution/frameworks/swift.js.map +1 -1
- package/lib/dist/resolution/frameworks/tanstack-router.d.ts +84 -0
- package/lib/dist/resolution/frameworks/tanstack-router.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/tanstack-router.js +437 -0
- package/lib/dist/resolution/frameworks/tanstack-router.js.map +1 -0
- package/lib/dist/resolution/frameworks/vue-router.d.ts +98 -0
- package/lib/dist/resolution/frameworks/vue-router.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/vue-router.js +500 -0
- package/lib/dist/resolution/frameworks/vue-router.js.map +1 -0
- package/lib/dist/resolution/frameworks/vue.d.ts +9 -2
- package/lib/dist/resolution/frameworks/vue.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/vue.js +45 -11
- package/lib/dist/resolution/frameworks/vue.js.map +1 -1
- package/lib/dist/resolution/import-resolver.d.ts +66 -0
- package/lib/dist/resolution/import-resolver.d.ts.map +1 -1
- package/lib/dist/resolution/import-resolver.js +643 -61
- package/lib/dist/resolution/import-resolver.js.map +1 -1
- package/lib/dist/resolution/index.d.ts +124 -25
- package/lib/dist/resolution/index.d.ts.map +1 -1
- package/lib/dist/resolution/index.js +769 -152
- package/lib/dist/resolution/index.js.map +1 -1
- package/lib/dist/resolution/js-builtins.d.ts +13 -0
- package/lib/dist/resolution/js-builtins.d.ts.map +1 -0
- package/lib/dist/resolution/js-builtins.js +48 -0
- package/lib/dist/resolution/js-builtins.js.map +1 -0
- package/lib/dist/resolution/name-matcher.d.ts +101 -22
- package/lib/dist/resolution/name-matcher.d.ts.map +1 -1
- package/lib/dist/resolution/name-matcher.js +8267 -287
- package/lib/dist/resolution/name-matcher.js.map +1 -1
- package/lib/dist/resolution/next-router-synthesizer.d.ts +27 -0
- package/lib/dist/resolution/next-router-synthesizer.d.ts.map +1 -0
- package/lib/dist/resolution/next-router-synthesizer.js +113 -0
- package/lib/dist/resolution/next-router-synthesizer.js.map +1 -0
- package/lib/dist/resolution/react-router-synthesizer.d.ts +35 -0
- package/lib/dist/resolution/react-router-synthesizer.d.ts.map +1 -0
- package/lib/dist/resolution/react-router-synthesizer.js +197 -0
- package/lib/dist/resolution/react-router-synthesizer.js.map +1 -0
- package/lib/dist/resolution/resolver-pool.d.ts +22 -1
- package/lib/dist/resolution/resolver-pool.d.ts.map +1 -1
- package/lib/dist/resolution/resolver-pool.js +35 -5
- package/lib/dist/resolution/resolver-pool.js.map +1 -1
- package/lib/dist/resolution/resolver-worker.js +3 -0
- package/lib/dist/resolution/resolver-worker.js.map +1 -1
- package/lib/dist/resolution/strip-comments.d.ts +6 -0
- package/lib/dist/resolution/strip-comments.d.ts.map +1 -1
- package/lib/dist/resolution/strip-comments.js +58 -0
- package/lib/dist/resolution/strip-comments.js.map +1 -1
- package/lib/dist/resolution/sveltekit-synthesizer.d.ts +58 -0
- package/lib/dist/resolution/sveltekit-synthesizer.d.ts.map +1 -0
- package/lib/dist/resolution/sveltekit-synthesizer.js +173 -0
- package/lib/dist/resolution/sveltekit-synthesizer.js.map +1 -0
- package/lib/dist/resolution/swift-type-visibility.d.ts +68 -0
- package/lib/dist/resolution/swift-type-visibility.d.ts.map +1 -0
- package/lib/dist/resolution/swift-type-visibility.js +454 -0
- package/lib/dist/resolution/swift-type-visibility.js.map +1 -0
- package/lib/dist/resolution/synth-utils.d.ts +26 -0
- package/lib/dist/resolution/synth-utils.d.ts.map +1 -0
- package/lib/dist/resolution/synth-utils.js +75 -0
- package/lib/dist/resolution/synth-utils.js.map +1 -0
- package/lib/dist/resolution/tanstack-router-synthesizer.d.ts +31 -0
- package/lib/dist/resolution/tanstack-router-synthesizer.d.ts.map +1 -0
- package/lib/dist/resolution/tanstack-router-synthesizer.js +114 -0
- package/lib/dist/resolution/tanstack-router-synthesizer.js.map +1 -0
- package/lib/dist/resolution/tier-synthesizer.d.ts +54 -0
- package/lib/dist/resolution/tier-synthesizer.d.ts.map +1 -0
- package/lib/dist/resolution/tier-synthesizer.js +1294 -0
- package/lib/dist/resolution/tier-synthesizer.js.map +1 -0
- package/lib/dist/resolution/type-parameters.d.ts +11 -0
- package/lib/dist/resolution/type-parameters.d.ts.map +1 -0
- package/lib/dist/resolution/type-parameters.js +287 -0
- package/lib/dist/resolution/type-parameters.js.map +1 -0
- package/lib/dist/resolution/types.d.ts +105 -2
- package/lib/dist/resolution/types.d.ts.map +1 -1
- package/lib/dist/resolution/types.js +64 -0
- package/lib/dist/resolution/types.js.map +1 -1
- package/lib/dist/resolution/vue-router-synthesizer.d.ts +30 -0
- package/lib/dist/resolution/vue-router-synthesizer.d.ts.map +1 -0
- package/lib/dist/resolution/vue-router-synthesizer.js +115 -0
- package/lib/dist/resolution/vue-router-synthesizer.js.map +1 -0
- package/lib/dist/search/query-paths.d.ts +50 -1
- package/lib/dist/search/query-paths.d.ts.map +1 -1
- package/lib/dist/search/query-paths.js +227 -12
- package/lib/dist/search/query-paths.js.map +1 -1
- package/lib/dist/search/query-utils.d.ts +15 -0
- package/lib/dist/search/query-utils.d.ts.map +1 -1
- package/lib/dist/search/query-utils.js +35 -7
- package/lib/dist/search/query-utils.js.map +1 -1
- package/lib/dist/sync/watch-policy.d.ts +14 -0
- package/lib/dist/sync/watch-policy.d.ts.map +1 -1
- package/lib/dist/sync/watch-policy.js +19 -0
- package/lib/dist/sync/watch-policy.js.map +1 -1
- package/lib/dist/sync/watcher.d.ts +52 -35
- package/lib/dist/sync/watcher.d.ts.map +1 -1
- package/lib/dist/sync/watcher.js +236 -100
- package/lib/dist/sync/watcher.js.map +1 -1
- package/lib/dist/sync/worktree.d.ts +22 -0
- package/lib/dist/sync/worktree.d.ts.map +1 -1
- package/lib/dist/sync/worktree.js +54 -0
- package/lib/dist/sync/worktree.js.map +1 -1
- package/lib/dist/telemetry/index.d.ts +4 -2
- package/lib/dist/telemetry/index.d.ts.map +1 -1
- package/lib/dist/telemetry/index.js +159 -66
- package/lib/dist/telemetry/index.js.map +1 -1
- package/lib/dist/types.d.ts +1 -1
- package/lib/dist/types.d.ts.map +1 -1
- package/lib/dist/types.js +1 -0
- package/lib/dist/types.js.map +1 -1
- package/lib/dist/ui-server/api/deadcode.d.ts +84 -0
- package/lib/dist/ui-server/api/deadcode.d.ts.map +1 -0
- package/lib/dist/ui-server/api/deadcode.js +136 -0
- package/lib/dist/ui-server/api/deadcode.js.map +1 -0
- package/lib/dist/ui-server/api/effects.d.ts +94 -0
- package/lib/dist/ui-server/api/effects.d.ts.map +1 -0
- package/lib/dist/ui-server/api/effects.js +527 -0
- package/lib/dist/ui-server/api/effects.js.map +1 -0
- package/lib/dist/ui-server/api/entrypoints.d.ts +92 -0
- package/lib/dist/ui-server/api/entrypoints.d.ts.map +1 -0
- package/lib/dist/ui-server/api/entrypoints.js +364 -0
- package/lib/dist/ui-server/api/entrypoints.js.map +1 -0
- package/lib/dist/ui-server/api/events.d.ts +183 -0
- package/lib/dist/ui-server/api/events.d.ts.map +1 -0
- package/lib/dist/ui-server/api/events.js +430 -0
- package/lib/dist/ui-server/api/events.js.map +1 -0
- package/lib/dist/ui-server/api/file.d.ts +66 -0
- package/lib/dist/ui-server/api/file.d.ts.map +1 -0
- package/lib/dist/ui-server/api/file.js +235 -0
- package/lib/dist/ui-server/api/file.js.map +1 -0
- package/lib/dist/ui-server/api/filecode.d.ts +126 -0
- package/lib/dist/ui-server/api/filecode.d.ts.map +1 -0
- package/lib/dist/ui-server/api/filecode.js +205 -0
- package/lib/dist/ui-server/api/filecode.js.map +1 -0
- package/lib/dist/ui-server/api/flow.d.ts +226 -0
- package/lib/dist/ui-server/api/flow.d.ts.map +1 -0
- package/lib/dist/ui-server/api/flow.js +612 -0
- package/lib/dist/ui-server/api/flow.js.map +1 -0
- package/lib/dist/ui-server/api/hierarchy.d.ts +81 -0
- package/lib/dist/ui-server/api/hierarchy.d.ts.map +1 -0
- package/lib/dist/ui-server/api/hierarchy.js +92 -0
- package/lib/dist/ui-server/api/hierarchy.js.map +1 -0
- package/lib/dist/ui-server/api/index.d.ts +90 -0
- package/lib/dist/ui-server/api/index.d.ts.map +1 -0
- package/lib/dist/ui-server/api/index.js +332 -0
- package/lib/dist/ui-server/api/index.js.map +1 -0
- package/lib/dist/ui-server/api/map.d.ts +273 -0
- package/lib/dist/ui-server/api/map.d.ts.map +1 -0
- package/lib/dist/ui-server/api/map.js +781 -0
- package/lib/dist/ui-server/api/map.js.map +1 -0
- package/lib/dist/ui-server/api/node.d.ts +81 -0
- package/lib/dist/ui-server/api/node.d.ts.map +1 -0
- package/lib/dist/ui-server/api/node.js +394 -0
- package/lib/dist/ui-server/api/node.js.map +1 -0
- package/lib/dist/ui-server/api/nodes.d.ts +25 -0
- package/lib/dist/ui-server/api/nodes.d.ts.map +1 -0
- package/lib/dist/ui-server/api/nodes.js +45 -0
- package/lib/dist/ui-server/api/nodes.js.map +1 -0
- package/lib/dist/ui-server/api/program.d.ts +139 -0
- package/lib/dist/ui-server/api/program.d.ts.map +1 -0
- package/lib/dist/ui-server/api/program.js +315 -0
- package/lib/dist/ui-server/api/program.js.map +1 -0
- package/lib/dist/ui-server/api/respond.d.ts +76 -0
- package/lib/dist/ui-server/api/respond.d.ts.map +1 -0
- package/lib/dist/ui-server/api/respond.js +186 -0
- package/lib/dist/ui-server/api/respond.js.map +1 -0
- package/lib/dist/ui-server/api/route-roots.d.ts +45 -0
- package/lib/dist/ui-server/api/route-roots.d.ts.map +1 -0
- package/lib/dist/ui-server/api/route-roots.js +117 -0
- package/lib/dist/ui-server/api/route-roots.js.map +1 -0
- package/lib/dist/ui-server/api/routes.d.ts +61 -0
- package/lib/dist/ui-server/api/routes.d.ts.map +1 -0
- package/lib/dist/ui-server/api/routes.js +164 -0
- package/lib/dist/ui-server/api/routes.js.map +1 -0
- package/lib/dist/ui-server/api/screens.d.ts +117 -0
- package/lib/dist/ui-server/api/screens.d.ts.map +1 -0
- package/lib/dist/ui-server/api/screens.js +626 -0
- package/lib/dist/ui-server/api/screens.js.map +1 -0
- package/lib/dist/ui-server/api/search.d.ts +29 -0
- package/lib/dist/ui-server/api/search.d.ts.map +1 -0
- package/lib/dist/ui-server/api/search.js +232 -0
- package/lib/dist/ui-server/api/search.js.map +1 -0
- package/lib/dist/ui-server/api/session.d.ts +52 -0
- package/lib/dist/ui-server/api/session.d.ts.map +1 -0
- package/lib/dist/ui-server/api/session.js +196 -0
- package/lib/dist/ui-server/api/session.js.map +1 -0
- package/lib/dist/ui-server/api/source.d.ts +200 -0
- package/lib/dist/ui-server/api/source.d.ts.map +1 -0
- package/lib/dist/ui-server/api/source.js +422 -0
- package/lib/dist/ui-server/api/source.js.map +1 -0
- package/lib/dist/ui-server/api/stats.d.ts +27 -0
- package/lib/dist/ui-server/api/stats.d.ts.map +1 -0
- package/lib/dist/ui-server/api/stats.js +164 -0
- package/lib/dist/ui-server/api/stats.js.map +1 -0
- package/lib/dist/ui-server/api/steps.d.ts +274 -0
- package/lib/dist/ui-server/api/steps.d.ts.map +1 -0
- package/lib/dist/ui-server/api/steps.js +1554 -0
- package/lib/dist/ui-server/api/steps.js.map +1 -0
- package/lib/dist/ui-server/api/trail-store.d.ts +142 -0
- package/lib/dist/ui-server/api/trail-store.d.ts.map +1 -0
- package/lib/dist/ui-server/api/trail-store.js +323 -0
- package/lib/dist/ui-server/api/trail-store.js.map +1 -0
- package/lib/dist/ui-server/api/trails.d.ts +163 -0
- package/lib/dist/ui-server/api/trails.d.ts.map +1 -0
- package/lib/dist/ui-server/api/trails.js +370 -0
- package/lib/dist/ui-server/api/trails.js.map +1 -0
- package/lib/dist/ui-server/api/when.d.ts +133 -0
- package/lib/dist/ui-server/api/when.d.ts.map +1 -0
- package/lib/dist/ui-server/api/when.js +275 -0
- package/lib/dist/ui-server/api/when.js.map +1 -0
- package/lib/dist/ui-server/api/wire.d.ts +179 -0
- package/lib/dist/ui-server/api/wire.d.ts.map +1 -0
- package/lib/dist/ui-server/api/wire.js +231 -0
- package/lib/dist/ui-server/api/wire.js.map +1 -0
- package/lib/dist/ui-server/assets.d.ts +40 -0
- package/lib/dist/ui-server/assets.d.ts.map +1 -0
- package/lib/dist/ui-server/assets.js +110 -0
- package/lib/dist/ui-server/assets.js.map +1 -0
- package/lib/dist/ui-server/constants.d.ts +32 -0
- package/lib/dist/ui-server/constants.d.ts.map +1 -0
- package/lib/dist/ui-server/constants.js +35 -0
- package/lib/dist/ui-server/constants.js.map +1 -0
- package/lib/dist/ui-server/highlight/bounded-tokenize.d.ts +28 -0
- package/lib/dist/ui-server/highlight/bounded-tokenize.d.ts.map +1 -0
- package/lib/dist/ui-server/highlight/bounded-tokenize.js +139 -0
- package/lib/dist/ui-server/highlight/bounded-tokenize.js.map +1 -0
- package/lib/dist/ui-server/highlight/index.d.ts +113 -0
- package/lib/dist/ui-server/highlight/index.d.ts.map +1 -0
- package/lib/dist/ui-server/highlight/index.js +312 -0
- package/lib/dist/ui-server/highlight/index.js.map +1 -0
- package/lib/dist/ui-server/highlight/languages.d.ts +36 -0
- package/lib/dist/ui-server/highlight/languages.d.ts.map +1 -0
- package/lib/dist/ui-server/highlight/languages.js +50 -0
- package/lib/dist/ui-server/highlight/languages.js.map +1 -0
- package/lib/dist/ui-server/highlight/tokenize-worker.d.ts +7 -0
- package/lib/dist/ui-server/highlight/tokenize-worker.d.ts.map +1 -0
- package/lib/dist/ui-server/highlight/tokenize-worker.js +20 -0
- package/lib/dist/ui-server/highlight/tokenize-worker.js.map +1 -0
- package/lib/dist/ui-server/index.d.ts +92 -0
- package/lib/dist/ui-server/index.d.ts.map +1 -0
- package/lib/dist/ui-server/index.js +399 -0
- package/lib/dist/ui-server/index.js.map +1 -0
- package/lib/dist/ui-server/open-browser.d.ts +31 -0
- package/lib/dist/ui-server/open-browser.d.ts.map +1 -0
- package/lib/dist/ui-server/open-browser.js +79 -0
- package/lib/dist/ui-server/open-browser.js.map +1 -0
- package/lib/dist/ui-server/security.d.ts +127 -0
- package/lib/dist/ui-server/security.d.ts.map +1 -0
- package/lib/dist/ui-server/security.js +332 -0
- package/lib/dist/ui-server/security.js.map +1 -0
- package/lib/dist/ui-server/static.d.ts +45 -0
- package/lib/dist/ui-server/static.d.ts.map +1 -0
- package/lib/dist/ui-server/static.js +165 -0
- package/lib/dist/ui-server/static.js.map +1 -0
- package/lib/dist/upgrade/index.d.ts +43 -5
- package/lib/dist/upgrade/index.d.ts.map +1 -1
- package/lib/dist/upgrade/index.js +157 -35
- package/lib/dist/upgrade/index.js.map +1 -1
- package/lib/dist/utils.d.ts +14 -2
- package/lib/dist/utils.d.ts.map +1 -1
- package/lib/dist/utils.js +25 -10
- package/lib/dist/utils.js.map +1 -1
- package/lib/dist/viewer/assets/archivo-latin-ext-wght-normal-C4zznr8T.woff2 +0 -0
- package/lib/dist/viewer/assets/archivo-latin-wght-normal-E0tuGl4L.woff2 +0 -0
- package/lib/dist/viewer/assets/archivo-vietnamese-wght-normal-XAtsl5Q_.woff2 +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-400-italic-2syK4fUT.woff +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-400-italic-CBJ8pzag.woff2 +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-400-normal-BSMlKf0J.woff2 +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-400-normal-CEL4l2ZJ.woff +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-500-normal-Ael50iVv.woff +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-500-normal-Bq9vWWag.woff2 +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-600-normal-CTOM6hUh.woff2 +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-600-normal-fLZuRloM.woff +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-400-italic-B4oTjJdl.woff +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-400-italic-CBjNughH.woff2 +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-400-normal-DMdlQ8Kv.woff +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-400-normal-xuaO2J-f.woff2 +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-500-normal-BIfNGwUT.woff +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-500-normal-BqneJy0T.woff2 +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-600-normal-9HEixskS.woff +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-600-normal-V-xxqcpd.woff2 +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-latin-400-italic-66oory27.woff +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-latin-400-italic-BqAiT5Ww.woff2 +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-latin-400-normal-CvHOgSBP.woff +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-latin-400-normal-DMJ8VG8y.woff2 +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-latin-500-normal-CB9ihrfo.woff +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-latin-500-normal-DSY6xOcd.woff2 +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-latin-600-normal-BgSNZQsw.woff2 +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-latin-600-normal-DWFSQ4vo.woff +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-latin-ext-400-italic-B7_fu1kp.woff2 +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-latin-ext-400-italic-Bg0ZHwF4.woff +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-latin-ext-400-normal-BmRBH3aV.woff2 +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-latin-ext-400-normal-D3D2R8hC.woff +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-latin-ext-500-normal-CAhNIIs5.woff2 +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-latin-ext-500-normal-CZ70TYgx.woff +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-latin-ext-600-normal-D38SheWl.woff2 +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-latin-ext-600-normal-DmB0ttJJ.woff +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-vietnamese-400-italic-D6eaYXMU.woff +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-vietnamese-400-italic-DRuN92E5.woff2 +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-vietnamese-400-normal-BulugwFq.woff2 +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-vietnamese-400-normal-DDuiU_S-.woff +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-vietnamese-500-normal-C8zxqsMH.woff +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-vietnamese-500-normal-DZ4AoWbu.woff2 +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-vietnamese-600-normal-D2EvbN8M.woff2 +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-vietnamese-600-normal-iLQfcSjf.woff +0 -0
- package/lib/dist/viewer/assets/index-BSGpxBr9.js +99 -0
- package/lib/dist/viewer/assets/index-CF9yvio6.css +1 -0
- package/lib/dist/viewer/index.html +16 -0
- package/lib/dist/worker-teardown.d.ts +48 -0
- package/lib/dist/worker-teardown.d.ts.map +1 -0
- package/lib/dist/worker-teardown.js +100 -0
- package/lib/dist/worker-teardown.js.map +1 -0
- package/lib/kernel/codegraph-kernel.node +2 -2
- package/lib/node_modules/.package-lock.json +4 -4
- package/lib/node_modules/picomatch/README.md +56 -51
- package/lib/node_modules/picomatch/lib/constants.js +4 -0
- package/lib/node_modules/picomatch/lib/parse.js +341 -1
- package/lib/node_modules/picomatch/lib/picomatch.js +25 -5
- package/lib/node_modules/picomatch/lib/scan.js +30 -18
- package/lib/node_modules/picomatch/package.json +4 -4
- package/lib/package.json +9 -2
- package/package.json +1 -1
|
@@ -3,15 +3,19 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.cppExtractor = exports.cExtractor = void 0;
|
|
4
4
|
exports.normalizeCppReturnType = normalizeCppReturnType;
|
|
5
5
|
exports.stripCppTemplateArgs = stripCppTemplateArgs;
|
|
6
|
+
exports.isCppPureVirtualMethodDecl = isCppPureVirtualMethodDecl;
|
|
6
7
|
exports.blankCppExportMacros = blankCppExportMacros;
|
|
7
8
|
exports.blankCppInlineMacros = blankCppInlineMacros;
|
|
8
9
|
exports.recoverMangledCppName = recoverMangledCppName;
|
|
9
10
|
exports.blankMetalAttributes = blankMetalAttributes;
|
|
11
|
+
exports.maskCppRawStrings = maskCppRawStrings;
|
|
10
12
|
exports.blankCppAnnotationMacroCalls = blankCppAnnotationMacroCalls;
|
|
11
13
|
exports.blankLoneMacroLines = blankLoneMacroLines;
|
|
12
14
|
exports.blankCppApiPrefixMacros = blankCppApiPrefixMacros;
|
|
13
15
|
exports.blankCppInlineAnnotationMacros = blankCppInlineAnnotationMacros;
|
|
14
16
|
exports.blankCudaConstructs = blankCudaConstructs;
|
|
17
|
+
exports.rewriteCppAccessMacros = rewriteCppAccessMacros;
|
|
18
|
+
exports.flattenMidStatementConditionals = flattenMidStatementConditionals;
|
|
15
19
|
exports.blankCLeadingAttrMacros = blankCLeadingAttrMacros;
|
|
16
20
|
exports.blankCCplusplusGuardBodies = blankCCplusplusGuardBodies;
|
|
17
21
|
exports.blankCStatementMacroCalls = blankCStatementMacroCalls;
|
|
@@ -25,6 +29,8 @@ exports.blankCFileScopePrefixedDeclMacros = blankCFileScopePrefixedDeclMacros;
|
|
|
25
29
|
exports.rewriteCPrefixedDeclMacroInitializers = rewriteCPrefixedDeclMacroInitializers;
|
|
26
30
|
exports.blankCVaArgQualifiedTypeArgs = blankCVaArgQualifiedTypeArgs;
|
|
27
31
|
exports.blankCNamedVariadicDefineDots = blankCNamedVariadicDefineDots;
|
|
32
|
+
exports.blankCDesignatedMacroArgs = blankCDesignatedMacroArgs;
|
|
33
|
+
exports.isCppConstructorDeclaration = isCppConstructorDeclaration;
|
|
28
34
|
const tree_sitter_helpers_1 = require("../tree-sitter-helpers");
|
|
29
35
|
/**
|
|
30
36
|
* Find the function NAME's `qualified_identifier` (`Foo::bar`) inside a
|
|
@@ -51,6 +57,67 @@ function findDeclaratorQualifiedId(declarator) {
|
|
|
51
57
|
}
|
|
52
58
|
return undefined;
|
|
53
59
|
}
|
|
60
|
+
/**
|
|
61
|
+
* Single-argument macros are ambiguous without their definition (#1373).
|
|
62
|
+
* Require a preceding local #define whose replacement uses its sole parameter
|
|
63
|
+
* as the function declarator; registration, token-pasting, and K&R forms stay
|
|
64
|
+
* untouched. Walk enclosing scopes, but never guess across conditional macros.
|
|
65
|
+
*/
|
|
66
|
+
function recoverSingleArgMacroDefinedName(node, source) {
|
|
67
|
+
if (node.type !== 'function_definition')
|
|
68
|
+
return undefined;
|
|
69
|
+
const declarator = (0, tree_sitter_helpers_1.getChildByField)(node, 'declarator');
|
|
70
|
+
let macro = null;
|
|
71
|
+
let argument = null;
|
|
72
|
+
if (declarator?.type === 'parenthesized_declarator' && declarator.namedChildCount === 1) {
|
|
73
|
+
// C: NATIVE_FN is parsed as the return type, (name) as the declarator.
|
|
74
|
+
macro = (0, tree_sitter_helpers_1.getChildByField)(node, 'type');
|
|
75
|
+
argument = declarator.namedChild(0);
|
|
76
|
+
if (macro?.type !== 'type_identifier' || argument?.type !== 'identifier')
|
|
77
|
+
return undefined;
|
|
78
|
+
}
|
|
79
|
+
else if (declarator?.type === 'function_declarator' && !(0, tree_sitter_helpers_1.getChildByField)(node, 'type')) {
|
|
80
|
+
// C++: NATIVE_FN(name) is parsed as an implicit-return-type function.
|
|
81
|
+
macro = (0, tree_sitter_helpers_1.getChildByField)(declarator, 'declarator');
|
|
82
|
+
const params = (0, tree_sitter_helpers_1.getChildByField)(declarator, 'parameters');
|
|
83
|
+
const param = params?.namedChild(0);
|
|
84
|
+
if (macro?.type !== 'identifier' || params?.namedChildCount !== 1 ||
|
|
85
|
+
param?.type !== 'parameter_declaration' || param.namedChildCount !== 1)
|
|
86
|
+
return undefined;
|
|
87
|
+
argument = param.namedChild(0);
|
|
88
|
+
if (argument?.type !== 'type_identifier')
|
|
89
|
+
return undefined;
|
|
90
|
+
}
|
|
91
|
+
if (!macro || !argument)
|
|
92
|
+
return undefined;
|
|
93
|
+
const macroName = (0, tree_sitter_helpers_1.getNodeText)(macro, source);
|
|
94
|
+
for (let scope = node; scope; scope = scope.parent) {
|
|
95
|
+
if (scope.type === 'preproc_else' || scope.type.startsWith('preproc_elif'))
|
|
96
|
+
return undefined;
|
|
97
|
+
for (let prev = scope.previousNamedSibling; prev; prev = prev.previousNamedSibling) {
|
|
98
|
+
if (prev.type.startsWith('preproc_if'))
|
|
99
|
+
return undefined;
|
|
100
|
+
if (prev.type === 'preproc_call' && (0, tree_sitter_helpers_1.getChildByField)(prev, 'directive')?.text === '#undef' &&
|
|
101
|
+
(0, tree_sitter_helpers_1.getChildByField)(prev, 'argument')?.text.trim() === macroName)
|
|
102
|
+
return undefined;
|
|
103
|
+
if (prev.type !== 'preproc_function_def' && prev.type !== 'preproc_def')
|
|
104
|
+
continue;
|
|
105
|
+
if ((0, tree_sitter_helpers_1.getChildByField)(prev, 'name')?.text !== macroName)
|
|
106
|
+
continue;
|
|
107
|
+
const params = (0, tree_sitter_helpers_1.getChildByField)(prev, 'parameters');
|
|
108
|
+
const param = params?.namedChild(0);
|
|
109
|
+
const value = (0, tree_sitter_helpers_1.getChildByField)(prev, 'value');
|
|
110
|
+
if (params?.namedChildCount !== 1 || param?.type !== 'identifier' || !value)
|
|
111
|
+
return undefined;
|
|
112
|
+
const replacement = (0, tree_sitter_helpers_1.getNodeText)(value, source).replace(/\\\r?\n/g, ' ').trim();
|
|
113
|
+
const match = replacement.match(/^(?:[A-Za-z_][A-Za-z0-9_:]*\s+)+[*&\s]*([A-Za-z_]\w*)\s*\([^(){};#]*\)\s*$/);
|
|
114
|
+
if (!match || /\btypedef\b/.test(replacement) || match[1] !== param.text)
|
|
115
|
+
return undefined;
|
|
116
|
+
return (0, tree_sitter_helpers_1.getNodeText)(argument, source);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
return undefined;
|
|
120
|
+
}
|
|
54
121
|
/**
|
|
55
122
|
* Recover the real function name from the macro-definition idiom
|
|
56
123
|
* `MACRO_NAME(real_name, typed args…) { body }` — flash-attention's
|
|
@@ -102,7 +169,7 @@ function recoverCppMacroDefinedName(node, source) {
|
|
|
102
169
|
return name;
|
|
103
170
|
}
|
|
104
171
|
function extractCppQualifiedMethodName(node, source) {
|
|
105
|
-
const macroDefined = recoverCppMacroDefinedName(node, source);
|
|
172
|
+
const macroDefined = recoverSingleArgMacroDefinedName(node, source) ?? recoverCppMacroDefinedName(node, source);
|
|
106
173
|
if (macroDefined)
|
|
107
174
|
return macroDefined;
|
|
108
175
|
const declarator = (0, tree_sitter_helpers_1.getChildByField)(node, 'declarator');
|
|
@@ -208,6 +275,32 @@ function stripCppTemplateArgs(name) {
|
|
|
208
275
|
}
|
|
209
276
|
return out.trim();
|
|
210
277
|
}
|
|
278
|
+
/**
|
|
279
|
+
* Is this C++ `field_declaration` a pure-virtual method (`virtual int read(int key) = 0;`)?
|
|
280
|
+
* tree-sitter-cpp shapes those as a field_declaration whose declarator unwraps to a
|
|
281
|
+
* `function_declarator`, with the pure-virtual `= 0` as a DIRECT `number_literal` "0"
|
|
282
|
+
* child of the field_declaration (default-arg `= 0` lives inside parameter_declaration
|
|
283
|
+
* and must not match). Bodiless method prototypes (`int foo();`) and data members
|
|
284
|
+
* (`int x = 0;`) are excluded — prototypes usually have an out-of-line definition that
|
|
285
|
+
* already mints the method node; pure virtuals never do (#1727).
|
|
286
|
+
*/
|
|
287
|
+
function isCppPureVirtualMethodDecl(node) {
|
|
288
|
+
if (node.type !== 'field_declaration')
|
|
289
|
+
return false;
|
|
290
|
+
let declarator = (0, tree_sitter_helpers_1.getChildByField)(node, 'declarator');
|
|
291
|
+
if (!declarator)
|
|
292
|
+
return false;
|
|
293
|
+
while (declarator.type === 'pointer_declarator' ||
|
|
294
|
+
declarator.type === 'reference_declarator') {
|
|
295
|
+
const inner = (0, tree_sitter_helpers_1.getChildByField)(declarator, 'declarator') || declarator.namedChild(0);
|
|
296
|
+
if (!inner)
|
|
297
|
+
return false;
|
|
298
|
+
declarator = inner;
|
|
299
|
+
}
|
|
300
|
+
if (declarator.type !== 'function_declarator')
|
|
301
|
+
return false;
|
|
302
|
+
return node.namedChildren.some((c) => c.type === 'number_literal' && c.text === '0');
|
|
303
|
+
}
|
|
211
304
|
/**
|
|
212
305
|
* A function/method's return type lives in the `function_definition`'s `type`
|
|
213
306
|
* field (`Metrics& Metrics::instance()` → `Metrics`). Constructors, destructors,
|
|
@@ -220,6 +313,7 @@ function extractCppReturnType(node, source) {
|
|
|
220
313
|
return normalizeCppReturnType((0, tree_sitter_helpers_1.getNodeText)(typeNode, source));
|
|
221
314
|
}
|
|
222
315
|
exports.cExtractor = {
|
|
316
|
+
resolveName: recoverSingleArgMacroDefinedName,
|
|
223
317
|
// CUDA in C-detected headers (content-gated blank; see preParseCSource).
|
|
224
318
|
preParse: preParseCSource,
|
|
225
319
|
// Universal net: recover a real name from any macro-mangled function name.
|
|
@@ -487,6 +581,58 @@ function blankMetalAttributes(source) {
|
|
|
487
581
|
return source;
|
|
488
582
|
return source.replace(METAL_ATTRIBUTE_RE, (m) => ' '.repeat(m.length));
|
|
489
583
|
}
|
|
584
|
+
/**
|
|
585
|
+
* Hide C++ raw literals from the offset-preserving preParse scans (#1505).
|
|
586
|
+
* Neither macro-shaped text in a raw body nor its `)delim"` closer is code.
|
|
587
|
+
* Mask the whole literal with non-whitespace, non-paren tokens, keeping line
|
|
588
|
+
* endings, so even line-based scanners treat a multiline raw argument as opaque.
|
|
589
|
+
* Restore untouched bytes afterward; a real enclosing annotation can still be
|
|
590
|
+
* removed in full. The pipeline masks once, and individual paren blankers also
|
|
591
|
+
* use this helper so they are safe when called directly.
|
|
592
|
+
*/
|
|
593
|
+
function maskCppRawStrings(source) {
|
|
594
|
+
const unchanged = { source, restore: (blanked) => blanked };
|
|
595
|
+
if (source.indexOf('R"') === -1)
|
|
596
|
+
return unchanged;
|
|
597
|
+
// Skip comments and ordinary literals before looking for a raw opener. The
|
|
598
|
+
// char-literal boundary leaves numeric digit separators (1'000) alone.
|
|
599
|
+
const re = /\/\/[^\r\n]*|\/\*[\s\S]*?(?:\*\/|$)|\b(?:u8|[LuU])?R"([^ \t\v\f\r\n()\\]{0,16})\(|"(?:\\[\s\S]|[^"\\])*(?:"|$)|(?<!\w)(?:u8|[LuU])?'(?:\\[\s\S]|[^'\\])*(?:'|$)/g;
|
|
600
|
+
const spans = [];
|
|
601
|
+
const parts = [];
|
|
602
|
+
let last = 0;
|
|
603
|
+
let m;
|
|
604
|
+
while ((m = re.exec(source)) !== null) {
|
|
605
|
+
if (m[1] === undefined)
|
|
606
|
+
continue;
|
|
607
|
+
const closer = `)${m[1]}"`;
|
|
608
|
+
const close = source.indexOf(closer, re.lastIndex);
|
|
609
|
+
// An unterminated raw literal owns the rest of the file too.
|
|
610
|
+
const end = close < 0 ? source.length : close + closer.length;
|
|
611
|
+
spans.push({ start: m.index, end });
|
|
612
|
+
parts.push(source.slice(last, m.index), source.slice(m.index, end).replace(/[^\r\n]/g, '\0'));
|
|
613
|
+
last = re.lastIndex = end;
|
|
614
|
+
}
|
|
615
|
+
if (spans.length === 0)
|
|
616
|
+
return unchanged;
|
|
617
|
+
parts.push(source.slice(last));
|
|
618
|
+
const masked = parts.join('');
|
|
619
|
+
return {
|
|
620
|
+
source: masked,
|
|
621
|
+
restore(blanked) {
|
|
622
|
+
// A length-changing rewrite cannot be restored at the original offsets.
|
|
623
|
+
if (blanked === masked || blanked.length !== source.length)
|
|
624
|
+
return source;
|
|
625
|
+
const chars = blanked.split('');
|
|
626
|
+
for (const { start, end } of spans) {
|
|
627
|
+
for (let i = start; i < end; i++) {
|
|
628
|
+
if (chars[i] === '\0')
|
|
629
|
+
chars[i] = source[i];
|
|
630
|
+
}
|
|
631
|
+
}
|
|
632
|
+
return chars.join('');
|
|
633
|
+
},
|
|
634
|
+
};
|
|
635
|
+
}
|
|
490
636
|
/**
|
|
491
637
|
* Blank annotation-style macro invocations that decorate a declaration but carry
|
|
492
638
|
* NO terminating semicolon — the pervasive Unreal-Engine reflection markup
|
|
@@ -527,6 +673,8 @@ function blankMetalAttributes(source) {
|
|
|
527
673
|
function blankCppAnnotationMacroCalls(source) {
|
|
528
674
|
if (!/^[ \t]*[A-Z][A-Z0-9_]{2,}\s*\(/m.test(source))
|
|
529
675
|
return source;
|
|
676
|
+
const rawStrings = maskCppRawStrings(source);
|
|
677
|
+
source = rawStrings.source;
|
|
530
678
|
const chars = source.split('');
|
|
531
679
|
const re = /^([ \t]*)([A-Z][A-Z0-9_]{2,})(\s*)\(/gm;
|
|
532
680
|
let m;
|
|
@@ -573,7 +721,7 @@ function blankCppAnnotationMacroCalls(source) {
|
|
|
573
721
|
}
|
|
574
722
|
re.lastIndex = end;
|
|
575
723
|
}
|
|
576
|
-
return chars.join('');
|
|
724
|
+
return rawStrings.restore(chars.join(''));
|
|
577
725
|
}
|
|
578
726
|
/**
|
|
579
727
|
* Blank a macro that is the ONLY token on its line — no parens, no semicolon:
|
|
@@ -621,7 +769,14 @@ function blankLoneMacroLines(source) {
|
|
|
621
769
|
let prev = i - 1;
|
|
622
770
|
while (prev >= 0 && content(lines[prev]) === '')
|
|
623
771
|
prev--;
|
|
624
|
-
|
|
772
|
+
// Judged on the line's code: a comment — `/// @sa https://…/meta/`, a
|
|
773
|
+
// block comment's `*/` — ends in whatever it likes but continues nothing,
|
|
774
|
+
// while `CURLE_TOO_LARGE, /* 100 */` continues with its comma. A template
|
|
775
|
+
// head (`template<typename T, typename... Args>`) before a declaration
|
|
776
|
+
// continues nothing either.
|
|
777
|
+
const prevText = prev >= 0 ? content(lines[prev]) : '';
|
|
778
|
+
const prevCode = /^(?:\/\/|\/\*|\*)/.test(prevText) ? '' : prevText.replace(/\/\*.*?\*\/|\/\/.*$/g, '').trim();
|
|
779
|
+
if (prevCode !== '' && !/^template\s*</.test(prevCode) && LONE_MACRO_CONTINUATION_END_RE.test(prevCode))
|
|
625
780
|
continue;
|
|
626
781
|
let next = i + 1;
|
|
627
782
|
while (next < lines.length && content(lines[next]) === '')
|
|
@@ -693,6 +848,8 @@ const CPP_INLINE_ANNOTATION_RE = /\b(?:UMETA|UPARAM|UE_DEPRECATED\w*)\s*\(/g;
|
|
|
693
848
|
function blankCppInlineAnnotationMacros(source) {
|
|
694
849
|
if (!/\b(?:UMETA|UPARAM|UE_DEPRECATED)/.test(source))
|
|
695
850
|
return source;
|
|
851
|
+
const rawStrings = maskCppRawStrings(source);
|
|
852
|
+
source = rawStrings.source;
|
|
696
853
|
const chars = source.split('');
|
|
697
854
|
const re = new RegExp(CPP_INLINE_ANNOTATION_RE.source, 'g');
|
|
698
855
|
let m;
|
|
@@ -730,7 +887,7 @@ function blankCppInlineAnnotationMacros(source) {
|
|
|
730
887
|
}
|
|
731
888
|
re.lastIndex = end;
|
|
732
889
|
}
|
|
733
|
-
return chars.join('');
|
|
890
|
+
return rawStrings.restore(chars.join(''));
|
|
734
891
|
}
|
|
735
892
|
/**
|
|
736
893
|
* Blank CUDA-specific constructs before parsing `.cu`/`.cuh` files (parsed with
|
|
@@ -842,6 +999,32 @@ function restoreDirectiveLines(original, blanked) {
|
|
|
842
999
|
}
|
|
843
1000
|
return changed ? b.join('\n') : blanked;
|
|
844
1001
|
}
|
|
1002
|
+
/** Recover MSVC's COM alias only at type-definition sites. Match on a lexical
|
|
1003
|
+
* mask so comments, literals and directives cannot supply declaration evidence;
|
|
1004
|
+
* replace just the keyword, preserving source offsets on both parser arms. */
|
|
1005
|
+
function normalizeCppComInterfaces(source) {
|
|
1006
|
+
if (!source.includes('interface'))
|
|
1007
|
+
return source;
|
|
1008
|
+
// Raw strings have already been masked by preParseCppSource.
|
|
1009
|
+
let code = source.replace(/\/\/(?:\\\r?\n|[^\r\n])*|\/\*[\s\S]*?(?:\*\/|$)|"(?:\\[\s\S]|[^"\\])*(?:"|$)|(?<!\w)(?:u8|[LuU])?'(?:\\[\s\S]|[^'\\])*(?:'|$)/g, (m) => m.replace(/[^\r\n]/g, ' '));
|
|
1010
|
+
const hasAlias = /^[ \t]*#[ \t]*define[ \t]+interface[ \t]+struct\b/m.test(code);
|
|
1011
|
+
code = code.replace(/^[ \t]*#(?:\\\r?\n|[^\r\n])*/gm, (m) => m.replace(/[^\r\n]/g, '\0'));
|
|
1012
|
+
const declaration = /(^|[;{}])\s*\binterface\s+[A-Za-z_]\w*\s*(:[^;{}]+)?\{/gm;
|
|
1013
|
+
const offsets = [];
|
|
1014
|
+
let match;
|
|
1015
|
+
while ((match = declaration.exec(code)) !== null) {
|
|
1016
|
+
const bodyEnd = code.indexOf('}', declaration.lastIndex);
|
|
1017
|
+
const hasVirtual = /\bvirtual\b/.test(code.slice(declaration.lastIndex, bodyEnd < 0 ? code.length : bodyEnd));
|
|
1018
|
+
if (!hasAlias && !match[2] && !hasVirtual)
|
|
1019
|
+
continue;
|
|
1020
|
+
offsets.push(match.index + match[0].indexOf('interface'));
|
|
1021
|
+
declaration.lastIndex--; // allow the opening brace to start a nested declaration
|
|
1022
|
+
}
|
|
1023
|
+
for (const offset of offsets) {
|
|
1024
|
+
source = source.slice(0, offset) + 'struct ' + source.slice(offset + 9);
|
|
1025
|
+
}
|
|
1026
|
+
return source;
|
|
1027
|
+
}
|
|
845
1028
|
/** C/C++ source pre-processing before tree-sitter: recover macro-annotated class
|
|
846
1029
|
* definitions, macro-prefixed function definitions, macro-prefixed members, and
|
|
847
1030
|
* macro-decorated members (Unreal-Engine reflection markup) — plus the non-C++
|
|
@@ -849,11 +1032,124 @@ function restoreDirectiveLines(original, blanked) {
|
|
|
849
1032
|
* annotations, and CUDA specifiers + launch syntax (by `.cu`/`.cuh` extension
|
|
850
1033
|
* or by content, for CUDA living in `.h`/`.hpp` headers). Offset-preserving;
|
|
851
1034
|
* directive lines are restored at the end (see restoreDirectiveLines). */
|
|
1035
|
+
/**
|
|
1036
|
+
* An access specifier spelled as a macro — nlohmann/json's
|
|
1037
|
+
* `JSON_PRIVATE_UNLESS_TESTED:` (private, or public under test), Qt's
|
|
1038
|
+
* `Q_SIGNALS:` — is rewritten to the keyword it stands for, padded to the
|
|
1039
|
+
* same length. tree-sitter-cpp reads `NAME:` inside a class as an error, and
|
|
1040
|
+
* json.hpp's recovery lost members around each one.
|
|
1041
|
+
*/
|
|
1042
|
+
const ACCESS_MACRO_LINE = /^([ \t]*)([A-Z][A-Z0-9]*_[A-Z0-9_]*)([ \t]*):(?!:)(?=[ \t]*(?:\/\/[^\n]*)?\r?$)/gm;
|
|
1043
|
+
function rewriteCppAccessMacros(source) {
|
|
1044
|
+
if (!/_[A-Z0-9_]*[ \t]*:(?!:)/.test(source))
|
|
1045
|
+
return source;
|
|
1046
|
+
return source.replace(ACCESS_MACRO_LINE, (m, indent, name, gap) => {
|
|
1047
|
+
const keyword = /PRIVATE/.test(name) ? 'private' : /PROTECTED/.test(name) ? 'protected'
|
|
1048
|
+
: /PUBLIC|^Q_SIGNALS$|^Q_SLOTS$/.test(name) ? 'public' : null;
|
|
1049
|
+
if (!keyword || keyword.length > name.length + gap.length)
|
|
1050
|
+
return m;
|
|
1051
|
+
return `${indent}${keyword}${' '.repeat(name.length + gap.length - keyword.length)}:`;
|
|
1052
|
+
});
|
|
1053
|
+
}
|
|
1054
|
+
/**
|
|
1055
|
+
* A preprocessor conditional in the middle of a declaration or expression —
|
|
1056
|
+
* inside a constructor's member-initializer list (nlohmann/json's
|
|
1057
|
+
* `noexcept\n#ifdef JSON_NO_THREAD_LOCAL\n : m_okay(false)\n#else\n :
|
|
1058
|
+
* m_okay(…)\n#endif`), between a template head and its function
|
|
1059
|
+
* (`template <…>\n#if defined(JSON_HAS_CPP_14)\n constexpr\n#endif\n auto
|
|
1060
|
+
* get()`), inside an argument list — is an error to tree-sitter-cpp, and
|
|
1061
|
+
* json.hpp's recovery took the whole `basic_json` class with it. Where the
|
|
1062
|
+
* code before the `#if` has not ended a statement or declaration (`;`, `{`,
|
|
1063
|
+
* `}`, a label's `:`), its directives are blanked and so is every branch
|
|
1064
|
+
* after the first: one consistent configuration, every newline and offset
|
|
1065
|
+
* kept. A conditional between whole declarations is left alone.
|
|
1066
|
+
*/
|
|
1067
|
+
function flattenMidStatementConditionals(source) {
|
|
1068
|
+
if (!source.includes('#'))
|
|
1069
|
+
return source;
|
|
1070
|
+
const lines = source.split('\n');
|
|
1071
|
+
const directive = (i) => /^[ \t]*#[ \t]*(\w+)/.exec(lines[i] ?? '')?.[1] ?? null;
|
|
1072
|
+
const code = (i) => (lines[i] ?? '').replace(/\/\/.*$/, '').replace(/\/\*.*?\*\//g, '').trim();
|
|
1073
|
+
let changed = false;
|
|
1074
|
+
const blank = (i) => {
|
|
1075
|
+
lines[i] = (lines[i] ?? '').replace(/[^\r]/g, ' ');
|
|
1076
|
+
changed = true;
|
|
1077
|
+
};
|
|
1078
|
+
let lastCode = ''; // the last non-directive code line, trimmed
|
|
1079
|
+
let inBlockComment = false;
|
|
1080
|
+
let region = 0; // #if depth inside a flattened conditional (0 = none)
|
|
1081
|
+
let skipFrom = 0; // the depth whose later branches are blanked (0 = none)
|
|
1082
|
+
let continued = false; // inside a `\`-continued directive (a multi-line #define)
|
|
1083
|
+
for (let i = 0; i < lines.length; i++) {
|
|
1084
|
+
if (continued) {
|
|
1085
|
+
continued = /\\\s*$/.test(lines[i] ?? '');
|
|
1086
|
+
continue;
|
|
1087
|
+
}
|
|
1088
|
+
const d = directive(i);
|
|
1089
|
+
if (d !== null && !inBlockComment) {
|
|
1090
|
+
// A directive continued with `\` spans lines; its body is not code.
|
|
1091
|
+
if (/\\\s*$/.test(lines[i])) {
|
|
1092
|
+
continued = true;
|
|
1093
|
+
if (region === 0)
|
|
1094
|
+
continue;
|
|
1095
|
+
}
|
|
1096
|
+
const opens = /^if/.test(d);
|
|
1097
|
+
if (region === 0) {
|
|
1098
|
+
// Not after a statement macro written without its `;`
|
|
1099
|
+
// (`RAPIDJSON_DIAG_OFF(padded)`), either.
|
|
1100
|
+
const mid = opens && lastCode !== '' && !/[;{}]$|^[\w\s]*:$|\*\/$/.test(lastCode) &&
|
|
1101
|
+
!/^(?:public|private|protected)\s*:$/.test(lastCode) && !/^[A-Z][A-Z0-9_]*(?:\s*\(.*\))?$/.test(lastCode);
|
|
1102
|
+
if (!mid)
|
|
1103
|
+
continue;
|
|
1104
|
+
region = 1;
|
|
1105
|
+
blank(i);
|
|
1106
|
+
continue;
|
|
1107
|
+
}
|
|
1108
|
+
if (opens)
|
|
1109
|
+
region++;
|
|
1110
|
+
else if ((d === 'else' || d === 'elif') && skipFrom === 0)
|
|
1111
|
+
skipFrom = region;
|
|
1112
|
+
else if (d === 'endif') {
|
|
1113
|
+
if (skipFrom === region)
|
|
1114
|
+
skipFrom = 0;
|
|
1115
|
+
region--;
|
|
1116
|
+
}
|
|
1117
|
+
if (/^(?:if|ifdef|ifndef|else|elif|elifdef|elifndef|endif)$/.test(d))
|
|
1118
|
+
blank(i);
|
|
1119
|
+
continue;
|
|
1120
|
+
}
|
|
1121
|
+
const text = lines[i] ?? '';
|
|
1122
|
+
if (region > 0 && skipFrom > 0) {
|
|
1123
|
+
if (text.trim() !== '')
|
|
1124
|
+
blank(i);
|
|
1125
|
+
continue;
|
|
1126
|
+
}
|
|
1127
|
+
// Track block comments so a `#` or `;` inside one is not read as code.
|
|
1128
|
+
const trimmed = code(i);
|
|
1129
|
+
if (inBlockComment) {
|
|
1130
|
+
if (text.includes('*/'))
|
|
1131
|
+
inBlockComment = false;
|
|
1132
|
+
continue;
|
|
1133
|
+
}
|
|
1134
|
+
if (/\/\*(?!.*\*\/)/.test(text.replace(/\/\/.*$/, ''))) {
|
|
1135
|
+
inBlockComment = true;
|
|
1136
|
+
const before = trimmed.split('/*')[0].trim();
|
|
1137
|
+
if (before !== '')
|
|
1138
|
+
lastCode = before;
|
|
1139
|
+
continue;
|
|
1140
|
+
}
|
|
1141
|
+
if (trimmed !== '')
|
|
1142
|
+
lastCode = trimmed;
|
|
1143
|
+
}
|
|
1144
|
+
return changed ? lines.join('\n') : source;
|
|
1145
|
+
}
|
|
852
1146
|
function preParseCppSource(source, filePath) {
|
|
1147
|
+
const rawStrings = maskCppRawStrings(source);
|
|
1148
|
+
source = flattenMidStatementConditionals(rewriteCppAccessMacros(rawStrings.source));
|
|
853
1149
|
// blankCLeadingAttrMacros runs AFTER the api-prefix blank so a stacked
|
|
854
1150
|
// `FMT_NORETURN FMT_API void f(…)` reduces to the `MACRO Ret name(` shape
|
|
855
1151
|
// it matches (the _API token is already spaces by then).
|
|
856
|
-
let blanked = blankLoneMacroLines(blankCLeadingAttrMacros(blankCppAnnotationMacroCalls(blankCppInlineAnnotationMacros(blankCppApiPrefixMacros(blankCppInlineMacros(blankCppExportMacros(source)))))));
|
|
1152
|
+
let blanked = blankLoneMacroLines(blankCLeadingAttrMacros(blankCppAnnotationMacroCalls(blankCppInlineAnnotationMacros(blankCppApiPrefixMacros(blankCppInlineMacros(blankCppExportMacros(normalizeCppComInterfaces(source))))))));
|
|
857
1153
|
const lower = filePath ? filePath.toLowerCase() : '';
|
|
858
1154
|
if (lower.endsWith('.metal')) {
|
|
859
1155
|
blanked = blankMetalAttributes(blanked);
|
|
@@ -861,7 +1157,7 @@ function preParseCppSource(source, filePath) {
|
|
|
861
1157
|
else if (lower.endsWith('.cu') || lower.endsWith('.cuh') || looksLikeCudaSource(source)) {
|
|
862
1158
|
blanked = blankCudaConstructs(blanked);
|
|
863
1159
|
}
|
|
864
|
-
return restoreDirectiveLines(source, blanked);
|
|
1160
|
+
return rawStrings.restore(restoreDirectiveLines(source, blanked));
|
|
865
1161
|
}
|
|
866
1162
|
/**
|
|
867
1163
|
* Blank an unknown attribute macro sitting in front of a C function
|
|
@@ -985,6 +1281,8 @@ const C_STMT_MACRO_KEYWORDS = new Set([
|
|
|
985
1281
|
'if', 'while', 'for', 'switch', 'return', 'do', 'else', 'sizeof',
|
|
986
1282
|
]);
|
|
987
1283
|
function blankCStatementMacroCalls(source) {
|
|
1284
|
+
const rawStrings = maskCppRawStrings(source);
|
|
1285
|
+
source = rawStrings.source;
|
|
988
1286
|
const lines = source.split('\n');
|
|
989
1287
|
let changed = false;
|
|
990
1288
|
const content = (l) => l.replace(/\r$/, '').trim();
|
|
@@ -1101,7 +1399,7 @@ function blankCStatementMacroCalls(source) {
|
|
|
1101
1399
|
}
|
|
1102
1400
|
changed = true;
|
|
1103
1401
|
}
|
|
1104
|
-
return changed ? lines.join('\n') : source;
|
|
1402
|
+
return rawStrings.restore(changed ? lines.join('\n') : source);
|
|
1105
1403
|
}
|
|
1106
1404
|
/**
|
|
1107
1405
|
* Blank a lowercase compiler-annotation word SANDWICHED between a storage
|
|
@@ -1254,9 +1552,8 @@ const C_PARAM_ANNOTATION_RE = new RegExp(`\\b(${[...C_PARAMETERIZED_ANNOTATIONS]
|
|
|
1254
1552
|
function blankCParameterizedAnnotationMacros(source) {
|
|
1255
1553
|
if (source.indexOf('__') === -1)
|
|
1256
1554
|
return source;
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
return source;
|
|
1555
|
+
const rawStrings = maskCppRawStrings(source);
|
|
1556
|
+
source = rawStrings.source;
|
|
1260
1557
|
C_PARAM_ANNOTATION_RE.lastIndex = 0;
|
|
1261
1558
|
let result = '';
|
|
1262
1559
|
let last = 0;
|
|
@@ -1277,7 +1574,7 @@ function blankCParameterizedAnnotationMacros(source) {
|
|
|
1277
1574
|
result += source.slice(last, start) + source.slice(start, end).replace(/[^\n\r]/g, ' ');
|
|
1278
1575
|
last = end;
|
|
1279
1576
|
}
|
|
1280
|
-
return result + source.slice(last);
|
|
1577
|
+
return rawStrings.restore(result + source.slice(last));
|
|
1281
1578
|
}
|
|
1282
1579
|
/**
|
|
1283
1580
|
* Blank a bare `struct`/`union`/`enum` TYPE-keyword argument inside a macro
|
|
@@ -1320,6 +1617,8 @@ const C_TYPE_ARG_SCAN_CAP = 600;
|
|
|
1320
1617
|
function blankCTypeKeywordArgs(source) {
|
|
1321
1618
|
if (!/\b(?:struct|union|enum)[ \t\r\n]/.test(source))
|
|
1322
1619
|
return source;
|
|
1620
|
+
const rawStrings = maskCppRawStrings(source);
|
|
1621
|
+
source = rawStrings.source;
|
|
1323
1622
|
let chars = null;
|
|
1324
1623
|
C_TYPE_ARG_HEAD_RE.lastIndex = 0;
|
|
1325
1624
|
let m;
|
|
@@ -1397,7 +1696,7 @@ function blankCTypeKeywordArgs(source) {
|
|
|
1397
1696
|
atArgStart = false;
|
|
1398
1697
|
}
|
|
1399
1698
|
}
|
|
1400
|
-
return chars ? chars.join('') : source;
|
|
1699
|
+
return rawStrings.restore(chars ? chars.join('') : source);
|
|
1401
1700
|
}
|
|
1402
1701
|
/**
|
|
1403
1702
|
* Blank a file-scope `static`/`extern`-prefixed ALL-CAPS declaration macro —
|
|
@@ -1425,6 +1724,8 @@ const C_PREFIXED_DECL_MACRO_RE = /^[ \t]*(?:static|extern)[ \t]+[A-Z][A-Z0-9_]{2
|
|
|
1425
1724
|
function blankCFileScopePrefixedDeclMacros(source) {
|
|
1426
1725
|
if (!/^[ \t]*(?:static|extern)[ \t]+[A-Z]/m.test(source))
|
|
1427
1726
|
return source;
|
|
1727
|
+
const rawStrings = maskCppRawStrings(source);
|
|
1728
|
+
source = rawStrings.source;
|
|
1428
1729
|
const lines = source.split('\n');
|
|
1429
1730
|
let changed = false;
|
|
1430
1731
|
for (let i = 0; i < lines.length; i++) {
|
|
@@ -1464,7 +1765,7 @@ function blankCFileScopePrefixedDeclMacros(source) {
|
|
|
1464
1765
|
lines[i] = line.replace(/[^\n\r]/g, ' ');
|
|
1465
1766
|
changed = true;
|
|
1466
1767
|
}
|
|
1467
|
-
return changed ? lines.join('\n') : source;
|
|
1768
|
+
return rawStrings.restore(changed ? lines.join('\n') : source);
|
|
1468
1769
|
}
|
|
1469
1770
|
/**
|
|
1470
1771
|
* REWRITE (the one non-blank pass in this family — it moves a token) a
|
|
@@ -1575,14 +1876,84 @@ function blankCNamedVariadicDefineDots(source) {
|
|
|
1575
1876
|
* C-detected headers in CUDA projects (llm.c keeps `__device__` helpers and
|
|
1576
1877
|
* kernel prototypes in plain `.h`) — the same content-gated CUDA blank as
|
|
1577
1878
|
* C++. Offset-preserving. */
|
|
1879
|
+
/**
|
|
1880
|
+
* Blank the argument list of a statement-level `MACRO( … );` call whose
|
|
1881
|
+
* arguments are designated initializers — betaflight's
|
|
1882
|
+
*
|
|
1883
|
+
* RESET_CONFIG(pidProfile_t, pidProfile,
|
|
1884
|
+
* .pid = { [PID_ROLL] = PID_ROLL_DEFAULT, … },
|
|
1885
|
+
* .pidSumLimit = PIDSUM_LIMIT,
|
|
1886
|
+
* …
|
|
1887
|
+
* );
|
|
1888
|
+
*
|
|
1889
|
+
* tree-sitter-c has no rule for `.field = value` as a call argument. Even a
|
|
1890
|
+
* small statement-level `M(a, b, .x = 1, .y = { 1, 2 },);` with a trailing
|
|
1891
|
+
* comma recovers by extending the enclosing `function_definition` to EOF —
|
|
1892
|
+
* the next function vanishes and later ones nest under the first (#1729 —
|
|
1893
|
+
* 310 functions in 73 files on a betaflight tree, which name matching then
|
|
1894
|
+
* treated as unreachable closures). Emptying the argument list to spaces,
|
|
1895
|
+
* newlines kept, leaves `RESET_CONFIG(\n\n…\n);` — a call the grammar parses
|
|
1896
|
+
* cleanly — at the cost of the references inside the initializer, which the
|
|
1897
|
+
* broken parse was not yielding either. Statement-level only (`);` follows),
|
|
1898
|
+
* macro-cased name only, offsets preserved. Runs before the kernel route
|
|
1899
|
+
* point, so both the wasm and kernel C arms see the same bytes.
|
|
1900
|
+
*/
|
|
1901
|
+
function blankCDesignatedMacroArgs(source) {
|
|
1902
|
+
if (source.indexOf('=') === -1)
|
|
1903
|
+
return source;
|
|
1904
|
+
const rawStrings = maskCppRawStrings(source);
|
|
1905
|
+
source = rawStrings.source;
|
|
1906
|
+
const out = source.split('');
|
|
1907
|
+
const re = /^[ \t]*([A-Z_][A-Z0-9_]*)\s*\(/gm;
|
|
1908
|
+
let m;
|
|
1909
|
+
while ((m = re.exec(source))) {
|
|
1910
|
+
const open = m.index + m[0].length - 1;
|
|
1911
|
+
let depth = 1;
|
|
1912
|
+
let i = open + 1;
|
|
1913
|
+
for (; i < source.length && depth > 0; i++) {
|
|
1914
|
+
const c = source[i];
|
|
1915
|
+
if (c === '(')
|
|
1916
|
+
depth++;
|
|
1917
|
+
else if (c === ')')
|
|
1918
|
+
depth--;
|
|
1919
|
+
}
|
|
1920
|
+
if (depth !== 0)
|
|
1921
|
+
continue;
|
|
1922
|
+
const close = i - 1;
|
|
1923
|
+
const args = source.slice(open + 1, close);
|
|
1924
|
+
// A designator at argument depth: `.name =` or `[index] =`.
|
|
1925
|
+
if (!/(^|[,{(\s])(\.[A-Za-z_]\w*|\[[^\]]+\])\s*=[^=]/.test(args))
|
|
1926
|
+
continue;
|
|
1927
|
+
if (!/^\s*;/.test(source.slice(close + 1)))
|
|
1928
|
+
continue;
|
|
1929
|
+
for (let k = open + 1; k < close; k++)
|
|
1930
|
+
if (out[k] !== '\n')
|
|
1931
|
+
out[k] = ' ';
|
|
1932
|
+
re.lastIndex = close;
|
|
1933
|
+
}
|
|
1934
|
+
return rawStrings.restore(out.join(''));
|
|
1935
|
+
}
|
|
1578
1936
|
function preParseCSource(source) {
|
|
1579
|
-
const
|
|
1937
|
+
const rawStrings = maskCppRawStrings(source);
|
|
1938
|
+
source = rawStrings.source;
|
|
1939
|
+
const inner = blankCDesignatedMacroArgs(blankCKernelAnnotations(blankCCplusplusGuardBodies(source)));
|
|
1580
1940
|
let blanked = blankCLeadingAttrMacros(blankLoneMacroLines(blankCStatementMacroCalls(blankCTrailingParamAttrMacros(blankCppAnnotationMacroCalls(rewriteCPrefixedDeclMacroInitializers(blankCFileScopePrefixedDeclMacros(blankCVaArgQualifiedTypeArgs(blankCTypeKeywordArgs(blankCParameterizedAnnotationMacros(blankCAutoInference(blankCSandwichedAnnotations(inner))))))))))));
|
|
1581
1941
|
if (looksLikeCudaSource(blanked))
|
|
1582
1942
|
blanked = blankCudaConstructs(blanked);
|
|
1583
1943
|
// The named-variadic `#define` pass runs AFTER the directive restore — it
|
|
1584
1944
|
// deliberately edits directive lines (see its doc comment).
|
|
1585
|
-
return blankCNamedVariadicDefineDots(restoreDirectiveLines(source, blanked));
|
|
1945
|
+
return rawStrings.restore(blankCNamedVariadicDefineDots(restoreDirectiveLines(source, blanked)));
|
|
1946
|
+
}
|
|
1947
|
+
/** A constructor prototype carries defaults even when its body is in another file. */
|
|
1948
|
+
function isCppConstructorDeclaration(node) {
|
|
1949
|
+
if (node.type !== 'declaration' || (0, tree_sitter_helpers_1.getChildByField)(node, 'type'))
|
|
1950
|
+
return false;
|
|
1951
|
+
const owner = node.parent?.parent;
|
|
1952
|
+
if (!owner || !['class_specifier', 'struct_specifier', 'union_specifier'].includes(owner.type))
|
|
1953
|
+
return false;
|
|
1954
|
+
const declarator = (0, tree_sitter_helpers_1.getChildByField)(node, 'declarator');
|
|
1955
|
+
return declarator?.type === 'function_declarator'
|
|
1956
|
+
&& (0, tree_sitter_helpers_1.getChildByField)(declarator, 'declarator')?.text === (0, tree_sitter_helpers_1.getChildByField)(owner, 'name')?.text;
|
|
1586
1957
|
}
|
|
1587
1958
|
exports.cppExtractor = {
|
|
1588
1959
|
// Recover macro-annotated class/struct definitions (`class MYMODULE_API Foo : Base`,
|
|
@@ -1599,7 +1970,18 @@ exports.cppExtractor = {
|
|
|
1599
1970
|
// get picked as the blast-radius representative over — the single real
|
|
1600
1971
|
// definition, exactly as bodiless struct/enum specifiers are already skipped. (#1093)
|
|
1601
1972
|
skipBodilessClass: true,
|
|
1602
|
-
|
|
1973
|
+
// `function_definition` covers inline / out-of-line bodies; `field_declaration`
|
|
1974
|
+
// covers pure-virtual methods (`virtual int read(int key) = 0;`), which have no
|
|
1975
|
+
// body and would otherwise mint no node — so calls through the abstract base and
|
|
1976
|
+
// cpp-override synthesis had nothing to attach to (#1727). classifyMethodNode
|
|
1977
|
+
// keeps ordinary data members / prototypes on the children-walk path.
|
|
1978
|
+
methodTypes: ['function_definition', 'field_declaration'],
|
|
1979
|
+
classifyMethodNode: (node) => {
|
|
1980
|
+
if (node.type !== 'field_declaration')
|
|
1981
|
+
return 'method';
|
|
1982
|
+
return isCppPureVirtualMethodDecl(node) ? 'method' : 'skip';
|
|
1983
|
+
},
|
|
1984
|
+
isAbstract: (node) => (isCppPureVirtualMethodDecl(node) ? true : undefined),
|
|
1603
1985
|
interfaceTypes: [],
|
|
1604
1986
|
structTypes: ['struct_specifier'],
|
|
1605
1987
|
// C++ unions additionally carry member functions, which extract through the
|
|
@@ -1617,6 +1999,20 @@ exports.cppExtractor = {
|
|
|
1617
1999
|
resolveName: extractCppQualifiedMethodName,
|
|
1618
2000
|
getReceiverType: extractCppReceiverType,
|
|
1619
2001
|
getReturnType: extractCppReturnType,
|
|
2002
|
+
// Constructors (definitions and class-body declarations) carry their
|
|
2003
|
+
// parameter list as the signature; a trailing semicolon marks a prototype, so a local `T obj(args)` can be matched
|
|
2004
|
+
// to the one overload with a compatible arity (#1839). Macro-shaped
|
|
2005
|
+
// definitions whose real name was recovered from an argument are excluded:
|
|
2006
|
+
// their "parameters" are macro arguments. Mirrored in the kernel.
|
|
2007
|
+
getSignature: (node, source) => {
|
|
2008
|
+
if ((node.type !== 'function_definition' && !isCppConstructorDeclaration(node)) || (0, tree_sitter_helpers_1.getChildByField)(node, 'type'))
|
|
2009
|
+
return undefined;
|
|
2010
|
+
if (recoverCppMacroDefinedName(node, source))
|
|
2011
|
+
return undefined;
|
|
2012
|
+
const declarator = (0, tree_sitter_helpers_1.getChildByField)(node, 'declarator');
|
|
2013
|
+
const parameters = declarator && (0, tree_sitter_helpers_1.getChildByField)(declarator, 'parameters');
|
|
2014
|
+
return parameters ? (0, tree_sitter_helpers_1.getNodeText)(parameters, source) + (node.type === 'declaration' ? ';' : '') : undefined;
|
|
2015
|
+
},
|
|
1620
2016
|
getVisibility: (node) => {
|
|
1621
2017
|
// Check for access specifier in parent
|
|
1622
2018
|
const parent = node.parent;
|