@aroman22/codegraph-vba-darwin-arm64 1.5.2 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/codegraph +5 -0
- package/lib/dist/bin/codegraph.d.ts +1 -1
- package/lib/dist/bin/codegraph.d.ts.map +1 -1
- package/lib/dist/bin/codegraph.js +307 -81
- package/lib/dist/bin/codegraph.js.map +1 -1
- package/lib/dist/bin/command-supervision.d.ts +38 -1
- package/lib/dist/bin/command-supervision.d.ts.map +1 -1
- package/lib/dist/bin/command-supervision.js +22 -3
- package/lib/dist/bin/command-supervision.js.map +1 -1
- package/lib/dist/db/index.d.ts +84 -5
- package/lib/dist/db/index.d.ts.map +1 -1
- package/lib/dist/db/index.js +209 -12
- package/lib/dist/db/index.js.map +1 -1
- package/lib/dist/db/migrations.d.ts +1 -1
- package/lib/dist/db/migrations.d.ts.map +1 -1
- package/lib/dist/db/migrations.js +80 -3
- package/lib/dist/db/migrations.js.map +1 -1
- package/lib/dist/db/queries.d.ts +116 -4
- package/lib/dist/db/queries.d.ts.map +1 -1
- package/lib/dist/db/queries.js +294 -7
- package/lib/dist/db/queries.js.map +1 -1
- package/lib/dist/db/schema.sql +43 -1
- package/lib/dist/db/wal-valve.d.ts +106 -0
- package/lib/dist/db/wal-valve.d.ts.map +1 -0
- package/lib/dist/db/wal-valve.js +208 -0
- package/lib/dist/db/wal-valve.js.map +1 -0
- package/lib/dist/directory.d.ts +9 -5
- package/lib/dist/directory.d.ts.map +1 -1
- package/lib/dist/directory.js +210 -19
- package/lib/dist/directory.js.map +1 -1
- package/lib/dist/extraction/cfml-extractor.d.ts +107 -0
- package/lib/dist/extraction/cfml-extractor.d.ts.map +1 -0
- package/lib/dist/extraction/cfml-extractor.js +494 -0
- package/lib/dist/extraction/cfml-extractor.js.map +1 -0
- package/lib/dist/extraction/grammars.d.ts +25 -1
- package/lib/dist/extraction/grammars.d.ts.map +1 -1
- package/lib/dist/extraction/grammars.js +177 -23
- package/lib/dist/extraction/grammars.js.map +1 -1
- package/lib/dist/extraction/index.d.ts +47 -2
- package/lib/dist/extraction/index.d.ts.map +1 -1
- package/lib/dist/extraction/index.js +568 -51
- package/lib/dist/extraction/index.js.map +1 -1
- package/lib/dist/extraction/languages/arkts.d.ts +3 -0
- package/lib/dist/extraction/languages/arkts.d.ts.map +1 -0
- package/lib/dist/extraction/languages/arkts.js +127 -0
- package/lib/dist/extraction/languages/arkts.js.map +1 -0
- package/lib/dist/extraction/languages/c-cpp.d.ts +98 -0
- package/lib/dist/extraction/languages/c-cpp.d.ts.map +1 -1
- package/lib/dist/extraction/languages/c-cpp.js +563 -1
- package/lib/dist/extraction/languages/c-cpp.js.map +1 -1
- package/lib/dist/extraction/languages/cfquery.d.ts +12 -0
- package/lib/dist/extraction/languages/cfquery.d.ts.map +1 -0
- package/lib/dist/extraction/languages/cfquery.js +28 -0
- package/lib/dist/extraction/languages/cfquery.js.map +1 -0
- package/lib/dist/extraction/languages/cfscript.d.ts +3 -0
- package/lib/dist/extraction/languages/cfscript.d.ts.map +1 -0
- package/lib/dist/extraction/languages/cfscript.js +73 -0
- package/lib/dist/extraction/languages/cfscript.js.map +1 -0
- package/lib/dist/extraction/languages/cobol.d.ts +33 -0
- package/lib/dist/extraction/languages/cobol.d.ts.map +1 -0
- package/lib/dist/extraction/languages/cobol.js +499 -0
- package/lib/dist/extraction/languages/cobol.js.map +1 -0
- package/lib/dist/extraction/languages/erlang.d.ts +3 -0
- package/lib/dist/extraction/languages/erlang.d.ts.map +1 -0
- package/lib/dist/extraction/languages/erlang.js +350 -0
- package/lib/dist/extraction/languages/erlang.js.map +1 -0
- package/lib/dist/extraction/languages/index.d.ts.map +1 -1
- package/lib/dist/extraction/languages/index.js +18 -0
- package/lib/dist/extraction/languages/index.js.map +1 -1
- package/lib/dist/extraction/languages/nix.d.ts +3 -0
- package/lib/dist/extraction/languages/nix.d.ts.map +1 -0
- package/lib/dist/extraction/languages/nix.js +294 -0
- package/lib/dist/extraction/languages/nix.js.map +1 -0
- package/lib/dist/extraction/languages/solidity.d.ts +3 -0
- package/lib/dist/extraction/languages/solidity.d.ts.map +1 -0
- package/lib/dist/extraction/languages/solidity.js +293 -0
- package/lib/dist/extraction/languages/solidity.js.map +1 -0
- package/lib/dist/extraction/languages/terraform.d.ts +3 -0
- package/lib/dist/extraction/languages/terraform.d.ts.map +1 -0
- package/lib/dist/extraction/languages/terraform.js +641 -0
- package/lib/dist/extraction/languages/terraform.js.map +1 -0
- package/lib/dist/extraction/languages/vbnet.d.ts +11 -0
- package/lib/dist/extraction/languages/vbnet.d.ts.map +1 -0
- package/lib/dist/extraction/languages/vbnet.js +141 -0
- package/lib/dist/extraction/languages/vbnet.js.map +1 -0
- package/lib/dist/extraction/mybatis-extractor.d.ts +30 -10
- package/lib/dist/extraction/mybatis-extractor.d.ts.map +1 -1
- package/lib/dist/extraction/mybatis-extractor.js +140 -38
- package/lib/dist/extraction/mybatis-extractor.js.map +1 -1
- package/lib/dist/extraction/parse-pool.d.ts +28 -1
- package/lib/dist/extraction/parse-pool.d.ts.map +1 -1
- package/lib/dist/extraction/parse-pool.js +76 -7
- package/lib/dist/extraction/parse-pool.js.map +1 -1
- package/lib/dist/extraction/parse-worker.js +11 -4
- package/lib/dist/extraction/parse-worker.js.map +1 -1
- package/lib/dist/extraction/tree-sitter-helpers.d.ts.map +1 -1
- package/lib/dist/extraction/tree-sitter-helpers.js +1 -0
- package/lib/dist/extraction/tree-sitter-helpers.js.map +1 -1
- package/lib/dist/extraction/tree-sitter-types.d.ts +20 -1
- package/lib/dist/extraction/tree-sitter-types.d.ts.map +1 -1
- package/lib/dist/extraction/tree-sitter.d.ts +60 -1
- package/lib/dist/extraction/tree-sitter.d.ts.map +1 -1
- package/lib/dist/extraction/tree-sitter.js +905 -20
- package/lib/dist/extraction/tree-sitter.js.map +1 -1
- package/lib/dist/extraction/vba/call-sweep.d.ts +3 -0
- package/lib/dist/extraction/vba/call-sweep.d.ts.map +1 -0
- package/lib/dist/extraction/vba/call-sweep.js +206 -0
- package/lib/dist/extraction/vba/call-sweep.js.map +1 -0
- package/lib/dist/extraction/vba/calls.d.ts +55 -0
- package/lib/dist/extraction/vba/calls.d.ts.map +1 -0
- package/lib/dist/extraction/vba/calls.js +439 -0
- package/lib/dist/extraction/vba/calls.js.map +1 -0
- package/lib/dist/extraction/vba/constants.d.ts +42 -0
- package/lib/dist/extraction/vba/constants.d.ts.map +1 -0
- package/lib/dist/extraction/vba/constants.js +112 -0
- package/lib/dist/extraction/vba/constants.js.map +1 -0
- package/lib/dist/extraction/vba/context.d.ts +175 -0
- package/lib/dist/extraction/vba/context.d.ts.map +1 -0
- package/lib/dist/extraction/vba/context.js +268 -0
- package/lib/dist/extraction/vba/context.js.map +1 -0
- package/lib/dist/extraction/vba/controls.d.ts +24 -0
- package/lib/dist/extraction/vba/controls.d.ts.map +1 -0
- package/lib/dist/extraction/vba/controls.js +89 -0
- package/lib/dist/extraction/vba/controls.js.map +1 -0
- package/lib/dist/extraction/vba/declarations.d.ts +3 -0
- package/lib/dist/extraction/vba/declarations.d.ts.map +1 -0
- package/lib/dist/extraction/vba/declarations.js +154 -0
- package/lib/dist/extraction/vba/declarations.js.map +1 -0
- package/lib/dist/extraction/vba/dims.d.ts +3 -0
- package/lib/dist/extraction/vba/dims.d.ts.map +1 -0
- package/lib/dist/extraction/vba/dims.js +186 -0
- package/lib/dist/extraction/vba/dims.js.map +1 -0
- package/lib/dist/extraction/vba/docmd.d.ts +16 -0
- package/lib/dist/extraction/vba/docmd.d.ts.map +1 -0
- package/lib/dist/extraction/vba/docmd.js +179 -0
- package/lib/dist/extraction/vba/docmd.js.map +1 -0
- package/lib/dist/extraction/vba/enums-consts.d.ts +15 -0
- package/lib/dist/extraction/vba/enums-consts.d.ts.map +1 -0
- package/lib/dist/extraction/vba/enums-consts.js +178 -0
- package/lib/dist/extraction/vba/enums-consts.js.map +1 -0
- package/lib/dist/extraction/vba/implements.d.ts +3 -0
- package/lib/dist/extraction/vba/implements.d.ts.map +1 -0
- package/lib/dist/extraction/vba/implements.js +52 -0
- package/lib/dist/extraction/vba/implements.js.map +1 -0
- package/lib/dist/extraction/vba/procedures.d.ts +3 -0
- package/lib/dist/extraction/vba/procedures.d.ts.map +1 -0
- package/lib/dist/extraction/vba/procedures.js +239 -0
- package/lib/dist/extraction/vba/procedures.js.map +1 -0
- package/lib/dist/extraction/vba/sql-wrapper.d.ts +17 -0
- package/lib/dist/extraction/vba/sql-wrapper.d.ts.map +1 -0
- package/lib/dist/extraction/vba/sql-wrapper.js +212 -0
- package/lib/dist/extraction/vba/sql-wrapper.js.map +1 -0
- package/lib/dist/extraction/vba/tempvars.d.ts +10 -0
- package/lib/dist/extraction/vba/tempvars.d.ts.map +1 -0
- package/lib/dist/extraction/vba/tempvars.js +138 -0
- package/lib/dist/extraction/vba/tempvars.js.map +1 -0
- package/lib/dist/extraction/vba/text-utils.d.ts +73 -0
- package/lib/dist/extraction/vba/text-utils.d.ts.map +1 -0
- package/lib/dist/extraction/vba/text-utils.js +195 -0
- package/lib/dist/extraction/vba/text-utils.js.map +1 -0
- package/lib/dist/extraction/vba-extractor.d.ts +3 -951
- package/lib/dist/extraction/vba-extractor.d.ts.map +1 -1
- package/lib/dist/extraction/vba-extractor.js +46 -2934
- package/lib/dist/extraction/vba-extractor.js.map +1 -1
- package/lib/dist/extraction/vba-preprocess.d.ts +1 -1
- package/lib/dist/extraction/vba-preprocess.d.ts.map +1 -1
- package/lib/dist/extraction/vba-preprocess.js +300 -88
- package/lib/dist/extraction/vba-preprocess.js.map +1 -1
- package/lib/dist/extraction/wasm/tree-sitter-arkts.wasm +0 -0
- package/lib/dist/extraction/wasm/tree-sitter-cfml.wasm +0 -0
- package/lib/dist/extraction/wasm/tree-sitter-cfquery.wasm +0 -0
- package/lib/dist/extraction/wasm/tree-sitter-cfscript.wasm +0 -0
- package/lib/dist/extraction/wasm/tree-sitter-cobol.wasm +0 -0
- package/lib/dist/extraction/wasm/tree-sitter-erlang.wasm +0 -0
- package/lib/dist/extraction/wasm/tree-sitter-nix.wasm +0 -0
- package/lib/dist/extraction/wasm/tree-sitter-terraform.wasm +0 -0
- package/lib/dist/extraction/wasm/tree-sitter-vbnet.wasm +0 -0
- package/lib/dist/graph/traversal.d.ts.map +1 -1
- package/lib/dist/graph/traversal.js +76 -17
- package/lib/dist/graph/traversal.js.map +1 -1
- package/lib/dist/index.d.ts +81 -1
- package/lib/dist/index.d.ts.map +1 -1
- package/lib/dist/index.js +460 -10
- package/lib/dist/index.js.map +1 -1
- package/lib/dist/installer/index.d.ts +42 -0
- package/lib/dist/installer/index.d.ts.map +1 -1
- package/lib/dist/installer/index.js +97 -2
- package/lib/dist/installer/index.js.map +1 -1
- package/lib/dist/mcp/daemon.d.ts +35 -3
- package/lib/dist/mcp/daemon.d.ts.map +1 -1
- package/lib/dist/mcp/daemon.js +101 -9
- package/lib/dist/mcp/daemon.js.map +1 -1
- package/lib/dist/mcp/dynamic-boundaries.d.ts.map +1 -1
- package/lib/dist/mcp/dynamic-boundaries.js +2 -1
- package/lib/dist/mcp/dynamic-boundaries.js.map +1 -1
- package/lib/dist/mcp/early-ppid.d.ts +26 -0
- package/lib/dist/mcp/early-ppid.d.ts.map +1 -0
- package/lib/dist/mcp/early-ppid.js +29 -0
- package/lib/dist/mcp/early-ppid.js.map +1 -0
- package/lib/dist/mcp/index.d.ts.map +1 -1
- package/lib/dist/mcp/index.js +29 -4
- package/lib/dist/mcp/index.js.map +1 -1
- package/lib/dist/mcp/liveness-watchdog.d.ts +18 -1
- package/lib/dist/mcp/liveness-watchdog.d.ts.map +1 -1
- package/lib/dist/mcp/liveness-watchdog.js +73 -13
- package/lib/dist/mcp/liveness-watchdog.js.map +1 -1
- package/lib/dist/mcp/proxy.d.ts.map +1 -1
- package/lib/dist/mcp/proxy.js +30 -4
- package/lib/dist/mcp/proxy.js.map +1 -1
- package/lib/dist/mcp/query-pool.d.ts +14 -0
- package/lib/dist/mcp/query-pool.d.ts.map +1 -1
- package/lib/dist/mcp/query-pool.js +18 -0
- package/lib/dist/mcp/query-pool.js.map +1 -1
- package/lib/dist/mcp/session.d.ts +14 -0
- package/lib/dist/mcp/session.d.ts.map +1 -1
- package/lib/dist/mcp/session.js +28 -1
- package/lib/dist/mcp/session.js.map +1 -1
- package/lib/dist/mcp/startup-handshake.d.ts +44 -0
- package/lib/dist/mcp/startup-handshake.d.ts.map +1 -0
- package/lib/dist/mcp/startup-handshake.js +73 -0
- package/lib/dist/mcp/startup-handshake.js.map +1 -0
- package/lib/dist/mcp/tools.d.ts +22 -0
- package/lib/dist/mcp/tools.d.ts.map +1 -1
- package/lib/dist/mcp/tools.js +289 -23
- 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 +18 -0
- package/lib/dist/mcp/transport.js.map +1 -1
- package/lib/dist/project-config.d.ts +44 -0
- package/lib/dist/project-config.d.ts.map +1 -1
- package/lib/dist/project-config.js +151 -2
- package/lib/dist/project-config.js.map +1 -1
- package/lib/dist/resolution/c-fnptr-synthesizer.d.ts +2 -1
- package/lib/dist/resolution/c-fnptr-synthesizer.d.ts.map +1 -1
- package/lib/dist/resolution/c-fnptr-synthesizer.js +170 -146
- package/lib/dist/resolution/c-fnptr-synthesizer.js.map +1 -1
- package/lib/dist/resolution/callback-synthesizer.d.ts +1 -1
- package/lib/dist/resolution/callback-synthesizer.d.ts.map +1 -1
- package/lib/dist/resolution/callback-synthesizer.js +1109 -97
- package/lib/dist/resolution/callback-synthesizer.js.map +1 -1
- package/lib/dist/resolution/cooperative-yield.d.ts +32 -0
- package/lib/dist/resolution/cooperative-yield.d.ts.map +1 -0
- package/lib/dist/resolution/cooperative-yield.js +42 -0
- package/lib/dist/resolution/cooperative-yield.js.map +1 -0
- package/lib/dist/resolution/frameworks/cics.d.ts +20 -0
- package/lib/dist/resolution/frameworks/cics.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/cics.js +90 -0
- package/lib/dist/resolution/frameworks/cics.js.map +1 -0
- package/lib/dist/resolution/frameworks/index.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/index.js +6 -0
- 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 +14 -6
- package/lib/dist/resolution/frameworks/java.js.map +1 -1
- package/lib/dist/resolution/frameworks/terraform.d.ts +38 -0
- package/lib/dist/resolution/frameworks/terraform.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/terraform.js +277 -0
- package/lib/dist/resolution/frameworks/terraform.js.map +1 -0
- package/lib/dist/resolution/goframe-synthesizer.d.ts +2 -1
- package/lib/dist/resolution/goframe-synthesizer.d.ts.map +1 -1
- package/lib/dist/resolution/goframe-synthesizer.js +8 -3
- package/lib/dist/resolution/goframe-synthesizer.js.map +1 -1
- package/lib/dist/resolution/import-resolver.d.ts +7 -0
- package/lib/dist/resolution/import-resolver.d.ts.map +1 -1
- package/lib/dist/resolution/import-resolver.js +129 -4
- package/lib/dist/resolution/import-resolver.js.map +1 -1
- package/lib/dist/resolution/index.d.ts +64 -2
- package/lib/dist/resolution/index.d.ts.map +1 -1
- package/lib/dist/resolution/index.js +476 -58
- package/lib/dist/resolution/index.js.map +1 -1
- package/lib/dist/resolution/name-matcher.d.ts +22 -3
- package/lib/dist/resolution/name-matcher.d.ts.map +1 -1
- package/lib/dist/resolution/name-matcher.js +613 -39
- package/lib/dist/resolution/name-matcher.js.map +1 -1
- package/lib/dist/resolution/strip-comments.d.ts +1 -1
- package/lib/dist/resolution/strip-comments.d.ts.map +1 -1
- package/lib/dist/resolution/strip-comments.js +49 -0
- package/lib/dist/resolution/strip-comments.js.map +1 -1
- package/lib/dist/resolution/types.d.ts +29 -0
- package/lib/dist/resolution/types.d.ts.map +1 -1
- package/lib/dist/resolution/workspace-packages.d.ts +10 -0
- package/lib/dist/resolution/workspace-packages.d.ts.map +1 -1
- package/lib/dist/resolution/workspace-packages.js +142 -4
- package/lib/dist/resolution/workspace-packages.js.map +1 -1
- package/lib/dist/search/identifier-segments.d.ts +60 -0
- package/lib/dist/search/identifier-segments.d.ts.map +1 -0
- package/lib/dist/search/identifier-segments.js +176 -0
- package/lib/dist/search/identifier-segments.js.map +1 -0
- package/lib/dist/sync/git-hooks.d.ts.map +1 -1
- package/lib/dist/sync/git-hooks.js +2 -0
- package/lib/dist/sync/git-hooks.js.map +1 -1
- package/lib/dist/sync/watcher.d.ts +10 -5
- package/lib/dist/sync/watcher.d.ts.map +1 -1
- package/lib/dist/sync/watcher.js +51 -14
- package/lib/dist/sync/watcher.js.map +1 -1
- package/lib/dist/sync/worktree.d.ts +9 -0
- package/lib/dist/sync/worktree.d.ts.map +1 -1
- package/lib/dist/sync/worktree.js +45 -0
- package/lib/dist/sync/worktree.js.map +1 -1
- package/lib/dist/types.d.ts +25 -2
- package/lib/dist/types.d.ts.map +1 -1
- package/lib/dist/types.js +10 -0
- package/lib/dist/types.js.map +1 -1
- package/lib/dist/upgrade/index.d.ts +32 -0
- package/lib/dist/upgrade/index.d.ts.map +1 -1
- package/lib/dist/upgrade/index.js +163 -14
- package/lib/dist/upgrade/index.js.map +1 -1
- package/lib/dist/upgrade/remove-binary.d.ts +87 -0
- package/lib/dist/upgrade/remove-binary.d.ts.map +1 -0
- package/lib/dist/upgrade/remove-binary.js +289 -0
- package/lib/dist/upgrade/remove-binary.js.map +1 -0
- package/lib/dist/upgrade/update-check.d.ts +92 -0
- package/lib/dist/upgrade/update-check.d.ts.map +1 -0
- package/lib/dist/upgrade/update-check.js +258 -0
- package/lib/dist/upgrade/update-check.js.map +1 -0
- package/lib/node_modules/.modules.yaml +1 -1
- package/lib/node_modules/.pnpm-workspace-state-v1.json +1 -1
- package/lib/package.json +1 -1
- package/package.json +1 -1
- package/lib/dist/reasoning/config.d.ts +0 -45
- package/lib/dist/reasoning/config.d.ts.map +0 -1
- package/lib/dist/reasoning/config.js +0 -171
- package/lib/dist/reasoning/config.js.map +0 -1
- package/lib/dist/reasoning/credentials.d.ts +0 -5
- package/lib/dist/reasoning/credentials.d.ts.map +0 -1
- package/lib/dist/reasoning/credentials.js +0 -83
- package/lib/dist/reasoning/credentials.js.map +0 -1
- package/lib/dist/reasoning/login.d.ts +0 -21
- package/lib/dist/reasoning/login.d.ts.map +0 -1
- package/lib/dist/reasoning/login.js +0 -85
- package/lib/dist/reasoning/login.js.map +0 -1
- package/lib/dist/reasoning/reasoner.d.ts +0 -43
- package/lib/dist/reasoning/reasoner.d.ts.map +0 -1
- package/lib/dist/reasoning/reasoner.js +0 -308
- package/lib/dist/reasoning/reasoner.js.map +0 -1
|
@@ -0,0 +1,439 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.scanRaiseEvents = scanRaiseEvents;
|
|
4
|
+
exports.scanCallSites = scanCallSites;
|
|
5
|
+
exports.splitSingleLineIfClauses = splitSingleLineIfClauses;
|
|
6
|
+
exports.detectStatementCall = detectStatementCall;
|
|
7
|
+
exports.emitStatementCallEdge = emitStatementCallEdge;
|
|
8
|
+
exports.detectQualifiedStatementCall = detectQualifiedStatementCall;
|
|
9
|
+
exports.emitQualifiedStatementCallEdge = emitQualifiedStatementCallEdge;
|
|
10
|
+
exports.normalizeWithReceiver = normalizeWithReceiver;
|
|
11
|
+
exports.detectWithMemberCall = detectWithMemberCall;
|
|
12
|
+
/**
|
|
13
|
+
* Call-site detection (REQ-CODE-4): paren-form calls (`CALL_RE`),
|
|
14
|
+
* statement-form calls (`Foo arg` / `Call Foo`), qualified statement calls
|
|
15
|
+
* (`Receiver.Member args`), `RaiseEvent`, and the `With` receiver/member
|
|
16
|
+
* helpers. Emits same-file `calls` edges and heuristic cross-module
|
|
17
|
+
* `calls` edges to synthetic stubs (`vba-name-resolution`).
|
|
18
|
+
*/
|
|
19
|
+
const tree_sitter_helpers_1 = require("../tree-sitter-helpers");
|
|
20
|
+
const constants_1 = require("./constants");
|
|
21
|
+
/**
|
|
22
|
+
* Call-site regex — captures either `Name(...)` (same-file candidate) or
|
|
23
|
+
* `Receiver.Member(...)` (qualified). The receiver AND member alternatives
|
|
24
|
+
* accept BOTH the bare form (`Foo`) and the VBA bracketed form (`[Foo Bar]`)
|
|
25
|
+
* — bracketed captures win when present; brackets are stripped by the regex
|
|
26
|
+
* itself. Issue #54 added the bracketed alternative so
|
|
27
|
+
* `[FUNCIONES UTILES].FormatearFecha(fecha)` is no longer silently dropped.
|
|
28
|
+
*/
|
|
29
|
+
const CALL_RE = /(?<![\w.])(?:\[([^\]]+)\]|(\p{L}[\p{L}\p{N}_]*))(?:\.(?:\[([^\]]+)\]|(\p{L}[\p{L}\p{N}_]*)))?\s*\(/gu;
|
|
30
|
+
const RAISE_EVENT_RE = /\bRaiseEvent\s+(\p{L}[\p{L}\p{N}_]*)\b/giu;
|
|
31
|
+
function scanRaiseEvents(ctx, line, from, lineNum) {
|
|
32
|
+
RAISE_EVENT_RE.lastIndex = 0;
|
|
33
|
+
let m;
|
|
34
|
+
while ((m = RAISE_EVENT_RE.exec(line)) !== null) {
|
|
35
|
+
const eventName = m[1] ?? '';
|
|
36
|
+
const eventNode = ctx.localEvents.get(eventName.toLowerCase());
|
|
37
|
+
if (!eventNode)
|
|
38
|
+
continue;
|
|
39
|
+
ctx.edges.push({
|
|
40
|
+
source: ctx.findOrCreateFunctionNodeId(from),
|
|
41
|
+
target: eventNode.id,
|
|
42
|
+
kind: 'raises-event',
|
|
43
|
+
provenance: 'parser',
|
|
44
|
+
metadata: { eventName },
|
|
45
|
+
line: lineNum,
|
|
46
|
+
column: m.index,
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
function scanCallSites(ctx, line, from, lineNum) {
|
|
51
|
+
CALL_RE.lastIndex = 0;
|
|
52
|
+
let m;
|
|
53
|
+
while ((m = CALL_RE.exec(line)) !== null) {
|
|
54
|
+
// Issue #54: CALL_RE groups (1)/(2) are alternative captures for the
|
|
55
|
+
// receiver position, (3)/(4) for the member position. The bracketed
|
|
56
|
+
// alternative wins when present; the captured value is already
|
|
57
|
+
// unwrapped by the regex.
|
|
58
|
+
const receiver = m[1] ?? m[2] ?? '';
|
|
59
|
+
const member = m[3] ?? m[4] ?? '';
|
|
60
|
+
if (!receiver)
|
|
61
|
+
continue;
|
|
62
|
+
// Skip VBA control-flow keywords.
|
|
63
|
+
if (constants_1.CALL_KEYWORD_BLACKLIST.has(receiver))
|
|
64
|
+
continue;
|
|
65
|
+
if (member && constants_1.CALL_KEYWORD_BLACKLIST.has(member))
|
|
66
|
+
continue;
|
|
67
|
+
// Skip Access runtime objects — `Me`, `DoCmd`, `Application`, etc.
|
|
68
|
+
// These calls are real but the targets are NOT user code; emitting
|
|
69
|
+
// synthetic function nodes for them pollutes the graph (audit W4).
|
|
70
|
+
if (constants_1.RUNTIME_RECEIVER_BLACKLIST.has(receiver))
|
|
71
|
+
continue;
|
|
72
|
+
if (member && constants_1.RUNTIME_RECEIVER_BLACKLIST.has(member))
|
|
73
|
+
continue;
|
|
74
|
+
// Skip the receiver when it equals the containing procedure (self-call).
|
|
75
|
+
if (receiver === from.name && !member)
|
|
76
|
+
continue;
|
|
77
|
+
const col = m.index;
|
|
78
|
+
if (!member) {
|
|
79
|
+
// Bare `Name(...)` — same-file resolution.
|
|
80
|
+
const localFuncNode = ctx.findFunctionNodeByName(receiver);
|
|
81
|
+
if (!localFuncNode)
|
|
82
|
+
continue;
|
|
83
|
+
ctx.edges.push({
|
|
84
|
+
source: ctx.findOrCreateFunctionNodeId(from),
|
|
85
|
+
target: localFuncNode.id,
|
|
86
|
+
kind: 'calls',
|
|
87
|
+
line: lineNum,
|
|
88
|
+
column: col,
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
else {
|
|
92
|
+
// Qualified `Receiver.Member(...)` — synthesize the call target only
|
|
93
|
+
// for project-class local variables or undeclared module candidates.
|
|
94
|
+
if (!ctx.shouldProcessQualifiedCall(receiver))
|
|
95
|
+
continue;
|
|
96
|
+
// #12a: `receiverType` resolves to the real class name when
|
|
97
|
+
// `receiver` is a declared project-class local var; otherwise it's the
|
|
98
|
+
// raw `receiver` text unchanged (e.g. `.bas`-qualified module calls).
|
|
99
|
+
//
|
|
100
|
+
// Antigravity audit Task 3 (refined gate): if `receiver` is a
|
|
101
|
+
// file-local variable declared as a PRIMITIVE, skip emission — the
|
|
102
|
+
// stub `<receiver>.<member>` would be dead-end graph pollution no
|
|
103
|
+
// resolver could ever repoint. Cross-module qualified calls like
|
|
104
|
+
// `modUtils.Foo(1)` are unaffected (`modUtils` is not a local var).
|
|
105
|
+
const recvEntry = ctx.localVarTypeMap.get(receiver.toLowerCase());
|
|
106
|
+
if (recvEntry && constants_1.PRIMITIVE_TYPES.has(recvEntry.outer.toLowerCase())) {
|
|
107
|
+
continue;
|
|
108
|
+
}
|
|
109
|
+
const receiverType = ctx.resolveReceiverType(receiver);
|
|
110
|
+
const qualified = `${receiverType}.${member}`;
|
|
111
|
+
// Avoid emitting duplicate edges for the same call (within a line).
|
|
112
|
+
const dedupeKey = `${from.name}->${qualified}@${lineNum}`;
|
|
113
|
+
if (ctx.callDedupe.has(dedupeKey))
|
|
114
|
+
continue;
|
|
115
|
+
ctx.callDedupe.add(dedupeKey);
|
|
116
|
+
const synthId = (0, tree_sitter_helpers_1.generateNodeId)(ctx.filePath, 'function', qualified, lineNum);
|
|
117
|
+
// Only add the synthetic function node once per (file, qualified, line).
|
|
118
|
+
if (!ctx.synthFunctionNodeIds.has(synthId)) {
|
|
119
|
+
ctx.synthFunctionNodeIds.add(synthId);
|
|
120
|
+
ctx.nodes.push({
|
|
121
|
+
id: synthId,
|
|
122
|
+
kind: 'function',
|
|
123
|
+
name: qualified,
|
|
124
|
+
qualifiedName: qualified,
|
|
125
|
+
filePath: ctx.filePath,
|
|
126
|
+
language: 'vba',
|
|
127
|
+
startLine: lineNum,
|
|
128
|
+
endLine: lineNum,
|
|
129
|
+
startColumn: col,
|
|
130
|
+
endColumn: col + qualified.length,
|
|
131
|
+
visibility: 'public',
|
|
132
|
+
// #12a: tag the stub so the post-extraction resolver (#12b)
|
|
133
|
+
// can find and repoint it.
|
|
134
|
+
metadata: { stub: true },
|
|
135
|
+
updatedAt: Date.now(),
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
ctx.edges.push({
|
|
139
|
+
source: ctx.findOrCreateFunctionNodeId(from),
|
|
140
|
+
target: synthId,
|
|
141
|
+
kind: 'calls',
|
|
142
|
+
provenance: 'heuristic',
|
|
143
|
+
metadata: {
|
|
144
|
+
synthesizedBy: 'vba-name-resolution',
|
|
145
|
+
stub: true,
|
|
146
|
+
receiverType,
|
|
147
|
+
member,
|
|
148
|
+
},
|
|
149
|
+
line: lineNum,
|
|
150
|
+
column: col,
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* Issue #45: split a single-line VBA `If <cond> Then <body>` into one or
|
|
157
|
+
* more statement-clause fragments the statement-call detectors can process
|
|
158
|
+
* (`If x Then Foo Else Bar`, colon-separated `If x Then DoA: DoB`). When the
|
|
159
|
+
* line is not a single-line `If … Then` shape, returns `[<line>]` so
|
|
160
|
+
* block-form `If` still works through the per-line scan. `GoTo`/`Exit`/
|
|
161
|
+
* `Resume` clauses are filtered out. `line` is the string-literal-masked
|
|
162
|
+
* scan line, which makes global `:`/`Else` splitting safe.
|
|
163
|
+
*/
|
|
164
|
+
function splitSingleLineIfClauses(line) {
|
|
165
|
+
const trimmed = line.trimStart();
|
|
166
|
+
if (!trimmed)
|
|
167
|
+
return [];
|
|
168
|
+
// Match `If <cond> Then <body>` with a non-greedy condition. Requiring
|
|
169
|
+
// at least one whitespace character after `Then` ensures the block
|
|
170
|
+
// form `If x Then` (with the body on subsequent lines) is left alone.
|
|
171
|
+
const ifThenRe = /^If\s[\s\S]+?\bThen\b\s+/i;
|
|
172
|
+
const m = ifThenRe.exec(trimmed);
|
|
173
|
+
if (!m) {
|
|
174
|
+
// Not a single-line `If … Then` — preserve the original line.
|
|
175
|
+
return [line];
|
|
176
|
+
}
|
|
177
|
+
const body = trimmed.slice(m[0].length);
|
|
178
|
+
// Split on top-level `Else` (case-insensitive; word-bounded).
|
|
179
|
+
const elseClauses = body.split(/\s+Else\s+/i);
|
|
180
|
+
const clauses = [];
|
|
181
|
+
for (const elseClause of elseClauses) {
|
|
182
|
+
// Split each Else-clause on `:` for multi-statement single-line
|
|
183
|
+
// `If` bodies. VBA expressions never contain `:`, so a global
|
|
184
|
+
// split is correct on a masked line.
|
|
185
|
+
const subStatements = elseClause.split(':');
|
|
186
|
+
for (const sub of subStatements) {
|
|
187
|
+
const t = sub.trim();
|
|
188
|
+
if (!t)
|
|
189
|
+
continue;
|
|
190
|
+
// Defense in depth: GoTo / Exit / Resume are VBA control-flow
|
|
191
|
+
// statements, not Sub calls — drop them before they reach the
|
|
192
|
+
// statement-call detectors.
|
|
193
|
+
if (/^(?:GoTo|Exit|Resume)\b/i.test(t))
|
|
194
|
+
continue;
|
|
195
|
+
clauses.push(t);
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
return clauses;
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* H1: detect a statement-form Sub call (`MySub`, `MySub arg1, x`,
|
|
202
|
+
* `Call MySub arg1`). Returns the called proc name, or null for
|
|
203
|
+
* declarations, assignments, comments, keyword lines, and the paren form
|
|
204
|
+
* (handled by CALL_RE).
|
|
205
|
+
*/
|
|
206
|
+
function detectStatementCall(line) {
|
|
207
|
+
let trimmed = line.trimStart();
|
|
208
|
+
if (!trimmed)
|
|
209
|
+
return null;
|
|
210
|
+
// Strip `Call ` keyword if present — same call shape after.
|
|
211
|
+
if (/^Call\s/i.test(trimmed)) {
|
|
212
|
+
trimmed = trimmed.replace(/^Call\s+/i, '');
|
|
213
|
+
}
|
|
214
|
+
// Skip comment lines.
|
|
215
|
+
if (trimmed.startsWith("'") || trimmed.startsWith('Rem '))
|
|
216
|
+
return null;
|
|
217
|
+
// Skip declarations: Dim/Private/Public/Static/Global/Const/ReDim.
|
|
218
|
+
if (/^(Dim|Private|Public|Static|Global|Const|ReDim)\s/i.test(trimmed))
|
|
219
|
+
return null;
|
|
220
|
+
// Extract the leading identifier.
|
|
221
|
+
const m = /^(\p{L}[\p{L}\p{N}_]*)/u.exec(trimmed);
|
|
222
|
+
if (!m)
|
|
223
|
+
return null;
|
|
224
|
+
const procName = m[1] ?? '';
|
|
225
|
+
const rest = trimmed.slice(procName.length);
|
|
226
|
+
// `MySub(...)` is parens-form and already handled by CALL_RE.
|
|
227
|
+
if (rest.startsWith('('))
|
|
228
|
+
return null;
|
|
229
|
+
// Bare `MySub` is a valid no-argument statement-form Sub call.
|
|
230
|
+
if (rest.length === 0)
|
|
231
|
+
return procName;
|
|
232
|
+
const nextCh = trimmed.charAt(procName.length);
|
|
233
|
+
if (nextCh !== ' ' && nextCh !== '\t')
|
|
234
|
+
return null;
|
|
235
|
+
const args = rest.trimStart();
|
|
236
|
+
// Skip leading-identifier assignments (`X = ...`). Do not reject `=` inside
|
|
237
|
+
// argument expressions because named arguments use `:=` and comparisons can
|
|
238
|
+
// appear in expressions.
|
|
239
|
+
if (args.startsWith('='))
|
|
240
|
+
return null;
|
|
241
|
+
return procName;
|
|
242
|
+
}
|
|
243
|
+
/**
|
|
244
|
+
* H1: emit a same-file `calls` edge for a statement-form Sub call to the
|
|
245
|
+
* already-emitted function node named `procName`.
|
|
246
|
+
*/
|
|
247
|
+
function emitStatementCallEdge(ctx, caller, procName, lineNum) {
|
|
248
|
+
if (procName === caller.name)
|
|
249
|
+
return; // skip self-call
|
|
250
|
+
if (constants_1.CALL_KEYWORD_BLACKLIST.has(procName))
|
|
251
|
+
return;
|
|
252
|
+
if (constants_1.RUNTIME_RECEIVER_BLACKLIST.has(procName))
|
|
253
|
+
return;
|
|
254
|
+
const target = ctx.findFunctionNodeByName(procName);
|
|
255
|
+
if (!target)
|
|
256
|
+
return;
|
|
257
|
+
ctx.edges.push({
|
|
258
|
+
source: ctx.findOrCreateFunctionNodeId(caller),
|
|
259
|
+
target: target.id,
|
|
260
|
+
kind: 'calls',
|
|
261
|
+
line: lineNum,
|
|
262
|
+
column: 0,
|
|
263
|
+
});
|
|
264
|
+
}
|
|
265
|
+
/**
|
|
266
|
+
* Fix 7: detect a qualified statement-form call — `Receiver.Member <args>`
|
|
267
|
+
* where `Receiver.Member` is NOT followed by `(`. Distinct from the paren
|
|
268
|
+
* form (handled by CALL_RE). Property assignments and blacklisted
|
|
269
|
+
* receivers/members are excluded. Returns `{receiver, member}` or null.
|
|
270
|
+
*/
|
|
271
|
+
function detectQualifiedStatementCall(line) {
|
|
272
|
+
let trimmed = line.trimStart();
|
|
273
|
+
if (!trimmed)
|
|
274
|
+
return null;
|
|
275
|
+
// Strip `Call` keyword — same call shape after it.
|
|
276
|
+
if (/^Call\s/i.test(trimmed))
|
|
277
|
+
trimmed = trimmed.replace(/^Call\s+/i, '');
|
|
278
|
+
// Skip comment lines.
|
|
279
|
+
if (trimmed.startsWith("'") || /^Rem(\s|$)/i.test(trimmed))
|
|
280
|
+
return null;
|
|
281
|
+
// Skip declarations.
|
|
282
|
+
if (/^(Dim|Private|Public|Static|Global|Const|ReDim)\s/i.test(trimmed))
|
|
283
|
+
return null;
|
|
284
|
+
// Issue #54: the receiver alternative accepts BOTH the bare form
|
|
285
|
+
// (`Foo`) and the VBA bracketed form (`[Foo Bar]`). Same for the member.
|
|
286
|
+
const receiverM = /^(?:\[([^\]]+)\]|(\p{L}[\p{L}\p{N}_]*))/u.exec(trimmed);
|
|
287
|
+
if (!receiverM)
|
|
288
|
+
return null;
|
|
289
|
+
const receiver = receiverM[1] ?? receiverM[2] ?? '';
|
|
290
|
+
const rest = trimmed.slice(receiverM[0].length);
|
|
291
|
+
// Must have a dot separator.
|
|
292
|
+
if (!rest.startsWith('.'))
|
|
293
|
+
return null;
|
|
294
|
+
// Extract member identifier.
|
|
295
|
+
const memberRest = rest.slice(1); // skip the dot
|
|
296
|
+
const memberM = /^(?:\[([^\]]+)\]|(\p{L}[\p{L}\p{N}_]*))/u.exec(memberRest);
|
|
297
|
+
if (!memberM)
|
|
298
|
+
return null;
|
|
299
|
+
const member = memberM[1] ?? memberM[2] ?? '';
|
|
300
|
+
const afterMember = memberRest.slice(memberM[0].length);
|
|
301
|
+
// Must NOT be followed by `(` — the paren form is handled by CALL_RE.
|
|
302
|
+
if (afterMember.startsWith('('))
|
|
303
|
+
return null;
|
|
304
|
+
// Must be followed by space/tab (args present) OR end of line (no args).
|
|
305
|
+
if (afterMember.length > 0) {
|
|
306
|
+
const ch = afterMember.charAt(0);
|
|
307
|
+
if (ch !== ' ' && ch !== '\t')
|
|
308
|
+
return null;
|
|
309
|
+
// Skip property assignments: `Receiver.Prop = value`.
|
|
310
|
+
const argsText = afterMember.trimStart();
|
|
311
|
+
if (argsText.startsWith('='))
|
|
312
|
+
return null;
|
|
313
|
+
}
|
|
314
|
+
// Respect the keyword and runtime blacklists.
|
|
315
|
+
if (constants_1.CALL_KEYWORD_BLACKLIST.has(receiver))
|
|
316
|
+
return null;
|
|
317
|
+
if (constants_1.RUNTIME_RECEIVER_BLACKLIST.has(receiver))
|
|
318
|
+
return null;
|
|
319
|
+
if (constants_1.CALL_KEYWORD_BLACKLIST.has(member))
|
|
320
|
+
return null;
|
|
321
|
+
if (constants_1.RUNTIME_RECEIVER_BLACKLIST.has(member))
|
|
322
|
+
return null;
|
|
323
|
+
return { receiver, member };
|
|
324
|
+
}
|
|
325
|
+
/**
|
|
326
|
+
* Fix 7: emit a heuristic `calls` edge for a qualified statement-form call.
|
|
327
|
+
* Same shape as the qualified-paren path in `scanCallSites` — reuses the
|
|
328
|
+
* same `callDedupe` / `synthFunctionNodeIds` sets so a paren and non-paren
|
|
329
|
+
* form on the same line don't create duplicate edges.
|
|
330
|
+
*/
|
|
331
|
+
function emitQualifiedStatementCallEdge(ctx, caller, receiver, member, lineNum) {
|
|
332
|
+
// Eligibility is checked before this call. Project-class local receivers
|
|
333
|
+
// resolve to their class name; undeclared receivers stay as raw module-name
|
|
334
|
+
// candidates.
|
|
335
|
+
const receiverType = ctx.resolveReceiverType(receiver);
|
|
336
|
+
const qualified = `${receiverType}.${member}`;
|
|
337
|
+
const dedupeKey = `${caller.name}->${qualified}@${lineNum}`;
|
|
338
|
+
if (ctx.callDedupe.has(dedupeKey))
|
|
339
|
+
return;
|
|
340
|
+
ctx.callDedupe.add(dedupeKey);
|
|
341
|
+
const synthId = (0, tree_sitter_helpers_1.generateNodeId)(ctx.filePath, 'function', qualified, lineNum);
|
|
342
|
+
if (!ctx.synthFunctionNodeIds.has(synthId)) {
|
|
343
|
+
ctx.synthFunctionNodeIds.add(synthId);
|
|
344
|
+
ctx.nodes.push({
|
|
345
|
+
id: synthId,
|
|
346
|
+
kind: 'function',
|
|
347
|
+
name: qualified,
|
|
348
|
+
qualifiedName: qualified,
|
|
349
|
+
filePath: ctx.filePath,
|
|
350
|
+
language: 'vba',
|
|
351
|
+
startLine: lineNum,
|
|
352
|
+
endLine: lineNum,
|
|
353
|
+
startColumn: 0,
|
|
354
|
+
endColumn: qualified.length,
|
|
355
|
+
visibility: 'public',
|
|
356
|
+
metadata: { stub: true },
|
|
357
|
+
updatedAt: Date.now(),
|
|
358
|
+
});
|
|
359
|
+
}
|
|
360
|
+
ctx.edges.push({
|
|
361
|
+
source: ctx.findOrCreateFunctionNodeId(caller),
|
|
362
|
+
target: synthId,
|
|
363
|
+
kind: 'calls',
|
|
364
|
+
provenance: 'heuristic',
|
|
365
|
+
metadata: {
|
|
366
|
+
synthesizedBy: 'vba-name-resolution',
|
|
367
|
+
stub: true,
|
|
368
|
+
receiverType,
|
|
369
|
+
member,
|
|
370
|
+
},
|
|
371
|
+
line: lineNum,
|
|
372
|
+
column: 0,
|
|
373
|
+
});
|
|
374
|
+
}
|
|
375
|
+
/**
|
|
376
|
+
* Issue #43: normalize the receiver of a `With <expr>` block to a bare
|
|
377
|
+
* identifier, or null when it is a keyword / runtime object / unparseable.
|
|
378
|
+
*/
|
|
379
|
+
function normalizeWithReceiver(expr) {
|
|
380
|
+
let receiver = expr.trim();
|
|
381
|
+
if (!receiver)
|
|
382
|
+
return null;
|
|
383
|
+
if (/^Call\s/i.test(receiver))
|
|
384
|
+
receiver = receiver.replace(/^Call\s+/i, '').trimStart();
|
|
385
|
+
if (receiver.startsWith('[')) {
|
|
386
|
+
const m = /^\[([^\]]+)\]/u.exec(receiver);
|
|
387
|
+
if (!m)
|
|
388
|
+
return null;
|
|
389
|
+
receiver = m[1] ?? '';
|
|
390
|
+
}
|
|
391
|
+
else {
|
|
392
|
+
const m = /^(\p{L}[\p{L}\p{N}_]*)/u.exec(receiver);
|
|
393
|
+
if (!m)
|
|
394
|
+
return null;
|
|
395
|
+
receiver = m[1] ?? '';
|
|
396
|
+
}
|
|
397
|
+
if (!receiver)
|
|
398
|
+
return null;
|
|
399
|
+
if (constants_1.CALL_KEYWORD_BLACKLIST.has(receiver))
|
|
400
|
+
return null;
|
|
401
|
+
if (constants_1.RUNTIME_RECEIVER_BLACKLIST.has(receiver))
|
|
402
|
+
return null;
|
|
403
|
+
return receiver;
|
|
404
|
+
}
|
|
405
|
+
/**
|
|
406
|
+
* Issue #43: detect a `.Member` call inside a `With` block (leading-dot
|
|
407
|
+
* member reference that is a call, not a property assignment).
|
|
408
|
+
*/
|
|
409
|
+
function detectWithMemberCall(line) {
|
|
410
|
+
let trimmed = line.trimStart();
|
|
411
|
+
if (!trimmed)
|
|
412
|
+
return null;
|
|
413
|
+
if (/^Call\s/i.test(trimmed))
|
|
414
|
+
trimmed = trimmed.replace(/^Call\s+/i, '').trimStart();
|
|
415
|
+
if (trimmed.startsWith("'") || /^Rem(\s|$)/i.test(trimmed))
|
|
416
|
+
return null;
|
|
417
|
+
if (!trimmed.startsWith('.'))
|
|
418
|
+
return null;
|
|
419
|
+
const memberRest = trimmed.slice(1);
|
|
420
|
+
const memberM = /^(\p{L}[\p{L}\p{N}_]*)/u.exec(memberRest);
|
|
421
|
+
if (!memberM)
|
|
422
|
+
return null;
|
|
423
|
+
const member = memberM[1] ?? '';
|
|
424
|
+
const afterMember = memberRest.slice(member.length);
|
|
425
|
+
if (afterMember.length > 0) {
|
|
426
|
+
const ch = afterMember.charAt(0);
|
|
427
|
+
if (ch !== '(' && ch !== ' ' && ch !== '\t')
|
|
428
|
+
return null;
|
|
429
|
+
const argsText = afterMember.trimStart();
|
|
430
|
+
if (argsText.startsWith('='))
|
|
431
|
+
return null;
|
|
432
|
+
}
|
|
433
|
+
if (constants_1.CALL_KEYWORD_BLACKLIST.has(member))
|
|
434
|
+
return null;
|
|
435
|
+
if (constants_1.RUNTIME_RECEIVER_BLACKLIST.has(member))
|
|
436
|
+
return null;
|
|
437
|
+
return { member };
|
|
438
|
+
}
|
|
439
|
+
//# sourceMappingURL=calls.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"calls.js","sourceRoot":"","sources":["../../../src/extraction/vba/calls.ts"],"names":[],"mappings":";;AA4BA,0CAsBC;AAED,sCA2GC;AAWD,4DAgCC;AAQD,kDA4BC;AAMD,sDAkBC;AAQD,oEAyCC;AAQD,wEAiDC;AAMD,sDAiBC;AAMD,oDAoBC;AAjaD;;;;;;GAMG;AACH,gEAAwD;AACxD,2CAIqB;AAGrB;;;;;;;GAOG;AACH,MAAM,OAAO,GACX,sGAAsG,CAAC;AAEzG,MAAM,cAAc,GAAG,2CAA2C,CAAC;AAEnE,SAAgB,eAAe,CAC7B,GAAwB,EACxB,IAAY,EACZ,IAAc,EACd,OAAe;IAEf,cAAc,CAAC,SAAS,GAAG,CAAC,CAAC;IAC7B,IAAI,CAAyB,CAAC;IAC9B,OAAO,CAAC,CAAC,GAAG,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC;QAChD,MAAM,SAAS,GAAG,CAAC,CAAC,CAAC,C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,CAAC,OAAO;QAAE,OAAO,IAAI,CAAC;IAC1B,MAAM,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IAChC,MAAM,WAAW,GAAG,UAAU,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IACpD,IAAI,WAAW,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC3B,MAAM,EAAE,GAAG,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;QACjC,IAAI,EAAE,KAAK,GAAG,IAAI,EAAE,KAAK,GAAG,IAAI,EAAE,KAAK,IAAI;YAAE,OAAO,IAAI,CAAC;QACzD,MAAM,QAAQ,GAAG,WAAW,CAAC,SAAS,EAAE,CAAC;QACzC,IAAI,QAAQ,CAAC,UAAU,CAAC,GAAG,CAAC;YAAE,OAAO,IAAI,CAAC;IAC5C,CAAC;IACD,IAAI,kCAAsB,CAAC,GAAG,CAAC,MAAM,CAAC;QAAE,OAAO,IAAI,CAAC;IACpD,IAAI,sCAA0B,CAAC,GAAG,CAAC,MAAM,CAAC;QAAE,OAAO,IAAI,CAAC;IACxD,OAAO,EAAE,MAAM,EAAE,CAAC;AACpB,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared regexes and lookup sets used by more than one VBA extraction pass.
|
|
3
|
+
* Kept in a leaf module so the per-concern pass modules can import them
|
|
4
|
+
* without depending on each other or on the orchestrator.
|
|
5
|
+
*/
|
|
6
|
+
/** Sub/Function/Property regex — captures visibility prefix, kind, and name. */
|
|
7
|
+
export declare const PROC_RE: RegExp;
|
|
8
|
+
/**
|
|
9
|
+
* Issue #52: shared `End Sub` / `End Function` / `End Property` marker.
|
|
10
|
+
* Promoted from a local regex in `sweepCallsAndSql` so `sweepEnumsAndConsts`
|
|
11
|
+
* can walk the same proc boundaries and decide Const scope per line.
|
|
12
|
+
* The `(?:^|:\s*)` prefix tolerates colon-separated single-line procs
|
|
13
|
+
* (`Public Sub X(): ... : End Sub`) so the proc stack pops on the same
|
|
14
|
+
* physical line.
|
|
15
|
+
*/
|
|
16
|
+
export declare const PROCEDURE_END_RE: RegExp;
|
|
17
|
+
/**
|
|
18
|
+
* VBA primitive type names — skipped when emitted as Dim targets so
|
|
19
|
+
* we don't pollute the graph with `As Long` / `As String` references.
|
|
20
|
+
* Fix 4: all entries are LOWERCASE and the lookup lowercases the
|
|
21
|
+
* captured type name so `As long`, `As LONG`, `As Long` all match.
|
|
22
|
+
* Fix 1 (Issue #1): added `'new'` as a backstop so that if the `As New`
|
|
23
|
+
* pattern is ever captured as a type name it is silently skipped.
|
|
24
|
+
*/
|
|
25
|
+
export declare const PRIMITIVE_TYPES: Set<string>;
|
|
26
|
+
/** Keywords we never want to match as call receivers. */
|
|
27
|
+
export declare const CALL_KEYWORD_BLACKLIST: Set<string>;
|
|
28
|
+
/**
|
|
29
|
+
* Access runtime objects and singletons. Calls on these receivers are
|
|
30
|
+
* real VBA calls but the targets are NOT user-defined modules or
|
|
31
|
+
* classes — they're Access/DAO/ADO runtime types. Synthesizing a
|
|
32
|
+
* `function` node for each would pollute the graph with ~20+ junk
|
|
33
|
+
* nodes per real-world file (audit W4, June 2026). Skip synthesis
|
|
34
|
+
* for any receiver or member in this set.
|
|
35
|
+
*
|
|
36
|
+
* Note: `DoCmd.RunSQL`, `DoCmd.OpenForm`, etc. still get SQL/edge
|
|
37
|
+
* tracking via the dedicated `SQL_WRAPPERS` regex path (REQ-CODE-8),
|
|
38
|
+
* which fires BEFORE this scan and uses its own dispatch — so
|
|
39
|
+
* blacklisting DoCmd here doesn't lose the SQL-flow edges.
|
|
40
|
+
*/
|
|
41
|
+
export declare const RUNTIME_RECEIVER_BLACKLIST: Set<string>;
|
|
42
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/extraction/vba/constants.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,gFAAgF;AAChF,eAAO,MAAM,OAAO,QACgH,CAAC;AAErI;;;;;;;GAOG;AACH,eAAO,MAAM,gBAAgB,QACmB,CAAC;AAEjD;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe,aAI1B,CAAC;AAEH,yDAAyD;AACzD,eAAO,MAAM,sBAAsB,aAyCjC,CAAC;AAEH;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,0BAA0B,aAsBrC,CAAC"}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Shared regexes and lookup sets used by more than one VBA extraction pass.
|
|
4
|
+
* Kept in a leaf module so the per-concern pass modules can import them
|
|
5
|
+
* without depending on each other or on the orchestrator.
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.RUNTIME_RECEIVER_BLACKLIST = exports.CALL_KEYWORD_BLACKLIST = exports.PRIMITIVE_TYPES = exports.PROCEDURE_END_RE = exports.PROC_RE = void 0;
|
|
9
|
+
/** Sub/Function/Property regex — captures visibility prefix, kind, and name. */
|
|
10
|
+
exports.PROC_RE = /^\s*((?:Public|Private|Friend|Static)\s+)?(?:Static\s+)?(Sub|Function|Property(?:\s+(?:Get|Let|Set))?)\s+(\p{L}[\p{L}\p{N}_]*)/iu;
|
|
11
|
+
/**
|
|
12
|
+
* Issue #52: shared `End Sub` / `End Function` / `End Property` marker.
|
|
13
|
+
* Promoted from a local regex in `sweepCallsAndSql` so `sweepEnumsAndConsts`
|
|
14
|
+
* can walk the same proc boundaries and decide Const scope per line.
|
|
15
|
+
* The `(?:^|:\s*)` prefix tolerates colon-separated single-line procs
|
|
16
|
+
* (`Public Sub X(): ... : End Sub`) so the proc stack pops on the same
|
|
17
|
+
* physical line.
|
|
18
|
+
*/
|
|
19
|
+
exports.PROCEDURE_END_RE = /(?:^|:\s*)End\s+(?:Sub|Function|Property)\b/i;
|
|
20
|
+
/**
|
|
21
|
+
* VBA primitive type names — skipped when emitted as Dim targets so
|
|
22
|
+
* we don't pollute the graph with `As Long` / `As String` references.
|
|
23
|
+
* Fix 4: all entries are LOWERCASE and the lookup lowercases the
|
|
24
|
+
* captured type name so `As long`, `As LONG`, `As Long` all match.
|
|
25
|
+
* Fix 1 (Issue #1): added `'new'` as a backstop so that if the `As New`
|
|
26
|
+
* pattern is ever captured as a type name it is silently skipped.
|
|
27
|
+
*/
|
|
28
|
+
exports.PRIMITIVE_TYPES = new Set([
|
|
29
|
+
'long', 'integer', 'short', 'byte', 'single', 'double', 'currency',
|
|
30
|
+
'string', 'boolean', 'date', 'variant', 'object', 'error',
|
|
31
|
+
'empty', 'null', 'longptr', 'longlong', 'new',
|
|
32
|
+
]);
|
|
33
|
+
/** Keywords we never want to match as call receivers. */
|
|
34
|
+
exports.CALL_KEYWORD_BLACKLIST = new Set([
|
|
35
|
+
'If',
|
|
36
|
+
'For',
|
|
37
|
+
'While',
|
|
38
|
+
'Do',
|
|
39
|
+
'Select',
|
|
40
|
+
'Case',
|
|
41
|
+
'Then',
|
|
42
|
+
'Else',
|
|
43
|
+
'ElseIf',
|
|
44
|
+
'With',
|
|
45
|
+
'Loop',
|
|
46
|
+
'Wend',
|
|
47
|
+
'End',
|
|
48
|
+
'Return',
|
|
49
|
+
'Dim',
|
|
50
|
+
'Set',
|
|
51
|
+
'Let',
|
|
52
|
+
'Const',
|
|
53
|
+
'ReDim',
|
|
54
|
+
'Static',
|
|
55
|
+
'Public',
|
|
56
|
+
'Private',
|
|
57
|
+
'Friend',
|
|
58
|
+
'Sub',
|
|
59
|
+
'Function',
|
|
60
|
+
'Property',
|
|
61
|
+
'Class',
|
|
62
|
+
'Module',
|
|
63
|
+
'Option',
|
|
64
|
+
'On',
|
|
65
|
+
'Error',
|
|
66
|
+
'Resume',
|
|
67
|
+
'Exit',
|
|
68
|
+
'New',
|
|
69
|
+
'Call',
|
|
70
|
+
'Rem',
|
|
71
|
+
'LBound',
|
|
72
|
+
'UBound',
|
|
73
|
+
'Me',
|
|
74
|
+
'Nothing',
|
|
75
|
+
]);
|
|
76
|
+
/**
|
|
77
|
+
* Access runtime objects and singletons. Calls on these receivers are
|
|
78
|
+
* real VBA calls but the targets are NOT user-defined modules or
|
|
79
|
+
* classes — they're Access/DAO/ADO runtime types. Synthesizing a
|
|
80
|
+
* `function` node for each would pollute the graph with ~20+ junk
|
|
81
|
+
* nodes per real-world file (audit W4, June 2026). Skip synthesis
|
|
82
|
+
* for any receiver or member in this set.
|
|
83
|
+
*
|
|
84
|
+
* Note: `DoCmd.RunSQL`, `DoCmd.OpenForm`, etc. still get SQL/edge
|
|
85
|
+
* tracking via the dedicated `SQL_WRAPPERS` regex path (REQ-CODE-8),
|
|
86
|
+
* which fires BEFORE this scan and uses its own dispatch — so
|
|
87
|
+
* blacklisting DoCmd here doesn't lose the SQL-flow edges.
|
|
88
|
+
*/
|
|
89
|
+
exports.RUNTIME_RECEIVER_BLACKLIST = new Set([
|
|
90
|
+
// Form / page references
|
|
91
|
+
'Screen',
|
|
92
|
+
// Access application singletons
|
|
93
|
+
'Application',
|
|
94
|
+
'DoCmd',
|
|
95
|
+
'SysCmd',
|
|
96
|
+
// VBA debugging intrinsic — Debug.Print / Debug.Assert
|
|
97
|
+
'Debug',
|
|
98
|
+
// Access object collections
|
|
99
|
+
'Forms',
|
|
100
|
+
'Reports',
|
|
101
|
+
'Modules',
|
|
102
|
+
'References',
|
|
103
|
+
'CommandBars',
|
|
104
|
+
// Error-handling intrinsic
|
|
105
|
+
'Err',
|
|
106
|
+
// Late-binding factories (return IDispatch — not user code)
|
|
107
|
+
'CreateObject',
|
|
108
|
+
'GetObject',
|
|
109
|
+
// DAO/ADO recordset field collection access (e.g. rcdDatos.Fields("ID"))
|
|
110
|
+
'Fields',
|
|
111
|
+
]);
|
|
112
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot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