@aroman22/codegraph-vba-darwin-arm64 1.14.0 → 1.16.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/lib/dist/bin/codegraph.js +13 -7
- package/lib/dist/bin/codegraph.js.map +1 -1
- package/lib/dist/bin/daemon-release.d.ts +7 -0
- package/lib/dist/bin/daemon-release.d.ts.map +1 -0
- package/lib/dist/bin/daemon-release.js +18 -0
- package/lib/dist/bin/daemon-release.js.map +1 -0
- package/lib/dist/db/queries.d.ts +30 -0
- package/lib/dist/db/queries.d.ts.map +1 -1
- package/lib/dist/db/queries.js +51 -1
- package/lib/dist/db/queries.js.map +1 -1
- package/lib/dist/extraction/access-erd-extractor.d.ts +57 -0
- package/lib/dist/extraction/access-erd-extractor.d.ts.map +1 -0
- package/lib/dist/extraction/access-erd-extractor.js +389 -0
- package/lib/dist/extraction/access-erd-extractor.js.map +1 -0
- package/lib/dist/extraction/extraction-version.d.ts +1 -1
- package/lib/dist/extraction/extraction-version.js +1 -1
- package/lib/dist/extraction/grammars.d.ts +20 -0
- package/lib/dist/extraction/grammars.d.ts.map +1 -1
- package/lib/dist/extraction/grammars.js +34 -0
- package/lib/dist/extraction/grammars.js.map +1 -1
- package/lib/dist/extraction/index.d.ts +1 -0
- package/lib/dist/extraction/index.d.ts.map +1 -1
- package/lib/dist/extraction/index.js +371 -351
- package/lib/dist/extraction/index.js.map +1 -1
- package/lib/dist/extraction/parse-pool.d.ts +8 -3
- package/lib/dist/extraction/parse-pool.d.ts.map +1 -1
- package/lib/dist/extraction/parse-pool.js +1 -2
- package/lib/dist/extraction/parse-pool.js.map +1 -1
- package/lib/dist/extraction/parse-worker.js +7 -6
- package/lib/dist/extraction/parse-worker.js.map +1 -1
- package/lib/dist/extraction/sql-query-extractor.d.ts +16 -14
- package/lib/dist/extraction/sql-query-extractor.d.ts.map +1 -1
- package/lib/dist/extraction/sql-query-extractor.js +43 -31
- package/lib/dist/extraction/sql-query-extractor.js.map +1 -1
- package/lib/dist/extraction/sql-table-scan.d.ts +184 -0
- package/lib/dist/extraction/sql-table-scan.d.ts.map +1 -0
- package/lib/dist/extraction/sql-table-scan.js +288 -0
- package/lib/dist/extraction/sql-table-scan.js.map +1 -0
- package/lib/dist/extraction/tree-sitter.d.ts +10 -1
- package/lib/dist/extraction/tree-sitter.d.ts.map +1 -1
- package/lib/dist/extraction/tree-sitter.js +34 -3
- package/lib/dist/extraction/tree-sitter.js.map +1 -1
- package/lib/dist/extraction/vba/call-sweep.d.ts +2 -7
- package/lib/dist/extraction/vba/call-sweep.d.ts.map +1 -1
- package/lib/dist/extraction/vba/call-sweep.js +144 -90
- package/lib/dist/extraction/vba/call-sweep.js.map +1 -1
- package/lib/dist/extraction/vba/calls.d.ts +24 -4
- package/lib/dist/extraction/vba/calls.d.ts.map +1 -1
- package/lib/dist/extraction/vba/calls.js +42 -12
- package/lib/dist/extraction/vba/calls.js.map +1 -1
- package/lib/dist/extraction/vba/constants.d.ts +7 -14
- package/lib/dist/extraction/vba/constants.d.ts.map +1 -1
- package/lib/dist/extraction/vba/constants.js +8 -36
- package/lib/dist/extraction/vba/constants.js.map +1 -1
- package/lib/dist/extraction/vba/context.d.ts +443 -7
- package/lib/dist/extraction/vba/context.d.ts.map +1 -1
- package/lib/dist/extraction/vba/context.js +325 -29
- package/lib/dist/extraction/vba/context.js.map +1 -1
- package/lib/dist/extraction/vba/controls.d.ts +18 -1
- package/lib/dist/extraction/vba/controls.d.ts.map +1 -1
- package/lib/dist/extraction/vba/controls.js +99 -27
- package/lib/dist/extraction/vba/controls.js.map +1 -1
- package/lib/dist/extraction/vba/declarations.d.ts +1 -6
- package/lib/dist/extraction/vba/declarations.d.ts.map +1 -1
- package/lib/dist/extraction/vba/declarations.js +5 -39
- package/lib/dist/extraction/vba/declarations.js.map +1 -1
- package/lib/dist/extraction/vba/dims.d.ts +11 -7
- package/lib/dist/extraction/vba/dims.d.ts.map +1 -1
- package/lib/dist/extraction/vba/dims.js +265 -29
- package/lib/dist/extraction/vba/dims.js.map +1 -1
- package/lib/dist/extraction/vba/docmd.d.ts +29 -2
- package/lib/dist/extraction/vba/docmd.d.ts.map +1 -1
- package/lib/dist/extraction/vba/docmd.js +297 -18
- package/lib/dist/extraction/vba/docmd.js.map +1 -1
- package/lib/dist/extraction/vba/enums-consts.d.ts +7 -14
- package/lib/dist/extraction/vba/enums-consts.d.ts.map +1 -1
- package/lib/dist/extraction/vba/enums-consts.js +11 -45
- package/lib/dist/extraction/vba/enums-consts.js.map +1 -1
- package/lib/dist/extraction/vba/error-channel.d.ts +57 -0
- package/lib/dist/extraction/vba/error-channel.d.ts.map +1 -0
- package/lib/dist/extraction/vba/error-channel.js +128 -0
- package/lib/dist/extraction/vba/error-channel.js.map +1 -0
- package/lib/dist/extraction/vba/errors.d.ts +64 -0
- package/lib/dist/extraction/vba/errors.d.ts.map +1 -0
- package/lib/dist/extraction/vba/errors.js +775 -0
- package/lib/dist/extraction/vba/errors.js.map +1 -0
- package/lib/dist/extraction/vba/filesystem-statements.d.ts +23 -0
- package/lib/dist/extraction/vba/filesystem-statements.d.ts.map +1 -0
- package/lib/dist/extraction/vba/filesystem-statements.js +70 -0
- package/lib/dist/extraction/vba/filesystem-statements.js.map +1 -0
- package/lib/dist/extraction/vba/implements.d.ts +1 -6
- package/lib/dist/extraction/vba/implements.d.ts.map +1 -1
- package/lib/dist/extraction/vba/implements.js +1 -22
- package/lib/dist/extraction/vba/implements.js.map +1 -1
- package/lib/dist/extraction/vba/labels.d.ts +26 -0
- package/lib/dist/extraction/vba/labels.d.ts.map +1 -0
- package/lib/dist/extraction/vba/labels.js +180 -0
- package/lib/dist/extraction/vba/labels.js.map +1 -0
- package/lib/dist/extraction/vba/module-vars.d.ts +36 -0
- package/lib/dist/extraction/vba/module-vars.d.ts.map +1 -0
- package/lib/dist/extraction/vba/module-vars.js +145 -0
- package/lib/dist/extraction/vba/module-vars.js.map +1 -0
- package/lib/dist/extraction/vba/options.d.ts +88 -0
- package/lib/dist/extraction/vba/options.d.ts.map +1 -0
- package/lib/dist/extraction/vba/options.js +39 -0
- package/lib/dist/extraction/vba/options.js.map +1 -0
- package/lib/dist/extraction/vba/parameters.d.ts +35 -0
- package/lib/dist/extraction/vba/parameters.d.ts.map +1 -0
- package/lib/dist/extraction/vba/parameters.js +110 -0
- package/lib/dist/extraction/vba/parameters.js.map +1 -0
- package/lib/dist/extraction/vba/procedures.d.ts +1 -9
- package/lib/dist/extraction/vba/procedures.d.ts.map +1 -1
- package/lib/dist/extraction/vba/procedures.js +174 -112
- package/lib/dist/extraction/vba/procedures.js.map +1 -1
- package/lib/dist/extraction/vba/rules.d.ts +10 -5
- package/lib/dist/extraction/vba/rules.d.ts.map +1 -1
- package/lib/dist/extraction/vba/rules.js +19 -0
- package/lib/dist/extraction/vba/rules.js.map +1 -1
- package/lib/dist/extraction/vba/runtime-objects.d.ts +59 -0
- package/lib/dist/extraction/vba/runtime-objects.d.ts.map +1 -0
- package/lib/dist/extraction/vba/runtime-objects.js +106 -0
- package/lib/dist/extraction/vba/runtime-objects.js.map +1 -0
- package/lib/dist/extraction/vba/signature.d.ts +57 -0
- package/lib/dist/extraction/vba/signature.d.ts.map +1 -0
- package/lib/dist/extraction/vba/signature.js +164 -0
- package/lib/dist/extraction/vba/signature.js.map +1 -0
- package/lib/dist/extraction/vba/sql-wrapper.d.ts +76 -3
- package/lib/dist/extraction/vba/sql-wrapper.d.ts.map +1 -1
- package/lib/dist/extraction/vba/sql-wrapper.js +725 -151
- package/lib/dist/extraction/vba/sql-wrapper.js.map +1 -1
- package/lib/dist/extraction/vba/tempvars.d.ts.map +1 -1
- package/lib/dist/extraction/vba/tempvars.js +4 -0
- package/lib/dist/extraction/vba/tempvars.js.map +1 -1
- package/lib/dist/extraction/vba/text-utils.d.ts +62 -2
- package/lib/dist/extraction/vba/text-utils.d.ts.map +1 -1
- package/lib/dist/extraction/vba/text-utils.js +84 -6
- package/lib/dist/extraction/vba/text-utils.js.map +1 -1
- package/lib/dist/extraction/vba-extractor.d.ts +18 -1
- package/lib/dist/extraction/vba-extractor.d.ts.map +1 -1
- package/lib/dist/extraction/vba-extractor.js +111 -16
- package/lib/dist/extraction/vba-extractor.js.map +1 -1
- package/lib/dist/extraction/vba-form-extractor.d.ts +28 -14
- package/lib/dist/extraction/vba-form-extractor.d.ts.map +1 -1
- package/lib/dist/extraction/vba-form-extractor.js +56 -21
- package/lib/dist/extraction/vba-form-extractor.js.map +1 -1
- package/lib/dist/extraction/vba-preprocess.d.ts +89 -3
- package/lib/dist/extraction/vba-preprocess.d.ts.map +1 -1
- package/lib/dist/extraction/vba-preprocess.js +221 -57
- package/lib/dist/extraction/vba-preprocess.js.map +1 -1
- package/lib/dist/extraction/vba-source.d.ts +0 -10
- package/lib/dist/extraction/vba-source.d.ts.map +1 -1
- package/lib/dist/extraction/vba-source.js +0 -13
- package/lib/dist/extraction/vba-source.js.map +1 -1
- package/lib/dist/extraction/vba-test-manifest-extractor.d.ts +0 -6
- package/lib/dist/extraction/vba-test-manifest-extractor.d.ts.map +1 -1
- package/lib/dist/extraction/vba-test-manifest-extractor.js +0 -1
- package/lib/dist/extraction/vba-test-manifest-extractor.js.map +1 -1
- package/lib/dist/index.d.ts.map +1 -1
- package/lib/dist/index.js +9 -0
- package/lib/dist/index.js.map +1 -1
- package/lib/dist/mcp/daemon-manager.d.ts.map +1 -1
- package/lib/dist/mcp/daemon-manager.js +7 -3
- package/lib/dist/mcp/daemon-manager.js.map +1 -1
- package/lib/dist/mcp/daemon-paths.d.ts +6 -0
- package/lib/dist/mcp/daemon-paths.d.ts.map +1 -1
- package/lib/dist/mcp/daemon-paths.js +15 -0
- package/lib/dist/mcp/daemon-paths.js.map +1 -1
- package/lib/dist/mcp/daemon-registry.d.ts +82 -7
- package/lib/dist/mcp/daemon-registry.d.ts.map +1 -1
- package/lib/dist/mcp/daemon-registry.js +557 -45
- package/lib/dist/mcp/daemon-registry.js.map +1 -1
- package/lib/dist/mcp/daemon-watchdog.d.ts +12 -0
- package/lib/dist/mcp/daemon-watchdog.d.ts.map +1 -1
- package/lib/dist/mcp/daemon-watchdog.js +37 -7
- package/lib/dist/mcp/daemon-watchdog.js.map +1 -1
- package/lib/dist/mcp/daemon.d.ts +20 -1
- package/lib/dist/mcp/daemon.d.ts.map +1 -1
- package/lib/dist/mcp/daemon.js +123 -30
- package/lib/dist/mcp/daemon.js.map +1 -1
- package/lib/dist/mcp/index.d.ts.map +1 -1
- package/lib/dist/mcp/index.js +13 -2
- package/lib/dist/mcp/index.js.map +1 -1
- package/lib/dist/mcp/proxy.d.ts +32 -0
- package/lib/dist/mcp/proxy.d.ts.map +1 -1
- package/lib/dist/mcp/proxy.js +163 -31
- package/lib/dist/mcp/proxy.js.map +1 -1
- package/lib/dist/mcp/tools.d.ts.map +1 -1
- package/lib/dist/mcp/tools.js +29 -1
- package/lib/dist/mcp/tools.js.map +1 -1
- package/lib/dist/project-config.d.ts +43 -2
- package/lib/dist/project-config.d.ts.map +1 -1
- package/lib/dist/project-config.js +86 -2
- package/lib/dist/project-config.js.map +1 -1
- package/lib/dist/resolution/index.d.ts +47 -2
- package/lib/dist/resolution/index.d.ts.map +1 -1
- package/lib/dist/resolution/index.js +160 -5
- package/lib/dist/resolution/index.js.map +1 -1
- package/lib/dist/resolution/name-matcher.d.ts +25 -0
- package/lib/dist/resolution/name-matcher.d.ts.map +1 -1
- package/lib/dist/resolution/name-matcher.js +59 -0
- package/lib/dist/resolution/name-matcher.js.map +1 -1
- package/lib/dist/resolution/vba-runtime-objects.d.ts +11 -11
- package/lib/dist/resolution/vba-runtime-objects.d.ts.map +1 -1
- package/lib/dist/resolution/vba-runtime-objects.js +18 -38
- package/lib/dist/resolution/vba-runtime-objects.js.map +1 -1
- package/lib/dist/types.d.ts +13 -5
- package/lib/dist/types.d.ts.map +1 -1
- package/lib/dist/types.js +17 -0
- package/lib/dist/types.js.map +1 -1
- package/lib/node_modules/.modules.yaml +1 -1
- package/lib/node_modules/.pnpm-workspace-state-v1.json +1 -1
- package/lib/package.json +4 -1
- package/package.json +1 -1
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.VbaExtractorContext = void 0;
|
|
4
4
|
const tree_sitter_helpers_1 = require("../tree-sitter-helpers");
|
|
5
|
+
const sql_table_scan_1 = require("../sql-table-scan");
|
|
5
6
|
const constants_1 = require("./constants");
|
|
6
7
|
class VbaExtractorContext {
|
|
7
8
|
filePath;
|
|
@@ -10,6 +11,49 @@ class VbaExtractorContext {
|
|
|
10
11
|
errors = [];
|
|
11
12
|
unresolvedReferences = [];
|
|
12
13
|
moduleOrClassNode = null;
|
|
14
|
+
/**
|
|
15
|
+
* Issue #251: the module/class name this file's symbols belong to —
|
|
16
|
+
* the resolved `Attribute VB_Name`, or the file basename when the
|
|
17
|
+
* attribute is absent. It is the SAME string the module/class node is
|
|
18
|
+
* later created with (`createModuleOrClassNode`), but it is resolved
|
|
19
|
+
* BEFORE the walk so a classifier can compose a `<Module>.<name>`
|
|
20
|
+
* qualifiedName while the module node itself does not exist yet.
|
|
21
|
+
*
|
|
22
|
+
* `classNamePrefix` right below cannot serve that purpose: it is
|
|
23
|
+
* deliberately `null` for `.bas` modules so procedure qualifiedNames
|
|
24
|
+
* keep their bare-name shape. Module-level variables want the module
|
|
25
|
+
* prefix in BOTH file kinds, so they read this field instead.
|
|
26
|
+
*/
|
|
27
|
+
moduleName = null;
|
|
28
|
+
/**
|
|
29
|
+
* Issue #251: module-level variables declared in THIS file, keyed by
|
|
30
|
+
* the lowercase variable name. Populated by the dims classifier at the
|
|
31
|
+
* moment it emits the `variable` node, so membership means exactly
|
|
32
|
+
* "this name is a module-level variable of this module and has a node
|
|
33
|
+
* in the graph".
|
|
34
|
+
*
|
|
35
|
+
* This is the ONLY gate the read/write reference scan consults. It is
|
|
36
|
+
* deliberately NOT `localVarTypeMap.get('module')`: that map also holds
|
|
37
|
+
* bookkeeping entries the sweeps write for type-tracking purposes, and
|
|
38
|
+
* scanning identifiers against anything broader than "names we emitted
|
|
39
|
+
* a node for" is how a reference sweep turns into thousands of false
|
|
40
|
+
* positives.
|
|
41
|
+
*/
|
|
42
|
+
moduleVariables = new Map();
|
|
43
|
+
/**
|
|
44
|
+
* Issue #251: for each procedure (keyed by its `startLine` as a string,
|
|
45
|
+
* the same key `currentVarTypeProcKey` uses), the lowercase names that
|
|
46
|
+
* procedure declares itself — its parameters and every `Dim` / `Static`
|
|
47
|
+
* / `Private` declaration in its body.
|
|
48
|
+
*
|
|
49
|
+
* The module-level variable read/write scan consults this to honour the
|
|
50
|
+
* issue #205 scoping rule: a procedure that declares its own `codigo`
|
|
51
|
+
* must not report a read of the module-level `codigo`. `localVarTypeMap`
|
|
52
|
+
* cannot answer that question on its own — its bare-`Dim` path skips the
|
|
53
|
+
* write when an outer declaration of the same name already resolves, and
|
|
54
|
+
* it never sees parameters at all — so both would read as unshadowed.
|
|
55
|
+
*/
|
|
56
|
+
procLocalNames = new Map();
|
|
13
57
|
/**
|
|
14
58
|
* Class-name prefix for `qualifiedName` composition.
|
|
15
59
|
*
|
|
@@ -69,13 +113,51 @@ class VbaExtractorContext {
|
|
|
69
113
|
*/
|
|
70
114
|
synthTempVarNodeIds = new Set();
|
|
71
115
|
/**
|
|
72
|
-
*
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
-
*
|
|
76
|
-
|
|
116
|
+
* Issue #256: external-backend (`IN "<path>"`) node de-dup cache. Same
|
|
117
|
+
* rationale as `synthTempVarNodeIds`: the ids are keyed on the
|
|
118
|
+
* normalized backend path via a synthetic file path, so the SAME
|
|
119
|
+
* `.accdb` referenced from N modules collapses to ONE node.
|
|
120
|
+
*/
|
|
121
|
+
synthExternalBackendNodeIds = new Set();
|
|
122
|
+
/**
|
|
123
|
+
* Issue #205: `variableName.toLowerCase()` → declared type info,
|
|
124
|
+
* **scoped per procedure**. The outer key is `'module'` for module-
|
|
125
|
+
* level `Dim`s, or the procedure's `startLine` (stringified) for
|
|
126
|
+
* proc-local `Dim`s — mirroring `localConstants` directly above and
|
|
127
|
+
* `ProcInfo.arrayParameters` (`context.ts:42`).
|
|
128
|
+
*
|
|
129
|
+
* The pre-#205 shape was a flat `Map<string, …>` keyed on the bare
|
|
130
|
+
* name, so the last `Dim` in a file silently won for the whole file
|
|
131
|
+
* and qualified calls (`item.Method`) resolved to whichever
|
|
132
|
+
* procedure declared `item` most recently — even when the call site
|
|
133
|
+
* was in a different procedure that had its OWN `Dim item As
|
|
134
|
+
* <OtherType>`. Worse, a module-level `Dim` was overwritten by the
|
|
135
|
+
* first proc-local `Dim` of the same name and never re-asserted, so
|
|
136
|
+
* a different procedure without its own local `Dim` would resolve
|
|
137
|
+
* `item.Method` to the wrong class with no diagnostic.
|
|
138
|
+
*
|
|
139
|
+
* Built by the dims classifier (which tracks the current scope via
|
|
140
|
+
* `currentVarTypeProcKey`); consulted by the unified qualified-call
|
|
141
|
+
* gate (`shouldProcessQualifiedCall`, `isLocalProjectClassVar`,
|
|
142
|
+
* `resolveReceiverType`) so declared project-class locals emit
|
|
143
|
+
* edges, declared primitive/external locals stay silent, and
|
|
144
|
+
* undeclared receivers remain module-name candidates for the
|
|
145
|
+
* resolver (Fix 2 / Issue #2). The proc bucket is consulted first
|
|
146
|
+
* and the `'module'` bucket is the fallback — same two-tier lookup
|
|
147
|
+
* `resolveLocalConst` performs.
|
|
77
148
|
*/
|
|
78
149
|
localVarTypeMap = new Map();
|
|
150
|
+
/**
|
|
151
|
+
* Issue #205: the current scope the dims classifier writes to. Set
|
|
152
|
+
* to `'module'` when no procedure is open, otherwise the top of the
|
|
153
|
+
* dims classifier's per-instance proc stack (the startLine of the
|
|
154
|
+
* procedure whose `End Sub`/`End Function`/`End Property` has not
|
|
155
|
+
* been seen yet). The dims classifier updates this on every
|
|
156
|
+
* `PROC_RE` / `PROCEDURE_END_RE` boundary so the bucket the call
|
|
157
|
+
* sweep later consults (via the per-proc-then-module lookup) lines
|
|
158
|
+
* up with the procedure the call site is inside.
|
|
159
|
+
*/
|
|
160
|
+
currentVarTypeProcKey = 'module';
|
|
79
161
|
/**
|
|
80
162
|
* Issue #52: Const resolution buckets, scoped per procedure. Key is
|
|
81
163
|
* `'module'` for module-level Consts, or the procedure's `startLine`
|
|
@@ -119,6 +201,17 @@ class VbaExtractorContext {
|
|
|
119
201
|
* `null` means "outside any enum block right now".
|
|
120
202
|
*/
|
|
121
203
|
vbaEnumBlock = null;
|
|
204
|
+
/**
|
|
205
|
+
* Issue #259: per-extraction state for the error-policy classifier
|
|
206
|
+
* (`src/extraction/vba/errors.ts`). Non-null exactly while a procedure
|
|
207
|
+
* body is open; the classifier folds it into the `errorPolicy` metadata
|
|
208
|
+
* object on that procedure's `function` node when the body closes.
|
|
209
|
+
*
|
|
210
|
+
* Same rationale as `vbaEnumBlock` / `vbaDeclTypeBlock`: the declarative
|
|
211
|
+
* RULES table's `emit` functions need somewhere to accumulate inter-line
|
|
212
|
+
* state, and `ctx` is the only thing they are handed.
|
|
213
|
+
*/
|
|
214
|
+
vbaErrorPolicy = null;
|
|
122
215
|
/**
|
|
123
216
|
* Issue #153: per-extraction state for the calls/SQL classifier's
|
|
124
217
|
* `With <receiver> ... End With` block tracking. The with-receiver
|
|
@@ -171,6 +264,39 @@ class VbaExtractorContext {
|
|
|
171
264
|
* pays no cost.
|
|
172
265
|
*/
|
|
173
266
|
classifierInvokeCounts = null;
|
|
267
|
+
/**
|
|
268
|
+
* Issue #244: the SQL execution-site matcher, compiled ONCE per extractor
|
|
269
|
+
* instance from `codegraph.json` → `vba.sqlWrappers` and parked here.
|
|
270
|
+
* `scanSqlInLine` runs on every line of every VBA file, so the two
|
|
271
|
+
* stateful `/g` RegExps it holds must outlive the line loop — building
|
|
272
|
+
* them per line (the pre-#244 shape) burned a RegExp compile per line for
|
|
273
|
+
* no behavioural gain.
|
|
274
|
+
*
|
|
275
|
+
* `null` means "nobody supplied options" (tests, out-of-repo callers);
|
|
276
|
+
* `sql-wrapper.ts` then falls back to its module-level default set, which
|
|
277
|
+
* is compiled once as well. The type is imported TYPE-ONLY on purpose:
|
|
278
|
+
* `sql-wrapper.ts` imports this module, so a value import here would close
|
|
279
|
+
* a runtime require cycle.
|
|
280
|
+
*/
|
|
281
|
+
sqlWrappers = null;
|
|
282
|
+
/**
|
|
283
|
+
* Issue #261: the error channel — the module-level variable names this
|
|
284
|
+
* project propagates error messages through — compiled ONCE per extractor
|
|
285
|
+
* instance from `codegraph.json` → `vba.errorChannel` and parked here.
|
|
286
|
+
*
|
|
287
|
+
* Two hot paths read it: `module-vars.ts` tests every identifier that is
|
|
288
|
+
* already a module-level variable of this file (flagging the reference
|
|
289
|
+
* `errorChannel: true`), and `errors.ts` tests every statement of every
|
|
290
|
+
* procedure body for a channel WRITE. Neither may rebuild the `Set` and the
|
|
291
|
+
* RegExps it holds inside the line loop.
|
|
292
|
+
*
|
|
293
|
+
* `null` means "nobody supplied options" (tests, out-of-repo callers);
|
|
294
|
+
* `error-channel.ts` then falls back to its memoised default channel, which
|
|
295
|
+
* is the same four names. The type is imported TYPE-ONLY on purpose, exactly
|
|
296
|
+
* as {@link sqlWrappers} is: `error-channel.ts` is a leaf and a value import
|
|
297
|
+
* here would be the start of a runtime cycle.
|
|
298
|
+
*/
|
|
299
|
+
errorChannel = null;
|
|
174
300
|
constructor(filePath) {
|
|
175
301
|
this.filePath = filePath;
|
|
176
302
|
}
|
|
@@ -185,6 +311,28 @@ class VbaExtractorContext {
|
|
|
185
311
|
this.classifierInvokeCounts = new Map();
|
|
186
312
|
}
|
|
187
313
|
}
|
|
314
|
+
/**
|
|
315
|
+
* Issue #260: is `lineNum` inside the error handler of the procedure that
|
|
316
|
+
* is open right now?
|
|
317
|
+
*
|
|
318
|
+
* The lower bound is the open procedure's `handlerStartLine` — the line
|
|
319
|
+
* AFTER the handler label, which is the same boundary published on the
|
|
320
|
+
* node's `errorPolicy`. The upper bound is implicit and is the reason this
|
|
321
|
+
* reads live state rather than a stored range: `vbaErrorPolicy` is cleared
|
|
322
|
+
* at the procedure's `End Sub` / `End Function` / `End Property`, so the
|
|
323
|
+
* next procedure starts with a fresh accumulator and can never inherit the
|
|
324
|
+
* previous one's region. That is the off-by-one guard, by construction.
|
|
325
|
+
*
|
|
326
|
+
* Returns `false` outside any procedure, and inside a procedure whose
|
|
327
|
+
* handler region has not opened yet (no `On Error GoTo`, or a label nobody
|
|
328
|
+
* targets — which is control flow, not a handler).
|
|
329
|
+
*/
|
|
330
|
+
inErrorHandler(lineNum) {
|
|
331
|
+
const state = this.vbaErrorPolicy;
|
|
332
|
+
if (state === null || state.handlerStartLine === null)
|
|
333
|
+
return false;
|
|
334
|
+
return lineNum >= state.handlerStartLine;
|
|
335
|
+
}
|
|
188
336
|
/**
|
|
189
337
|
* Issue #156: add `ms` to the stage named `name`. No-op when
|
|
190
338
|
* `timings` is null (default path).
|
|
@@ -220,11 +368,19 @@ class VbaExtractorContext {
|
|
|
220
368
|
* Qualified types (e.g. `DAO.Recordset`) and primitives (`String`, `Long`)
|
|
221
369
|
* return false so runtime/DAO calls are suppressed. Brackets are stripped
|
|
222
370
|
* from the lookup key defensively (Issue #54).
|
|
371
|
+
*
|
|
372
|
+
* Issue #205: the lookup is two-tier — the current procedure's bucket is
|
|
373
|
+
* consulted first, then the `'module'` bucket — so a proc-local
|
|
374
|
+
* `Dim x As Producto` in `Sub Foo` does NOT make `x` a project class
|
|
375
|
+
* in `Sub Bar` (where `Dim x As Variant` is the only declaration, or
|
|
376
|
+
* `x` is undeclared). Without the per-proc scoping, the last `Dim` in
|
|
377
|
+
* the file would silently win and the wrong class would propagate
|
|
378
|
+
* into `x.Method` qualified-call stub edges.
|
|
223
379
|
*/
|
|
224
380
|
isLocalProjectClassVar(receiverName) {
|
|
225
381
|
// Issue #54: strip a single leading `[` and/or trailing `]` if present.
|
|
226
382
|
const key = receiverName.replace(/^\[|\]$/g, '').toLowerCase();
|
|
227
|
-
const entry = this.
|
|
383
|
+
const entry = this.lookupLocalVarType(key);
|
|
228
384
|
if (!entry)
|
|
229
385
|
return false; // not declared in this file → silent
|
|
230
386
|
if (entry.qualified)
|
|
@@ -239,11 +395,16 @@ class VbaExtractorContext {
|
|
|
239
395
|
* project-class locals are processed after type resolution, declared
|
|
240
396
|
* primitive/external locals are silent, and undeclared receivers remain
|
|
241
397
|
* candidate module names.
|
|
398
|
+
*
|
|
399
|
+
* Issue #205: the underlying `localVarTypeMap` lookup is two-tier
|
|
400
|
+
* (current proc → module) so the eligibility check inherits the
|
|
401
|
+
* same scoping discipline.
|
|
242
402
|
*/
|
|
243
403
|
shouldProcessQualifiedCall(receiverName) {
|
|
244
404
|
if (this.isLocalProjectClassVar(receiverName))
|
|
245
405
|
return true;
|
|
246
|
-
|
|
406
|
+
const key = receiverName.replace(/^\[|\]$/g, '').toLowerCase();
|
|
407
|
+
return !this.lookupLocalVarType(key);
|
|
247
408
|
}
|
|
248
409
|
/**
|
|
249
410
|
* #12a: resolve the "receiver type" used to build a qualified call-stub's
|
|
@@ -253,11 +414,14 @@ class VbaExtractorContext {
|
|
|
253
414
|
* → `'NCOperaciones'`) so the stub matches the real `.cls` method's
|
|
254
415
|
* `${className}.${proc}` shape. Otherwise returns `receiverName` unchanged
|
|
255
416
|
* (the `.bas`-qualified module call case).
|
|
417
|
+
*
|
|
418
|
+
* Issue #205: lookup is two-tier (current proc → module) so the
|
|
419
|
+
* resolved class name matches the procedure the call site is inside.
|
|
256
420
|
*/
|
|
257
421
|
resolveReceiverType(receiverName) {
|
|
258
422
|
if (this.isLocalProjectClassVar(receiverName)) {
|
|
259
423
|
const key = receiverName.replace(/^\[|\]$/g, '').toLowerCase();
|
|
260
|
-
const entry = this.
|
|
424
|
+
const entry = this.lookupLocalVarType(key);
|
|
261
425
|
if (entry)
|
|
262
426
|
return entry.outer;
|
|
263
427
|
}
|
|
@@ -349,6 +513,67 @@ class VbaExtractorContext {
|
|
|
349
513
|
this.edges.push(e);
|
|
350
514
|
return before - kept.length;
|
|
351
515
|
}
|
|
516
|
+
/**
|
|
517
|
+
* Create — once per file, per name — the synthetic `class` node that stands
|
|
518
|
+
* in for a type this file names but does not declare, and return its id.
|
|
519
|
+
*
|
|
520
|
+
* The id is keyed on (filePath, 'class', name) WITHOUT a line number so the
|
|
521
|
+
* same type named on N lines produces ONE node, and
|
|
522
|
+
* `resolveVbaReferenceStubs` can later repoint every edge pointing at it onto
|
|
523
|
+
* the real declaration and delete the stub.
|
|
524
|
+
*
|
|
525
|
+
* Factored out of `emitReference` (issue #257) so a caller that needs a
|
|
526
|
+
* different EDGE kind onto the same stub — `emitTypeOf` below — cannot drift
|
|
527
|
+
* from the id formula the resolver depends on.
|
|
528
|
+
*/
|
|
529
|
+
ensureSynthTypeNode(targetName, lineNum, column) {
|
|
530
|
+
const targetId = (0, tree_sitter_helpers_1.generateNodeId)(this.filePath, 'class', // placeholder kind; cross-file resolution will re-type at lookup
|
|
531
|
+
targetName, 0);
|
|
532
|
+
if (!this.synthClassNodeIds.has(targetId)) {
|
|
533
|
+
this.synthClassNodeIds.add(targetId);
|
|
534
|
+
this.nodes.push({
|
|
535
|
+
id: targetId,
|
|
536
|
+
kind: 'class',
|
|
537
|
+
name: targetName,
|
|
538
|
+
qualifiedName: targetName,
|
|
539
|
+
filePath: this.filePath,
|
|
540
|
+
language: 'vba',
|
|
541
|
+
startLine: lineNum,
|
|
542
|
+
endLine: lineNum,
|
|
543
|
+
startColumn: column,
|
|
544
|
+
endColumn: column + targetName.length,
|
|
545
|
+
updatedAt: Date.now(),
|
|
546
|
+
});
|
|
547
|
+
}
|
|
548
|
+
return targetId;
|
|
549
|
+
}
|
|
550
|
+
/**
|
|
551
|
+
* Issue #257: emit a `type_of` edge from an arbitrary node — a `parameter`,
|
|
552
|
+
* today — to the synthetic node standing in for its declared type.
|
|
553
|
+
*
|
|
554
|
+
* Deliberately NOT `emitReference`: that helper always sources the edge from
|
|
555
|
+
* the file's module/class node, which is the right answer for "this module
|
|
556
|
+
* mentions type X" but the wrong one for "this parameter IS an X". Both
|
|
557
|
+
* share the stub, so a parameter typed `As Cliente` and a `Dim c As Cliente`
|
|
558
|
+
* in the same file converge on ONE node and `resolveVbaReferenceStubs`
|
|
559
|
+
* repoints their edges together.
|
|
560
|
+
*
|
|
561
|
+
* The caller owns the primitive gate — see `emitParameterNodes`.
|
|
562
|
+
*/
|
|
563
|
+
emitTypeOf(sourceNodeId, targetName, lineNum, column, synthesizedBy) {
|
|
564
|
+
if (!sourceNodeId || !targetName)
|
|
565
|
+
return;
|
|
566
|
+
const targetId = this.ensureSynthTypeNode(targetName, lineNum, column);
|
|
567
|
+
this.edges.push({
|
|
568
|
+
source: sourceNodeId,
|
|
569
|
+
target: targetId,
|
|
570
|
+
kind: 'type_of',
|
|
571
|
+
provenance: 'heuristic',
|
|
572
|
+
metadata: { synthesizedBy },
|
|
573
|
+
line: lineNum,
|
|
574
|
+
column,
|
|
575
|
+
});
|
|
576
|
+
}
|
|
352
577
|
/**
|
|
353
578
|
* Emit a `references` edge from the file's module/class node to a synthetic
|
|
354
579
|
* node named `targetName`. Used by Dim, WithEvents, Set-New, and SQL sweeps.
|
|
@@ -376,27 +601,7 @@ class VbaExtractorContext {
|
|
|
376
601
|
emitReference(targetName, lineNum, column, synthesizedBy, access, extras) {
|
|
377
602
|
if (!targetName)
|
|
378
603
|
return;
|
|
379
|
-
const targetId =
|
|
380
|
-
targetName, 0);
|
|
381
|
-
if (this.synthClassNodeIds.has(targetId)) {
|
|
382
|
-
// Node already emitted for this name — only add the edge below.
|
|
383
|
-
}
|
|
384
|
-
else {
|
|
385
|
-
this.synthClassNodeIds.add(targetId);
|
|
386
|
-
this.nodes.push({
|
|
387
|
-
id: targetId,
|
|
388
|
-
kind: 'class',
|
|
389
|
-
name: targetName,
|
|
390
|
-
qualifiedName: targetName,
|
|
391
|
-
filePath: this.filePath,
|
|
392
|
-
language: 'vba',
|
|
393
|
-
startLine: lineNum,
|
|
394
|
-
endLine: lineNum,
|
|
395
|
-
startColumn: column,
|
|
396
|
-
endColumn: column + targetName.length,
|
|
397
|
-
updatedAt: Date.now(),
|
|
398
|
-
});
|
|
399
|
-
}
|
|
604
|
+
const targetId = this.ensureSynthTypeNode(targetName, lineNum, column);
|
|
400
605
|
const metadata = access
|
|
401
606
|
? { synthesizedBy, access, ...(extras ?? {}) }
|
|
402
607
|
: { synthesizedBy, ...(extras ?? {}) };
|
|
@@ -412,6 +617,39 @@ class VbaExtractorContext {
|
|
|
412
617
|
this.edges.push(edge);
|
|
413
618
|
this.pendingModuleOrClassSource.push(edge);
|
|
414
619
|
}
|
|
620
|
+
/**
|
|
621
|
+
* Issue #256: emit a `references` edge from the file's module/class node
|
|
622
|
+
* to the external database file an Access `IN "<path>"` clause points at.
|
|
623
|
+
*
|
|
624
|
+
* The target is a `file`-kind node built by `buildExternalBackendNode`,
|
|
625
|
+
* keyed on the NORMALIZED path, so the same backend named from several
|
|
626
|
+
* modules — or from a saved query — converges on ONE node. The edge
|
|
627
|
+
* carries only `synthesizedBy`; the `external` / `backendPath` facts
|
|
628
|
+
* live on the node, which is the thing they describe.
|
|
629
|
+
*
|
|
630
|
+
* `backendPath` must already be normalized (the caller gets it from
|
|
631
|
+
* `scanSqlExternalBackends`). An empty path is a no-op.
|
|
632
|
+
*/
|
|
633
|
+
emitExternalBackendReference(backendPath, lineNum, column) {
|
|
634
|
+
if (!backendPath)
|
|
635
|
+
return;
|
|
636
|
+
const node = (0, sql_table_scan_1.buildExternalBackendNode)(backendPath);
|
|
637
|
+
if (!this.synthExternalBackendNodeIds.has(node.id)) {
|
|
638
|
+
this.synthExternalBackendNodeIds.add(node.id);
|
|
639
|
+
this.nodes.push(node);
|
|
640
|
+
}
|
|
641
|
+
const edge = {
|
|
642
|
+
source: '', // rewritten after module node exists
|
|
643
|
+
target: node.id,
|
|
644
|
+
kind: 'references',
|
|
645
|
+
provenance: 'heuristic',
|
|
646
|
+
metadata: { synthesizedBy: sql_table_scan_1.EXTERNAL_BACKEND_SYNTHESIZED_BY },
|
|
647
|
+
line: lineNum,
|
|
648
|
+
column,
|
|
649
|
+
};
|
|
650
|
+
this.edges.push(edge);
|
|
651
|
+
this.pendingModuleOrClassSource.push(edge);
|
|
652
|
+
}
|
|
415
653
|
/**
|
|
416
654
|
* Issue #52: shared lookup helper for `scanDoCmdOpenCalls` and
|
|
417
655
|
* `scanDoCmdOpenQuery`. The current scope is the procedure whose
|
|
@@ -443,6 +681,64 @@ class VbaExtractorContext {
|
|
|
443
681
|
bucket.set(name.toLowerCase(), value);
|
|
444
682
|
return bucket;
|
|
445
683
|
}
|
|
684
|
+
/**
|
|
685
|
+
* Issue #205: shared lookup helper for the procedure-scoped
|
|
686
|
+
* `localVarTypeMap`. The current scope is the procedure whose
|
|
687
|
+
* `startLine` is on top of the dims classifier's proc stack, kept in
|
|
688
|
+
* sync via `currentVarTypeProcKey` (or `'module'` when no procedure
|
|
689
|
+
* is open). Per-proc bucket first; the `'module'` bucket is the
|
|
690
|
+
* fallback — mirrors `resolveLocalConst` and the `arrayParameters`
|
|
691
|
+
* rationale spelled out at `calls.ts:86-90` ("a same-named
|
|
692
|
+
* parameter on a different procedure cannot suppress a genuine
|
|
693
|
+
* missing-call elsewhere in the file").
|
|
694
|
+
*
|
|
695
|
+
* `name` is normalized to lowercase so the dim sweep's
|
|
696
|
+
* `varName.toLowerCase()` key matches the call sweep's
|
|
697
|
+
* `receiverName.toLowerCase()` key.
|
|
698
|
+
*/
|
|
699
|
+
lookupLocalVarType(name) {
|
|
700
|
+
const lower = name.toLowerCase();
|
|
701
|
+
const procBucket = this.localVarTypeMap.get(this.currentVarTypeProcKey);
|
|
702
|
+
if (procBucket) {
|
|
703
|
+
const v = procBucket.get(lower);
|
|
704
|
+
if (v !== undefined)
|
|
705
|
+
return v;
|
|
706
|
+
}
|
|
707
|
+
const moduleBucket = this.localVarTypeMap.get('module');
|
|
708
|
+
return moduleBucket?.get(lower);
|
|
709
|
+
}
|
|
710
|
+
/**
|
|
711
|
+
* Issue #205: shared writer for the procedure-scoped
|
|
712
|
+
* `localVarTypeMap`. `scopeKey` is `'module'` for module-level
|
|
713
|
+
* `Dim`s, or the procedure's `startLine` (stringified) for
|
|
714
|
+
* proc-local `Dim`s — the same shape the dims classifier uses for
|
|
715
|
+
* `currentVarTypeProcKey`. Creates the bucket lazily. Returns the
|
|
716
|
+
* bucket the entry was written to (mostly useful for tests).
|
|
717
|
+
*/
|
|
718
|
+
/**
|
|
719
|
+
* Issue #251: record `name` as declared by the procedure `procKey`
|
|
720
|
+
* (`'module'` is accepted and simply ignored — a module-level
|
|
721
|
+
* declaration shadows nothing). Creates the bucket lazily.
|
|
722
|
+
*/
|
|
723
|
+
declareProcLocalName(procKey, name) {
|
|
724
|
+
if (procKey === 'module' || !name)
|
|
725
|
+
return;
|
|
726
|
+
let bucket = this.procLocalNames.get(procKey);
|
|
727
|
+
if (!bucket) {
|
|
728
|
+
bucket = new Set();
|
|
729
|
+
this.procLocalNames.set(procKey, bucket);
|
|
730
|
+
}
|
|
731
|
+
bucket.add(name.toLowerCase());
|
|
732
|
+
}
|
|
733
|
+
setLocalVarTypeInScope(scopeKey, name, entry) {
|
|
734
|
+
let bucket = this.localVarTypeMap.get(scopeKey);
|
|
735
|
+
if (!bucket) {
|
|
736
|
+
bucket = new Map();
|
|
737
|
+
this.localVarTypeMap.set(scopeKey, bucket);
|
|
738
|
+
}
|
|
739
|
+
bucket.set(name.toLowerCase(), entry);
|
|
740
|
+
return bucket;
|
|
741
|
+
}
|
|
446
742
|
}
|
|
447
743
|
exports.VbaExtractorContext = VbaExtractorContext;
|
|
448
744
|
//# sourceMappingURL=context.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../../src/extraction/vba/context.ts"],"names":[],"mappings":";;;AAmBA,gEAAwD;AACxD,2CAA8C;AAgD9C,MAAa,mBAAmB;IACvB,QAAQ,CAAS;IACjB,KAAK,GAAW,EAAE,CAAC;IACnB,KAAK,GAAW,EAAE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7C,CAAC;QACD,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE,KAAK,CAAC,CAAC;QACtC,OAAO,MAAM,CAAC;IAChB,CAAC;CACF;AA/zBD,kDA+zBC"}
|
|
@@ -5,6 +5,23 @@
|
|
|
5
5
|
* node) the resolver later binds to the form's controls.
|
|
6
6
|
*/
|
|
7
7
|
import { VbaExtractorContext, ProcInfo } from './context';
|
|
8
|
+
/**
|
|
9
|
+
* Issue #211: shared direct-assignment predicate. The same-line rule
|
|
10
|
+
* the third branch (`control` for non-builtin Me.<Ctl>) already uses is
|
|
11
|
+
* the right shape — `before` must be empty (or whitespace) AND `after`
|
|
12
|
+
* must start with `=` — and lifts cleanly into the `builtIn` and bang
|
|
13
|
+
* branches too. Returning `true` means the match IS the LHS of an
|
|
14
|
+
* assignment (`Me.X = ...`), so callers should tag it `*-set`. Any
|
|
15
|
+
* other shape (e.g. `If Me.X = ...`, `MsgBox Me.X`, `x = Me.X`) is a
|
|
16
|
+
* read and must tag `*-get`. The function is intentionally narrow; a
|
|
17
|
+
* cross-line assignment is out of scope (matches the prior comment).
|
|
18
|
+
*
|
|
19
|
+
* Issue #251: exported so the module-level variable sweep
|
|
20
|
+
* (`module-vars.ts`) reads `gblConn = Nothing` as a write and
|
|
21
|
+
* `x = gblConn` as a read through the SAME predicate. There must only
|
|
22
|
+
* ever be one direct-assignment rule in the VBA extractor.
|
|
23
|
+
*/
|
|
24
|
+
export declare function isDirectAssignment(before: string, after: string): boolean;
|
|
8
25
|
/**
|
|
9
26
|
* Hueco 1: scan a line for `Me.<ControlName>` / `Me!<ControlName>`
|
|
10
27
|
* patterns and emit one UnresolvedReference per occurrence, tagged
|
|
@@ -37,5 +54,5 @@ export declare function scanMeControlReferences(ctx: VbaExtractorContext, line:
|
|
|
37
54
|
* (`Forms!FormX!Ctl = value`) is rare; round-3 emits `'bang-get'`
|
|
38
55
|
* uniformly and the resolvers do not care about access direction here.
|
|
39
56
|
*/
|
|
40
|
-
export declare function scanFormsBang(ctx: VbaExtractorContext, line: string, from: ProcInfo, lineNum: number): void;
|
|
57
|
+
export declare function scanFormsBang(ctx: VbaExtractorContext, line: string, maskedLine: string, from: ProcInfo, lineNum: number): void;
|
|
41
58
|
//# sourceMappingURL=controls.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"controls.d.ts","sourceRoot":"","sources":["../../../src/extraction/vba/controls.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,mBAAmB,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"controls.d.ts","sourceRoot":"","sources":["../../../src/extraction/vba/controls.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,mBAAmB,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAkB1D;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAEzE;AAqFD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,uBAAuB,CACrC,GAAG,EAAE,mBAAmB,EACxB,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,QAAQ,EACd,OAAO,EAAE,MAAM,GACd,IAAI,CA4GN;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,aAAa,CAC3B,GAAG,EAAE,mBAAmB,EACxB,IAAI,EAAE,MAAM,EACZ,UAAU,EAAE,MAAM,EAClB,IAAI,EAAE,QAAQ,EACd,OAAO,EAAE,MAAM,GACd,IAAI,CA+BN"}
|