@aroman22/codegraph-vba 1.5.0 → 1.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/db/queries.d.ts
CHANGED
|
@@ -251,6 +251,17 @@ export declare class QueryBuilder {
|
|
|
251
251
|
* about the target symbol.
|
|
252
252
|
*/
|
|
253
253
|
getVbaCallStubs(): Node[];
|
|
254
|
+
/**
|
|
255
|
+
* Find VBA reference-stub candidate nodes for `resolveVbaReferenceStubs`
|
|
256
|
+
* (issue #78).
|
|
257
|
+
*
|
|
258
|
+
* A VBA reference-stub is a `class` node whose `metadata.synthesizedBy`
|
|
259
|
+
* starts with `vba-` and is targeted by a `references` edge from a VBA
|
|
260
|
+
* module. These synthetic nodes are created by the extractor for
|
|
261
|
+
* cross-file type references (`Dim x As MyEnum`) but may not have been
|
|
262
|
+
* resolved to the real type node during the main resolution pass.
|
|
263
|
+
*/
|
|
264
|
+
getVbaReferenceStubs(): Node[];
|
|
254
265
|
/**
|
|
255
266
|
* Repoint an edge's `target` + `metadata` in place, leaving all other
|
|
256
267
|
* columns (source, kind, line, col, provenance) untouched. Used by
|
|
@@ -538,6 +538,14 @@ export declare class VbaExtractor {
|
|
|
538
538
|
* caller that forgets.
|
|
539
539
|
*/
|
|
540
540
|
private isLocalProjectClassVar;
|
|
541
|
+
/**
|
|
542
|
+
* Qualified-call eligibility is intentionally shared by paren-form
|
|
543
|
+
* (`Receiver.Member(...)`) and statement-form (`Receiver.Member args`) scans:
|
|
544
|
+
* project-class locals are processed after type resolution, declared
|
|
545
|
+
* primitive/external locals are silent, and undeclared receivers remain
|
|
546
|
+
* candidate module names.
|
|
547
|
+
*/
|
|
548
|
+
private shouldProcessQualifiedCall;
|
|
541
549
|
/**
|
|
542
550
|
* #12a: resolve the "receiver type" used to build a qualified call-stub's
|
|
543
551
|
* name/qualifiedName. When `receiverName` is a file-local variable typed
|
|
@@ -895,10 +903,11 @@ export declare class VbaExtractor {
|
|
|
895
903
|
*/
|
|
896
904
|
private sweepTempVars;
|
|
897
905
|
/**
|
|
898
|
-
*
|
|
899
|
-
* Built by `sweepDimsAndWithEvents`; consulted by
|
|
900
|
-
*
|
|
901
|
-
*
|
|
906
|
+
* Maps `variableName.toLowerCase()` → declared type info.
|
|
907
|
+
* Built by `sweepDimsAndWithEvents`; consulted by the unified qualified-call
|
|
908
|
+
* gate (`shouldProcessQualifiedCall`) so declared project-class locals emit
|
|
909
|
+
* edges, declared primitive/external locals stay silent, and undeclared
|
|
910
|
+
* receivers remain module-name candidates for the resolver (Fix 2 / Issue #2).
|
|
902
911
|
*/
|
|
903
912
|
private localVarTypeMap;
|
|
904
913
|
/**
|
|
@@ -204,6 +204,27 @@ export declare class ReferenceResolver {
|
|
|
204
204
|
* no new stubs is a no-op.
|
|
205
205
|
*/
|
|
206
206
|
resolveVbaCallStubs(): number;
|
|
207
|
+
/**
|
|
208
|
+
* VBA #78 — post-extraction resolver pass for `references` edges that
|
|
209
|
+
* target synthetic `class` nodes created by the extractor for cross-file
|
|
210
|
+
* type references (`Dim x As MyEnum`, `Set x = New Foo`).
|
|
211
|
+
*
|
|
212
|
+
* The extractor creates a synthetic `class` node keyed on
|
|
213
|
+
* `(filePath, 'class', name, 0)` in the REFERENCING file. When the real
|
|
214
|
+
* type lives in a different file (e.g. `enum MyEnum` in `Module1.bas`),
|
|
215
|
+
* the `references` edge points to the synthetic stub instead of the real
|
|
216
|
+
* type node. This method repoints those edges to the real type node when
|
|
217
|
+
* uniquely resolvable by name + kind, then deletes the synthetic stub.
|
|
218
|
+
*
|
|
219
|
+
* Resolution strategy: for each VBA `class` stub, find all real project
|
|
220
|
+
* nodes with the same `name` whose `kind` is one of the type-like kinds
|
|
221
|
+
* (enum, class, interface, struct, type_alias). Exactly one match →
|
|
222
|
+
* repoint; zero or 2+ → decline (leave the stub as-is).
|
|
223
|
+
*
|
|
224
|
+
* Duplicate `(source, target, 'references')` rows after repointing are
|
|
225
|
+
* collapsed the same way `resolveVbaCallStubs` handles F1 duplicates.
|
|
226
|
+
*/
|
|
227
|
+
resolveVbaReferenceStubs(): number;
|
|
207
228
|
/**
|
|
208
229
|
* Resolve a single VBA call-stub node to its real target, or `null` when
|
|
209
230
|
* unresolvable/ambiguous. See `resolveVbaCallStubs` for the two-step
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aroman22/codegraph-vba",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.2",
|
|
4
4
|
"description": "Local-first code intelligence for AI agents (MCP). Self-contained — bundles its own runtime.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"codegraph-vba": "npm-shim.js"
|
|
@@ -15,12 +15,12 @@
|
|
|
15
15
|
"./package.json": "./package.json"
|
|
16
16
|
},
|
|
17
17
|
"optionalDependencies": {
|
|
18
|
-
"@aroman22/codegraph-vba-darwin-arm64": "1.5.
|
|
19
|
-
"@aroman22/codegraph-vba-darwin-x64": "1.5.
|
|
20
|
-
"@aroman22/codegraph-vba-linux-arm64": "1.5.
|
|
21
|
-
"@aroman22/codegraph-vba-linux-x64": "1.5.
|
|
22
|
-
"@aroman22/codegraph-vba-win32-arm64": "1.5.
|
|
23
|
-
"@aroman22/codegraph-vba-win32-x64": "1.5.
|
|
18
|
+
"@aroman22/codegraph-vba-darwin-arm64": "1.5.2",
|
|
19
|
+
"@aroman22/codegraph-vba-darwin-x64": "1.5.2",
|
|
20
|
+
"@aroman22/codegraph-vba-linux-arm64": "1.5.2",
|
|
21
|
+
"@aroman22/codegraph-vba-linux-x64": "1.5.2",
|
|
22
|
+
"@aroman22/codegraph-vba-win32-arm64": "1.5.2",
|
|
23
|
+
"@aroman22/codegraph-vba-win32-x64": "1.5.2"
|
|
24
24
|
},
|
|
25
25
|
"files": [
|
|
26
26
|
"npm-shim.js",
|