@colbymchenry/codegraph-win32-arm64 1.6.1 → 1.6.3
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 +1 -1
- package/bin/codegraph.cmd +1 -1
- package/lib/dist/.test-build-engine.json +1 -1
- package/lib/dist/.test-build-viewer.json +1 -1
- package/lib/dist/bin/codegraph.d.ts +3 -0
- package/lib/dist/bin/codegraph.d.ts.map +1 -1
- package/lib/dist/bin/codegraph.js +427 -684
- 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 +30 -74
- package/lib/dist/bin/command-supervision.js.map +1 -1
- package/lib/dist/bin/fatal-handler.js +0 -46
- package/lib/dist/bin/fatal-handler.js.map +1 -1
- package/lib/dist/bin/node-version-check.js +0 -33
- package/lib/dist/bin/node-version-check.js.map +1 -1
- package/lib/dist/bin/uninstall.js +0 -19
- package/lib/dist/bin/uninstall.js.map +1 -1
- package/lib/dist/bin/viewer-gate.js +0 -14
- package/lib/dist/bin/viewer-gate.js.map +1 -1
- package/lib/dist/compile-cache.d.ts +2 -0
- package/lib/dist/compile-cache.d.ts.map +1 -0
- package/lib/dist/compile-cache.js +45 -0
- package/lib/dist/compile-cache.js.map +1 -0
- package/lib/dist/context/formatter.js +3 -66
- package/lib/dist/context/formatter.js.map +1 -1
- package/lib/dist/context/index.d.ts +44 -1
- package/lib/dist/context/index.d.ts.map +1 -1
- package/lib/dist/context/index.js +123 -430
- package/lib/dist/context/index.js.map +1 -1
- package/lib/dist/context/markers.js +0 -17
- package/lib/dist/context/markers.js.map +1 -1
- package/lib/dist/db/index.d.ts +44 -1
- package/lib/dist/db/index.d.ts.map +1 -1
- package/lib/dist/db/index.js +123 -395
- package/lib/dist/db/index.js.map +1 -1
- package/lib/dist/db/migrations.d.ts +11 -1
- package/lib/dist/db/migrations.d.ts.map +1 -1
- package/lib/dist/db/migrations.js +71 -79
- package/lib/dist/db/migrations.js.map +1 -1
- package/lib/dist/db/name-substring-index.d.ts +63 -0
- package/lib/dist/db/name-substring-index.d.ts.map +1 -0
- package/lib/dist/db/name-substring-index.js +151 -0
- package/lib/dist/db/name-substring-index.js.map +1 -0
- package/lib/dist/db/node-sqlite.d.ts +19 -0
- package/lib/dist/db/node-sqlite.d.ts.map +1 -0
- package/lib/dist/db/node-sqlite.js +23 -0
- package/lib/dist/db/node-sqlite.js.map +1 -0
- package/lib/dist/db/open-error.d.ts +36 -0
- package/lib/dist/db/open-error.d.ts.map +1 -0
- package/lib/dist/db/open-error.js +63 -0
- package/lib/dist/db/open-error.js.map +1 -0
- package/lib/dist/db/parameter-flow-queries.d.ts +120 -0
- package/lib/dist/db/parameter-flow-queries.d.ts.map +1 -0
- package/lib/dist/db/parameter-flow-queries.js +168 -0
- package/lib/dist/db/parameter-flow-queries.js.map +1 -0
- package/lib/dist/db/queries.d.ts +641 -40
- package/lib/dist/db/queries.d.ts.map +1 -1
- package/lib/dist/db/queries.js +1370 -1398
- package/lib/dist/db/queries.js.map +1 -1
- package/lib/dist/db/reference-tail.d.ts +83 -0
- package/lib/dist/db/reference-tail.d.ts.map +1 -0
- package/lib/dist/db/reference-tail.js +68 -0
- package/lib/dist/db/reference-tail.js.map +1 -0
- package/lib/dist/db/schema.sql +18 -2
- package/lib/dist/db/sqlite-adapter.d.ts +18 -1
- package/lib/dist/db/sqlite-adapter.d.ts.map +1 -1
- package/lib/dist/db/sqlite-adapter.js +12 -62
- package/lib/dist/db/sqlite-adapter.js.map +1 -1
- package/lib/dist/db/synthesis-stage.d.ts.map +1 -1
- package/lib/dist/db/synthesis-stage.js +2 -6
- package/lib/dist/db/synthesis-stage.js.map +1 -1
- package/lib/dist/db/wal-valve.js +1 -153
- package/lib/dist/db/wal-valve.js.map +1 -1
- package/lib/dist/db/wsl-shared-index.js +0 -37
- package/lib/dist/db/wsl-shared-index.js.map +1 -1
- package/lib/dist/directory.d.ts +81 -0
- package/lib/dist/directory.d.ts.map +1 -1
- package/lib/dist/directory.js +91 -500
- package/lib/dist/directory.js.map +1 -1
- package/lib/dist/engine.d.ts +15 -0
- package/lib/dist/engine.d.ts.map +1 -0
- package/lib/dist/engine.js +34 -0
- package/lib/dist/engine.js.map +1 -0
- package/lib/dist/errors.d.ts +10 -0
- package/lib/dist/errors.d.ts.map +1 -1
- package/lib/dist/errors.js +8 -101
- 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 +15 -133
- package/lib/dist/extraction/astro-extractor.js.map +1 -1
- package/lib/dist/extraction/cfml-extractor.d.ts +102 -10
- package/lib/dist/extraction/cfml-extractor.d.ts.map +1 -1
- package/lib/dist/extraction/cfml-extractor.js +260 -179
- 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 +37 -0
- package/lib/dist/extraction/commonjs-requires.js.map +1 -0
- package/lib/dist/extraction/dfm-extractor.js +0 -21
- 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 -24
- package/lib/dist/extraction/extraction-version.js.map +1 -1
- package/lib/dist/extraction/function-ref.d.ts +40 -0
- package/lib/dist/extraction/function-ref.d.ts.map +1 -1
- package/lib/dist/extraction/function-ref.js +145 -206
- 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 +29 -154
- package/lib/dist/extraction/generated-detection.js.map +1 -1
- package/lib/dist/extraction/grammars.d.ts +47 -4
- package/lib/dist/extraction/grammars.d.ts.map +1 -1
- package/lib/dist/extraction/grammars.js +91 -374
- package/lib/dist/extraction/grammars.js.map +1 -1
- package/lib/dist/extraction/index.d.ts +216 -11
- package/lib/dist/extraction/index.d.ts.map +1 -1
- package/lib/dist/extraction/index.js +703 -1368
- package/lib/dist/extraction/index.js.map +1 -1
- package/lib/dist/extraction/kernel/decode.js +0 -16
- package/lib/dist/extraction/kernel/decode.js.map +1 -1
- package/lib/dist/extraction/kernel/index.d.ts +3 -1
- package/lib/dist/extraction/kernel/index.d.ts.map +1 -1
- package/lib/dist/extraction/kernel/index.js +29 -131
- package/lib/dist/extraction/kernel/index.js.map +1 -1
- package/lib/dist/extraction/kernel/layout.js +42 -76
- package/lib/dist/extraction/kernel/layout.js.map +1 -1
- package/lib/dist/extraction/kernel/loader.js +0 -37
- package/lib/dist/extraction/kernel/loader.js.map +1 -1
- package/lib/dist/extraction/languages/arkts.js +0 -59
- package/lib/dist/extraction/languages/arkts.js.map +1 -1
- package/lib/dist/extraction/languages/c-cpp.d.ts +140 -28
- package/lib/dist/extraction/languages/c-cpp.d.ts.map +1 -1
- package/lib/dist/extraction/languages/c-cpp.js +876 -823
- package/lib/dist/extraction/languages/c-cpp.js.map +1 -1
- package/lib/dist/extraction/languages/cfquery.js +0 -9
- package/lib/dist/extraction/languages/cfquery.js.map +1 -1
- package/lib/dist/extraction/languages/cfscript.d.ts +20 -0
- package/lib/dist/extraction/languages/cfscript.d.ts.map +1 -1
- package/lib/dist/extraction/languages/cfscript.js +80 -9
- package/lib/dist/extraction/languages/cfscript.js.map +1 -1
- package/lib/dist/extraction/languages/cobol.js +0 -114
- package/lib/dist/extraction/languages/cobol.js.map +1 -1
- package/lib/dist/extraction/languages/cpp-brace-scopes.d.ts +66 -0
- package/lib/dist/extraction/languages/cpp-brace-scopes.d.ts.map +1 -0
- package/lib/dist/extraction/languages/cpp-brace-scopes.js +343 -0
- package/lib/dist/extraction/languages/cpp-brace-scopes.js.map +1 -0
- package/lib/dist/extraction/languages/cpp-macro-methods.d.ts +41 -0
- package/lib/dist/extraction/languages/cpp-macro-methods.d.ts.map +1 -0
- package/lib/dist/extraction/languages/cpp-macro-methods.js +487 -0
- package/lib/dist/extraction/languages/cpp-macro-methods.js.map +1 -0
- package/lib/dist/extraction/languages/csharp.d.ts.map +1 -1
- package/lib/dist/extraction/languages/csharp.js +11 -54
- package/lib/dist/extraction/languages/csharp.js.map +1 -1
- package/lib/dist/extraction/languages/dart.d.ts +84 -0
- package/lib/dist/extraction/languages/dart.d.ts.map +1 -1
- package/lib/dist/extraction/languages/dart.js +335 -159
- package/lib/dist/extraction/languages/dart.js.map +1 -1
- package/lib/dist/extraction/languages/erlang.d.ts.map +1 -1
- package/lib/dist/extraction/languages/erlang.js +15 -102
- package/lib/dist/extraction/languages/erlang.js.map +1 -1
- package/lib/dist/extraction/languages/go.d.ts +48 -0
- package/lib/dist/extraction/languages/go.d.ts.map +1 -1
- package/lib/dist/extraction/languages/go.js +102 -31
- package/lib/dist/extraction/languages/go.js.map +1 -1
- package/lib/dist/extraction/languages/index.js +0 -6
- package/lib/dist/extraction/languages/index.js.map +1 -1
- package/lib/dist/extraction/languages/java.d.ts.map +1 -1
- package/lib/dist/extraction/languages/java.js +67 -78
- package/lib/dist/extraction/languages/java.js.map +1 -1
- package/lib/dist/extraction/languages/javascript.d.ts.map +1 -1
- package/lib/dist/extraction/languages/javascript.js +2 -12
- package/lib/dist/extraction/languages/javascript.js.map +1 -1
- package/lib/dist/extraction/languages/kotlin.d.ts +15 -0
- package/lib/dist/extraction/languages/kotlin.d.ts.map +1 -1
- package/lib/dist/extraction/languages/kotlin.js +69 -150
- package/lib/dist/extraction/languages/kotlin.js.map +1 -1
- package/lib/dist/extraction/languages/lua.js +2 -39
- package/lib/dist/extraction/languages/lua.js.map +1 -1
- package/lib/dist/extraction/languages/luau.js +0 -14
- package/lib/dist/extraction/languages/luau.js.map +1 -1
- package/lib/dist/extraction/languages/nix.js +0 -16
- package/lib/dist/extraction/languages/nix.js.map +1 -1
- package/lib/dist/extraction/languages/objc.d.ts.map +1 -1
- package/lib/dist/extraction/languages/objc.js +5 -16
- package/lib/dist/extraction/languages/objc.js.map +1 -1
- package/lib/dist/extraction/languages/pascal-preparse.d.ts +66 -0
- package/lib/dist/extraction/languages/pascal-preparse.d.ts.map +1 -0
- package/lib/dist/extraction/languages/pascal-preparse.js +958 -0
- package/lib/dist/extraction/languages/pascal-preparse.js.map +1 -0
- package/lib/dist/extraction/languages/pascal-system.d.ts +11 -0
- package/lib/dist/extraction/languages/pascal-system.d.ts.map +1 -0
- package/lib/dist/extraction/languages/pascal-system.js +23 -0
- package/lib/dist/extraction/languages/pascal-system.js.map +1 -0
- package/lib/dist/extraction/languages/pascal.d.ts.map +1 -1
- package/lib/dist/extraction/languages/pascal.js +3 -4
- package/lib/dist/extraction/languages/pascal.js.map +1 -1
- package/lib/dist/extraction/languages/php.js +5 -42
- package/lib/dist/extraction/languages/php.js.map +1 -1
- package/lib/dist/extraction/languages/python.js +2 -20
- package/lib/dist/extraction/languages/python.js.map +1 -1
- package/lib/dist/extraction/languages/r.js +8 -78
- package/lib/dist/extraction/languages/r.js.map +1 -1
- package/lib/dist/extraction/languages/ruby.d.ts.map +1 -1
- package/lib/dist/extraction/languages/ruby.js +17 -25
- package/lib/dist/extraction/languages/ruby.js.map +1 -1
- package/lib/dist/extraction/languages/rust.d.ts +10 -0
- package/lib/dist/extraction/languages/rust.d.ts.map +1 -1
- package/lib/dist/extraction/languages/rust.js +15 -47
- package/lib/dist/extraction/languages/rust.js.map +1 -1
- package/lib/dist/extraction/languages/scala.js +5 -41
- package/lib/dist/extraction/languages/scala.js.map +1 -1
- package/lib/dist/extraction/languages/solidity.js +1 -82
- package/lib/dist/extraction/languages/solidity.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 +33 -27
- package/lib/dist/extraction/languages/swift.js.map +1 -1
- package/lib/dist/extraction/languages/terraform.js +6 -152
- package/lib/dist/extraction/languages/terraform.js.map +1 -1
- package/lib/dist/extraction/languages/typescript.d.ts +71 -0
- package/lib/dist/extraction/languages/typescript.d.ts.map +1 -1
- package/lib/dist/extraction/languages/typescript.js +86 -41
- package/lib/dist/extraction/languages/typescript.js.map +1 -1
- package/lib/dist/extraction/languages/vbnet.d.ts.map +1 -1
- package/lib/dist/extraction/languages/vbnet.js +9 -42
- package/lib/dist/extraction/languages/vbnet.js.map +1 -1
- package/lib/dist/extraction/lazy-frameworks.d.ts +15 -0
- package/lib/dist/extraction/lazy-frameworks.d.ts.map +1 -0
- package/lib/dist/extraction/lazy-frameworks.js +8 -0
- package/lib/dist/extraction/lazy-frameworks.js.map +1 -0
- package/lib/dist/extraction/liquid-extractor.d.ts +29 -3
- package/lib/dist/extraction/liquid-extractor.d.ts.map +1 -1
- package/lib/dist/extraction/liquid-extractor.js +89 -148
- package/lib/dist/extraction/liquid-extractor.js.map +1 -1
- package/lib/dist/extraction/mybatis-extractor.js +0 -78
- 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 +11 -0
- package/lib/dist/extraction/parse-budget.js.map +1 -0
- package/lib/dist/extraction/parse-pool.d.ts +41 -5
- package/lib/dist/extraction/parse-pool.d.ts.map +1 -1
- package/lib/dist/extraction/parse-pool.js +74 -158
- package/lib/dist/extraction/parse-pool.js.map +1 -1
- package/lib/dist/extraction/parse-worker.d.ts +1 -1
- package/lib/dist/extraction/parse-worker.d.ts.map +1 -1
- package/lib/dist/extraction/parse-worker.js +7 -58
- package/lib/dist/extraction/parse-worker.js.map +1 -1
- package/lib/dist/extraction/razor-extractor.d.ts +9 -0
- package/lib/dist/extraction/razor-extractor.d.ts.map +1 -1
- package/lib/dist/extraction/razor-extractor.js +45 -69
- package/lib/dist/extraction/razor-extractor.js.map +1 -1
- package/lib/dist/extraction/razor-script.d.ts +23 -0
- package/lib/dist/extraction/razor-script.d.ts.map +1 -0
- package/lib/dist/extraction/razor-script.js +244 -0
- package/lib/dist/extraction/razor-script.js.map +1 -0
- package/lib/dist/extraction/sfc-script.d.ts +85 -0
- package/lib/dist/extraction/sfc-script.d.ts.map +1 -0
- package/lib/dist/extraction/sfc-script.js +136 -0
- package/lib/dist/extraction/sfc-script.js.map +1 -0
- package/lib/dist/extraction/store-worker.d.ts +1 -1
- package/lib/dist/extraction/store-worker.d.ts.map +1 -1
- package/lib/dist/extraction/store-worker.js +5 -37
- 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 +8 -32
- 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 +16 -122
- package/lib/dist/extraction/svelte-extractor.js.map +1 -1
- package/lib/dist/extraction/syntax-tokens.d.ts +6 -5
- package/lib/dist/extraction/syntax-tokens.d.ts.map +1 -1
- package/lib/dist/extraction/syntax-tokens.js +6 -153
- package/lib/dist/extraction/syntax-tokens.js.map +1 -1
- package/lib/dist/extraction/tree-sitter-helpers.d.ts +37 -1
- package/lib/dist/extraction/tree-sitter-helpers.d.ts.map +1 -1
- package/lib/dist/extraction/tree-sitter-helpers.js +76 -68
- package/lib/dist/extraction/tree-sitter-helpers.js.map +1 -1
- package/lib/dist/extraction/tree-sitter-types.d.ts +102 -22
- package/lib/dist/extraction/tree-sitter-types.d.ts.map +1 -1
- package/lib/dist/extraction/tree-sitter-types.js +0 -7
- package/lib/dist/extraction/tree-sitter-types.js.map +1 -1
- package/lib/dist/extraction/tree-sitter.d.ts +455 -9
- package/lib/dist/extraction/tree-sitter.d.ts.map +1 -1
- package/lib/dist/extraction/tree-sitter.js +1998 -2517
- package/lib/dist/extraction/tree-sitter.js.map +1 -1
- package/lib/dist/extraction/vue-extractor.d.ts +20 -0
- package/lib/dist/extraction/vue-extractor.d.ts.map +1 -1
- package/lib/dist/extraction/vue-extractor.js +113 -115
- 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 +164 -0
- package/lib/dist/extraction/vue-options-api.js.map +1 -0
- package/lib/dist/extraction/vue-template-calls.d.ts +37 -0
- package/lib/dist/extraction/vue-template-calls.d.ts.map +1 -0
- package/lib/dist/extraction/vue-template-calls.js +497 -0
- package/lib/dist/extraction/vue-template-calls.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-vbnet.wasm +0 -0
- package/lib/dist/extraction/wasm-runtime-flags.d.ts +6 -0
- package/lib/dist/extraction/wasm-runtime-flags.d.ts.map +1 -1
- package/lib/dist/extraction/wasm-runtime-flags.js +1 -88
- package/lib/dist/extraction/wasm-runtime-flags.js.map +1 -1
- package/lib/dist/file-limits.d.ts +8 -0
- package/lib/dist/file-limits.d.ts.map +1 -1
- package/lib/dist/file-limits.js +13 -28
- package/lib/dist/file-limits.js.map +1 -1
- package/lib/dist/graph/branch-guards.d.ts +17 -0
- package/lib/dist/graph/branch-guards.d.ts.map +1 -1
- package/lib/dist/graph/branch-guards.js +98 -250
- package/lib/dist/graph/branch-guards.js.map +1 -1
- package/lib/dist/graph/call-sites.d.ts +12 -0
- package/lib/dist/graph/call-sites.d.ts.map +1 -0
- package/lib/dist/graph/call-sites.js +17 -0
- package/lib/dist/graph/call-sites.js.map +1 -0
- package/lib/dist/graph/cobol-copybooks.d.ts +75 -0
- package/lib/dist/graph/cobol-copybooks.d.ts.map +1 -0
- package/lib/dist/graph/cobol-copybooks.js +45 -0
- package/lib/dist/graph/cobol-copybooks.js.map +1 -0
- package/lib/dist/graph/dead-code.d.ts +26 -4
- package/lib/dist/graph/dead-code.d.ts.map +1 -1
- package/lib/dist/graph/dead-code.js +157 -311
- package/lib/dist/graph/dead-code.js.map +1 -1
- package/lib/dist/graph/dynamic-boundary-report.js +1 -88
- package/lib/dist/graph/dynamic-boundary-report.js.map +1 -1
- package/lib/dist/graph/file-cycles.d.ts +20 -0
- package/lib/dist/graph/file-cycles.d.ts.map +1 -0
- package/lib/dist/graph/file-cycles.js +79 -0
- package/lib/dist/graph/file-cycles.js.map +1 -0
- package/lib/dist/graph/go-package.d.ts +27 -0
- package/lib/dist/graph/go-package.d.ts.map +1 -0
- package/lib/dist/graph/go-package.js +49 -0
- package/lib/dist/graph/go-package.js.map +1 -0
- package/lib/dist/graph/index.d.ts +2 -0
- package/lib/dist/graph/index.d.ts.map +1 -1
- package/lib/dist/graph/index.js +4 -6
- package/lib/dist/graph/index.js.map +1 -1
- package/lib/dist/graph/named-symbol-flow.d.ts +5 -1
- package/lib/dist/graph/named-symbol-flow.d.ts.map +1 -1
- package/lib/dist/graph/named-symbol-flow.js +85 -219
- package/lib/dist/graph/named-symbol-flow.js.map +1 -1
- package/lib/dist/graph/owning-package.d.ts +59 -0
- package/lib/dist/graph/owning-package.d.ts.map +1 -0
- package/lib/dist/graph/owning-package.js +120 -0
- package/lib/dist/graph/owning-package.js.map +1 -0
- package/lib/dist/graph/queries.d.ts +2 -2
- package/lib/dist/graph/queries.d.ts.map +1 -1
- package/lib/dist/graph/queries.js +2 -135
- package/lib/dist/graph/queries.js.map +1 -1
- package/lib/dist/graph/symbol-lookup.d.ts +15 -3
- package/lib/dist/graph/symbol-lookup.d.ts.map +1 -1
- package/lib/dist/graph/symbol-lookup.js +47 -89
- package/lib/dist/graph/symbol-lookup.js.map +1 -1
- package/lib/dist/graph/synthesized-hop.d.ts +37 -0
- package/lib/dist/graph/synthesized-hop.d.ts.map +1 -0
- package/lib/dist/graph/synthesized-hop.js +62 -0
- package/lib/dist/graph/synthesized-hop.js.map +1 -0
- package/lib/dist/graph/test-code.d.ts +21 -0
- package/lib/dist/graph/test-code.d.ts.map +1 -0
- package/lib/dist/graph/test-code.js +50 -0
- package/lib/dist/graph/test-code.js.map +1 -0
- package/lib/dist/graph/traversal.d.ts +31 -2
- package/lib/dist/graph/traversal.d.ts.map +1 -1
- package/lib/dist/graph/traversal.js +98 -226
- package/lib/dist/graph/traversal.js.map +1 -1
- package/lib/dist/graph/type-hierarchy.js +0 -138
- package/lib/dist/graph/type-hierarchy.js.map +1 -1
- package/lib/dist/index.d.ts +195 -25
- package/lib/dist/index.d.ts.map +1 -1
- package/lib/dist/index.js +697 -1105
- package/lib/dist/index.js.map +1 -1
- package/lib/dist/installer/beta-signup.js +0 -39
- package/lib/dist/installer/beta-signup.js.map +1 -1
- package/lib/dist/installer/config-writer.js +0 -24
- package/lib/dist/installer/config-writer.js.map +1 -1
- package/lib/dist/installer/index.d.ts +9 -5
- package/lib/dist/installer/index.d.ts.map +1 -1
- package/lib/dist/installer/index.js +25 -159
- package/lib/dist/installer/index.js.map +1 -1
- package/lib/dist/installer/instructions-template.d.ts +1 -1
- package/lib/dist/installer/instructions-template.js +0 -37
- package/lib/dist/installer/instructions-template.js.map +1 -1
- package/lib/dist/installer/targets/antigravity.js +0 -113
- package/lib/dist/installer/targets/antigravity.js.map +1 -1
- package/lib/dist/installer/targets/bob.d.ts +20 -0
- package/lib/dist/installer/targets/bob.d.ts.map +1 -0
- package/lib/dist/installer/targets/bob.js +83 -0
- package/lib/dist/installer/targets/bob.js.map +1 -0
- package/lib/dist/installer/targets/claude.d.ts.map +1 -1
- package/lib/dist/installer/targets/claude.js +1 -185
- package/lib/dist/installer/targets/claude.js.map +1 -1
- package/lib/dist/installer/targets/codex.d.ts.map +1 -1
- package/lib/dist/installer/targets/codex.js +17 -109
- 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 +2 -54
- package/lib/dist/installer/targets/copilot-cli.js.map +1 -1
- package/lib/dist/installer/targets/copilot-jetbrains.js +0 -57
- package/lib/dist/installer/targets/copilot-jetbrains.js.map +1 -1
- package/lib/dist/installer/targets/copilot-vscode.js +0 -58
- package/lib/dist/installer/targets/copilot-vscode.js.map +1 -1
- package/lib/dist/installer/targets/cursor.js +7 -88
- package/lib/dist/installer/targets/cursor.js.map +1 -1
- package/lib/dist/installer/targets/droid.d.ts +18 -0
- package/lib/dist/installer/targets/droid.d.ts.map +1 -0
- package/lib/dist/installer/targets/droid.js +92 -0
- package/lib/dist/installer/targets/droid.js.map +1 -0
- package/lib/dist/installer/targets/dsh.d.ts +35 -0
- package/lib/dist/installer/targets/dsh.d.ts.map +1 -0
- package/lib/dist/installer/targets/dsh.js +267 -0
- package/lib/dist/installer/targets/dsh.js.map +1 -0
- package/lib/dist/installer/targets/gemini.js +0 -37
- package/lib/dist/installer/targets/gemini.js.map +1 -1
- package/lib/dist/installer/targets/grok.d.ts +25 -0
- package/lib/dist/installer/targets/grok.d.ts.map +1 -0
- package/lib/dist/installer/targets/grok.js +96 -0
- package/lib/dist/installer/targets/grok.js.map +1 -0
- package/lib/dist/installer/targets/hermes.d.ts +19 -7
- package/lib/dist/installer/targets/hermes.d.ts.map +1 -1
- package/lib/dist/installer/targets/hermes.js +218 -214
- package/lib/dist/installer/targets/hermes.js.map +1 -1
- package/lib/dist/installer/targets/json-config.d.ts +45 -0
- package/lib/dist/installer/targets/json-config.d.ts.map +1 -0
- package/lib/dist/installer/targets/json-config.js +128 -0
- package/lib/dist/installer/targets/json-config.js.map +1 -0
- package/lib/dist/installer/targets/kimi.d.ts +21 -0
- package/lib/dist/installer/targets/kimi.d.ts.map +1 -0
- package/lib/dist/installer/targets/kimi.js +97 -0
- package/lib/dist/installer/targets/kimi.js.map +1 -0
- package/lib/dist/installer/targets/kiro.js +1 -41
- package/lib/dist/installer/targets/kiro.js.map +1 -1
- package/lib/dist/installer/targets/opencode.js +0 -102
- package/lib/dist/installer/targets/opencode.js.map +1 -1
- package/lib/dist/installer/targets/pi.d.ts +24 -0
- package/lib/dist/installer/targets/pi.d.ts.map +1 -0
- package/lib/dist/installer/targets/pi.js +100 -0
- package/lib/dist/installer/targets/pi.js.map +1 -0
- package/lib/dist/installer/targets/qoder.d.ts +23 -0
- package/lib/dist/installer/targets/qoder.d.ts.map +1 -0
- package/lib/dist/installer/targets/qoder.js +83 -0
- package/lib/dist/installer/targets/qoder.js.map +1 -0
- package/lib/dist/installer/targets/qwen.d.ts +21 -0
- package/lib/dist/installer/targets/qwen.d.ts.map +1 -0
- package/lib/dist/installer/targets/qwen.js +115 -0
- package/lib/dist/installer/targets/qwen.js.map +1 -0
- package/lib/dist/installer/targets/registry.d.ts.map +1 -1
- package/lib/dist/installer/targets/registry.js +18 -25
- package/lib/dist/installer/targets/registry.js.map +1 -1
- package/lib/dist/installer/targets/shared.d.ts +81 -11
- package/lib/dist/installer/targets/shared.d.ts.map +1 -1
- package/lib/dist/installer/targets/shared.js +183 -129
- package/lib/dist/installer/targets/shared.js.map +1 -1
- package/lib/dist/installer/targets/toml.d.ts +82 -6
- package/lib/dist/installer/targets/toml.d.ts.map +1 -1
- package/lib/dist/installer/targets/toml.js +318 -112
- package/lib/dist/installer/targets/toml.js.map +1 -1
- package/lib/dist/installer/targets/types.d.ts +1 -1
- package/lib/dist/installer/targets/types.d.ts.map +1 -1
- package/lib/dist/installer/targets/types.js +0 -13
- package/lib/dist/installer/targets/types.js.map +1 -1
- package/lib/dist/installer/targets/windsurf.d.ts +22 -0
- package/lib/dist/installer/targets/windsurf.d.ts.map +1 -0
- package/lib/dist/installer/targets/windsurf.js +90 -0
- package/lib/dist/installer/targets/windsurf.js.map +1 -0
- package/lib/dist/lazy-engine.d.ts +22 -0
- package/lib/dist/lazy-engine.d.ts.map +1 -0
- package/lib/dist/lazy-engine.js +16 -0
- package/lib/dist/lazy-engine.js.map +1 -0
- package/lib/dist/mcp/answer-freshness.js +0 -6
- package/lib/dist/mcp/answer-freshness.js.map +1 -1
- package/lib/dist/mcp/daemon-manager.js +2 -23
- package/lib/dist/mcp/daemon-manager.js.map +1 -1
- package/lib/dist/mcp/daemon-paths.d.ts.map +1 -1
- package/lib/dist/mcp/daemon-paths.js +2 -79
- package/lib/dist/mcp/daemon-paths.js.map +1 -1
- package/lib/dist/mcp/daemon-registry.d.ts +44 -0
- package/lib/dist/mcp/daemon-registry.d.ts.map +1 -1
- package/lib/dist/mcp/daemon-registry.js +189 -118
- package/lib/dist/mcp/daemon-registry.js.map +1 -1
- package/lib/dist/mcp/daemon.d.ts +23 -0
- package/lib/dist/mcp/daemon.d.ts.map +1 -1
- package/lib/dist/mcp/daemon.js +89 -373
- package/lib/dist/mcp/daemon.js.map +1 -1
- package/lib/dist/mcp/dynamic-boundaries.js +4 -78
- package/lib/dist/mcp/dynamic-boundaries.js.map +1 -1
- package/lib/dist/mcp/early-ppid.js +0 -24
- package/lib/dist/mcp/early-ppid.js.map +1 -1
- package/lib/dist/mcp/engine.d.ts +10 -0
- package/lib/dist/mcp/engine.d.ts.map +1 -1
- package/lib/dist/mcp/engine.js +41 -152
- package/lib/dist/mcp/engine.js.map +1 -1
- package/lib/dist/mcp/explore-dedup.js +0 -108
- package/lib/dist/mcp/explore-dedup.js.map +1 -1
- package/lib/dist/mcp/explore-diagnostics.js +0 -116
- package/lib/dist/mcp/explore-diagnostics.js.map +1 -1
- package/lib/dist/mcp/explore-session-state.js +0 -129
- package/lib/dist/mcp/explore-session-state.js.map +1 -1
- package/lib/dist/mcp/index-freshness-worker.js +5 -4
- package/lib/dist/mcp/index-freshness-worker.js.map +1 -1
- package/lib/dist/mcp/index-freshness.d.ts +7 -1
- package/lib/dist/mcp/index-freshness.d.ts.map +1 -1
- package/lib/dist/mcp/index-freshness.js +20 -12
- package/lib/dist/mcp/index-freshness.js.map +1 -1
- package/lib/dist/mcp/index-version-warning.d.ts +21 -0
- package/lib/dist/mcp/index-version-warning.d.ts.map +1 -0
- package/lib/dist/mcp/index-version-warning.js +38 -0
- package/lib/dist/mcp/index-version-warning.js.map +1 -0
- package/lib/dist/mcp/index.d.ts +19 -1
- package/lib/dist/mcp/index.d.ts.map +1 -1
- package/lib/dist/mcp/index.js +118 -293
- package/lib/dist/mcp/index.js.map +1 -1
- package/lib/dist/mcp/liveness-watchdog.d.ts +13 -3
- package/lib/dist/mcp/liveness-watchdog.d.ts.map +1 -1
- package/lib/dist/mcp/liveness-watchdog.js +106 -121
- package/lib/dist/mcp/liveness-watchdog.js.map +1 -1
- package/lib/dist/mcp/ppid-watchdog.js +0 -24
- package/lib/dist/mcp/ppid-watchdog.js.map +1 -1
- package/lib/dist/mcp/process-identity.d.ts +42 -0
- package/lib/dist/mcp/process-identity.d.ts.map +1 -0
- package/lib/dist/mcp/process-identity.js +130 -0
- package/lib/dist/mcp/process-identity.js.map +1 -0
- package/lib/dist/mcp/project-lifecycle.d.ts.map +1 -1
- package/lib/dist/mcp/project-lifecycle.js +55 -21
- package/lib/dist/mcp/project-lifecycle.js.map +1 -1
- package/lib/dist/mcp/proxy.d.ts +26 -8
- package/lib/dist/mcp/proxy.d.ts.map +1 -1
- package/lib/dist/mcp/proxy.js +209 -223
- package/lib/dist/mcp/proxy.js.map +1 -1
- package/lib/dist/mcp/query-pool.d.ts +58 -3
- package/lib/dist/mcp/query-pool.d.ts.map +1 -1
- package/lib/dist/mcp/query-pool.js +140 -100
- package/lib/dist/mcp/query-pool.js.map +1 -1
- package/lib/dist/mcp/query-worker.js +24 -36
- package/lib/dist/mcp/query-worker.js.map +1 -1
- package/lib/dist/mcp/server-instructions.js +0 -31
- package/lib/dist/mcp/server-instructions.js.map +1 -1
- package/lib/dist/mcp/session.d.ts +27 -0
- package/lib/dist/mcp/session.d.ts.map +1 -1
- package/lib/dist/mcp/session.js +29 -130
- package/lib/dist/mcp/session.js.map +1 -1
- package/lib/dist/mcp/startup-handshake.js +1 -48
- package/lib/dist/mcp/startup-handshake.js.map +1 -1
- package/lib/dist/mcp/stdin-teardown.js +0 -28
- package/lib/dist/mcp/stdin-teardown.js.map +1 -1
- package/lib/dist/mcp/stdout-teardown.d.ts +26 -0
- package/lib/dist/mcp/stdout-teardown.d.ts.map +1 -0
- package/lib/dist/mcp/stdout-teardown.js +20 -0
- package/lib/dist/mcp/stdout-teardown.js.map +1 -0
- package/lib/dist/mcp/tools.d.ts +159 -20
- package/lib/dist/mcp/tools.d.ts.map +1 -1
- package/lib/dist/mcp/tools.js +730 -3545
- package/lib/dist/mcp/tools.js.map +1 -1
- package/lib/dist/mcp/transport.d.ts.map +1 -1
- package/lib/dist/mcp/transport.js +4 -96
- package/lib/dist/mcp/transport.js.map +1 -1
- package/lib/dist/mcp/version.d.ts +13 -1
- package/lib/dist/mcp/version.d.ts.map +1 -1
- package/lib/dist/mcp/version.js +19 -21
- package/lib/dist/mcp/version.js.map +1 -1
- package/lib/dist/mcp/writer-lock.d.ts +11 -0
- package/lib/dist/mcp/writer-lock.d.ts.map +1 -1
- package/lib/dist/mcp/writer-lock.js +49 -46
- package/lib/dist/mcp/writer-lock.js.map +1 -1
- package/lib/dist/project-config.js +1 -138
- package/lib/dist/project-config.js.map +1 -1
- package/lib/dist/resolution/alias-binding.d.ts +7 -0
- package/lib/dist/resolution/alias-binding.d.ts.map +1 -1
- package/lib/dist/resolution/alias-binding.js +19 -52
- package/lib/dist/resolution/alias-binding.js.map +1 -1
- package/lib/dist/resolution/ambient-modules.d.ts +185 -0
- package/lib/dist/resolution/ambient-modules.d.ts.map +1 -0
- package/lib/dist/resolution/ambient-modules.js +732 -0
- package/lib/dist/resolution/ambient-modules.js.map +1 -0
- package/lib/dist/resolution/angular-template-synthesizer.d.ts +96 -0
- package/lib/dist/resolution/angular-template-synthesizer.d.ts.map +1 -0
- package/lib/dist/resolution/angular-template-synthesizer.js +695 -0
- package/lib/dist/resolution/angular-template-synthesizer.js.map +1 -0
- package/lib/dist/resolution/c-feature-variants.d.ts +40 -0
- package/lib/dist/resolution/c-feature-variants.d.ts.map +1 -0
- package/lib/dist/resolution/c-feature-variants.js +249 -0
- package/lib/dist/resolution/c-feature-variants.js.map +1 -0
- package/lib/dist/resolution/c-fnptr-synthesizer.d.ts.map +1 -1
- package/lib/dist/resolution/c-fnptr-synthesizer.js +23 -391
- package/lib/dist/resolution/c-fnptr-synthesizer.js.map +1 -1
- package/lib/dist/resolution/c-macro-renames.d.ts +25 -0
- package/lib/dist/resolution/c-macro-renames.d.ts.map +1 -0
- package/lib/dist/resolution/c-macro-renames.js +95 -0
- package/lib/dist/resolution/c-macro-renames.js.map +1 -0
- package/lib/dist/resolution/callback-synthesizer.d.ts +15 -1
- package/lib/dist/resolution/callback-synthesizer.d.ts.map +1 -1
- package/lib/dist/resolution/callback-synthesizer.js +1487 -1234
- package/lib/dist/resolution/callback-synthesizer.js.map +1 -1
- package/lib/dist/resolution/const-alias-synthesizer.d.ts +48 -0
- package/lib/dist/resolution/const-alias-synthesizer.d.ts.map +1 -0
- package/lib/dist/resolution/const-alias-synthesizer.js +234 -0
- package/lib/dist/resolution/const-alias-synthesizer.js.map +1 -0
- package/lib/dist/resolution/cooperative-yield.js +0 -27
- package/lib/dist/resolution/cooperative-yield.js.map +1 -1
- package/lib/dist/resolution/cpp-constructor.d.ts.map +1 -1
- package/lib/dist/resolution/cpp-constructor.js +15 -17
- package/lib/dist/resolution/cpp-constructor.js.map +1 -1
- package/lib/dist/resolution/cpp-includers.d.ts +46 -0
- package/lib/dist/resolution/cpp-includers.d.ts.map +1 -0
- package/lib/dist/resolution/cpp-includers.js +153 -0
- package/lib/dist/resolution/cpp-includers.js.map +1 -0
- package/lib/dist/resolution/cpp-macro-visibility.d.ts +16 -0
- package/lib/dist/resolution/cpp-macro-visibility.d.ts.map +1 -1
- package/lib/dist/resolution/cpp-macro-visibility.js +60 -61
- package/lib/dist/resolution/cpp-macro-visibility.js.map +1 -1
- package/lib/dist/resolution/cpp-namespaces.d.ts +54 -0
- package/lib/dist/resolution/cpp-namespaces.d.ts.map +1 -0
- package/lib/dist/resolution/cpp-namespaces.js +151 -0
- package/lib/dist/resolution/cpp-namespaces.js.map +1 -0
- package/lib/dist/resolution/cpp-raw-strings.d.ts +33 -0
- package/lib/dist/resolution/cpp-raw-strings.d.ts.map +1 -0
- package/lib/dist/resolution/cpp-raw-strings.js +167 -0
- package/lib/dist/resolution/cpp-raw-strings.js.map +1 -0
- package/lib/dist/resolution/cpp-supertypes.d.ts +118 -0
- package/lib/dist/resolution/cpp-supertypes.d.ts.map +1 -0
- package/lib/dist/resolution/cpp-supertypes.js +322 -0
- package/lib/dist/resolution/cpp-supertypes.js.map +1 -0
- package/lib/dist/resolution/cpp-template-instantiations.d.ts +83 -0
- package/lib/dist/resolution/cpp-template-instantiations.d.ts.map +1 -0
- package/lib/dist/resolution/cpp-template-instantiations.js +983 -0
- package/lib/dist/resolution/cpp-template-instantiations.js.map +1 -0
- package/lib/dist/resolution/cpp-type-aliases.d.ts +194 -0
- package/lib/dist/resolution/cpp-type-aliases.d.ts.map +1 -0
- package/lib/dist/resolution/cpp-type-aliases.js +648 -0
- package/lib/dist/resolution/cpp-type-aliases.js.map +1 -0
- package/lib/dist/resolution/dart-libraries.d.ts +75 -0
- package/lib/dist/resolution/dart-libraries.d.ts.map +1 -0
- package/lib/dist/resolution/dart-libraries.js +721 -0
- package/lib/dist/resolution/dart-libraries.js.map +1 -0
- package/lib/dist/resolution/dart-local-scope.d.ts +41 -0
- package/lib/dist/resolution/dart-local-scope.d.ts.map +1 -0
- package/lib/dist/resolution/dart-local-scope.js +565 -0
- package/lib/dist/resolution/dart-local-scope.js.map +1 -0
- package/lib/dist/resolution/expo-router-synthesizer.js +0 -52
- package/lib/dist/resolution/expo-router-synthesizer.js.map +1 -1
- 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 +959 -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 +30 -60
- package/lib/dist/resolution/frameworks/astro.js.map +1 -1
- package/lib/dist/resolution/frameworks/cargo-workspace.d.ts +18 -1
- package/lib/dist/resolution/frameworks/cargo-workspace.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/cargo-workspace.js +65 -15
- package/lib/dist/resolution/frameworks/cargo-workspace.js.map +1 -1
- package/lib/dist/resolution/frameworks/cics.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/cics.js +7 -33
- package/lib/dist/resolution/frameworks/cics.js.map +1 -1
- package/lib/dist/resolution/frameworks/codeigniter.d.ts +23 -0
- package/lib/dist/resolution/frameworks/codeigniter.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/codeigniter.js +271 -0
- package/lib/dist/resolution/frameworks/codeigniter.js.map +1 -0
- package/lib/dist/resolution/frameworks/component-folder.d.ts +17 -0
- package/lib/dist/resolution/frameworks/component-folder.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/component-folder.js +11 -0
- package/lib/dist/resolution/frameworks/component-folder.js.map +1 -0
- package/lib/dist/resolution/frameworks/csharp.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/csharp.js +106 -101
- package/lib/dist/resolution/frameworks/csharp.js.map +1 -1
- package/lib/dist/resolution/frameworks/drupal.d.ts +17 -8
- package/lib/dist/resolution/frameworks/drupal.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/drupal.js +377 -142
- package/lib/dist/resolution/frameworks/drupal.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 +79 -65
- package/lib/dist/resolution/frameworks/expo-modules.js.map +1 -1
- package/lib/dist/resolution/frameworks/expo-router.d.ts +6 -0
- package/lib/dist/resolution/frameworks/expo-router.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/expo-router.js +64 -183
- package/lib/dist/resolution/frameworks/expo-router.js.map +1 -1
- package/lib/dist/resolution/frameworks/express.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/express.js +215 -173
- 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 +11 -112
- 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 +15 -61
- package/lib/dist/resolution/frameworks/go.js.map +1 -1
- package/lib/dist/resolution/frameworks/goframe.js +1 -55
- package/lib/dist/resolution/frameworks/goframe.js.map +1 -1
- package/lib/dist/resolution/frameworks/index.d.ts +16 -2
- package/lib/dist/resolution/frameworks/index.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/index.js +20 -48
- 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 +209 -147
- 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 +291 -71
- 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 +33 -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 +236 -192
- package/lib/dist/resolution/frameworks/nestjs.js.map +1 -1
- package/lib/dist/resolution/frameworks/next-proxy.d.ts +67 -0
- package/lib/dist/resolution/frameworks/next-proxy.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/next-proxy.js +239 -0
- package/lib/dist/resolution/frameworks/next-proxy.js.map +1 -0
- package/lib/dist/resolution/frameworks/nextjs.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/nextjs.js +11 -66
- package/lib/dist/resolution/frameworks/nextjs.js.map +1 -1
- package/lib/dist/resolution/frameworks/object-literal.js +0 -21
- package/lib/dist/resolution/frameworks/object-literal.js.map +1 -1
- package/lib/dist/resolution/frameworks/package-deps.d.ts +11 -7
- package/lib/dist/resolution/frameworks/package-deps.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/package-deps.js +35 -26
- package/lib/dist/resolution/frameworks/package-deps.js.map +1 -1
- 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 +31 -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 +27 -33
- 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 +106 -116
- package/lib/dist/resolution/frameworks/python.js.map +1 -1
- package/lib/dist/resolution/frameworks/react-native.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/react-native.js +1 -166
- package/lib/dist/resolution/frameworks/react-native.js.map +1 -1
- package/lib/dist/resolution/frameworks/react-router.d.ts +17 -7
- package/lib/dist/resolution/frameworks/react-router.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/react-router.js +21 -79
- package/lib/dist/resolution/frameworks/react-router.js.map +1 -1
- package/lib/dist/resolution/frameworks/react.d.ts +68 -1
- package/lib/dist/resolution/frameworks/react.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/react.js +1721 -114
- 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 +152 -52
- 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 +51 -70
- 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 +9 -74
- package/lib/dist/resolution/frameworks/svelte.js.map +1 -1
- package/lib/dist/resolution/frameworks/sveltekit-router.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/sveltekit-router.js +8 -46
- package/lib/dist/resolution/frameworks/sveltekit-router.js.map +1 -1
- package/lib/dist/resolution/frameworks/swift-objc.js +0 -97
- package/lib/dist/resolution/frameworks/swift-objc.js.map +1 -1
- package/lib/dist/resolution/frameworks/swift.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/swift.js +199 -167
- package/lib/dist/resolution/frameworks/swift.js.map +1 -1
- package/lib/dist/resolution/frameworks/tanstack-router.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/tanstack-router.js +9 -130
- package/lib/dist/resolution/frameworks/tanstack-router.js.map +1 -1
- package/lib/dist/resolution/frameworks/terraform.js +1 -85
- package/lib/dist/resolution/frameworks/terraform.js.map +1 -1
- package/lib/dist/resolution/frameworks/vue-router.d.ts +26 -10
- package/lib/dist/resolution/frameworks/vue-router.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/vue-router.js +147 -147
- package/lib/dist/resolution/frameworks/vue-router.js.map +1 -1
- 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 +69 -107
- package/lib/dist/resolution/frameworks/vue.js.map +1 -1
- package/lib/dist/resolution/go-func-field-synthesizer.d.ts +58 -0
- package/lib/dist/resolution/go-func-field-synthesizer.d.ts.map +1 -0
- package/lib/dist/resolution/go-func-field-synthesizer.js +696 -0
- package/lib/dist/resolution/go-func-field-synthesizer.js.map +1 -0
- package/lib/dist/resolution/go-module.d.ts +23 -7
- package/lib/dist/resolution/go-module.d.ts.map +1 -1
- package/lib/dist/resolution/go-module.js +21 -24
- package/lib/dist/resolution/go-module.js.map +1 -1
- package/lib/dist/resolution/go-stdlib-methods.d.ts +9 -0
- package/lib/dist/resolution/go-stdlib-methods.d.ts.map +1 -0
- package/lib/dist/resolution/go-stdlib-methods.js +224 -0
- package/lib/dist/resolution/go-stdlib-methods.js.map +1 -0
- package/lib/dist/resolution/goframe-synthesizer.js +2 -53
- package/lib/dist/resolution/goframe-synthesizer.js.map +1 -1
- package/lib/dist/resolution/import-resolver.d.ts +298 -23
- package/lib/dist/resolution/import-resolver.d.ts.map +1 -1
- package/lib/dist/resolution/import-resolver.js +1802 -1280
- package/lib/dist/resolution/import-resolver.js.map +1 -1
- package/lib/dist/resolution/index.d.ts +449 -5
- package/lib/dist/resolution/index.d.ts.map +1 -1
- package/lib/dist/resolution/index.js +1477 -981
- package/lib/dist/resolution/index.js.map +1 -1
- package/lib/dist/resolution/js-builtins.d.ts +14 -0
- package/lib/dist/resolution/js-builtins.d.ts.map +1 -1
- package/lib/dist/resolution/js-builtins.js +15 -13
- package/lib/dist/resolution/js-builtins.js.map +1 -1
- package/lib/dist/resolution/js-class-expressions.d.ts +48 -0
- package/lib/dist/resolution/js-class-expressions.d.ts.map +1 -0
- package/lib/dist/resolution/js-class-expressions.js +25 -0
- package/lib/dist/resolution/js-class-expressions.js.map +1 -0
- package/lib/dist/resolution/js-super-calls.d.ts +18 -0
- package/lib/dist/resolution/js-super-calls.d.ts.map +1 -0
- package/lib/dist/resolution/js-super-calls.js +94 -0
- package/lib/dist/resolution/js-super-calls.js.map +1 -0
- package/lib/dist/resolution/jsx-code.d.ts +28 -0
- package/lib/dist/resolution/jsx-code.d.ts.map +1 -0
- package/lib/dist/resolution/jsx-code.js +459 -0
- package/lib/dist/resolution/jsx-code.js.map +1 -0
- package/lib/dist/resolution/lru-cache.d.ts +5 -13
- package/lib/dist/resolution/lru-cache.d.ts.map +1 -1
- package/lib/dist/resolution/lru-cache.js +43 -32
- package/lib/dist/resolution/lru-cache.js.map +1 -1
- package/lib/dist/resolution/memory-budget.js +0 -52
- package/lib/dist/resolution/memory-budget.js.map +1 -1
- package/lib/dist/resolution/module-importers.d.ts +185 -0
- package/lib/dist/resolution/module-importers.d.ts.map +1 -0
- package/lib/dist/resolution/module-importers.js +588 -0
- package/lib/dist/resolution/module-importers.js.map +1 -0
- package/lib/dist/resolution/name-matcher.d.ts +891 -8
- package/lib/dist/resolution/name-matcher.d.ts.map +1 -1
- package/lib/dist/resolution/name-matcher.js +25013 -2928
- package/lib/dist/resolution/name-matcher.js.map +1 -1
- package/lib/dist/resolution/next-router-synthesizer.d.ts +19 -0
- package/lib/dist/resolution/next-router-synthesizer.d.ts.map +1 -1
- package/lib/dist/resolution/next-router-synthesizer.js +46 -28
- package/lib/dist/resolution/next-router-synthesizer.js.map +1 -1
- package/lib/dist/resolution/override-parameters.d.ts +40 -0
- package/lib/dist/resolution/override-parameters.d.ts.map +1 -0
- package/lib/dist/resolution/override-parameters.js +339 -0
- package/lib/dist/resolution/override-parameters.js.map +1 -0
- package/lib/dist/resolution/parameter-flow.d.ts +218 -0
- package/lib/dist/resolution/parameter-flow.d.ts.map +1 -0
- package/lib/dist/resolution/parameter-flow.js +474 -0
- package/lib/dist/resolution/parameter-flow.js.map +1 -0
- package/lib/dist/resolution/pascal-scope.d.ts +91 -0
- package/lib/dist/resolution/pascal-scope.d.ts.map +1 -0
- package/lib/dist/resolution/pascal-scope.js +961 -0
- package/lib/dist/resolution/pascal-scope.js.map +1 -0
- package/lib/dist/resolution/path-aliases.d.ts +32 -4
- package/lib/dist/resolution/path-aliases.d.ts.map +1 -1
- package/lib/dist/resolution/path-aliases.js +43 -110
- package/lib/dist/resolution/path-aliases.js.map +1 -1
- package/lib/dist/resolution/project-scans.d.ts +38 -0
- package/lib/dist/resolution/project-scans.d.ts.map +1 -0
- package/lib/dist/resolution/project-scans.js +30 -0
- package/lib/dist/resolution/project-scans.js.map +1 -0
- package/lib/dist/resolution/react-router-synthesizer.d.ts +2 -0
- package/lib/dist/resolution/react-router-synthesizer.d.ts.map +1 -1
- package/lib/dist/resolution/react-router-synthesizer.js +67 -48
- package/lib/dist/resolution/react-router-synthesizer.js.map +1 -1
- package/lib/dist/resolution/resolver-pool.d.ts +43 -3
- package/lib/dist/resolution/resolver-pool.d.ts.map +1 -1
- package/lib/dist/resolution/resolver-pool.js +55 -97
- package/lib/dist/resolution/resolver-pool.js.map +1 -1
- package/lib/dist/resolution/resolver-worker.d.ts +1 -1
- package/lib/dist/resolution/resolver-worker.d.ts.map +1 -1
- package/lib/dist/resolution/resolver-worker.js +10 -36
- package/lib/dist/resolution/resolver-worker.js.map +1 -1
- package/lib/dist/resolution/resurrect-ref.d.ts +25 -0
- package/lib/dist/resolution/resurrect-ref.d.ts.map +1 -0
- package/lib/dist/resolution/resurrect-ref.js +19 -0
- package/lib/dist/resolution/resurrect-ref.js.map +1 -0
- package/lib/dist/resolution/ruby-constant-paths.d.ts +56 -0
- package/lib/dist/resolution/ruby-constant-paths.d.ts.map +1 -0
- package/lib/dist/resolution/ruby-constant-paths.js +255 -0
- package/lib/dist/resolution/ruby-constant-paths.js.map +1 -0
- package/lib/dist/resolution/ruby-parameter-flow.d.ts +10 -0
- package/lib/dist/resolution/ruby-parameter-flow.d.ts.map +1 -0
- package/lib/dist/resolution/ruby-parameter-flow.js +801 -0
- package/lib/dist/resolution/ruby-parameter-flow.js.map +1 -0
- package/lib/dist/resolution/rust-scopes.d.ts +120 -0
- package/lib/dist/resolution/rust-scopes.d.ts.map +1 -0
- package/lib/dist/resolution/rust-scopes.js +730 -0
- package/lib/dist/resolution/rust-scopes.js.map +1 -0
- package/lib/dist/resolution/shopify-themes.d.ts +10 -0
- package/lib/dist/resolution/shopify-themes.d.ts.map +1 -0
- package/lib/dist/resolution/shopify-themes.js +19 -0
- package/lib/dist/resolution/shopify-themes.js.map +1 -0
- package/lib/dist/resolution/strip-comments.d.ts +20 -1
- package/lib/dist/resolution/strip-comments.d.ts.map +1 -1
- package/lib/dist/resolution/strip-comments.js +164 -119
- package/lib/dist/resolution/strip-comments.js.map +1 -1
- package/lib/dist/resolution/sveltekit-synthesizer.js +0 -64
- package/lib/dist/resolution/sveltekit-synthesizer.js.map +1 -1
- package/lib/dist/resolution/swift-objc-bridge.js +0 -160
- package/lib/dist/resolution/swift-objc-bridge.js.map +1 -1
- 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 +355 -0
- package/lib/dist/resolution/swift-type-visibility.js.map +1 -0
- package/lib/dist/resolution/synth-utils.js +1 -22
- package/lib/dist/resolution/synth-utils.js.map +1 -1
- package/lib/dist/resolution/tanstack-router-synthesizer.js +0 -32
- package/lib/dist/resolution/tanstack-router-synthesizer.js.map +1 -1
- package/lib/dist/resolution/tauri-synthesizer.d.ts +37 -0
- package/lib/dist/resolution/tauri-synthesizer.d.ts.map +1 -0
- package/lib/dist/resolution/tauri-synthesizer.js +1038 -0
- package/lib/dist/resolution/tauri-synthesizer.js.map +1 -0
- package/lib/dist/resolution/tier-synthesizer.d.ts +7 -2
- package/lib/dist/resolution/tier-synthesizer.d.ts.map +1 -1
- package/lib/dist/resolution/tier-synthesizer.js +318 -121
- package/lib/dist/resolution/tier-synthesizer.js.map +1 -1
- package/lib/dist/resolution/type-parameters.d.ts +34 -0
- package/lib/dist/resolution/type-parameters.d.ts.map +1 -0
- package/lib/dist/resolution/type-parameters.js +285 -0
- package/lib/dist/resolution/type-parameters.js.map +1 -0
- package/lib/dist/resolution/types.d.ts +209 -10
- package/lib/dist/resolution/types.d.ts.map +1 -1
- package/lib/dist/resolution/types.js +0 -47
- package/lib/dist/resolution/types.js.map +1 -1
- package/lib/dist/resolution/vbnet-receivers.d.ts +92 -0
- package/lib/dist/resolution/vbnet-receivers.d.ts.map +1 -0
- package/lib/dist/resolution/vbnet-receivers.js +1482 -0
- package/lib/dist/resolution/vbnet-receivers.js.map +1 -0
- package/lib/dist/resolution/vue-router-synthesizer.js +0 -31
- package/lib/dist/resolution/vue-router-synthesizer.js.map +1 -1
- package/lib/dist/resolution/workspace-packages.d.ts +206 -15
- package/lib/dist/resolution/workspace-packages.d.ts.map +1 -1
- package/lib/dist/resolution/workspace-packages.js +570 -152
- package/lib/dist/resolution/workspace-packages.js.map +1 -1
- package/lib/dist/search/identifier-segments.js +2 -93
- package/lib/dist/search/identifier-segments.js.map +1 -1
- package/lib/dist/search/query-parser.js +0 -54
- package/lib/dist/search/query-parser.js.map +1 -1
- package/lib/dist/search/query-paths.js +0 -167
- package/lib/dist/search/query-paths.js.map +1 -1
- package/lib/dist/search/query-utils.d.ts +44 -0
- package/lib/dist/search/query-utils.d.ts.map +1 -1
- package/lib/dist/search/query-utils.js +120 -198
- package/lib/dist/search/query-utils.js.map +1 -1
- package/lib/dist/sync/git-hooks.d.ts +14 -5
- package/lib/dist/sync/git-hooks.d.ts.map +1 -1
- package/lib/dist/sync/git-hooks.js +118 -65
- package/lib/dist/sync/git-hooks.js.map +1 -1
- package/lib/dist/sync/index.js +0 -14
- package/lib/dist/sync/index.js.map +1 -1
- package/lib/dist/sync/watch-policy.js +0 -45
- package/lib/dist/sync/watch-policy.js.map +1 -1
- package/lib/dist/sync/watcher.d.ts +29 -11
- package/lib/dist/sync/watcher.d.ts.map +1 -1
- package/lib/dist/sync/watcher.js +83 -487
- package/lib/dist/sync/watcher.js.map +1 -1
- package/lib/dist/sync/worktree.d.ts +29 -2
- package/lib/dist/sync/worktree.d.ts.map +1 -1
- package/lib/dist/sync/worktree.js +59 -78
- package/lib/dist/sync/worktree.js.map +1 -1
- package/lib/dist/telemetry/index.d.ts.map +1 -1
- package/lib/dist/telemetry/index.js +68 -146
- package/lib/dist/telemetry/index.js.map +1 -1
- package/lib/dist/types.d.ts +46 -0
- package/lib/dist/types.d.ts.map +1 -1
- package/lib/dist/types.js +15 -44
- package/lib/dist/types.js.map +1 -1
- package/lib/dist/ui/color.js +0 -19
- package/lib/dist/ui/color.js.map +1 -1
- package/lib/dist/ui/glyphs.js +2 -45
- package/lib/dist/ui/glyphs.js.map +1 -1
- package/lib/dist/ui/shimmer-progress.js +0 -21
- package/lib/dist/ui/shimmer-progress.js.map +1 -1
- package/lib/dist/ui/shimmer-worker.js +0 -22
- package/lib/dist/ui/shimmer-worker.js.map +1 -1
- package/lib/dist/ui-server/api/deadcode.d.ts.map +1 -1
- package/lib/dist/ui-server/api/deadcode.js +2 -31
- package/lib/dist/ui-server/api/deadcode.js.map +1 -1
- package/lib/dist/ui-server/api/effects.d.ts +7 -0
- package/lib/dist/ui-server/api/effects.d.ts.map +1 -1
- package/lib/dist/ui-server/api/effects.js +20 -103
- package/lib/dist/ui-server/api/effects.js.map +1 -1
- package/lib/dist/ui-server/api/entrypoints.d.ts +6 -0
- package/lib/dist/ui-server/api/entrypoints.d.ts.map +1 -1
- package/lib/dist/ui-server/api/entrypoints.js +73 -130
- package/lib/dist/ui-server/api/entrypoints.js.map +1 -1
- package/lib/dist/ui-server/api/events.js +0 -145
- package/lib/dist/ui-server/api/events.js.map +1 -1
- package/lib/dist/ui-server/api/file.js +0 -80
- package/lib/dist/ui-server/api/file.js.map +1 -1
- package/lib/dist/ui-server/api/filecode.js +0 -95
- package/lib/dist/ui-server/api/filecode.js.map +1 -1
- package/lib/dist/ui-server/api/flow.js +0 -149
- package/lib/dist/ui-server/api/flow.js.map +1 -1
- package/lib/dist/ui-server/api/hierarchy.js +0 -28
- package/lib/dist/ui-server/api/hierarchy.js.map +1 -1
- package/lib/dist/ui-server/api/index.js +0 -88
- package/lib/dist/ui-server/api/index.js.map +1 -1
- package/lib/dist/ui-server/api/map.d.ts +41 -6
- package/lib/dist/ui-server/api/map.d.ts.map +1 -1
- package/lib/dist/ui-server/api/map.js +95 -308
- package/lib/dist/ui-server/api/map.js.map +1 -1
- package/lib/dist/ui-server/api/node.d.ts.map +1 -1
- package/lib/dist/ui-server/api/node.js +4 -109
- package/lib/dist/ui-server/api/node.js.map +1 -1
- package/lib/dist/ui-server/api/nodes.js +0 -16
- package/lib/dist/ui-server/api/nodes.js.map +1 -1
- package/lib/dist/ui-server/api/program.js +0 -90
- package/lib/dist/ui-server/api/program.js.map +1 -1
- package/lib/dist/ui-server/api/respond.js +0 -60
- package/lib/dist/ui-server/api/respond.js.map +1 -1
- package/lib/dist/ui-server/api/route-roots.d.ts +6 -0
- package/lib/dist/ui-server/api/route-roots.d.ts.map +1 -1
- package/lib/dist/ui-server/api/route-roots.js +18 -39
- package/lib/dist/ui-server/api/route-roots.js.map +1 -1
- package/lib/dist/ui-server/api/routes.d.ts +2 -0
- package/lib/dist/ui-server/api/routes.d.ts.map +1 -1
- package/lib/dist/ui-server/api/routes.js +47 -47
- package/lib/dist/ui-server/api/routes.js.map +1 -1
- package/lib/dist/ui-server/api/screens.d.ts.map +1 -1
- package/lib/dist/ui-server/api/screens.js +16 -171
- package/lib/dist/ui-server/api/screens.js.map +1 -1
- package/lib/dist/ui-server/api/search.js +0 -62
- package/lib/dist/ui-server/api/search.js.map +1 -1
- package/lib/dist/ui-server/api/session.js +0 -58
- package/lib/dist/ui-server/api/session.js.map +1 -1
- package/lib/dist/ui-server/api/source.d.ts.map +1 -1
- package/lib/dist/ui-server/api/source.js +0 -161
- package/lib/dist/ui-server/api/source.js.map +1 -1
- package/lib/dist/ui-server/api/stats.js +0 -58
- package/lib/dist/ui-server/api/stats.js.map +1 -1
- package/lib/dist/ui-server/api/steps.d.ts.map +1 -1
- package/lib/dist/ui-server/api/steps.js +105 -373
- package/lib/dist/ui-server/api/steps.js.map +1 -1
- package/lib/dist/ui-server/api/trail-store.d.ts +3 -3
- package/lib/dist/ui-server/api/trail-store.d.ts.map +1 -1
- package/lib/dist/ui-server/api/trail-store.js +24 -106
- package/lib/dist/ui-server/api/trail-store.js.map +1 -1
- package/lib/dist/ui-server/api/trails.d.ts.map +1 -1
- package/lib/dist/ui-server/api/trails.js +20 -94
- package/lib/dist/ui-server/api/trails.js.map +1 -1
- package/lib/dist/ui-server/api/when.d.ts +10 -2
- package/lib/dist/ui-server/api/when.d.ts.map +1 -1
- package/lib/dist/ui-server/api/when.js +32 -44
- package/lib/dist/ui-server/api/when.js.map +1 -1
- package/lib/dist/ui-server/api/wire.js +0 -58
- package/lib/dist/ui-server/api/wire.js.map +1 -1
- package/lib/dist/ui-server/assets.js +0 -35
- package/lib/dist/ui-server/assets.js.map +1 -1
- package/lib/dist/ui-server/constants.js +0 -26
- package/lib/dist/ui-server/constants.js.map +1 -1
- 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 +114 -0
- package/lib/dist/ui-server/highlight/bounded-tokenize.js.map +1 -0
- package/lib/dist/ui-server/highlight/index.d.ts.map +1 -1
- package/lib/dist/ui-server/highlight/index.js +7 -133
- package/lib/dist/ui-server/highlight/index.js.map +1 -1
- package/lib/dist/ui-server/highlight/languages.d.ts +3 -3
- package/lib/dist/ui-server/highlight/languages.js +0 -31
- package/lib/dist/ui-server/highlight/languages.js.map +1 -1
- 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 +15 -0
- package/lib/dist/ui-server/highlight/tokenize-worker.js.map +1 -0
- package/lib/dist/ui-server/index.d.ts +25 -0
- package/lib/dist/ui-server/index.d.ts.map +1 -1
- package/lib/dist/ui-server/index.js +35 -103
- package/lib/dist/ui-server/index.js.map +1 -1
- package/lib/dist/ui-server/open-browser.js +0 -34
- package/lib/dist/ui-server/open-browser.js.map +1 -1
- package/lib/dist/ui-server/security.d.ts +5 -0
- package/lib/dist/ui-server/security.d.ts.map +1 -1
- package/lib/dist/ui-server/security.js +11 -147
- package/lib/dist/ui-server/security.js.map +1 -1
- package/lib/dist/ui-server/static.js +0 -41
- package/lib/dist/ui-server/static.js.map +1 -1
- package/lib/dist/upgrade/index.d.ts +61 -10
- package/lib/dist/upgrade/index.d.ts.map +1 -1
- package/lib/dist/upgrade/index.js +191 -225
- package/lib/dist/upgrade/index.js.map +1 -1
- package/lib/dist/upgrade/remove-binary.js +2 -67
- package/lib/dist/upgrade/remove-binary.js.map +1 -1
- package/lib/dist/upgrade/update-check.js +1 -81
- package/lib/dist/upgrade/update-check.js.map +1 -1
- package/lib/dist/utils.d.ts +69 -1
- package/lib/dist/utils.d.ts.map +1 -1
- package/lib/dist/utils.js +224 -266
- package/lib/dist/utils.js.map +1 -1
- package/lib/dist/viewer/assets/{index-D4S7YUPf.js → index-BSGpxBr9.js} +60 -58
- package/lib/dist/viewer/index.html +1 -1
- 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 +53 -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/ignore/README.md +138 -8
- package/lib/node_modules/ignore/index.d.ts +56 -20
- package/lib/node_modules/ignore/index.js +1033 -221
- package/lib/node_modules/ignore/legacy.js +871 -178
- package/lib/node_modules/ignore/package.json +10 -4
- package/lib/package.json +14 -8
- package/node.exe +2 -2
- package/package.json +1 -1
|
@@ -0,0 +1,1482 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.sameVbProject = sameVbProject;
|
|
37
|
+
exports.isVbTypeQualifiedBy = isVbTypeQualifiedBy;
|
|
38
|
+
exports.preferVbProject = preferVbProject;
|
|
39
|
+
exports.breakVbTie = breakVbTie;
|
|
40
|
+
exports.matchVbTypedCall = matchVbTypedCall;
|
|
41
|
+
exports.isVbMemberRead = isVbMemberRead;
|
|
42
|
+
exports.isVbPathCall = isVbPathCall;
|
|
43
|
+
exports.matchVbMemberRead = matchVbMemberRead;
|
|
44
|
+
exports.matchVbPathCall = matchVbPathCall;
|
|
45
|
+
exports.isVbNestedTypeInScope = isVbNestedTypeInScope;
|
|
46
|
+
exports.isVbMemberInScope = isVbMemberInScope;
|
|
47
|
+
exports.clearVbnetReceiverMemos = clearVbnetReceiverMemos;
|
|
48
|
+
const fs = __importStar(require("fs"));
|
|
49
|
+
const path = __importStar(require("path"));
|
|
50
|
+
const VB_ELEMENT_COLLECTIONS = /^(?:List|IList|IEnumerable|ICollection|IReadOnlyList|IReadOnlyCollection|HashSet|SortedSet|Queue|Stack|LinkedList|ObservableCollection|Collection|ReadOnlyCollection|BindingList|ConcurrentBag|ConcurrentQueue|ConcurrentStack|BlockingCollection)$/i;
|
|
51
|
+
function elementType(t) {
|
|
52
|
+
if (t.array)
|
|
53
|
+
return { ...t, array: false };
|
|
54
|
+
return t.args?.length === 1 && VB_ELEMENT_COLLECTIONS.test(t.name) && t.args[0].name !== '?' ? t.args[0] : null;
|
|
55
|
+
}
|
|
56
|
+
const VB_BUILTIN_TYPES = new Map([
|
|
57
|
+
...['boolean', 'byte', 'char', 'date', 'decimal', 'double', 'integer', 'long', 'object', 'sbyte', 'short', 'single',
|
|
58
|
+
'string', 'uinteger', 'ulong', 'ushort'].map((k) => [k, k]),
|
|
59
|
+
['int16', 'short'], ['int32', 'integer'], ['int64', 'long'], ['uint16', 'ushort'], ['uint32', 'uinteger'],
|
|
60
|
+
['uint64', 'ulong'], ['datetime', 'date'],
|
|
61
|
+
]);
|
|
62
|
+
const VB_TYPE_CHARS = {
|
|
63
|
+
$: 'String', '%': 'Integer', '&': 'Long', '!': 'Single', '#': 'Double', '@': 'Decimal',
|
|
64
|
+
};
|
|
65
|
+
const VB_CONVERSIONS = {
|
|
66
|
+
cbool: 'Boolean', cbyte: 'Byte', cchar: 'Char', cdate: 'Date', cdbl: 'Double', cdec: 'Decimal', cint: 'Integer',
|
|
67
|
+
clng: 'Long', cobj: 'Object', csbyte: 'SByte', cshort: 'Short', csng: 'Single', cstr: 'String', cuint: 'UInteger',
|
|
68
|
+
culng: 'ULong', cushort: 'UShort',
|
|
69
|
+
};
|
|
70
|
+
const VB_TYPE_KINDS = new Set(['class', 'struct', 'interface']);
|
|
71
|
+
const VB_VALUE_KINDS = new Set(['field', 'property', 'constant', 'variable']);
|
|
72
|
+
const VB_MEMBER_KINDS = new Set(['method', 'property', 'field', 'enum_member', 'constant', 'variable']);
|
|
73
|
+
const VB_MEMBER_HEAD = /\b(?:Function|Sub|Property|Event|Operator|Declare|Delegate|Class|Structure|Module|Interface|Enum|Namespace)\s+$/i;
|
|
74
|
+
function escapeRegex(s) {
|
|
75
|
+
return s.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
76
|
+
}
|
|
77
|
+
function typeKey(t) {
|
|
78
|
+
const lower = t.name.toLowerCase();
|
|
79
|
+
return `${VB_BUILTIN_TYPES.get(lower) ?? lower}${t.array ? '[]' : ''}`;
|
|
80
|
+
}
|
|
81
|
+
function isBuiltin(t) {
|
|
82
|
+
return !t.array && VB_BUILTIN_TYPES.has(t.name.toLowerCase());
|
|
83
|
+
}
|
|
84
|
+
function closeParen(text, open) {
|
|
85
|
+
let depth = 0;
|
|
86
|
+
for (let i = open; i < text.length; i++) {
|
|
87
|
+
if (text[i] === '(')
|
|
88
|
+
depth++;
|
|
89
|
+
else if (text[i] === ')' && --depth === 0)
|
|
90
|
+
return i;
|
|
91
|
+
}
|
|
92
|
+
return -1;
|
|
93
|
+
}
|
|
94
|
+
function splitArgs(text, open) {
|
|
95
|
+
const close = closeParen(text, open);
|
|
96
|
+
if (close < 0)
|
|
97
|
+
return null;
|
|
98
|
+
const args = [];
|
|
99
|
+
let depth = 0;
|
|
100
|
+
let cur = '';
|
|
101
|
+
for (const ch of text.slice(open + 1, close)) {
|
|
102
|
+
if (ch === '(' || ch === '{')
|
|
103
|
+
depth++;
|
|
104
|
+
else if (ch === ')' || ch === '}')
|
|
105
|
+
depth--;
|
|
106
|
+
if (ch === ',' && depth === 0) {
|
|
107
|
+
args.push(cur);
|
|
108
|
+
cur = '';
|
|
109
|
+
}
|
|
110
|
+
else
|
|
111
|
+
cur += ch;
|
|
112
|
+
}
|
|
113
|
+
args.push(cur);
|
|
114
|
+
return args.map((a) => a.trim());
|
|
115
|
+
}
|
|
116
|
+
function readType(text, at) {
|
|
117
|
+
const head = /^\s*([A-Za-z_][\w.]*)/.exec(text.slice(at));
|
|
118
|
+
if (!head)
|
|
119
|
+
return null;
|
|
120
|
+
let i = at + head[0].length;
|
|
121
|
+
let args;
|
|
122
|
+
if (/^\s*\(\s*Of\b/i.test(text.slice(i))) {
|
|
123
|
+
const open = text.indexOf('(', i);
|
|
124
|
+
const close = closeParen(text, open);
|
|
125
|
+
if (close < 0)
|
|
126
|
+
return null;
|
|
127
|
+
args = (splitArgs(text, open) ?? []).map((a) => readType(a.replace(/^Of\s+/i, ''), 0) ?? { name: '?', array: false });
|
|
128
|
+
i = close + 1;
|
|
129
|
+
}
|
|
130
|
+
const segments = head[1].split('.');
|
|
131
|
+
const name = segments.pop();
|
|
132
|
+
if (!/^[A-Za-z_]\w*$/.test(name) || /^(?:New|Of|As|In|Out|From|With)$/i.test(name))
|
|
133
|
+
return null;
|
|
134
|
+
const qualifier = segments.map((s) => s.toLowerCase()).filter((s, i) => !(i === 0 && s === 'global'));
|
|
135
|
+
return {
|
|
136
|
+
name,
|
|
137
|
+
array: /^\s*\??\s*\(\s*,*\s*\)/.test(text.slice(i)),
|
|
138
|
+
...(qualifier.length > 0 ? { qualifier } : {}),
|
|
139
|
+
...(args ? { args } : {}),
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
function sited(t, file, line) {
|
|
143
|
+
return t ? { ...t, file, line, ...(t.args ? { args: t.args.map((a) => sited(a, file, line)) } : {}) } : null;
|
|
144
|
+
}
|
|
145
|
+
function vbCode(line) {
|
|
146
|
+
if (!/["'‘’\r]/.test(line))
|
|
147
|
+
return line;
|
|
148
|
+
let out = '';
|
|
149
|
+
for (let i = 0; i < line.length; i++) {
|
|
150
|
+
const ch = line[i];
|
|
151
|
+
if (ch === '"') {
|
|
152
|
+
let j = i + 1;
|
|
153
|
+
for (; j < line.length; j++) {
|
|
154
|
+
if (line[j] !== '"')
|
|
155
|
+
continue;
|
|
156
|
+
if (line[j + 1] === '"')
|
|
157
|
+
j++;
|
|
158
|
+
else
|
|
159
|
+
break;
|
|
160
|
+
}
|
|
161
|
+
out += '""';
|
|
162
|
+
i = j;
|
|
163
|
+
continue;
|
|
164
|
+
}
|
|
165
|
+
if (ch === "'" || ch === '\u2018' || ch === '\u2019' || ch === '\r')
|
|
166
|
+
break;
|
|
167
|
+
out += ch;
|
|
168
|
+
}
|
|
169
|
+
return out;
|
|
170
|
+
}
|
|
171
|
+
const VB_CODE_LINES = new WeakMap();
|
|
172
|
+
function codeLines(file, context) {
|
|
173
|
+
let memo = VB_CODE_LINES.get(context);
|
|
174
|
+
if (!memo)
|
|
175
|
+
VB_CODE_LINES.set(context, (memo = new Map()));
|
|
176
|
+
const hit = memo.get(file);
|
|
177
|
+
if (hit)
|
|
178
|
+
return hit;
|
|
179
|
+
const lines = (context.getFileLines?.(file) ?? context.readFile(file)?.split(/\r?\n/) ?? []).map(vbCode);
|
|
180
|
+
if (memo.size >= 1024)
|
|
181
|
+
memo.delete(memo.keys().next().value);
|
|
182
|
+
memo.set(file, lines);
|
|
183
|
+
return lines;
|
|
184
|
+
}
|
|
185
|
+
const VB_PATTERNS = new Map();
|
|
186
|
+
function patternsFor(name) {
|
|
187
|
+
const key = name.toLowerCase();
|
|
188
|
+
const hit = VB_PATTERNS.get(key);
|
|
189
|
+
if (hit)
|
|
190
|
+
return hit;
|
|
191
|
+
const r = escapeRegex(key);
|
|
192
|
+
const patterns = {
|
|
193
|
+
declared: new RegExp(`(?<![\\w.])${r}(?![\\w.]|\\s*\\.|\\s*\\((?![\\s\\d,]*\\)))`, 'i'),
|
|
194
|
+
asClause: new RegExp(`(?<![\\w.])${r}(\\s*\\([\\s\\d,]*\\))?\\s*\\??\\s+As\\s+(New\\s+)?`, 'gi'),
|
|
195
|
+
listed: new RegExp(`\\b(?:Dim|Static)\\s+(?:[A-Za-z_]\\w*\\s*,\\s*)*${r}\\s*,[\\w\\s,]*?\\bAs\\s+`, 'i'),
|
|
196
|
+
typeChar: new RegExp(`(?:\\b(?:Dim|Static|Const|ByVal|ByRef|Optional|ParamArray|Each|For|Using|Private|Public|Friend|Protected|Shared|ReadOnly|WithEvents)\\s+|[,(]\\s*)` +
|
|
197
|
+
`${r}([$%&!#@])(\\s*\\([\\s\\d,]*\\))?(?![\\w$%&!#@])`, 'i'),
|
|
198
|
+
inferred: new RegExp(`\\b(?:Dim|Static|Const|Using)\\s+${r}\\s*=(?!=)`, 'i'),
|
|
199
|
+
forEach: new RegExp(`\\bFor\\s+Each\\s+${r}\\s+In\\s+(.+)$`, 'i'),
|
|
200
|
+
loose: new RegExp(`\\bFor\\s+(?:Each\\s+)?${r}\\b|\\b(?:From|Aggregate)\\s+${r}\\s+In\\b|\\bLet\\s+${r}\\s*=|\\bCatch\\s+${r}\\b|` +
|
|
201
|
+
`\\b(?:Function|Sub)\\s*\\((?:[^()]*,)?\\s*(?:ByVal\\s+|ByRef\\s+)?${r}\\s*[,)]`, 'i'),
|
|
202
|
+
};
|
|
203
|
+
if (VB_PATTERNS.size >= 4096)
|
|
204
|
+
VB_PATTERNS.delete(VB_PATTERNS.keys().next().value);
|
|
205
|
+
VB_PATTERNS.set(key, patterns);
|
|
206
|
+
return patterns;
|
|
207
|
+
}
|
|
208
|
+
const VB_MAY_BIND = /\b(?:As|Dim|Static|Const|For|Each|Function|Sub|Catch|Using|From|Let|Aggregate)\b|\w[$%&!#@]/i;
|
|
209
|
+
function bindingOn(code, name) {
|
|
210
|
+
if (!VB_MAY_BIND.test(code))
|
|
211
|
+
return undefined;
|
|
212
|
+
const p = patternsFor(name);
|
|
213
|
+
if (!p.declared.test(code))
|
|
214
|
+
return undefined;
|
|
215
|
+
p.asClause.lastIndex = 0;
|
|
216
|
+
for (let m = p.asClause.exec(code); m; m = p.asClause.exec(code)) {
|
|
217
|
+
if (VB_MEMBER_HEAD.test(code.slice(0, m.index)))
|
|
218
|
+
continue;
|
|
219
|
+
const type = readType(code, m.index + m[0].length);
|
|
220
|
+
if (!type)
|
|
221
|
+
return { kind: 'unknown' };
|
|
222
|
+
return { kind: 'type', type: m[2] ? { ...type, array: false } : { ...type, array: type.array || !!m[1] } };
|
|
223
|
+
}
|
|
224
|
+
const listed = p.listed.exec(code);
|
|
225
|
+
if (listed) {
|
|
226
|
+
const type = readType(code, listed.index + listed[0].length);
|
|
227
|
+
return type ? { kind: 'type', type } : { kind: 'unknown' };
|
|
228
|
+
}
|
|
229
|
+
const typeChar = p.typeChar.exec(code);
|
|
230
|
+
if (typeChar)
|
|
231
|
+
return { kind: 'type', type: { name: VB_TYPE_CHARS[typeChar[1]], array: !!typeChar[2] } };
|
|
232
|
+
const inferred = p.inferred.exec(code);
|
|
233
|
+
if (inferred)
|
|
234
|
+
return valueBinding(code.slice(inferred.index + inferred[0].length));
|
|
235
|
+
const loop = p.forEach.exec(code);
|
|
236
|
+
if (loop) {
|
|
237
|
+
const collection = loop[1].trim();
|
|
238
|
+
const elements = /\.\s*(?:OfType|Cast)\s*\(\s*Of\s+/i.exec(collection);
|
|
239
|
+
const type = elements && /^[^()]*\)\s*(?:\(\s*\))?\s*$/.test(collection.slice(elements.index + elements[0].length))
|
|
240
|
+
? readType(collection, elements.index + elements[0].length) : null;
|
|
241
|
+
if (type)
|
|
242
|
+
return { kind: 'type', type };
|
|
243
|
+
return /^[A-Za-z_]\w*$/.test(collection) ? { kind: 'each', collection } : { kind: 'unknown' };
|
|
244
|
+
}
|
|
245
|
+
return p.loose.test(code) ? { kind: 'unknown' } : undefined;
|
|
246
|
+
}
|
|
247
|
+
function valueBinding(expr) {
|
|
248
|
+
const e = expr.split(/\s:(?!=)/)[0].trim();
|
|
249
|
+
const unknown = { kind: 'unknown' };
|
|
250
|
+
const created = /^New\s+/i.exec(e);
|
|
251
|
+
if (created) {
|
|
252
|
+
const type = readType(e, created[0].length);
|
|
253
|
+
return type ? { kind: 'type', type: { ...type, array: false } } : unknown;
|
|
254
|
+
}
|
|
255
|
+
const cast = /^(?:DirectCast|TryCast|CType)\s*\(/i.exec(e);
|
|
256
|
+
if (cast) {
|
|
257
|
+
const args = splitArgs(e, cast[0].length - 1);
|
|
258
|
+
const type = args?.length === 2 ? readType(args[1], 0) : null;
|
|
259
|
+
return type ? { kind: 'type', type } : unknown;
|
|
260
|
+
}
|
|
261
|
+
if (/^\$?""/.test(e))
|
|
262
|
+
return { kind: 'type', type: { name: 'String', array: false } };
|
|
263
|
+
const conversion = /^(C[A-Za-z]+)\s*\(/.exec(e);
|
|
264
|
+
const converted = conversion ? VB_CONVERSIONS[conversion[1].toLowerCase()] : undefined;
|
|
265
|
+
if (converted)
|
|
266
|
+
return { kind: 'type', type: { name: converted, array: false } };
|
|
267
|
+
const call = /^(?:([A-Za-z_]\w*)\s*\.\s*)?([A-Za-z_]\w*)\s*/.exec(e);
|
|
268
|
+
if (call) {
|
|
269
|
+
let rest = e.slice(call[0].length);
|
|
270
|
+
if (rest.startsWith('(')) {
|
|
271
|
+
const close = closeParen(rest, 0);
|
|
272
|
+
rest = close < 0 ? 'unclosed' : rest.slice(close + 1).trim();
|
|
273
|
+
}
|
|
274
|
+
if (rest === '')
|
|
275
|
+
return { kind: 'call', receiver: call[1] ?? null, member: call[2] };
|
|
276
|
+
}
|
|
277
|
+
return unknown;
|
|
278
|
+
}
|
|
279
|
+
function scopeStartLine(ref, context) {
|
|
280
|
+
const from = context.getNodeById?.(ref.fromNodeId);
|
|
281
|
+
if (from && from.filePath === ref.filePath && from.startLine <= ref.line && from.endLine >= ref.line &&
|
|
282
|
+
(from.kind === 'method' || from.kind === 'function' || from.kind === 'property' || from.kind === 'field')) {
|
|
283
|
+
return from.startLine - 1;
|
|
284
|
+
}
|
|
285
|
+
let start = -1;
|
|
286
|
+
for (const n of context.getNodesInFile(ref.filePath)) {
|
|
287
|
+
if (n.kind !== 'method' && n.kind !== 'function' && n.kind !== 'property')
|
|
288
|
+
continue;
|
|
289
|
+
if (n.startLine <= ref.line && n.endLine >= ref.line && n.startLine - 1 > start)
|
|
290
|
+
start = n.startLine - 1;
|
|
291
|
+
}
|
|
292
|
+
return start < 0 ? ref.line - 1 : start;
|
|
293
|
+
}
|
|
294
|
+
const VB_WORD_LINES = new WeakMap();
|
|
295
|
+
function wordLines(file, context) {
|
|
296
|
+
let memo = VB_WORD_LINES.get(context);
|
|
297
|
+
if (!memo)
|
|
298
|
+
VB_WORD_LINES.set(context, (memo = new Map()));
|
|
299
|
+
const hit = memo.get(file);
|
|
300
|
+
if (hit)
|
|
301
|
+
return hit;
|
|
302
|
+
const index = new Map();
|
|
303
|
+
const words = /[A-Za-z_]\w*/g;
|
|
304
|
+
const lines = codeLines(file, context);
|
|
305
|
+
for (let i = 0; i < lines.length; i++) {
|
|
306
|
+
const code = lines[i].toLowerCase();
|
|
307
|
+
words.lastIndex = 0;
|
|
308
|
+
for (let m = words.exec(code); m; m = words.exec(code)) {
|
|
309
|
+
let at = index.get(m[0]);
|
|
310
|
+
if (!at)
|
|
311
|
+
index.set(m[0], (at = []));
|
|
312
|
+
if (at[at.length - 1] !== i)
|
|
313
|
+
at.push(i);
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
if (memo.size >= 256)
|
|
317
|
+
memo.delete(memo.keys().next().value);
|
|
318
|
+
memo.set(file, index);
|
|
319
|
+
return index;
|
|
320
|
+
}
|
|
321
|
+
const VB_BINDINGS = new WeakMap();
|
|
322
|
+
function bindingsOf(name, file, context) {
|
|
323
|
+
let memo = VB_BINDINGS.get(context);
|
|
324
|
+
if (!memo)
|
|
325
|
+
VB_BINDINGS.set(context, (memo = new Map()));
|
|
326
|
+
const key = `${file}|${name.toLowerCase()}`;
|
|
327
|
+
const hit = memo.get(key);
|
|
328
|
+
if (hit)
|
|
329
|
+
return hit;
|
|
330
|
+
const lines = codeLines(file, context);
|
|
331
|
+
const found = [];
|
|
332
|
+
for (const i of wordLines(file, context).get(name.toLowerCase()) ?? []) {
|
|
333
|
+
const binding = bindingOn(lines[i], name);
|
|
334
|
+
if (binding)
|
|
335
|
+
found.push({ line: i, binding });
|
|
336
|
+
}
|
|
337
|
+
if (memo.size >= 65536)
|
|
338
|
+
memo.delete(memo.keys().next().value);
|
|
339
|
+
memo.set(key, found);
|
|
340
|
+
return found;
|
|
341
|
+
}
|
|
342
|
+
function localBinding(name, ref, context) {
|
|
343
|
+
const found = bindingsOf(name, ref.filePath, context);
|
|
344
|
+
let lo = 0;
|
|
345
|
+
let hi = found.length;
|
|
346
|
+
while (lo < hi) {
|
|
347
|
+
const mid = (lo + hi) >>> 1;
|
|
348
|
+
if (found[mid].line <= ref.line - 1)
|
|
349
|
+
lo = mid + 1;
|
|
350
|
+
else
|
|
351
|
+
hi = mid;
|
|
352
|
+
}
|
|
353
|
+
const nearest = found[lo - 1];
|
|
354
|
+
return nearest && nearest.line >= scopeStartLine(ref, context) ? { binding: nearest.binding, line: nearest.line + 1 } : undefined;
|
|
355
|
+
}
|
|
356
|
+
const VB_FILE_TYPES = new WeakMap();
|
|
357
|
+
function typesAround(file, line, context) {
|
|
358
|
+
let memo = VB_FILE_TYPES.get(context);
|
|
359
|
+
if (!memo)
|
|
360
|
+
VB_FILE_TYPES.set(context, (memo = new Map()));
|
|
361
|
+
let types = memo.get(file);
|
|
362
|
+
if (!types) {
|
|
363
|
+
types = context.getNodesInFile(file)
|
|
364
|
+
.filter((n) => n.language === 'vbnet' && VB_TYPE_KINDS.has(n.kind))
|
|
365
|
+
.sort((a, b) => b.startLine - a.startLine);
|
|
366
|
+
if (memo.size >= 1024)
|
|
367
|
+
memo.delete(memo.keys().next().value);
|
|
368
|
+
memo.set(file, types);
|
|
369
|
+
}
|
|
370
|
+
return types.filter((n) => n.startLine <= line && n.endLine >= line);
|
|
371
|
+
}
|
|
372
|
+
function projectTypesNamed(name, context, kinds = VB_TYPE_KINDS) {
|
|
373
|
+
return context.getNodesByLowerName(name.toLowerCase()).filter((n) => n.language === 'vbnet' && kinds.has(n.kind));
|
|
374
|
+
}
|
|
375
|
+
const VB_FILE_QNS = new WeakMap();
|
|
376
|
+
function nodesByQualifiedName(file, context) {
|
|
377
|
+
let memo = VB_FILE_QNS.get(context);
|
|
378
|
+
if (!memo)
|
|
379
|
+
VB_FILE_QNS.set(context, (memo = new Map()));
|
|
380
|
+
const hit = memo.get(file);
|
|
381
|
+
if (hit)
|
|
382
|
+
return hit;
|
|
383
|
+
const index = new Map();
|
|
384
|
+
for (const n of context.getNodesInFile(file)) {
|
|
385
|
+
if (n.language !== 'vbnet')
|
|
386
|
+
continue;
|
|
387
|
+
const key = n.qualifiedName.toLowerCase();
|
|
388
|
+
const list = index.get(key);
|
|
389
|
+
if (list)
|
|
390
|
+
list.push(n);
|
|
391
|
+
else
|
|
392
|
+
index.set(key, [n]);
|
|
393
|
+
}
|
|
394
|
+
if (memo.size >= 1024)
|
|
395
|
+
memo.delete(memo.keys().next().value);
|
|
396
|
+
memo.set(file, index);
|
|
397
|
+
return index;
|
|
398
|
+
}
|
|
399
|
+
const VB_MEMBERS = new WeakMap();
|
|
400
|
+
function membersNamed(type, name, context) {
|
|
401
|
+
let memo = VB_MEMBERS.get(context);
|
|
402
|
+
if (!memo)
|
|
403
|
+
VB_MEMBERS.set(context, (memo = new Map()));
|
|
404
|
+
const project = projectOf(type.filePath, context);
|
|
405
|
+
const qn = `${type.qualifiedName}::${name}`.toLowerCase();
|
|
406
|
+
const key = `${project}|${qn}`;
|
|
407
|
+
const hit = memo.get(key);
|
|
408
|
+
if (hit)
|
|
409
|
+
return hit;
|
|
410
|
+
const own = type.qualifiedName.toLowerCase();
|
|
411
|
+
const files = new Set([type.filePath]);
|
|
412
|
+
for (const part of context.getNodesByLowerName(type.name.toLowerCase())) {
|
|
413
|
+
if (part.language === 'vbnet' && part.qualifiedName.toLowerCase() === own && projectOf(part.filePath, context) === project) {
|
|
414
|
+
files.add(part.filePath);
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
const members = [...files].flatMap((file) => nodesByQualifiedName(file, context).get(qn) ?? []);
|
|
418
|
+
if (memo.size >= 65536)
|
|
419
|
+
memo.delete(memo.keys().next().value);
|
|
420
|
+
memo.set(key, members);
|
|
421
|
+
return members;
|
|
422
|
+
}
|
|
423
|
+
const VB_MODULES = new WeakMap();
|
|
424
|
+
function isModule(ownerQn, context) {
|
|
425
|
+
let memo = VB_MODULES.get(context);
|
|
426
|
+
if (!memo)
|
|
427
|
+
VB_MODULES.set(context, (memo = new Map()));
|
|
428
|
+
const hit = memo.get(ownerQn);
|
|
429
|
+
if (hit !== undefined)
|
|
430
|
+
return hit;
|
|
431
|
+
const module = context.getNodesByQualifiedName(ownerQn).some((n) => n.language === 'vbnet' && n.kind === 'class' &&
|
|
432
|
+
(context.getFileLines?.(n.filePath) ?? context.readFile(n.filePath)?.split(/\r?\n/) ?? []).slice(n.startLine - 1, n.startLine + 2)
|
|
433
|
+
.some((l) => /^\s*(?:<[^>]*>\s*)*(?:(?:Public|Friend|Private|Partial)\s+)*Module\s/i.test(l)));
|
|
434
|
+
memo.set(ownerQn, module);
|
|
435
|
+
return module;
|
|
436
|
+
}
|
|
437
|
+
function moduleMembersNamed(name, ref, context) {
|
|
438
|
+
const members = context.getNodesByLowerName(name.toLowerCase()).filter((n) => {
|
|
439
|
+
const cut = n.qualifiedName.lastIndexOf('::');
|
|
440
|
+
return n.language === 'vbnet' && cut > 0 && isModule(n.qualifiedName.slice(0, cut), context);
|
|
441
|
+
});
|
|
442
|
+
return preferVbProject(members, ref, context);
|
|
443
|
+
}
|
|
444
|
+
const VB_SUPERS = new WeakMap();
|
|
445
|
+
function supertypesOf(type, context) {
|
|
446
|
+
let memo = VB_SUPERS.get(context);
|
|
447
|
+
if (!memo)
|
|
448
|
+
VB_SUPERS.set(context, (memo = new Map()));
|
|
449
|
+
const key = type.qualifiedName.toLowerCase();
|
|
450
|
+
const hit = memo.get(key);
|
|
451
|
+
if (hit)
|
|
452
|
+
return hit;
|
|
453
|
+
const supers = [];
|
|
454
|
+
const parts = context.getNodesByQualifiedName(type.qualifiedName).filter((n) => n.language === 'vbnet' && VB_TYPE_KINDS.has(n.kind));
|
|
455
|
+
for (const part of parts.length > 0 ? parts : [type]) {
|
|
456
|
+
const lines = codeLines(part.filePath, context);
|
|
457
|
+
scan: for (let i = part.startLine - 1; i < Math.min(lines.length, part.startLine + 12, part.endLine); i++) {
|
|
458
|
+
for (const statement of lines[i].split(/:(?!=)/)) {
|
|
459
|
+
const s = statement.trim();
|
|
460
|
+
if (s === '' || /^<.*>$/.test(s) || s.startsWith('#') || /\b(?:Class|Structure|Interface|Module)\s+[A-Za-z_]/i.test(s) && !/^(?:Inherits|Implements)\b/i.test(s))
|
|
461
|
+
continue;
|
|
462
|
+
const clause = /^(Inherits|Implements)\s+(.+)$/i.exec(s);
|
|
463
|
+
if (!clause)
|
|
464
|
+
break scan;
|
|
465
|
+
for (const sup of splitArgs(`(${clause[2]})`, 0) ?? []) {
|
|
466
|
+
const t = sited(readType(sup, 0), part.filePath, part.startLine);
|
|
467
|
+
if (t)
|
|
468
|
+
supers.push(/^Implements$/i.test(clause[1]) ? { ...t, implemented: true } : t);
|
|
469
|
+
}
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
}
|
|
473
|
+
memo.set(key, supers);
|
|
474
|
+
return supers;
|
|
475
|
+
}
|
|
476
|
+
const VB_ANCESTRIES = new WeakMap();
|
|
477
|
+
function substitute(t, args) {
|
|
478
|
+
return (!t.qualifier && !t.array && args.get(t.name.toLowerCase())) || t;
|
|
479
|
+
}
|
|
480
|
+
function ancestry(type, context) {
|
|
481
|
+
let memo = VB_ANCESTRIES.get(context);
|
|
482
|
+
if (!memo)
|
|
483
|
+
VB_ANCESTRIES.set(context, (memo = new Map()));
|
|
484
|
+
const hit = memo.get(type.id);
|
|
485
|
+
if (hit)
|
|
486
|
+
return hit;
|
|
487
|
+
const out = [];
|
|
488
|
+
const seen = new Set();
|
|
489
|
+
const queue = [{ node: type, args: new Map() }];
|
|
490
|
+
while (queue.length > 0 && out.length < 16) {
|
|
491
|
+
const current = queue.shift();
|
|
492
|
+
const key = current.node.qualifiedName.toLowerCase();
|
|
493
|
+
if (seen.has(key))
|
|
494
|
+
continue;
|
|
495
|
+
seen.add(key);
|
|
496
|
+
out.push(current);
|
|
497
|
+
for (const sup of supertypesOf(current.node, context)) {
|
|
498
|
+
if (sup.implemented)
|
|
499
|
+
continue;
|
|
500
|
+
const found = typesNamedAt(sup, context);
|
|
501
|
+
if (found.ambiguous)
|
|
502
|
+
continue;
|
|
503
|
+
const given = (sup.args ?? []).map((a) => substitute(a, current.args));
|
|
504
|
+
for (const base of found.owners) {
|
|
505
|
+
const params = [...typeParametersOf(base, context).keys()];
|
|
506
|
+
queue.push({ node: base, args: new Map(params.flatMap((p, i) => (given[i] ? [[p, given[i]]] : []))) });
|
|
507
|
+
}
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
memo.set(type.id, out);
|
|
511
|
+
return out;
|
|
512
|
+
}
|
|
513
|
+
function hierarchy(type, context) {
|
|
514
|
+
return ancestry(type, context).map((a) => a.node);
|
|
515
|
+
}
|
|
516
|
+
const VB_PROJECTS = new WeakMap();
|
|
517
|
+
function projectOfDir(dir, context, memo) {
|
|
518
|
+
const hit = memo.get(dir);
|
|
519
|
+
if (hit !== undefined)
|
|
520
|
+
return hit;
|
|
521
|
+
let found = null;
|
|
522
|
+
try {
|
|
523
|
+
if (fs.readdirSync(path.join(context.getProjectRoot(), dir)).some((e) => /\.vbproj$/i.test(e)))
|
|
524
|
+
found = dir;
|
|
525
|
+
}
|
|
526
|
+
catch {
|
|
527
|
+
}
|
|
528
|
+
if (found === null && dir !== '') {
|
|
529
|
+
const cut = dir.lastIndexOf('/');
|
|
530
|
+
found = projectOfDir(cut < 0 ? '' : dir.slice(0, cut), context, memo);
|
|
531
|
+
}
|
|
532
|
+
memo.set(dir, found);
|
|
533
|
+
return found;
|
|
534
|
+
}
|
|
535
|
+
function projectOf(file, context) {
|
|
536
|
+
let memo = VB_PROJECTS.get(context);
|
|
537
|
+
if (!memo)
|
|
538
|
+
VB_PROJECTS.set(context, (memo = new Map()));
|
|
539
|
+
const cut = file.lastIndexOf('/');
|
|
540
|
+
return projectOfDir(cut < 0 ? '' : file.slice(0, cut), context, memo);
|
|
541
|
+
}
|
|
542
|
+
function sameVbProject(a, b, context) {
|
|
543
|
+
const project = projectOf(a, context);
|
|
544
|
+
return project !== null && project === projectOf(b, context);
|
|
545
|
+
}
|
|
546
|
+
const VB_PROJECT_INFO = new WeakMap();
|
|
547
|
+
function projectInfo(file, context) {
|
|
548
|
+
const dir = projectOf(file, context);
|
|
549
|
+
if (dir === null)
|
|
550
|
+
return { root: [], imports: [] };
|
|
551
|
+
let memo = VB_PROJECT_INFO.get(context);
|
|
552
|
+
if (!memo)
|
|
553
|
+
VB_PROJECT_INFO.set(context, (memo = new Map()));
|
|
554
|
+
const hit = memo.get(dir);
|
|
555
|
+
if (hit)
|
|
556
|
+
return hit;
|
|
557
|
+
const info = { root: [], imports: [] };
|
|
558
|
+
try {
|
|
559
|
+
const abs = path.join(context.getProjectRoot(), dir);
|
|
560
|
+
const project = fs.readdirSync(abs).find((e) => /\.vbproj$/i.test(e));
|
|
561
|
+
if (project) {
|
|
562
|
+
const text = fs.readFileSync(path.join(abs, project), 'utf8');
|
|
563
|
+
const root = /<RootNamespace>\s*([\w.]*)\s*<\/RootNamespace>/i.exec(text)?.[1] ?? project.replace(/\.vbproj$/i, '');
|
|
564
|
+
info.root = root.toLowerCase().split('.').filter((s) => s !== '');
|
|
565
|
+
for (const m of text.matchAll(/<Import\s+Include\s*=\s*"([\w.]+)"/gi))
|
|
566
|
+
info.imports.push(m[1].toLowerCase());
|
|
567
|
+
}
|
|
568
|
+
}
|
|
569
|
+
catch {
|
|
570
|
+
}
|
|
571
|
+
memo.set(dir, info);
|
|
572
|
+
return info;
|
|
573
|
+
}
|
|
574
|
+
function fullSegments(n, context) {
|
|
575
|
+
return [...projectInfo(n.filePath, context).root, ...n.qualifiedName.toLowerCase().split('::').flatMap((s) => s.split('.'))];
|
|
576
|
+
}
|
|
577
|
+
function headerLines(file, context) {
|
|
578
|
+
const lines = codeLines(file, context);
|
|
579
|
+
const end = lines.findIndex((l) => /^\s*(?:Namespace|Module|Class|Structure|Interface|Enum|Delegate|Public|Friend|Private|Protected|Partial|NotInheritable|MustInherit)\b/i.test(l));
|
|
580
|
+
return end < 0 ? lines : lines.slice(0, end);
|
|
581
|
+
}
|
|
582
|
+
const VB_FILE_IMPORTS = new WeakMap();
|
|
583
|
+
function importedNamespaces(file, context) {
|
|
584
|
+
let memo = VB_FILE_IMPORTS.get(context);
|
|
585
|
+
if (!memo)
|
|
586
|
+
VB_FILE_IMPORTS.set(context, (memo = new Map()));
|
|
587
|
+
const hit = memo.get(file);
|
|
588
|
+
if (hit)
|
|
589
|
+
return hit;
|
|
590
|
+
const imports = [...projectInfo(file, context).imports];
|
|
591
|
+
for (const line of headerLines(file, context)) {
|
|
592
|
+
const m = /^\s*Imports\s+([\w.]+)\s*$/i.exec(line);
|
|
593
|
+
if (m)
|
|
594
|
+
imports.push(m[1].toLowerCase().replace(/^global\./, ''));
|
|
595
|
+
}
|
|
596
|
+
memo.set(file, imports);
|
|
597
|
+
return imports;
|
|
598
|
+
}
|
|
599
|
+
const VB_ALIASES = new WeakMap();
|
|
600
|
+
function importAliases(file, context) {
|
|
601
|
+
let memo = VB_ALIASES.get(context);
|
|
602
|
+
if (!memo)
|
|
603
|
+
VB_ALIASES.set(context, (memo = new Map()));
|
|
604
|
+
const hit = memo.get(file);
|
|
605
|
+
if (hit)
|
|
606
|
+
return hit;
|
|
607
|
+
const aliases = new Map();
|
|
608
|
+
for (const line of headerLines(file, context)) {
|
|
609
|
+
const m = /^\s*Imports\s+([A-Za-z_]\w*)\s*=\s*(.+)$/i.exec(line);
|
|
610
|
+
const target = m ? readType(m[2], 0) : null;
|
|
611
|
+
if (target)
|
|
612
|
+
aliases.set(m[1].toLowerCase(), target);
|
|
613
|
+
}
|
|
614
|
+
memo.set(file, aliases);
|
|
615
|
+
return aliases;
|
|
616
|
+
}
|
|
617
|
+
function unalias(t, file, context) {
|
|
618
|
+
const aliases = importAliases(file, context);
|
|
619
|
+
if (aliases.size === 0)
|
|
620
|
+
return t;
|
|
621
|
+
if (!t.qualifier) {
|
|
622
|
+
const target = aliases.get(t.name.toLowerCase());
|
|
623
|
+
return target ? { ...t, name: target.name, ...(target.qualifier ? { qualifier: target.qualifier } : {}) } : t;
|
|
624
|
+
}
|
|
625
|
+
const target = aliases.get(t.qualifier[0]);
|
|
626
|
+
return target ? { ...t, qualifier: [...(target.qualifier ?? []), target.name.toLowerCase(), ...t.qualifier.slice(1)] } : t;
|
|
627
|
+
}
|
|
628
|
+
function endsWith(full, tail) {
|
|
629
|
+
return tail.length <= full.length && tail.every((s, i) => full[full.length - tail.length + i] === s);
|
|
630
|
+
}
|
|
631
|
+
const VB_TYPE_LIKE_KINDS = new Set(['class', 'struct', 'interface', 'enum', 'type_alias']);
|
|
632
|
+
function enclosingType(n, context) {
|
|
633
|
+
const cut = n.qualifiedName.lastIndexOf('::');
|
|
634
|
+
if (cut < 0)
|
|
635
|
+
return null;
|
|
636
|
+
const parentQn = n.qualifiedName.slice(0, cut);
|
|
637
|
+
const parent = context.getNodesByQualifiedName(parentQn).find((p) => p.language === 'vbnet' && VB_TYPE_KINDS.has(p.kind));
|
|
638
|
+
return parent && !isModule(parentQn, context) ? parent : null;
|
|
639
|
+
}
|
|
640
|
+
function isNestedInType(n, context) {
|
|
641
|
+
return enclosingType(n, context) !== null;
|
|
642
|
+
}
|
|
643
|
+
const VB_BASE_NAMES = new WeakMap();
|
|
644
|
+
function baseTypeNamesAround(file, line, context) {
|
|
645
|
+
const around = typesAround(file, line, context);
|
|
646
|
+
let memo = VB_BASE_NAMES.get(context);
|
|
647
|
+
if (!memo)
|
|
648
|
+
VB_BASE_NAMES.set(context, (memo = new Map()));
|
|
649
|
+
const key = around.map((t) => t.id).join('|');
|
|
650
|
+
const hit = memo.get(key);
|
|
651
|
+
if (hit)
|
|
652
|
+
return hit;
|
|
653
|
+
const names = new Set();
|
|
654
|
+
let frontier = around;
|
|
655
|
+
for (let depth = 0; depth < 5 && frontier.length > 0; depth++) {
|
|
656
|
+
const next = [];
|
|
657
|
+
for (const t of frontier) {
|
|
658
|
+
if (names.has(t.name.toLowerCase()))
|
|
659
|
+
continue;
|
|
660
|
+
names.add(t.name.toLowerCase());
|
|
661
|
+
for (const sup of supertypesOf(t, context))
|
|
662
|
+
if (!sup.implemented)
|
|
663
|
+
next.push(...projectTypesNamed(sup.name, context));
|
|
664
|
+
}
|
|
665
|
+
frontier = next;
|
|
666
|
+
}
|
|
667
|
+
memo.set(key, names);
|
|
668
|
+
return names;
|
|
669
|
+
}
|
|
670
|
+
function isVbTypeQualifiedBy(n, qualifier, file, context) {
|
|
671
|
+
if (n.language !== 'vbnet' || !VB_TYPE_LIKE_KINDS.has(n.kind))
|
|
672
|
+
return true;
|
|
673
|
+
const written = readType(`${qualifier}.${n.name}`, 0);
|
|
674
|
+
if (!written?.qualifier)
|
|
675
|
+
return true;
|
|
676
|
+
const t = unalias(written, file, context);
|
|
677
|
+
return !t.qualifier || endsWith(fullSegments(n, context).slice(0, -1), t.qualifier);
|
|
678
|
+
}
|
|
679
|
+
function typesNamedAt(written, context, kinds = VB_TYPE_KINDS) {
|
|
680
|
+
const t = written.file ? unalias(written, written.file, context) : written;
|
|
681
|
+
let candidates = projectTypesNamed(t.name, context, kinds);
|
|
682
|
+
if (t.qualifier)
|
|
683
|
+
candidates = candidates.filter((c) => endsWith(fullSegments(c, context).slice(0, -1), t.qualifier));
|
|
684
|
+
if (candidates.length === 0 || !t.file)
|
|
685
|
+
return { owners: candidates, ambiguous: false };
|
|
686
|
+
const file = t.file;
|
|
687
|
+
const site = typesAround(file, t.line ?? 0, context)[0];
|
|
688
|
+
const sitePath = site ? fullSegments(site, context) : projectInfo(file, context).root;
|
|
689
|
+
let tier = [];
|
|
690
|
+
let best = -1;
|
|
691
|
+
for (const c of candidates) {
|
|
692
|
+
const container = fullSegments(c, context).slice(0, -1);
|
|
693
|
+
if (container.length > sitePath.length || container.some((s, i) => s !== sitePath[i]))
|
|
694
|
+
continue;
|
|
695
|
+
if (container.length > best) {
|
|
696
|
+
best = container.length;
|
|
697
|
+
tier = [c];
|
|
698
|
+
}
|
|
699
|
+
else if (container.length === best)
|
|
700
|
+
tier.push(c);
|
|
701
|
+
}
|
|
702
|
+
if (tier.length === 0 && !t.qualifier) {
|
|
703
|
+
const bases = baseTypeNamesAround(file, t.line ?? 0, context);
|
|
704
|
+
tier = candidates.filter((c) => bases.has(enclosingType(c, context)?.name.toLowerCase() ?? ''));
|
|
705
|
+
}
|
|
706
|
+
if (tier.length === 0) {
|
|
707
|
+
const imports = importedNamespaces(file, context);
|
|
708
|
+
tier = candidates.filter((c) => imports.includes(fullSegments(c, context).slice(0, -1).join('.')));
|
|
709
|
+
}
|
|
710
|
+
if (tier.length === 0)
|
|
711
|
+
tier = t.qualifier ? candidates : candidates.filter((c) => !isNestedInType(c, context));
|
|
712
|
+
const own = tier.filter((c) => sameVbProject(c.filePath, file, context));
|
|
713
|
+
if (own.length > 0)
|
|
714
|
+
tier = own;
|
|
715
|
+
const distinct = new Set(tier.map((c) => `${projectOf(c.filePath, context)}|${c.qualifiedName.toLowerCase()}`));
|
|
716
|
+
return { owners: [...tier.filter((c) => c.filePath === file), ...tier.filter((c) => c.filePath !== file)], ambiguous: distinct.size > 1 };
|
|
717
|
+
}
|
|
718
|
+
const VB_NAMESPACES = new WeakMap();
|
|
719
|
+
function knownNamespaces(context) {
|
|
720
|
+
const hit = VB_NAMESPACES.get(context);
|
|
721
|
+
if (hit)
|
|
722
|
+
return hit;
|
|
723
|
+
const known = new Set();
|
|
724
|
+
const add = (segments) => {
|
|
725
|
+
for (let i = 1; i <= segments.length; i++)
|
|
726
|
+
known.add(segments.slice(0, i).join('.'));
|
|
727
|
+
};
|
|
728
|
+
for (const n of context.getNodesByKind('namespace'))
|
|
729
|
+
if (n.language === 'vbnet')
|
|
730
|
+
add(fullSegments(n, context));
|
|
731
|
+
for (const file of context.getAllFiles())
|
|
732
|
+
if (/\.vb$/i.test(file))
|
|
733
|
+
add(projectInfo(file, context).root);
|
|
734
|
+
VB_NAMESPACES.set(context, known);
|
|
735
|
+
return known;
|
|
736
|
+
}
|
|
737
|
+
function namespaceAround(file, line, context) {
|
|
738
|
+
const root = projectInfo(file, context).root;
|
|
739
|
+
const around = typesAround(file, line, context);
|
|
740
|
+
const outer = around[around.length - 1];
|
|
741
|
+
const cut = outer ? outer.qualifiedName.indexOf('::') : -1;
|
|
742
|
+
if (cut < 0)
|
|
743
|
+
return root;
|
|
744
|
+
const head = outer.qualifiedName.slice(0, cut).toLowerCase();
|
|
745
|
+
return nodesByQualifiedName(file, context).get(head)?.some((n) => n.kind === 'namespace') ? [...root, ...head.split('.')] : root;
|
|
746
|
+
}
|
|
747
|
+
function namespaceNamed(name, ref, context) {
|
|
748
|
+
const known = knownNamespaces(context);
|
|
749
|
+
const key = name.toLowerCase();
|
|
750
|
+
const around = namespaceAround(ref.filePath, ref.line, context);
|
|
751
|
+
for (let i = around.length; i >= 0; i--) {
|
|
752
|
+
const candidate = [...around.slice(0, i), key];
|
|
753
|
+
if (known.has(candidate.join('.')))
|
|
754
|
+
return candidate;
|
|
755
|
+
}
|
|
756
|
+
for (const imported of importedNamespaces(ref.filePath, context)) {
|
|
757
|
+
const candidate = [...imported.split('.'), key];
|
|
758
|
+
if (known.has(candidate.join('.')))
|
|
759
|
+
return candidate;
|
|
760
|
+
}
|
|
761
|
+
return null;
|
|
762
|
+
}
|
|
763
|
+
function typesInNamespace(ns, name, ref, context) {
|
|
764
|
+
const key = ns.join('.');
|
|
765
|
+
let found = projectTypesNamed(name, context, VB_READ_TYPE_KINDS)
|
|
766
|
+
.filter((c) => fullSegments(c, context).slice(0, -1).join('.') === key);
|
|
767
|
+
const own = found.filter((c) => sameVbProject(c.filePath, ref.filePath, context));
|
|
768
|
+
if (own.length > 0)
|
|
769
|
+
found = own;
|
|
770
|
+
const distinct = new Set(found.map((c) => `${projectOf(c.filePath, context)}|${c.qualifiedName.toLowerCase()}`));
|
|
771
|
+
return distinct.size > 1 ? null
|
|
772
|
+
: [...found.filter((c) => c.filePath === ref.filePath), ...found.filter((c) => c.filePath !== ref.filePath)];
|
|
773
|
+
}
|
|
774
|
+
function moduleMemberIn(ns, name, ref, context) {
|
|
775
|
+
const key = ns.join('.');
|
|
776
|
+
return moduleMembersNamed(name, ref, context).find((n) => (VB_VALUE_KINDS.has(n.kind) || n.kind === 'method') && fullSegments(n, context).slice(0, -2).join('.') === key);
|
|
777
|
+
}
|
|
778
|
+
function preferVbProject(nodes, ref, context) {
|
|
779
|
+
if (nodes.length < 2)
|
|
780
|
+
return nodes;
|
|
781
|
+
const file = [];
|
|
782
|
+
const project = [];
|
|
783
|
+
const rest = [];
|
|
784
|
+
for (const n of nodes) {
|
|
785
|
+
if (n.filePath === ref.filePath)
|
|
786
|
+
file.push(n);
|
|
787
|
+
else if (sameVbProject(n.filePath, ref.filePath, context))
|
|
788
|
+
project.push(n);
|
|
789
|
+
else
|
|
790
|
+
rest.push(n);
|
|
791
|
+
}
|
|
792
|
+
return [...file, ...project, ...rest];
|
|
793
|
+
}
|
|
794
|
+
function sharedDirs(a, b) {
|
|
795
|
+
const da = a.split('/').slice(0, -1);
|
|
796
|
+
const db = b.split('/').slice(0, -1);
|
|
797
|
+
let i = 0;
|
|
798
|
+
while (i < da.length && i < db.length && da[i] === db[i])
|
|
799
|
+
i++;
|
|
800
|
+
return i;
|
|
801
|
+
}
|
|
802
|
+
function breakVbTie(tied, ref, context) {
|
|
803
|
+
const seen = new Set();
|
|
804
|
+
const distinct = tied.filter((n) => {
|
|
805
|
+
const key = `${projectOf(n.filePath, context)}|${n.qualifiedName.toLowerCase()}`;
|
|
806
|
+
if (seen.has(key))
|
|
807
|
+
return false;
|
|
808
|
+
seen.add(key);
|
|
809
|
+
return true;
|
|
810
|
+
});
|
|
811
|
+
if (distinct.length === 1)
|
|
812
|
+
return distinct[0];
|
|
813
|
+
let pool = distinct.filter((n) => n.filePath === ref.filePath);
|
|
814
|
+
if (pool.length === 0) {
|
|
815
|
+
const own = distinct.filter((n) => sameVbProject(n.filePath, ref.filePath, context));
|
|
816
|
+
pool = own.length > 0 ? own : distinct;
|
|
817
|
+
}
|
|
818
|
+
if (pool.length === 1)
|
|
819
|
+
return pool[0];
|
|
820
|
+
let best = -1;
|
|
821
|
+
let winners = [];
|
|
822
|
+
for (const n of pool) {
|
|
823
|
+
const shared = sharedDirs(ref.filePath, n.filePath);
|
|
824
|
+
if (shared > best) {
|
|
825
|
+
best = shared;
|
|
826
|
+
winners = [n];
|
|
827
|
+
}
|
|
828
|
+
else if (shared === best)
|
|
829
|
+
winners.push(n);
|
|
830
|
+
}
|
|
831
|
+
return winners.length === 1 ? winners[0] : null;
|
|
832
|
+
}
|
|
833
|
+
function memberDeclaredType(member, context) {
|
|
834
|
+
const code = codeLines(member.filePath, context).slice(member.startLine - 1, member.startLine + 2).join(' ');
|
|
835
|
+
const r = escapeRegex(member.name);
|
|
836
|
+
const property = new RegExp(`\\bProperty\\s+${r}\\b\\s*`, 'i').exec(code);
|
|
837
|
+
if (property) {
|
|
838
|
+
let at = property.index + property[0].length;
|
|
839
|
+
if (code[at] === '(') {
|
|
840
|
+
const close = closeParen(code, at);
|
|
841
|
+
if (close < 0)
|
|
842
|
+
return null;
|
|
843
|
+
at = close + 1;
|
|
844
|
+
}
|
|
845
|
+
const as = /^\s*As\s+(New\s+)?/i.exec(code.slice(at));
|
|
846
|
+
const type = as ? readType(code, at + as[0].length) : null;
|
|
847
|
+
return type && as?.[1] ? { ...type, array: false } : type;
|
|
848
|
+
}
|
|
849
|
+
const binding = bindingOn(code, member.name);
|
|
850
|
+
if (binding?.kind === 'type')
|
|
851
|
+
return binding.type;
|
|
852
|
+
const init = new RegExp(`(?<![\\w.])${r}\\s*=(?!=)`, 'i').exec(code);
|
|
853
|
+
const value = init ? valueBinding(code.slice(init.index + init[0].length)) : null;
|
|
854
|
+
return value?.kind === 'type' ? value.type : null;
|
|
855
|
+
}
|
|
856
|
+
function valueMemberType(member, context, args = new Map()) {
|
|
857
|
+
const type = sited(member.kind === 'method' ? declaredReturnType(member, context) : memberDeclaredType(member, context), member.filePath, member.startLine);
|
|
858
|
+
const given = type ? substitute(type, args) : null;
|
|
859
|
+
return given !== type ? given : resolveTypeParameter(type, member, context);
|
|
860
|
+
}
|
|
861
|
+
function memberAround(name, ref, context) {
|
|
862
|
+
const fits = (n) => VB_VALUE_KINDS.has(n.kind) || n.kind === 'method';
|
|
863
|
+
for (const around of typesAround(ref.filePath, ref.line, context)) {
|
|
864
|
+
for (const { node, args } of ancestry(around, context)) {
|
|
865
|
+
const member = membersNamed(node, name, context).find(fits);
|
|
866
|
+
if (member)
|
|
867
|
+
return { node: member, args };
|
|
868
|
+
}
|
|
869
|
+
}
|
|
870
|
+
const global = moduleMembersNamed(name, ref, context).find(fits);
|
|
871
|
+
return global ? { node: global, args: new Map() } : undefined;
|
|
872
|
+
}
|
|
873
|
+
function memberType(name, ref, context) {
|
|
874
|
+
const member = memberAround(name, ref, context);
|
|
875
|
+
return member ? valueMemberType(member.node, context, member.args) : undefined;
|
|
876
|
+
}
|
|
877
|
+
function declaredReturnType(n, context) {
|
|
878
|
+
const code = codeLines(n.filePath, context).slice(n.startLine - 1, n.startLine + 6).join(' ');
|
|
879
|
+
const head = new RegExp(`\\b(Function|Property|Sub)\\s+${escapeRegex(n.name)}\\b`, 'i').exec(code);
|
|
880
|
+
if (!head || /^Sub$/i.test(head[1]))
|
|
881
|
+
return null;
|
|
882
|
+
let at = head.index + head[0].length;
|
|
883
|
+
for (let group = 0; group < 2; group++) {
|
|
884
|
+
const open = /^\s*\(/.exec(code.slice(at));
|
|
885
|
+
if (!open)
|
|
886
|
+
break;
|
|
887
|
+
const close = closeParen(code, at + open[0].length - 1);
|
|
888
|
+
if (close < 0)
|
|
889
|
+
return null;
|
|
890
|
+
at = close + 1;
|
|
891
|
+
}
|
|
892
|
+
const as = /^\s*As\s+/i.exec(code.slice(at));
|
|
893
|
+
return as ? readType(code, at + as[0].length) : null;
|
|
894
|
+
}
|
|
895
|
+
const VB_TYPE_PARAMS = new WeakMap();
|
|
896
|
+
function typeParametersOf(n, context) {
|
|
897
|
+
let memo = VB_TYPE_PARAMS.get(context);
|
|
898
|
+
if (!memo)
|
|
899
|
+
VB_TYPE_PARAMS.set(context, (memo = new Map()));
|
|
900
|
+
const hit = memo.get(n.id);
|
|
901
|
+
if (hit)
|
|
902
|
+
return hit;
|
|
903
|
+
const params = readTypeParameters(n, context);
|
|
904
|
+
memo.set(n.id, params);
|
|
905
|
+
return params;
|
|
906
|
+
}
|
|
907
|
+
function readTypeParameters(n, context) {
|
|
908
|
+
const params = new Map();
|
|
909
|
+
const code = codeLines(n.filePath, context).slice(n.startLine - 1, n.startLine + 2).join(' ');
|
|
910
|
+
const head = new RegExp(`\\b(?:Class|Structure|Interface|Module|Function|Sub)\\s+${escapeRegex(n.name)}\\s*(?=\\(\\s*Of\\b)`, 'i').exec(code);
|
|
911
|
+
if (!head)
|
|
912
|
+
return params;
|
|
913
|
+
for (const p of splitArgs(code, head.index + head[0].length) ?? []) {
|
|
914
|
+
const m = /^(?:Of\s+)?(?:In\s+|Out\s+)?([A-Za-z_]\w*)(?:\s+As\s+(.+))?$/i.exec(p);
|
|
915
|
+
if (!m)
|
|
916
|
+
continue;
|
|
917
|
+
const constraints = (m[2] ?? '').replace(/^\{|\}$/g, '').split(',').map((c) => c.trim())
|
|
918
|
+
.filter((c) => c !== '' && !/^(?:New|Class|Structure)$/i.test(c));
|
|
919
|
+
params.set(m[1].toLowerCase(), constraints.length > 0 ? sited(readType(constraints[0], 0), n.filePath, n.startLine) : null);
|
|
920
|
+
}
|
|
921
|
+
return params;
|
|
922
|
+
}
|
|
923
|
+
function resolveTypeParameter(t, owner, context) {
|
|
924
|
+
if (!t || t.array || isBuiltin(t) || t.qualifier || !t.file)
|
|
925
|
+
return t;
|
|
926
|
+
const key = t.name.toLowerCase();
|
|
927
|
+
for (const decl of [...(owner && owner.kind === 'method' ? [owner] : []), ...typesAround(t.file, t.line ?? 0, context)]) {
|
|
928
|
+
const params = typeParametersOf(decl, context);
|
|
929
|
+
if (params.has(key))
|
|
930
|
+
return params.get(key) ?? null;
|
|
931
|
+
}
|
|
932
|
+
return t;
|
|
933
|
+
}
|
|
934
|
+
function ownersOf(t, context) {
|
|
935
|
+
if (t.array || isBuiltin(t))
|
|
936
|
+
return [];
|
|
937
|
+
const found = typesNamedAt(t, context);
|
|
938
|
+
return found.ambiguous ? null : found.owners;
|
|
939
|
+
}
|
|
940
|
+
function memberOn(owners, name, ref, context, withValues, typed, fits = (n) => n.kind === 'method' || (withValues && VB_VALUE_KINDS.has(n.kind))) {
|
|
941
|
+
for (const level of [0, 1]) {
|
|
942
|
+
for (const owner of preferVbProject(owners, ref, context)) {
|
|
943
|
+
const given = new Map([...typeParametersOf(owner, context).keys()].flatMap((p, i) => (typed?.args?.[i] ? [[p, typed.args[i]]] : [])));
|
|
944
|
+
const ancestors = ancestry(owner, context);
|
|
945
|
+
for (const { node, args } of level === 0 ? ancestors.slice(0, 1) : ancestors.slice(1)) {
|
|
946
|
+
const found = preferVbProject(membersNamed(node, name, context).filter(fits), ref, context)[0];
|
|
947
|
+
if (found)
|
|
948
|
+
return { node: found, args: level === 0 ? given : new Map([...args].map(([p, t]) => [p, substitute(t, given)])) };
|
|
949
|
+
}
|
|
950
|
+
}
|
|
951
|
+
}
|
|
952
|
+
return null;
|
|
953
|
+
}
|
|
954
|
+
function callResultType(call, ref, context, depth) {
|
|
955
|
+
let member = null;
|
|
956
|
+
if (call.receiver === null || /^(?:Me|MyClass|MyBase)$/i.test(call.receiver)) {
|
|
957
|
+
const owners = typesAround(ref.filePath, ref.line, context).slice(0, 1);
|
|
958
|
+
member = owners.length > 0 ? memberOn(owners, call.member, ref, context, true) : null;
|
|
959
|
+
if (!member && call.receiver === null) {
|
|
960
|
+
const global = moduleMembersNamed(call.member, ref, context).find((n) => n.kind === 'method' || VB_VALUE_KINDS.has(n.kind));
|
|
961
|
+
member = global ? { node: global, args: new Map() } : null;
|
|
962
|
+
}
|
|
963
|
+
}
|
|
964
|
+
else {
|
|
965
|
+
const type = receiverType(call.receiver, ref, context, depth + 1);
|
|
966
|
+
const owners = type === undefined ? ownersOf({ name: call.receiver, array: false, file: ref.filePath, line: ref.line }, context)
|
|
967
|
+
: type ? ownersOf(type, context) : null;
|
|
968
|
+
member = owners && owners.length > 0 ? memberOn(owners, call.member, ref, context, true, type ?? undefined) : null;
|
|
969
|
+
}
|
|
970
|
+
return member ? valueMemberType(member.node, context, member.args) : null;
|
|
971
|
+
}
|
|
972
|
+
function receiverType(name, ref, context, depth) {
|
|
973
|
+
if (depth > 2)
|
|
974
|
+
return null;
|
|
975
|
+
const local = localBinding(name, ref, context);
|
|
976
|
+
if (local) {
|
|
977
|
+
const { binding, line } = local;
|
|
978
|
+
const owner = context.getNodeById?.(ref.fromNodeId) ?? null;
|
|
979
|
+
if (binding.kind === 'type')
|
|
980
|
+
return resolveTypeParameter(sited(binding.type, ref.filePath, line), owner, context);
|
|
981
|
+
if (binding.kind === 'call')
|
|
982
|
+
return callResultType(binding, { ...ref, line }, context, depth);
|
|
983
|
+
if (binding.kind === 'each') {
|
|
984
|
+
const collection = receiverType(binding.collection, { ...ref, line }, context, depth + 1);
|
|
985
|
+
return collection ? elementType(collection) : null;
|
|
986
|
+
}
|
|
987
|
+
return null;
|
|
988
|
+
}
|
|
989
|
+
return memberType(name, ref, context);
|
|
990
|
+
}
|
|
991
|
+
const VB_EXTENSIONS = new WeakMap();
|
|
992
|
+
function extensionOf(n, context) {
|
|
993
|
+
if (n.kind !== 'method' || n.language !== 'vbnet')
|
|
994
|
+
return null;
|
|
995
|
+
let memo = VB_EXTENSIONS.get(context);
|
|
996
|
+
if (!memo)
|
|
997
|
+
VB_EXTENSIONS.set(context, (memo = new Map()));
|
|
998
|
+
const hit = memo.get(n.id);
|
|
999
|
+
if (hit !== undefined)
|
|
1000
|
+
return hit;
|
|
1001
|
+
const extension = readExtension(n, context);
|
|
1002
|
+
memo.set(n.id, extension);
|
|
1003
|
+
return extension;
|
|
1004
|
+
}
|
|
1005
|
+
function readExtension(n, context) {
|
|
1006
|
+
const code = codeLines(n.filePath, context).slice(Math.max(0, n.startLine - 2), n.startLine + 6).join(' ');
|
|
1007
|
+
const decl = new RegExp(`\\b(?:Function|Sub)\\s+${escapeRegex(n.name)}\\b`, 'i').exec(code);
|
|
1008
|
+
if (!decl)
|
|
1009
|
+
return null;
|
|
1010
|
+
const attributes = /((?:<[^<>]*>\s*)+)(?:(?:Public|Friend|Private|Protected|Shared|Overloads|Async|Iterator)\s+)*$/i
|
|
1011
|
+
.exec(code.slice(0, decl.index))?.[1];
|
|
1012
|
+
if (!attributes || !/\bExtension(?:Attribute)?\b/i.test(attributes))
|
|
1013
|
+
return null;
|
|
1014
|
+
let at = decl.index + decl[0].length;
|
|
1015
|
+
const typeParams = new Set();
|
|
1016
|
+
if (/^\s*\(\s*Of\b/i.test(code.slice(at))) {
|
|
1017
|
+
const open = code.indexOf('(', at);
|
|
1018
|
+
for (const p of splitArgs(code, open) ?? []) {
|
|
1019
|
+
const tp = /^(?:Of\s+)?(?:In\s+|Out\s+)?([A-Za-z_]\w*)/i.exec(p);
|
|
1020
|
+
if (tp)
|
|
1021
|
+
typeParams.add(tp[1].toLowerCase());
|
|
1022
|
+
}
|
|
1023
|
+
const close = closeParen(code, open);
|
|
1024
|
+
if (close < 0)
|
|
1025
|
+
return null;
|
|
1026
|
+
at = close + 1;
|
|
1027
|
+
}
|
|
1028
|
+
const open = /^\s*\(/.exec(code.slice(at));
|
|
1029
|
+
const first = open ? splitArgs(code, at + open[0].length - 1)?.[0]?.replace(/<[^<>]*>/g, '') : undefined;
|
|
1030
|
+
const as = first ? /\bAs\s+/i.exec(first) : null;
|
|
1031
|
+
const type = as ? readType(first, as.index + as[0].length) : null;
|
|
1032
|
+
if (!type)
|
|
1033
|
+
return null;
|
|
1034
|
+
return { node: n, param: typeParams.has(type.name.toLowerCase()) && !type.array ? null : type };
|
|
1035
|
+
}
|
|
1036
|
+
const OBJECT_METHODS = ['tostring', 'equals', 'gethashcode', 'gettype'];
|
|
1037
|
+
const BCL_INSTANCE_METHODS = new Map(Object.entries({
|
|
1038
|
+
string: ['clone', 'compareto', 'contains', 'copyto', 'endswith', 'getenumerator', 'gettypecode', 'indexof', 'indexofany',
|
|
1039
|
+
'insert', 'isnormalized', 'lastindexof', 'lastindexofany', 'normalize', 'padleft', 'padright', 'remove', 'replace', 'split',
|
|
1040
|
+
'startswith', 'substring', 'tochararray', 'tolower', 'tolowerinvariant', 'toupper', 'toupperinvariant', 'trim', 'trimend',
|
|
1041
|
+
'trimstart'],
|
|
1042
|
+
stringbuilder: ['append', 'appendformat', 'appendjoin', 'appendline', 'clear', 'copyto', 'ensurecapacity', 'getchunks', 'insert',
|
|
1043
|
+
'remove', 'replace'],
|
|
1044
|
+
list: ['add', 'addrange', 'asreadonly', 'binarysearch', 'clear', 'contains', 'convertall', 'copyto', 'exists', 'find', 'findall',
|
|
1045
|
+
'findindex', 'findlast', 'findlastindex', 'foreach', 'getenumerator', 'getrange', 'indexof', 'insert', 'insertrange',
|
|
1046
|
+
'lastindexof', 'remove', 'removeall', 'removeat', 'removerange', 'reverse', 'sort', 'toarray', 'trimexcess', 'trueforall'],
|
|
1047
|
+
dictionary: ['add', 'clear', 'containskey', 'containsvalue', 'ensurecapacity', 'getenumerator', 'remove', 'trimexcess', 'tryadd',
|
|
1048
|
+
'trygetvalue'],
|
|
1049
|
+
hashset: ['add', 'clear', 'contains', 'copyto', 'exceptwith', 'getenumerator', 'intersectwith', 'ispropersubsetof',
|
|
1050
|
+
'ispropersupersetof', 'issubsetof', 'issupersetof', 'overlaps', 'remove', 'removewhere', 'setequals', 'symmetricexceptwith',
|
|
1051
|
+
'trimexcess', 'trygetvalue', 'unionwith'],
|
|
1052
|
+
'[]': ['clone', 'copyto', 'getenumerator', 'getlength', 'getlonglength', 'getlowerbound', 'getupperbound', 'getvalue',
|
|
1053
|
+
'initialize', 'setvalue'],
|
|
1054
|
+
}).map(([type, methods]) => [type, new Set([...methods, ...OBJECT_METHODS])]));
|
|
1055
|
+
function bclInstanceMethods(t) {
|
|
1056
|
+
return BCL_INSTANCE_METHODS.get(t.array ? '[]' : typeKey(t));
|
|
1057
|
+
}
|
|
1058
|
+
function mayExtend(t, open, param) {
|
|
1059
|
+
if (typeKey(param) === 'object')
|
|
1060
|
+
return true;
|
|
1061
|
+
if (param.array !== t.array) {
|
|
1062
|
+
return t.array && /^(?:IEnumerable|IList|ICollection|IReadOnlyList|IReadOnlyCollection|Array)$/i.test(param.name);
|
|
1063
|
+
}
|
|
1064
|
+
if (isBuiltin(param))
|
|
1065
|
+
return false;
|
|
1066
|
+
if (isBuiltin(t))
|
|
1067
|
+
return /^I[A-Z]/.test(param.name);
|
|
1068
|
+
return open;
|
|
1069
|
+
}
|
|
1070
|
+
function extensionFor(t, owners, method, ref, context, isStdMethod) {
|
|
1071
|
+
const instanceMethods = owners.length === 0 ? bclInstanceMethods(t) : undefined;
|
|
1072
|
+
if (instanceMethods?.has(method.toLowerCase()))
|
|
1073
|
+
return null;
|
|
1074
|
+
const extensions = context.getNodesByLowerName(method.toLowerCase())
|
|
1075
|
+
.map((n) => extensionOf(n, context))
|
|
1076
|
+
.filter((e) => e !== null);
|
|
1077
|
+
if (extensions.length === 0)
|
|
1078
|
+
return null;
|
|
1079
|
+
const names = new Set([typeKey({ name: t.name, array: false })]);
|
|
1080
|
+
let open = owners.length === 0 && !isBuiltin(t) && !t.array;
|
|
1081
|
+
for (const owner of owners) {
|
|
1082
|
+
for (const type of hierarchy(owner, context)) {
|
|
1083
|
+
names.add(type.name.toLowerCase());
|
|
1084
|
+
for (const sup of supertypesOf(type, context)) {
|
|
1085
|
+
names.add(typeKey(sup));
|
|
1086
|
+
const found = typesNamedAt(sup, context).owners;
|
|
1087
|
+
if (found.length === 0)
|
|
1088
|
+
open = true;
|
|
1089
|
+
else if (sup.implemented)
|
|
1090
|
+
for (const i of found)
|
|
1091
|
+
for (const h of hierarchy(i, context))
|
|
1092
|
+
names.add(h.name.toLowerCase());
|
|
1093
|
+
}
|
|
1094
|
+
}
|
|
1095
|
+
}
|
|
1096
|
+
const exact = extensions.filter((e) => e.param !== null &&
|
|
1097
|
+
(typeKey(e.param) === typeKey(t) || (!t.array && !e.param.array && names.has(typeKey(e.param)))));
|
|
1098
|
+
if (exact.length > 0) {
|
|
1099
|
+
const target = preferVbProject(exact.map((e) => e.node), ref, context)[0];
|
|
1100
|
+
return { original: ref, targetNodeId: target.id, confidence: 0.85, resolvedBy: 'instance-method' };
|
|
1101
|
+
}
|
|
1102
|
+
const loose = extensions.filter((e) => e.param === null || mayExtend(t, open, e.param));
|
|
1103
|
+
if (loose.length === 1 && (instanceMethods !== undefined || !isStdMethod(method))) {
|
|
1104
|
+
return { original: ref, targetNodeId: loose[0].node.id, confidence: 0.7, resolvedBy: 'instance-method' };
|
|
1105
|
+
}
|
|
1106
|
+
return null;
|
|
1107
|
+
}
|
|
1108
|
+
function matchVbTypedCall(receiver, method, ref, context, isStdMethod) {
|
|
1109
|
+
if (!/^[A-Za-z_]\w*$/.test(receiver))
|
|
1110
|
+
return undefined;
|
|
1111
|
+
const type = receiverType(receiver, ref, context, 0);
|
|
1112
|
+
if (type === undefined) {
|
|
1113
|
+
const named = typesNamedAt({ name: receiver, array: false, file: ref.filePath, line: ref.line }, context);
|
|
1114
|
+
if (named.owners.length === 0)
|
|
1115
|
+
return undefined;
|
|
1116
|
+
if (named.ambiguous)
|
|
1117
|
+
return null;
|
|
1118
|
+
const shared = memberOn(named.owners, method, ref, context, false);
|
|
1119
|
+
if (shared)
|
|
1120
|
+
return { original: ref, targetNodeId: shared.node.id, confidence: 0.85, resolvedBy: 'qualified-name' };
|
|
1121
|
+
const indexed = memberOn(named.owners, method, ref, context, true);
|
|
1122
|
+
return indexed ? readThrough(indexed.node, named.owners, ref, context, { edgeKind: 'references' }) : null;
|
|
1123
|
+
}
|
|
1124
|
+
if (!type || typeKey(type) === 'object')
|
|
1125
|
+
return undefined;
|
|
1126
|
+
const owners = ownersOf(type, context);
|
|
1127
|
+
if (owners === null)
|
|
1128
|
+
return null;
|
|
1129
|
+
return callOnValue(type, owners, method, ref, context, isStdMethod);
|
|
1130
|
+
}
|
|
1131
|
+
function callOnValue(type, owners, method, ref, context, isStdMethod) {
|
|
1132
|
+
if (owners.length > 0) {
|
|
1133
|
+
const own = memberOn(owners, method, ref, context, false, type);
|
|
1134
|
+
if (own)
|
|
1135
|
+
return { original: ref, targetNodeId: own.node.id, confidence: 0.9, resolvedBy: 'instance-method' };
|
|
1136
|
+
const indexed = memberOn(owners, method, ref, context, true, type);
|
|
1137
|
+
if (indexed) {
|
|
1138
|
+
return indexed.node.id === ref.fromNodeId ? null
|
|
1139
|
+
: { original: ref, targetNodeId: indexed.node.id, confidence: 0.9, resolvedBy: 'instance-method', edgeKind: 'references' };
|
|
1140
|
+
}
|
|
1141
|
+
}
|
|
1142
|
+
return extensionFor(type, owners, method, ref, context, isStdMethod);
|
|
1143
|
+
}
|
|
1144
|
+
const VB_READ_TYPE_KINDS = new Set([...VB_TYPE_KINDS, 'enum']);
|
|
1145
|
+
const VB_READ_KINDS = new Set([...VB_VALUE_KINDS, 'enum_member', 'method', ...VB_TYPE_LIKE_KINDS]);
|
|
1146
|
+
const VB_INSTANCE_READ_KINDS = new Set([...VB_VALUE_KINDS, 'method']);
|
|
1147
|
+
const VB_SHARED_READ_KINDS = new Set(['constant', 'enum_member', ...VB_TYPE_LIKE_KINDS]);
|
|
1148
|
+
function isSharedMember(n, context) {
|
|
1149
|
+
if (n.isStatic || VB_SHARED_READ_KINDS.has(n.kind))
|
|
1150
|
+
return true;
|
|
1151
|
+
if (n.kind !== 'field')
|
|
1152
|
+
return false;
|
|
1153
|
+
const code = codeLines(n.filePath, context).slice(n.startLine - 1, n.startLine + 2).join(' ');
|
|
1154
|
+
return new RegExp(`\\bConst\\s+(?:[^=]*,\\s*)?${escapeRegex(n.name)}(?![\\w$%&!#@])`, 'i').test(code);
|
|
1155
|
+
}
|
|
1156
|
+
const VB_MEMBER_PATH = /^(\{[^{}]+\}|\[?[A-Za-z_]\w*\]?)((?:\.\[?[A-Za-z_]\w*\]?)*)\.(\[?[A-Za-z_]\w*\]?)$/;
|
|
1157
|
+
function isVbMemberRead(ref) {
|
|
1158
|
+
return ref.language === 'vbnet' && ref.referenceKind === 'references' && VB_MEMBER_PATH.test(ref.referenceName);
|
|
1159
|
+
}
|
|
1160
|
+
function isVbPathCall(ref) {
|
|
1161
|
+
if (ref.language !== 'vbnet' || ref.referenceKind !== 'calls')
|
|
1162
|
+
return false;
|
|
1163
|
+
const m = VB_MEMBER_PATH.exec(ref.referenceName);
|
|
1164
|
+
return m !== null && (m[2] !== '' || m[1].startsWith('{') || /^(?:Me|MyClass|MyBase)$/i.test(m[1]));
|
|
1165
|
+
}
|
|
1166
|
+
function unescaped(name) {
|
|
1167
|
+
return name.replace(/^\[(.*)\]$/, '$1');
|
|
1168
|
+
}
|
|
1169
|
+
function valueReceiver(t, context) {
|
|
1170
|
+
if (!t || typeKey(t) === 'object')
|
|
1171
|
+
return null;
|
|
1172
|
+
const owners = ownersOf(t, context);
|
|
1173
|
+
return owners ? { owners, typed: t, throughType: false } : null;
|
|
1174
|
+
}
|
|
1175
|
+
function receiverAt(head, ref, context) {
|
|
1176
|
+
if (head.startsWith('{')) {
|
|
1177
|
+
const owner = context.getNodeById?.(ref.fromNodeId) ?? null;
|
|
1178
|
+
return valueReceiver(resolveTypeParameter(sited(readType(head.slice(1, -1), 0), ref.filePath, ref.line), owner, context), context);
|
|
1179
|
+
}
|
|
1180
|
+
if (/^(?:Me|MyClass|MyBase)$/i.test(head)) {
|
|
1181
|
+
const own = typesAround(ref.filePath, ref.line, context)[0];
|
|
1182
|
+
if (!own)
|
|
1183
|
+
return null;
|
|
1184
|
+
if (/^MyBase$/i.test(head))
|
|
1185
|
+
return valueReceiver(supertypesOf(own, context).find((s) => !s.implemented), context);
|
|
1186
|
+
return { owners: [own], typed: { name: own.name, array: false }, throughType: false };
|
|
1187
|
+
}
|
|
1188
|
+
const name = unescaped(head);
|
|
1189
|
+
const bound = receiverType(name, ref, context, 0);
|
|
1190
|
+
const written = bound === undefined ? { name, array: false, file: ref.filePath, line: ref.line }
|
|
1191
|
+
: bound && !bound.array && bound.name.toLowerCase() === name.toLowerCase() ? bound : null;
|
|
1192
|
+
if (!written)
|
|
1193
|
+
return valueReceiver(bound, context);
|
|
1194
|
+
const found = typesNamedAt(written, context, VB_READ_TYPE_KINDS);
|
|
1195
|
+
if (found.ambiguous)
|
|
1196
|
+
return null;
|
|
1197
|
+
if (found.owners.length > 0)
|
|
1198
|
+
return { owners: found.owners, throughType: true, ...(bound ? { colorColor: true } : {}) };
|
|
1199
|
+
const namespace = bound === undefined ? namespaceNamed(name, ref, context) : null;
|
|
1200
|
+
return namespace ? { owners: [], throughType: false, namespace } : null;
|
|
1201
|
+
}
|
|
1202
|
+
function memberAt(at, name, ref, context) {
|
|
1203
|
+
if (at.namespace) {
|
|
1204
|
+
const types = typesInNamespace(at.namespace, name, ref, context);
|
|
1205
|
+
if (types === null)
|
|
1206
|
+
return null;
|
|
1207
|
+
if (types.length > 0)
|
|
1208
|
+
return { owners: types, throughType: true };
|
|
1209
|
+
const nested = [...at.namespace, name.toLowerCase()];
|
|
1210
|
+
if (knownNamespaces(context).has(nested.join('.')))
|
|
1211
|
+
return { owners: [], throughType: false, namespace: nested };
|
|
1212
|
+
const member = moduleMemberIn(at.namespace, name, ref, context);
|
|
1213
|
+
return member ? valueReceiver(valueMemberType(member, context), context) : null;
|
|
1214
|
+
}
|
|
1215
|
+
if (at.owners.length === 0)
|
|
1216
|
+
return null;
|
|
1217
|
+
const fits = (n) => VB_INSTANCE_READ_KINDS.has(n.kind) || (at.throughType && VB_READ_TYPE_KINDS.has(n.kind));
|
|
1218
|
+
const found = memberOn(at.owners, name, ref, context, true, at.typed, fits) ??
|
|
1219
|
+
memberOn(at.owners, `[${name}]`, ref, context, true, at.typed, fits);
|
|
1220
|
+
if (!found)
|
|
1221
|
+
return null;
|
|
1222
|
+
if (VB_READ_TYPE_KINDS.has(found.node.kind))
|
|
1223
|
+
return { owners: [found.node], throughType: true };
|
|
1224
|
+
return valueReceiver(valueMemberType(found.node, context, found.args), context);
|
|
1225
|
+
}
|
|
1226
|
+
function pathReceiver(head, links, ref, context) {
|
|
1227
|
+
let at = receiverAt(head, ref, context);
|
|
1228
|
+
for (const link of links) {
|
|
1229
|
+
if (!at)
|
|
1230
|
+
return null;
|
|
1231
|
+
at = memberAt(at, unescaped(link), ref, context);
|
|
1232
|
+
}
|
|
1233
|
+
return at;
|
|
1234
|
+
}
|
|
1235
|
+
function readThrough(member, owners, ref, context, extra = {}) {
|
|
1236
|
+
if (member.id === ref.fromNodeId)
|
|
1237
|
+
return null;
|
|
1238
|
+
const owner = owners.find((o) => o.filePath === member.filePath) ?? owners[0];
|
|
1239
|
+
const from = context.getNodeById?.(ref.fromNodeId)?.qualifiedName.toLowerCase();
|
|
1240
|
+
const own = owner.qualifiedName.toLowerCase();
|
|
1241
|
+
const inside = owner.id === ref.fromNodeId || (from !== undefined && (from === own || from.startsWith(`${own}::`)));
|
|
1242
|
+
return {
|
|
1243
|
+
original: ref,
|
|
1244
|
+
targetNodeId: member.id,
|
|
1245
|
+
confidence: 0.85,
|
|
1246
|
+
resolvedBy: 'qualified-name',
|
|
1247
|
+
...extra,
|
|
1248
|
+
...(inside ? {} : { alsoTargets: [{ targetNodeId: owner.id }] }),
|
|
1249
|
+
};
|
|
1250
|
+
}
|
|
1251
|
+
function namesWithoutRunning(ref, context) {
|
|
1252
|
+
const line = context.getFileLines?.(ref.filePath)?.[ref.line - 1] ?? context.readFile(ref.filePath)?.split(/\r?\n/)[ref.line - 1] ?? '';
|
|
1253
|
+
return /\b(?:AddressOf\s+|NameOf\s*\(\s*)$/i.test(line.slice(0, Math.max(0, ref.column)));
|
|
1254
|
+
}
|
|
1255
|
+
const VB_NO_ARGUMENTS = new WeakMap();
|
|
1256
|
+
function takesNoArguments(n, context) {
|
|
1257
|
+
let memo = VB_NO_ARGUMENTS.get(context);
|
|
1258
|
+
if (!memo)
|
|
1259
|
+
VB_NO_ARGUMENTS.set(context, (memo = new Map()));
|
|
1260
|
+
const hit = memo.get(n.id);
|
|
1261
|
+
if (hit !== undefined)
|
|
1262
|
+
return hit;
|
|
1263
|
+
const code = codeLines(n.filePath, context).slice(n.startLine - 1, n.startLine + 6).join(' ');
|
|
1264
|
+
const head = new RegExp(`\\b(?:Sub|Function)\\s+\\[?${escapeRegex(unescaped(n.name))}\\]?(?![\\w$%&!#@])`, 'i').exec(code);
|
|
1265
|
+
let none = true;
|
|
1266
|
+
if (head) {
|
|
1267
|
+
let at = head.index + head[0].length;
|
|
1268
|
+
if (/^\s*\(\s*Of\b/i.test(code.slice(at)))
|
|
1269
|
+
at = closeParen(code, code.indexOf('(', at)) + 1;
|
|
1270
|
+
const open = at > 0 ? /^\s*\(/.exec(code.slice(at)) : null;
|
|
1271
|
+
const params = open ? splitArgs(code, at + open[0].length - 1) : null;
|
|
1272
|
+
none = !params || params.every((p) => {
|
|
1273
|
+
const param = p.replace(/<[^<>]*>/g, '').replace(/^[\s_]+/, '');
|
|
1274
|
+
return param === '' || /^(?:(?:ByVal|ByRef)\s+)*(?:Optional|ParamArray)\b/i.test(param);
|
|
1275
|
+
});
|
|
1276
|
+
}
|
|
1277
|
+
memo.set(n.id, none);
|
|
1278
|
+
return none;
|
|
1279
|
+
}
|
|
1280
|
+
function runnableOverload(member, ref, context) {
|
|
1281
|
+
const cut = member.qualifiedName.lastIndexOf('::');
|
|
1282
|
+
const owner = cut > 0 ? context.getNodesByQualifiedName(member.qualifiedName.slice(0, cut))
|
|
1283
|
+
.find((n) => n.language === 'vbnet' && VB_TYPE_KINDS.has(n.kind)) : undefined;
|
|
1284
|
+
const project = projectOf(member.filePath, context);
|
|
1285
|
+
const overloads = owner ? membersNamed(owner, member.name, context)
|
|
1286
|
+
.filter((n) => n.kind === 'method' && projectOf(n.filePath, context) === project) : [];
|
|
1287
|
+
const others = overloads.filter((n) => n.id !== ref.fromNodeId);
|
|
1288
|
+
if (others.length === 0)
|
|
1289
|
+
return member.id === ref.fromNodeId ? null : member;
|
|
1290
|
+
const runnable = others.filter((n) => takesNoArguments(n, context));
|
|
1291
|
+
const pool = runnable.length > 0 ? runnable : others;
|
|
1292
|
+
return pool.find((n) => n.id === member.id) ?? pool[0];
|
|
1293
|
+
}
|
|
1294
|
+
function headMemberOf(head, ref, context) {
|
|
1295
|
+
if (head.startsWith('{') || /^(?:Me|MyClass|MyBase)$/i.test(head))
|
|
1296
|
+
return null;
|
|
1297
|
+
const name = unescaped(head);
|
|
1298
|
+
const line = context.getFileLines?.(ref.filePath)?.[ref.line - 1] ?? context.readFile(ref.filePath)?.split(/\r?\n/)[ref.line - 1] ?? '';
|
|
1299
|
+
const bracketed = line[ref.column] === '[';
|
|
1300
|
+
let at = ref.column + (bracketed ? 1 : 0);
|
|
1301
|
+
if (line.slice(at, at + name.length).toLowerCase() !== name.toLowerCase())
|
|
1302
|
+
return null;
|
|
1303
|
+
at += name.length;
|
|
1304
|
+
if (bracketed && line[at++] !== ']')
|
|
1305
|
+
return null;
|
|
1306
|
+
while (line[at] === ' ' || line[at] === '\t')
|
|
1307
|
+
at++;
|
|
1308
|
+
if (line[at] !== '.')
|
|
1309
|
+
return null;
|
|
1310
|
+
if (localBinding(name, ref, context))
|
|
1311
|
+
return null;
|
|
1312
|
+
const found = memberAround(name, ref, context);
|
|
1313
|
+
const member = found?.node;
|
|
1314
|
+
if (!member || !VB_VALUE_KINDS.has(member.kind) || member.id === ref.fromNodeId)
|
|
1315
|
+
return null;
|
|
1316
|
+
const cut = member.qualifiedName.lastIndexOf('::');
|
|
1317
|
+
const foreign = projectOf(member.filePath, context) !== projectOf(ref.filePath, context);
|
|
1318
|
+
if (foreign && cut > 0 && isModule(member.qualifiedName.slice(0, cut), context))
|
|
1319
|
+
return null;
|
|
1320
|
+
return isOutsideNamesake(member, found.args, context) ? null : member;
|
|
1321
|
+
}
|
|
1322
|
+
const VB_NAMESAKES = new WeakMap();
|
|
1323
|
+
function isOutsideNamesake(member, args, context) {
|
|
1324
|
+
let memo = VB_NAMESAKES.get(context);
|
|
1325
|
+
if (!memo)
|
|
1326
|
+
VB_NAMESAKES.set(context, (memo = new Map()));
|
|
1327
|
+
const hit = args.size === 0 ? memo.get(member.id) : undefined;
|
|
1328
|
+
if (hit !== undefined)
|
|
1329
|
+
return hit;
|
|
1330
|
+
const declared = valueMemberType(member, context, args);
|
|
1331
|
+
let namesake = false;
|
|
1332
|
+
if (declared && !declared.array && declared.name.toLowerCase() === unescaped(member.name).toLowerCase()) {
|
|
1333
|
+
const types = typesNamedAt(declared, context, VB_READ_TYPE_KINDS);
|
|
1334
|
+
namesake = types.ambiguous || types.owners.length === 0;
|
|
1335
|
+
}
|
|
1336
|
+
if (args.size === 0)
|
|
1337
|
+
memo.set(member.id, namesake);
|
|
1338
|
+
return namesake;
|
|
1339
|
+
}
|
|
1340
|
+
function matchVbMemberRead(ref, context) {
|
|
1341
|
+
const m = VB_MEMBER_PATH.exec(ref.referenceName);
|
|
1342
|
+
if (!m)
|
|
1343
|
+
return null;
|
|
1344
|
+
const links = m[2] ? m[2].slice(1).split('.') : [];
|
|
1345
|
+
const at = pathReceiver(m[1], links, ref, context);
|
|
1346
|
+
const name = unescaped(m[3]);
|
|
1347
|
+
const calls = (member) => member.kind === 'method' && !namesWithoutRunning(ref, context);
|
|
1348
|
+
const run = (member) => (!member ? null : calls(member) ? runnableOverload(member, ref, context) : member);
|
|
1349
|
+
const throughValue = (member) => ({
|
|
1350
|
+
original: ref,
|
|
1351
|
+
targetNodeId: member.id,
|
|
1352
|
+
confidence: 0.9,
|
|
1353
|
+
resolvedBy: 'instance-method',
|
|
1354
|
+
...(calls(member) ? { edgeKind: 'calls' } : {}),
|
|
1355
|
+
});
|
|
1356
|
+
const withHead = (read) => {
|
|
1357
|
+
const head = links.length === 0 ? headMemberOf(m[1], ref, context) : null;
|
|
1358
|
+
if (!head)
|
|
1359
|
+
return read;
|
|
1360
|
+
if (!read)
|
|
1361
|
+
return { original: ref, targetNodeId: head.id, confidence: 0.9, resolvedBy: 'instance-method' };
|
|
1362
|
+
return read.edgeKind === 'calls' ? read : { ...read, alsoTargets: [...(read.alsoTargets ?? []), { targetNodeId: head.id }] };
|
|
1363
|
+
};
|
|
1364
|
+
if (at?.namespace) {
|
|
1365
|
+
const types = typesInNamespace(at.namespace, name, ref, context);
|
|
1366
|
+
const target = types?.[0] ?? (types ? run(moduleMemberIn(at.namespace, name, ref, context)) : null);
|
|
1367
|
+
if (!target || target.id === ref.fromNodeId)
|
|
1368
|
+
return null;
|
|
1369
|
+
return {
|
|
1370
|
+
original: ref,
|
|
1371
|
+
targetNodeId: target.id,
|
|
1372
|
+
confidence: target.kind === 'method' ? 0.85 : 0.9,
|
|
1373
|
+
resolvedBy: 'qualified-name',
|
|
1374
|
+
...(calls(target) ? { edgeKind: 'calls' } : {}),
|
|
1375
|
+
};
|
|
1376
|
+
}
|
|
1377
|
+
if (!at || at.owners.length === 0)
|
|
1378
|
+
return withHead(null);
|
|
1379
|
+
if (!at.throughType) {
|
|
1380
|
+
const fits = (n) => VB_INSTANCE_READ_KINDS.has(n.kind);
|
|
1381
|
+
const member = run((memberOn(at.owners, name, ref, context, true, at.typed, fits) ??
|
|
1382
|
+
memberOn(at.owners, `[${name}]`, ref, context, true, at.typed, fits))?.node);
|
|
1383
|
+
return withHead(member && member.id !== ref.fromNodeId ? throughValue(member) : null);
|
|
1384
|
+
}
|
|
1385
|
+
const fits = (n) => VB_READ_KINDS.has(n.kind) && n.id !== ref.fromNodeId;
|
|
1386
|
+
let member = (memberOn(at.owners, name, ref, context, true, undefined, fits) ??
|
|
1387
|
+
memberOn(at.owners, `[${name}]`, ref, context, true, undefined, fits))?.node;
|
|
1388
|
+
if (!member)
|
|
1389
|
+
return null;
|
|
1390
|
+
if (!member.isStatic) {
|
|
1391
|
+
const found = member;
|
|
1392
|
+
member = context.getNodesByQualifiedName(found.qualifiedName).find((n) => n.isStatic && n.filePath === found.filePath && fits(n)) ?? found;
|
|
1393
|
+
}
|
|
1394
|
+
member = run(member) ?? member;
|
|
1395
|
+
if (at.colorColor && !isSharedMember(member, context))
|
|
1396
|
+
return withHead(throughValue(member));
|
|
1397
|
+
if (member.kind === 'method') {
|
|
1398
|
+
return {
|
|
1399
|
+
original: ref,
|
|
1400
|
+
targetNodeId: member.id,
|
|
1401
|
+
confidence: 0.85,
|
|
1402
|
+
resolvedBy: 'qualified-name',
|
|
1403
|
+
...(calls(member) ? { edgeKind: 'calls' } : {}),
|
|
1404
|
+
};
|
|
1405
|
+
}
|
|
1406
|
+
return links.length === 0 ? readThrough(member, at.owners, ref, context, { confidence: 0.9 })
|
|
1407
|
+
: { original: ref, targetNodeId: member.id, confidence: 0.9, resolvedBy: 'qualified-name' };
|
|
1408
|
+
}
|
|
1409
|
+
function matchVbPathCall(ref, context, isStdMethod) {
|
|
1410
|
+
const m = VB_MEMBER_PATH.exec(ref.referenceName);
|
|
1411
|
+
if (!m)
|
|
1412
|
+
return null;
|
|
1413
|
+
const at = pathReceiver(m[1], m[2] ? m[2].slice(1).split('.') : [], ref, context);
|
|
1414
|
+
return at?.typed && !at.throughType ? callOnValue(at.typed, at.owners, unescaped(m[3]), ref, context, isStdMethod) : null;
|
|
1415
|
+
}
|
|
1416
|
+
const VB_TYPE_IMPORTS = new WeakMap();
|
|
1417
|
+
function importedNames(file, context) {
|
|
1418
|
+
let memo = VB_TYPE_IMPORTS.get(context);
|
|
1419
|
+
if (!memo)
|
|
1420
|
+
VB_TYPE_IMPORTS.set(context, (memo = new Map()));
|
|
1421
|
+
const hit = memo.get(file);
|
|
1422
|
+
if (hit)
|
|
1423
|
+
return hit;
|
|
1424
|
+
const names = new Set();
|
|
1425
|
+
for (const line of headerLines(file, context)) {
|
|
1426
|
+
const m = /^\s*Imports\s+([\w.]+)\s*$/i.exec(line);
|
|
1427
|
+
if (m)
|
|
1428
|
+
names.add(m[1].split('.').pop().toLowerCase());
|
|
1429
|
+
}
|
|
1430
|
+
memo.set(file, names);
|
|
1431
|
+
return names;
|
|
1432
|
+
}
|
|
1433
|
+
const VB_SCOPES = new WeakMap();
|
|
1434
|
+
function scopeOwners(ref, context) {
|
|
1435
|
+
let memo = VB_SCOPES.get(context);
|
|
1436
|
+
if (!memo)
|
|
1437
|
+
VB_SCOPES.set(context, (memo = new WeakMap()));
|
|
1438
|
+
const hit = memo.get(ref);
|
|
1439
|
+
if (hit !== undefined)
|
|
1440
|
+
return hit;
|
|
1441
|
+
const around = typesAround(ref.filePath, ref.line, context);
|
|
1442
|
+
const owners = around.length === 0 ? null
|
|
1443
|
+
: new Set(around.flatMap((t) => hierarchy(t, context)).map((t) => t.name.toLowerCase()));
|
|
1444
|
+
memo.set(ref, owners);
|
|
1445
|
+
return owners;
|
|
1446
|
+
}
|
|
1447
|
+
function isVbNestedTypeInScope(n, ref, context) {
|
|
1448
|
+
if (n.language !== 'vbnet' || !VB_TYPE_LIKE_KINDS.has(n.kind))
|
|
1449
|
+
return true;
|
|
1450
|
+
const parent = enclosingType(n, context);
|
|
1451
|
+
if (!parent)
|
|
1452
|
+
return true;
|
|
1453
|
+
const owners = scopeOwners(ref, context);
|
|
1454
|
+
if (owners === null || owners.has(parent.name.toLowerCase()))
|
|
1455
|
+
return true;
|
|
1456
|
+
const alias = importAliases(ref.filePath, context).get(ref.referenceName.toLowerCase());
|
|
1457
|
+
if (alias && alias.name.toLowerCase() === n.name.toLowerCase() &&
|
|
1458
|
+
(!alias.qualifier || endsWith(fullSegments(n, context).slice(0, -1), alias.qualifier)))
|
|
1459
|
+
return true;
|
|
1460
|
+
return importedNames(ref.filePath, context).has(parent.name.toLowerCase());
|
|
1461
|
+
}
|
|
1462
|
+
function isVbMemberInScope(n, ref, context) {
|
|
1463
|
+
if (n.language !== 'vbnet' || !VB_MEMBER_KINDS.has(n.kind))
|
|
1464
|
+
return true;
|
|
1465
|
+
const cut = n.qualifiedName.lastIndexOf('::');
|
|
1466
|
+
if (cut < 0)
|
|
1467
|
+
return true;
|
|
1468
|
+
const owners = scopeOwners(ref, context);
|
|
1469
|
+
if (owners === null)
|
|
1470
|
+
return true;
|
|
1471
|
+
const ownerQn = n.qualifiedName.slice(0, cut);
|
|
1472
|
+
const owner = ownerQn.split(/::|\./).pop().toLowerCase();
|
|
1473
|
+
return owners.has(owner) || isModule(ownerQn, context) || importedNames(ref.filePath, context).has(owner);
|
|
1474
|
+
}
|
|
1475
|
+
function clearVbnetReceiverMemos(context) {
|
|
1476
|
+
for (const memo of [VB_CODE_LINES, VB_WORD_LINES, VB_BINDINGS, VB_FILE_TYPES, VB_FILE_QNS, VB_MEMBERS, VB_MODULES, VB_SUPERS, VB_ANCESTRIES,
|
|
1477
|
+
VB_PROJECTS, VB_PROJECT_INFO, VB_FILE_IMPORTS, VB_ALIASES, VB_BASE_NAMES, VB_TYPE_PARAMS, VB_EXTENSIONS, VB_TYPE_IMPORTS,
|
|
1478
|
+
VB_SCOPES, VB_NAMESPACES, VB_NO_ARGUMENTS, VB_NAMESAKES]) {
|
|
1479
|
+
memo.delete(context);
|
|
1480
|
+
}
|
|
1481
|
+
}
|
|
1482
|
+
//# sourceMappingURL=vbnet-receivers.js.map
|