@aroman22/codegraph-vba-darwin-arm64 1.6.1 → 1.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/dist/db/migrations.d.ts +1 -1
- package/lib/dist/db/migrations.d.ts.map +1 -1
- package/lib/dist/db/migrations.js +14 -1
- package/lib/dist/db/migrations.js.map +1 -1
- package/lib/dist/db/queries.d.ts.map +1 -1
- package/lib/dist/db/queries.js +8 -2
- package/lib/dist/db/queries.js.map +1 -1
- package/lib/dist/db/schema.sql +1 -0
- package/lib/dist/extraction/grammars.d.ts +32 -0
- package/lib/dist/extraction/grammars.d.ts.map +1 -1
- package/lib/dist/extraction/grammars.js +61 -0
- package/lib/dist/extraction/grammars.js.map +1 -1
- package/lib/dist/extraction/tree-sitter.d.ts.map +1 -1
- package/lib/dist/extraction/tree-sitter.js +24 -0
- package/lib/dist/extraction/tree-sitter.js.map +1 -1
- package/lib/dist/extraction/vba/call-sweep.d.ts +13 -1
- package/lib/dist/extraction/vba/call-sweep.d.ts.map +1 -1
- package/lib/dist/extraction/vba/call-sweep.js +229 -151
- package/lib/dist/extraction/vba/call-sweep.js.map +1 -1
- package/lib/dist/extraction/vba/context.d.ts +52 -2
- package/lib/dist/extraction/vba/context.d.ts.map +1 -1
- package/lib/dist/extraction/vba/context.js +29 -2
- package/lib/dist/extraction/vba/context.js.map +1 -1
- package/lib/dist/extraction/vba/declarations.d.ts +10 -1
- package/lib/dist/extraction/vba/declarations.d.ts.map +1 -1
- package/lib/dist/extraction/vba/declarations.js +141 -123
- package/lib/dist/extraction/vba/declarations.js.map +1 -1
- package/lib/dist/extraction/vba/dims.d.ts +9 -1
- package/lib/dist/extraction/vba/dims.d.ts.map +1 -1
- package/lib/dist/extraction/vba/dims.js +125 -109
- package/lib/dist/extraction/vba/dims.js.map +1 -1
- package/lib/dist/extraction/vba/enums-consts.d.ts +13 -10
- package/lib/dist/extraction/vba/enums-consts.d.ts.map +1 -1
- package/lib/dist/extraction/vba/enums-consts.js +153 -131
- package/lib/dist/extraction/vba/enums-consts.js.map +1 -1
- package/lib/dist/extraction/vba/implements.d.ts +9 -1
- package/lib/dist/extraction/vba/implements.d.ts.map +1 -1
- package/lib/dist/extraction/vba/implements.js +56 -40
- package/lib/dist/extraction/vba/implements.js.map +1 -1
- package/lib/dist/extraction/vba/procedures.d.ts +13 -1
- package/lib/dist/extraction/vba/procedures.d.ts.map +1 -1
- package/lib/dist/extraction/vba/procedures.js +238 -186
- package/lib/dist/extraction/vba/procedures.js.map +1 -1
- package/lib/dist/extraction/vba/sql-wrapper.d.ts.map +1 -1
- package/lib/dist/extraction/vba/sql-wrapper.js +20 -3
- package/lib/dist/extraction/vba/sql-wrapper.js.map +1 -1
- package/lib/dist/extraction/vba-extractor.d.ts.map +1 -1
- package/lib/dist/extraction/vba-extractor.js +47 -38
- package/lib/dist/extraction/vba-extractor.js.map +1 -1
- package/lib/dist/extraction/vba-form-extractor.d.ts.map +1 -1
- package/lib/dist/extraction/vba-form-extractor.js +6 -1
- package/lib/dist/extraction/vba-form-extractor.js.map +1 -1
- package/lib/dist/extraction/vba-preprocess.d.ts.map +1 -1
- package/lib/dist/extraction/vba-preprocess.js +23 -2
- package/lib/dist/extraction/vba-preprocess.js.map +1 -1
- package/lib/dist/extraction/vba-test-manifest-extractor.d.ts +26 -0
- package/lib/dist/extraction/vba-test-manifest-extractor.d.ts.map +1 -0
- package/lib/dist/extraction/vba-test-manifest-extractor.js +173 -0
- package/lib/dist/extraction/vba-test-manifest-extractor.js.map +1 -0
- package/lib/dist/extraction/vba-test-sequence-extractor.d.ts +29 -0
- package/lib/dist/extraction/vba-test-sequence-extractor.d.ts.map +1 -0
- package/lib/dist/extraction/vba-test-sequence-extractor.js +180 -0
- package/lib/dist/extraction/vba-test-sequence-extractor.js.map +1 -0
- package/lib/dist/installer/index.js +2 -2
- package/lib/dist/mcp/server-instructions.d.ts +1 -1
- package/lib/dist/mcp/server-instructions.d.ts.map +1 -1
- package/lib/dist/mcp/server-instructions.js +5 -0
- package/lib/dist/mcp/server-instructions.js.map +1 -1
- package/lib/dist/resolution/index.d.ts.map +1 -1
- package/lib/dist/resolution/index.js +30 -0
- package/lib/dist/resolution/index.js.map +1 -1
- package/lib/dist/resolution/types.d.ts +7 -0
- package/lib/dist/resolution/types.d.ts.map +1 -1
- package/lib/dist/upgrade/index.d.ts +1 -1
- package/lib/dist/upgrade/index.d.ts.map +1 -1
- package/lib/dist/upgrade/index.js +1 -1
- package/lib/dist/upgrade/index.js.map +1 -1
- package/lib/node_modules/.modules.yaml +1 -1
- package/lib/node_modules/.pnpm/lock.yaml +4 -0
- package/lib/node_modules/.pnpm-workspace-state-v1.json +1 -1
- package/lib/package.json +8 -2
- package/package.json +1 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createDimsClassifier = createDimsClassifier;
|
|
3
4
|
exports.sweepDimsAndWithEvents = sweepDimsAndWithEvents;
|
|
4
5
|
const tree_sitter_helpers_1 = require("../tree-sitter-helpers");
|
|
5
6
|
const constants_1 = require("./constants");
|
|
@@ -62,125 +63,140 @@ const DIM_ALL_VARS_RE = /\b(\p{L}[\p{L}\p{N}_]*)\s+As\s+(?:New\s+)?(?:\[([^\]]+)
|
|
|
62
63
|
const BARE_DIM_VAR_RE = /^\s*(?:Dim|Private|Public|Global|Static)\s+(\p{L}[\p{L}\p{N}_]*)\s*(?:,|$|\b)/iu;
|
|
63
64
|
/** `WithEvents m_X As Form_Foo` — Dim/Private/Public/Global/Static prefix is optional. */
|
|
64
65
|
const WITHEVENTS_RE = /^\s*(?:(?:Dim|Private|Public|Global|Static)\s+)?WithEvents\s+\p{L}[\p{L}\p{N}_]*\s+As\s+(\p{L}[\p{L}\p{N}_]*)/iu;
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
if (
|
|
100
|
-
|
|
101
|
-
|
|
66
|
+
/**
|
|
67
|
+
* Issue #83: factory for the Dim / WithEvents classifier. Stateless per-line.
|
|
68
|
+
*/
|
|
69
|
+
function createDimsClassifier() {
|
|
70
|
+
return {
|
|
71
|
+
name: 'dims',
|
|
72
|
+
count: 0,
|
|
73
|
+
classifyLine(line, i, ctx) {
|
|
74
|
+
const lineNum = i + 1;
|
|
75
|
+
// Fix 1 + Fix 3 (Issues #1, #3): replace the old single-match
|
|
76
|
+
// DIM_QUAL_RE / DIM_UNQUAL_RE pair with a global scan that handles
|
|
77
|
+
// `As New <Type>`, multi-variable `Dim a As Foo, b As Bar`, and
|
|
78
|
+
// qualified `Dim x As Foo.Bar` in a single pass.
|
|
79
|
+
if (DIM_DECL_PREFIX_RE.test(line)) {
|
|
80
|
+
DIM_ALL_VARS_RE.lastIndex = 0;
|
|
81
|
+
let m;
|
|
82
|
+
while ((m = DIM_ALL_VARS_RE.exec(line)) !== null) {
|
|
83
|
+
const varName = m[1] ?? '';
|
|
84
|
+
// Issue #54: DIM_ALL_VARS_RE groups (2) and (3) are alternative
|
|
85
|
+
// captures for the same outer-type position — the bracketed
|
|
86
|
+
// alternative wins when present, the bare one otherwise. The
|
|
87
|
+
// captured value is already unwrapped (the `[...]` is consumed
|
|
88
|
+
// by the regex, group (2) holds the inner content). Same shape
|
|
89
|
+
// for the inner type at groups (4)/(5).
|
|
90
|
+
const outerType = m[2] ?? m[3] ?? '';
|
|
91
|
+
const innerType = m[4] ?? m[5] ?? '';
|
|
92
|
+
// Fix 2 (Issue #2): populate the local var type map so that
|
|
93
|
+
// `sweepCallsAndSql` can gate qualified statement-form calls.
|
|
94
|
+
if (varName && outerType) {
|
|
95
|
+
ctx.localVarTypeMap.set(varName.toLowerCase(), {
|
|
96
|
+
outer: outerType,
|
|
97
|
+
qualified: !!innerType,
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
if (innerType) {
|
|
101
|
+
// Qualified form (`Dim x As Foo.Bar`) — emit reference to the
|
|
102
|
+
// outer type `Foo` (same behaviour as the old DIM_QUAL_RE path).
|
|
103
|
+
if (outerType) {
|
|
104
|
+
ctx.emitReference(outerType, lineNum, 0, 'vba-name-resolution');
|
|
105
|
+
this.count++;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
else {
|
|
109
|
+
// Unqualified form (`Dim x As SomeType`, `Dim x As New SomeType`)
|
|
110
|
+
// — emit reference only when the type is not a primitive or keyword.
|
|
111
|
+
if (outerType && !constants_1.PRIMITIVE_TYPES.has(outerType.toLowerCase())) {
|
|
112
|
+
ctx.emitReference(outerType, lineNum, 0, 'vba-name-resolution');
|
|
113
|
+
this.count++;
|
|
114
|
+
}
|
|
102
115
|
}
|
|
103
116
|
}
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
117
|
+
// Antigravity audit Task 3: bare `Dim x` (no `As` clause) and
|
|
118
|
+
// explicit-primitive `Dim x As <primitive>` declarations must
|
|
119
|
+
// still register `x` in `localVarTypeMap` so the qualified-call
|
|
120
|
+
// site scan in `scanCallSites` can gate the dead-end stub that
|
|
121
|
+
// no resolver could ever repoint.
|
|
122
|
+
//
|
|
123
|
+
// Captures the FIRST variable name only. Multi-variable bare
|
|
124
|
+
// Dim (e.g. `Dim a, b, c` without an `As` clause) is rare in
|
|
125
|
+
// real Dysflow fixtures and is intentionally NOT tracked here —
|
|
126
|
+
// those bare variables fall back to the undeclared-receiver
|
|
127
|
+
// path, which is the conservative choice. Skip if the typed-form
|
|
128
|
+
// loop already populated the entry.
|
|
129
|
+
const bm = BARE_DIM_VAR_RE.exec(line);
|
|
130
|
+
if (bm) {
|
|
131
|
+
const varName = bm[1] ?? '';
|
|
132
|
+
if (varName) {
|
|
133
|
+
const key = varName.toLowerCase();
|
|
134
|
+
if (!ctx.localVarTypeMap.has(key)) {
|
|
135
|
+
// Look for an `As <Type>` continuation on the same line so the
|
|
136
|
+
// outer type matches the existing typed-form behaviour. If
|
|
137
|
+
// absent, the variable is implicit `Variant` per VBA semantics.
|
|
138
|
+
const asRe = /\bAs\s+(\p{L}[\p{L}\p{N}_]*)/iu;
|
|
139
|
+
const asMatch = asRe.exec(line);
|
|
140
|
+
const outer = asMatch ? (asMatch[1] ?? '').toLowerCase() : 'variant';
|
|
141
|
+
ctx.localVarTypeMap.set(key, {
|
|
142
|
+
outer,
|
|
143
|
+
qualified: false,
|
|
144
|
+
});
|
|
145
|
+
}
|
|
110
146
|
}
|
|
111
147
|
}
|
|
112
148
|
}
|
|
113
|
-
//
|
|
114
|
-
//
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
const bm = BARE_DIM_VAR_RE.exec(line);
|
|
126
|
-
if (bm) {
|
|
127
|
-
const varName = bm[1] ?? '';
|
|
128
|
-
if (varName) {
|
|
129
|
-
const key = varName.toLowerCase();
|
|
130
|
-
if (!ctx.localVarTypeMap.has(key)) {
|
|
131
|
-
// Look for an `As <Type>` continuation on the same line so the
|
|
132
|
-
// outer type matches the existing typed-form behaviour. If
|
|
133
|
-
// absent, the variable is implicit `Variant` per VBA semantics.
|
|
134
|
-
const asRe = /\bAs\s+(\p{L}[\p{L}\p{N}_]*)/iu;
|
|
135
|
-
const asMatch = asRe.exec(line);
|
|
136
|
-
const outer = asMatch ? (asMatch[1] ?? '').toLowerCase() : 'variant';
|
|
137
|
-
ctx.localVarTypeMap.set(key, {
|
|
138
|
-
outer,
|
|
149
|
+
// WithEvents declarations — handled by their own regex; also populate
|
|
150
|
+
// the local var type map for completeness.
|
|
151
|
+
const weMatch = WITHEVENTS_RE.exec(line);
|
|
152
|
+
if (weMatch) {
|
|
153
|
+
const formType = weMatch[1] ?? '';
|
|
154
|
+
if (formType) {
|
|
155
|
+
// Extract the variable name from the WithEvents line for the map.
|
|
156
|
+
const weVarM = /^\s*(?:(?:Dim|Private|Public|Global|Static)\s+)?WithEvents\s+(\p{L}[\p{L}\p{N}_]*)/iu.exec(line);
|
|
157
|
+
const weVarName = weVarM?.[1] ?? '';
|
|
158
|
+
if (weVarName) {
|
|
159
|
+
ctx.localVarTypeMap.set(weVarName.toLowerCase(), {
|
|
160
|
+
outer: formType,
|
|
139
161
|
qualified: false,
|
|
162
|
+
withEvents: true,
|
|
163
|
+
variableName: weVarName,
|
|
140
164
|
});
|
|
141
165
|
}
|
|
166
|
+
ctx.emitReference(formType, lineNum, 0, 'vba-withevents');
|
|
167
|
+
const targetId = (0, tree_sitter_helpers_1.generateNodeId)(ctx.filePath, 'class', formType, 0);
|
|
168
|
+
const subscriberEdge = {
|
|
169
|
+
source: ctx.moduleOrClassNode?.id ?? '',
|
|
170
|
+
target: targetId,
|
|
171
|
+
kind: 'subscribes-event',
|
|
172
|
+
provenance: 'heuristic',
|
|
173
|
+
metadata: {
|
|
174
|
+
synthesizedBy: 'vba-withevents',
|
|
175
|
+
variableName: weVarName || undefined,
|
|
176
|
+
},
|
|
177
|
+
line: lineNum,
|
|
178
|
+
column: 0,
|
|
179
|
+
};
|
|
180
|
+
ctx.edges.push(subscriberEdge);
|
|
181
|
+
if (!ctx.moduleOrClassNode) {
|
|
182
|
+
ctx.pendingModuleOrClassSource.push(subscriberEdge);
|
|
183
|
+
}
|
|
184
|
+
this.count++;
|
|
142
185
|
}
|
|
143
186
|
}
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
outer: formType,
|
|
157
|
-
qualified: false,
|
|
158
|
-
withEvents: true,
|
|
159
|
-
variableName: weVarName,
|
|
160
|
-
});
|
|
161
|
-
}
|
|
162
|
-
ctx.emitReference(formType, lineNum, 0, 'vba-withevents');
|
|
163
|
-
const targetId = (0, tree_sitter_helpers_1.generateNodeId)(ctx.filePath, 'class', formType, 0);
|
|
164
|
-
const subscriberEdge = {
|
|
165
|
-
source: ctx.moduleOrClassNode?.id ?? '',
|
|
166
|
-
target: targetId,
|
|
167
|
-
kind: 'subscribes-event',
|
|
168
|
-
provenance: 'heuristic',
|
|
169
|
-
metadata: {
|
|
170
|
-
synthesizedBy: 'vba-withevents',
|
|
171
|
-
variableName: weVarName || undefined,
|
|
172
|
-
},
|
|
173
|
-
line: lineNum,
|
|
174
|
-
column: 0,
|
|
175
|
-
};
|
|
176
|
-
ctx.edges.push(subscriberEdge);
|
|
177
|
-
if (!ctx.moduleOrClassNode) {
|
|
178
|
-
ctx.pendingModuleOrClassSource.push(subscriberEdge);
|
|
179
|
-
}
|
|
180
|
-
count++;
|
|
181
|
-
}
|
|
182
|
-
}
|
|
187
|
+
},
|
|
188
|
+
};
|
|
189
|
+
}
|
|
190
|
+
/**
|
|
191
|
+
* Backward-compat wrapper (see procedures.ts). Returns the classifier's
|
|
192
|
+
* `count` so the orchestrator can decide `hasAnySymbols`.
|
|
193
|
+
*/
|
|
194
|
+
function sweepDimsAndWithEvents(ctx, src) {
|
|
195
|
+
const cls = createDimsClassifier();
|
|
196
|
+
const lines = src.split('\n');
|
|
197
|
+
for (let i = 0; i < lines.length; i++) {
|
|
198
|
+
cls.classifyLine(lines[i] ?? '', i, ctx);
|
|
183
199
|
}
|
|
184
|
-
return count;
|
|
200
|
+
return cls.count;
|
|
185
201
|
}
|
|
186
202
|
//# sourceMappingURL=dims.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dims.js","sourceRoot":"","sources":["../../../src/extraction/vba/dims.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"dims.js","sourceRoot":"","sources":["../../../src/extraction/vba/dims.ts"],"names":[],"mappings":";;AAiFA,oDA4HC;AAMD,wDAOC;AAnND,gEAAwD;AACxD,2CAA8C;AAG9C;;;;;;;;;;;;GAYG;AACH,MAAM,kBAAkB,GACtB,8FAA8F,CAAC;AAEjG;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,eAAe,GACnB,kIAAkI,CAAC;AAErI;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,eAAe,GACnB,iFAAiF,CAAC;AAEpF,0FAA0F;AAC1F,MAAM,aAAa,GACjB,iHAAiH,CAAC;AAEpH;;GAEG;AACH,SAAgB,oBAAoB;IAClC,OAAO;QACL,IAAI,EAAE,MAAM;QACZ,KAAK,EAAE,CAAC;QACR,YAAY,CAAC,IAAI,EAAE,CAAC,EAAE,GAAG;YACvB,MAAM,OAAO,GAAG,CAAC,GAAG,CAAC,CAAC;YAEtB,8DAA8D;YAC9D,mEAAmE;YACnE,gEAAgE;YAChE,iDAAiD;YACjD,IAAI,kBAAkB,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;gBAClC,eAAe,CAAC,SAAS,GAAG,CAAC,CAAC;gBAC9B,IAAI,CAAyB,CAAC;gBAC9B,OAAO,CAAC,CAAC,GAAG,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC;oBACjD,MAAM,OAAO,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;oBAC3B,gEAAgE;oBAChE,4DAA4D;oBAC5D,6DAA6D;oBAC7D,+DAA+D;oBAC/D,+DAA+D;oBAC/D,wCAAwC;o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Y,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,EAAE,GAAG,CAAC,CAAC;IAC3C,CAAC;IACD,OAAO,GAAG,CAAC,KAAK,CAAC;AACnB,CAAC"}
|
|
@@ -1,15 +1,18 @@
|
|
|
1
|
-
import { VbaExtractorContext } from './context';
|
|
1
|
+
import { VbaExtractorContext, VbaClassifier } from './context';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
* per member and a `contains` edge enum→member;
|
|
6
|
-
* - one `constant` node per name declared on a `Const` line (multi-name
|
|
7
|
-
* lines emit one node per name);
|
|
8
|
-
* - a `contains` edge from the module/class node to each enum and constant
|
|
9
|
-
* (held in `pendingModuleOrClassSource` until the module node exists).
|
|
3
|
+
* Issue #83: factory for the enum / const classifier. Closure state:
|
|
4
|
+
* `currentEnum` (open `Enum ... End Enum` block).
|
|
10
5
|
*
|
|
11
|
-
*
|
|
12
|
-
* the
|
|
6
|
+
* Also resets + advances the SHARED `ctx.procStack`/`ctx.currentProcKey`
|
|
7
|
+
* per line — same protocol the pre-#83 sweep followed. The calls-sql
|
|
8
|
+
* classifier runs AFTER this one in the per-line dispatch order and
|
|
9
|
+
* applies the same protocol, so the end-of-line scope state is identical
|
|
10
|
+
* to the legacy sequential-sweep behaviour.
|
|
11
|
+
*/
|
|
12
|
+
export declare function createEnumsConstsClassifier(): VbaClassifier;
|
|
13
|
+
/**
|
|
14
|
+
* Backward-compat wrapper (see procedures.ts). Returns the classifier's
|
|
15
|
+
* `count` so the orchestrator can decide `hasAnySymbols`.
|
|
13
16
|
*/
|
|
14
17
|
export declare function sweepEnumsAndConsts(ctx: VbaExtractorContext, src: string): number;
|
|
15
18
|
//# sourceMappingURL=enums-consts.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enums-consts.d.ts","sourceRoot":"","sources":["../../../src/extraction/vba/enums-consts.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"enums-consts.d.ts","sourceRoot":"","sources":["../../../src/extraction/vba/enums-consts.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,mBAAmB,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAqB/D;;;;;;;;;GASG;AACH,wBAAgB,2BAA2B,IAAI,aAAa,CAiK3D;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,mBAAmB,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAOjF"}
|