@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.
Files changed (213) hide show
  1. package/lib/dist/bin/codegraph.js +13 -7
  2. package/lib/dist/bin/codegraph.js.map +1 -1
  3. package/lib/dist/bin/daemon-release.d.ts +7 -0
  4. package/lib/dist/bin/daemon-release.d.ts.map +1 -0
  5. package/lib/dist/bin/daemon-release.js +18 -0
  6. package/lib/dist/bin/daemon-release.js.map +1 -0
  7. package/lib/dist/db/queries.d.ts +30 -0
  8. package/lib/dist/db/queries.d.ts.map +1 -1
  9. package/lib/dist/db/queries.js +51 -1
  10. package/lib/dist/db/queries.js.map +1 -1
  11. package/lib/dist/extraction/access-erd-extractor.d.ts +57 -0
  12. package/lib/dist/extraction/access-erd-extractor.d.ts.map +1 -0
  13. package/lib/dist/extraction/access-erd-extractor.js +389 -0
  14. package/lib/dist/extraction/access-erd-extractor.js.map +1 -0
  15. package/lib/dist/extraction/extraction-version.d.ts +1 -1
  16. package/lib/dist/extraction/extraction-version.js +1 -1
  17. package/lib/dist/extraction/grammars.d.ts +20 -0
  18. package/lib/dist/extraction/grammars.d.ts.map +1 -1
  19. package/lib/dist/extraction/grammars.js +34 -0
  20. package/lib/dist/extraction/grammars.js.map +1 -1
  21. package/lib/dist/extraction/index.d.ts +1 -0
  22. package/lib/dist/extraction/index.d.ts.map +1 -1
  23. package/lib/dist/extraction/index.js +371 -351
  24. package/lib/dist/extraction/index.js.map +1 -1
  25. package/lib/dist/extraction/parse-pool.d.ts +8 -3
  26. package/lib/dist/extraction/parse-pool.d.ts.map +1 -1
  27. package/lib/dist/extraction/parse-pool.js +1 -2
  28. package/lib/dist/extraction/parse-pool.js.map +1 -1
  29. package/lib/dist/extraction/parse-worker.js +7 -6
  30. package/lib/dist/extraction/parse-worker.js.map +1 -1
  31. package/lib/dist/extraction/sql-query-extractor.d.ts +16 -14
  32. package/lib/dist/extraction/sql-query-extractor.d.ts.map +1 -1
  33. package/lib/dist/extraction/sql-query-extractor.js +43 -31
  34. package/lib/dist/extraction/sql-query-extractor.js.map +1 -1
  35. package/lib/dist/extraction/sql-table-scan.d.ts +184 -0
  36. package/lib/dist/extraction/sql-table-scan.d.ts.map +1 -0
  37. package/lib/dist/extraction/sql-table-scan.js +288 -0
  38. package/lib/dist/extraction/sql-table-scan.js.map +1 -0
  39. package/lib/dist/extraction/tree-sitter.d.ts +10 -1
  40. package/lib/dist/extraction/tree-sitter.d.ts.map +1 -1
  41. package/lib/dist/extraction/tree-sitter.js +34 -3
  42. package/lib/dist/extraction/tree-sitter.js.map +1 -1
  43. package/lib/dist/extraction/vba/call-sweep.d.ts +2 -7
  44. package/lib/dist/extraction/vba/call-sweep.d.ts.map +1 -1
  45. package/lib/dist/extraction/vba/call-sweep.js +144 -90
  46. package/lib/dist/extraction/vba/call-sweep.js.map +1 -1
  47. package/lib/dist/extraction/vba/calls.d.ts +24 -4
  48. package/lib/dist/extraction/vba/calls.d.ts.map +1 -1
  49. package/lib/dist/extraction/vba/calls.js +42 -12
  50. package/lib/dist/extraction/vba/calls.js.map +1 -1
  51. package/lib/dist/extraction/vba/constants.d.ts +7 -14
  52. package/lib/dist/extraction/vba/constants.d.ts.map +1 -1
  53. package/lib/dist/extraction/vba/constants.js +8 -36
  54. package/lib/dist/extraction/vba/constants.js.map +1 -1
  55. package/lib/dist/extraction/vba/context.d.ts +443 -7
  56. package/lib/dist/extraction/vba/context.d.ts.map +1 -1
  57. package/lib/dist/extraction/vba/context.js +325 -29
  58. package/lib/dist/extraction/vba/context.js.map +1 -1
  59. package/lib/dist/extraction/vba/controls.d.ts +18 -1
  60. package/lib/dist/extraction/vba/controls.d.ts.map +1 -1
  61. package/lib/dist/extraction/vba/controls.js +99 -27
  62. package/lib/dist/extraction/vba/controls.js.map +1 -1
  63. package/lib/dist/extraction/vba/declarations.d.ts +1 -6
  64. package/lib/dist/extraction/vba/declarations.d.ts.map +1 -1
  65. package/lib/dist/extraction/vba/declarations.js +5 -39
  66. package/lib/dist/extraction/vba/declarations.js.map +1 -1
  67. package/lib/dist/extraction/vba/dims.d.ts +11 -7
  68. package/lib/dist/extraction/vba/dims.d.ts.map +1 -1
  69. package/lib/dist/extraction/vba/dims.js +265 -29
  70. package/lib/dist/extraction/vba/dims.js.map +1 -1
  71. package/lib/dist/extraction/vba/docmd.d.ts +29 -2
  72. package/lib/dist/extraction/vba/docmd.d.ts.map +1 -1
  73. package/lib/dist/extraction/vba/docmd.js +297 -18
  74. package/lib/dist/extraction/vba/docmd.js.map +1 -1
  75. package/lib/dist/extraction/vba/enums-consts.d.ts +7 -14
  76. package/lib/dist/extraction/vba/enums-consts.d.ts.map +1 -1
  77. package/lib/dist/extraction/vba/enums-consts.js +11 -45
  78. package/lib/dist/extraction/vba/enums-consts.js.map +1 -1
  79. package/lib/dist/extraction/vba/error-channel.d.ts +57 -0
  80. package/lib/dist/extraction/vba/error-channel.d.ts.map +1 -0
  81. package/lib/dist/extraction/vba/error-channel.js +128 -0
  82. package/lib/dist/extraction/vba/error-channel.js.map +1 -0
  83. package/lib/dist/extraction/vba/errors.d.ts +64 -0
  84. package/lib/dist/extraction/vba/errors.d.ts.map +1 -0
  85. package/lib/dist/extraction/vba/errors.js +775 -0
  86. package/lib/dist/extraction/vba/errors.js.map +1 -0
  87. package/lib/dist/extraction/vba/filesystem-statements.d.ts +23 -0
  88. package/lib/dist/extraction/vba/filesystem-statements.d.ts.map +1 -0
  89. package/lib/dist/extraction/vba/filesystem-statements.js +70 -0
  90. package/lib/dist/extraction/vba/filesystem-statements.js.map +1 -0
  91. package/lib/dist/extraction/vba/implements.d.ts +1 -6
  92. package/lib/dist/extraction/vba/implements.d.ts.map +1 -1
  93. package/lib/dist/extraction/vba/implements.js +1 -22
  94. package/lib/dist/extraction/vba/implements.js.map +1 -1
  95. package/lib/dist/extraction/vba/labels.d.ts +26 -0
  96. package/lib/dist/extraction/vba/labels.d.ts.map +1 -0
  97. package/lib/dist/extraction/vba/labels.js +180 -0
  98. package/lib/dist/extraction/vba/labels.js.map +1 -0
  99. package/lib/dist/extraction/vba/module-vars.d.ts +36 -0
  100. package/lib/dist/extraction/vba/module-vars.d.ts.map +1 -0
  101. package/lib/dist/extraction/vba/module-vars.js +145 -0
  102. package/lib/dist/extraction/vba/module-vars.js.map +1 -0
  103. package/lib/dist/extraction/vba/options.d.ts +88 -0
  104. package/lib/dist/extraction/vba/options.d.ts.map +1 -0
  105. package/lib/dist/extraction/vba/options.js +39 -0
  106. package/lib/dist/extraction/vba/options.js.map +1 -0
  107. package/lib/dist/extraction/vba/parameters.d.ts +35 -0
  108. package/lib/dist/extraction/vba/parameters.d.ts.map +1 -0
  109. package/lib/dist/extraction/vba/parameters.js +110 -0
  110. package/lib/dist/extraction/vba/parameters.js.map +1 -0
  111. package/lib/dist/extraction/vba/procedures.d.ts +1 -9
  112. package/lib/dist/extraction/vba/procedures.d.ts.map +1 -1
  113. package/lib/dist/extraction/vba/procedures.js +174 -112
  114. package/lib/dist/extraction/vba/procedures.js.map +1 -1
  115. package/lib/dist/extraction/vba/rules.d.ts +10 -5
  116. package/lib/dist/extraction/vba/rules.d.ts.map +1 -1
  117. package/lib/dist/extraction/vba/rules.js +19 -0
  118. package/lib/dist/extraction/vba/rules.js.map +1 -1
  119. package/lib/dist/extraction/vba/runtime-objects.d.ts +59 -0
  120. package/lib/dist/extraction/vba/runtime-objects.d.ts.map +1 -0
  121. package/lib/dist/extraction/vba/runtime-objects.js +106 -0
  122. package/lib/dist/extraction/vba/runtime-objects.js.map +1 -0
  123. package/lib/dist/extraction/vba/signature.d.ts +57 -0
  124. package/lib/dist/extraction/vba/signature.d.ts.map +1 -0
  125. package/lib/dist/extraction/vba/signature.js +164 -0
  126. package/lib/dist/extraction/vba/signature.js.map +1 -0
  127. package/lib/dist/extraction/vba/sql-wrapper.d.ts +76 -3
  128. package/lib/dist/extraction/vba/sql-wrapper.d.ts.map +1 -1
  129. package/lib/dist/extraction/vba/sql-wrapper.js +725 -151
  130. package/lib/dist/extraction/vba/sql-wrapper.js.map +1 -1
  131. package/lib/dist/extraction/vba/tempvars.d.ts.map +1 -1
  132. package/lib/dist/extraction/vba/tempvars.js +4 -0
  133. package/lib/dist/extraction/vba/tempvars.js.map +1 -1
  134. package/lib/dist/extraction/vba/text-utils.d.ts +62 -2
  135. package/lib/dist/extraction/vba/text-utils.d.ts.map +1 -1
  136. package/lib/dist/extraction/vba/text-utils.js +84 -6
  137. package/lib/dist/extraction/vba/text-utils.js.map +1 -1
  138. package/lib/dist/extraction/vba-extractor.d.ts +18 -1
  139. package/lib/dist/extraction/vba-extractor.d.ts.map +1 -1
  140. package/lib/dist/extraction/vba-extractor.js +111 -16
  141. package/lib/dist/extraction/vba-extractor.js.map +1 -1
  142. package/lib/dist/extraction/vba-form-extractor.d.ts +28 -14
  143. package/lib/dist/extraction/vba-form-extractor.d.ts.map +1 -1
  144. package/lib/dist/extraction/vba-form-extractor.js +56 -21
  145. package/lib/dist/extraction/vba-form-extractor.js.map +1 -1
  146. package/lib/dist/extraction/vba-preprocess.d.ts +89 -3
  147. package/lib/dist/extraction/vba-preprocess.d.ts.map +1 -1
  148. package/lib/dist/extraction/vba-preprocess.js +221 -57
  149. package/lib/dist/extraction/vba-preprocess.js.map +1 -1
  150. package/lib/dist/extraction/vba-source.d.ts +0 -10
  151. package/lib/dist/extraction/vba-source.d.ts.map +1 -1
  152. package/lib/dist/extraction/vba-source.js +0 -13
  153. package/lib/dist/extraction/vba-source.js.map +1 -1
  154. package/lib/dist/extraction/vba-test-manifest-extractor.d.ts +0 -6
  155. package/lib/dist/extraction/vba-test-manifest-extractor.d.ts.map +1 -1
  156. package/lib/dist/extraction/vba-test-manifest-extractor.js +0 -1
  157. package/lib/dist/extraction/vba-test-manifest-extractor.js.map +1 -1
  158. package/lib/dist/index.d.ts.map +1 -1
  159. package/lib/dist/index.js +9 -0
  160. package/lib/dist/index.js.map +1 -1
  161. package/lib/dist/mcp/daemon-manager.d.ts.map +1 -1
  162. package/lib/dist/mcp/daemon-manager.js +7 -3
  163. package/lib/dist/mcp/daemon-manager.js.map +1 -1
  164. package/lib/dist/mcp/daemon-paths.d.ts +6 -0
  165. package/lib/dist/mcp/daemon-paths.d.ts.map +1 -1
  166. package/lib/dist/mcp/daemon-paths.js +15 -0
  167. package/lib/dist/mcp/daemon-paths.js.map +1 -1
  168. package/lib/dist/mcp/daemon-registry.d.ts +82 -7
  169. package/lib/dist/mcp/daemon-registry.d.ts.map +1 -1
  170. package/lib/dist/mcp/daemon-registry.js +557 -45
  171. package/lib/dist/mcp/daemon-registry.js.map +1 -1
  172. package/lib/dist/mcp/daemon-watchdog.d.ts +12 -0
  173. package/lib/dist/mcp/daemon-watchdog.d.ts.map +1 -1
  174. package/lib/dist/mcp/daemon-watchdog.js +37 -7
  175. package/lib/dist/mcp/daemon-watchdog.js.map +1 -1
  176. package/lib/dist/mcp/daemon.d.ts +20 -1
  177. package/lib/dist/mcp/daemon.d.ts.map +1 -1
  178. package/lib/dist/mcp/daemon.js +123 -30
  179. package/lib/dist/mcp/daemon.js.map +1 -1
  180. package/lib/dist/mcp/index.d.ts.map +1 -1
  181. package/lib/dist/mcp/index.js +13 -2
  182. package/lib/dist/mcp/index.js.map +1 -1
  183. package/lib/dist/mcp/proxy.d.ts +32 -0
  184. package/lib/dist/mcp/proxy.d.ts.map +1 -1
  185. package/lib/dist/mcp/proxy.js +163 -31
  186. package/lib/dist/mcp/proxy.js.map +1 -1
  187. package/lib/dist/mcp/tools.d.ts.map +1 -1
  188. package/lib/dist/mcp/tools.js +29 -1
  189. package/lib/dist/mcp/tools.js.map +1 -1
  190. package/lib/dist/project-config.d.ts +43 -2
  191. package/lib/dist/project-config.d.ts.map +1 -1
  192. package/lib/dist/project-config.js +86 -2
  193. package/lib/dist/project-config.js.map +1 -1
  194. package/lib/dist/resolution/index.d.ts +47 -2
  195. package/lib/dist/resolution/index.d.ts.map +1 -1
  196. package/lib/dist/resolution/index.js +160 -5
  197. package/lib/dist/resolution/index.js.map +1 -1
  198. package/lib/dist/resolution/name-matcher.d.ts +25 -0
  199. package/lib/dist/resolution/name-matcher.d.ts.map +1 -1
  200. package/lib/dist/resolution/name-matcher.js +59 -0
  201. package/lib/dist/resolution/name-matcher.js.map +1 -1
  202. package/lib/dist/resolution/vba-runtime-objects.d.ts +11 -11
  203. package/lib/dist/resolution/vba-runtime-objects.d.ts.map +1 -1
  204. package/lib/dist/resolution/vba-runtime-objects.js +18 -38
  205. package/lib/dist/resolution/vba-runtime-objects.js.map +1 -1
  206. package/lib/dist/types.d.ts +13 -5
  207. package/lib/dist/types.d.ts.map +1 -1
  208. package/lib/dist/types.js +17 -0
  209. package/lib/dist/types.js.map +1 -1
  210. package/lib/node_modules/.modules.yaml +1 -1
  211. package/lib/node_modules/.pnpm-workspace-state-v1.json +1 -1
  212. package/lib/package.json +4 -1
  213. package/package.json +1 -1
@@ -0,0 +1,128 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ERROR_CHANNEL_ENTRY_RE = exports.DEFAULT_ERROR_CHANNEL_NAMES = void 0;
4
+ exports.compileErrorChannel = compileErrorChannel;
5
+ exports.defaultErrorChannel = defaultErrorChannel;
6
+ exports.isErrorChannelName = isErrorChannelName;
7
+ /**
8
+ * The error channel — the module-level variable this kind of Access codebase
9
+ * actually propagates error messages through (issue #261, task E4 of
10
+ * `docs/vba-error-handling-plan.md`).
11
+ *
12
+ * ## Why a whole module for four names
13
+ *
14
+ * §2.1/§2.3 of the plan measured it: **16 handlers out of 3,774 re-raise**.
15
+ * `Err.Raise 1000` unwinds exactly one frame and the guard
16
+ * `If Err.Number <> 1000` in the handler means *"an inner procedure already
17
+ * wrote a human-readable message — do not overwrite it"*. The MESSAGE never
18
+ * travels through VBA's error mechanism; it travels through a field:
19
+ *
20
+ * ```vba
21
+ * errores: ' inner procedure
22
+ * If Err.Number <> 1000 Then
23
+ * m_Error = "Riesgo.Guardar ha devuelto el error: " & Err.Description
24
+ * End If
25
+ * Me.Error = m_Error
26
+ * ```
27
+ * ```vba
28
+ * p_Error = m_ObjRiesgoActivo.Error ' the form, later
29
+ * If p_Error <> "" Then MsgBox p_Error
30
+ * ```
31
+ *
32
+ * That is module-variable data flow, which issue #251 already models as
33
+ * `property-set` / `property-get` references onto a `variable` node. This
34
+ * module supplies the one thing #251 cannot know: **which** of those variables
35
+ * is the error channel. Nothing here emits a node, an edge or a reference — it
36
+ * only decides whether an existing row earns `metadata.errorChannel: true`.
37
+ *
38
+ * ## Why it is a LEAF, separate from `errors.ts`
39
+ *
40
+ * Two consumers need the same list and must never fork:
41
+ *
42
+ * - `errors.ts` derives `errorPolicy.behavior` from a channel-WRITE matcher
43
+ * (is this statement `<channel> = …`?), and
44
+ * - `module-vars.ts` flags a read or a write by NAME (is this variable the
45
+ * channel?).
46
+ *
47
+ * `errors.ts` owned both the names and the write matcher before this task and
48
+ * its own comment deferred the config knob here. Keeping the names in
49
+ * `errors.ts` and importing them from `module-vars.ts` would have closed a
50
+ * cycle the moment `errors.ts` needed the compiled, config-aware form back. So
51
+ * the names and both matchers live here, in a module that imports only
52
+ * `text-utils`, and `errors.ts` re-exports the constant for its existing
53
+ * consumers.
54
+ *
55
+ * ## Names, never substrings, never user regex
56
+ *
57
+ * A channel entry is a bare VBA identifier and is matched as a WHOLE name, so
58
+ * `ErrorCount` cannot match `Error`. `codegraph.json` → `vba.errorChannel`
59
+ * therefore takes identifiers, not patterns: this runs on every identifier of
60
+ * every line of every VBA file, which is precisely where a user-supplied regex
61
+ * is a catastrophic-backtracking hazard (the same reasoning `vba.sqlWrappers`
62
+ * was built on in #244).
63
+ */
64
+ const text_utils_1 = require("./text-utils");
65
+ /**
66
+ * The channel names used when `codegraph.json` → `vba.errorChannel` is absent.
67
+ *
68
+ * `m_Error` / `p_Error` are the private module-variable spellings, `g_Error`
69
+ * the global one, and `Error` the public field a caller reads off the object
70
+ * (`m_ObjRiesgoActivo.Error`). Identical to the probe's
71
+ * `DEFAULT_ERROR_CHANNEL_NAMES` — `scripts/vba-coverage-probe.mjs` measured
72
+ * the census this task is accepted against, so the two lists must agree.
73
+ */
74
+ exports.DEFAULT_ERROR_CHANNEL_NAMES = [
75
+ 'm_Error',
76
+ 'p_Error',
77
+ 'g_Error',
78
+ 'Error',
79
+ ];
80
+ /** A channel entry is a bare VBA identifier — nothing qualified, no regex. */
81
+ exports.ERROR_CHANNEL_ENTRY_RE = /^\p{L}[\p{L}\p{N}_]*$/u;
82
+ /**
83
+ * Compile the channel from the plain-string config entries.
84
+ *
85
+ * `configured` entries are APPENDED to {@link DEFAULT_ERROR_CHANNEL_NAMES},
86
+ * never substituted for them — same contract as `vba.sqlWrappers`: a project
87
+ * that names its own `lastFailure` field must not lose `m_Error` in the trade,
88
+ * because in a codebase this size the two conventions coexist. Blank, dotted
89
+ * and otherwise non-identifier entries are dropped here; `project-config.ts`
90
+ * has already warned about them at load time.
91
+ */
92
+ function compileErrorChannel(configured) {
93
+ const names = [];
94
+ const lookup = new Set();
95
+ for (const raw of [...exports.DEFAULT_ERROR_CHANNEL_NAMES, ...(configured ?? [])]) {
96
+ const entry = (raw ?? '').trim();
97
+ if (!entry || !exports.ERROR_CHANNEL_ENTRY_RE.test(entry))
98
+ continue;
99
+ const key = entry.toLowerCase();
100
+ if (lookup.has(key))
101
+ continue;
102
+ lookup.add(key);
103
+ names.push(entry);
104
+ }
105
+ const writeRes = names.map((name) => new RegExp(`^\\s*(?:Set\\s+)?(?:(?:Me|\\p{L}[\\p{L}\\p{N}_]*)\\s*\\.\\s*)?${(0, text_utils_1.escapeRegExpLiteral)(name)}\\s*=(?!=)`, 'iu'));
106
+ return { names, lookup, writeRes };
107
+ }
108
+ /**
109
+ * The zero-config channel, compiled once.
110
+ *
111
+ * The fallback for every context that was never handed options — tests and
112
+ * out-of-repo callers of `VbaExtractor`. Memoised because the write regexes
113
+ * are the hot path's and there is exactly one correct instance of them.
114
+ */
115
+ let defaultChannel = null;
116
+ function defaultErrorChannel() {
117
+ if (!defaultChannel)
118
+ defaultChannel = compileErrorChannel();
119
+ return defaultChannel;
120
+ }
121
+ /**
122
+ * Is `name` the error channel? A WHOLE-name, case-insensitive test — the
123
+ * single reason `ErrorCount` does not match `Error`, pinned by a test.
124
+ */
125
+ function isErrorChannelName(channel, name) {
126
+ return channel.lookup.has(name.toLowerCase());
127
+ }
128
+ //# sourceMappingURL=error-channel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"error-channel.js","sourceRoot":"","sources":["../../../src/extraction/vba/error-channel.ts"],"names":[],"mappings":";;;AAoHA,kDAqBC;AAUD,kDAGC;AAMD,gDAKC;AAjKD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwDG;AACH,6CAAmD;AAEnD;;;;;;;;GAQG;AACU,QAAA,2BAA2B,GAAsB;IAC5D,SAAS;IACT,SAAS;IACT,SAAS;IACT,OAAO;CACR,CAAC;AAEF,8EAA8E;AACjE,QAAA,sBAAsB,GAAG,wBAAwB,CAAC;AA8B/D;;;;;;;;;GASG;AACH,SAAgB,mBAAmB,CACjC,UAA8B;IAE9B,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,MAAM,MAAM,GAAG,IAAI,GAAG,EAAU,CAAC;IACjC,KAAK,MAAM,GAAG,IAAI,CAAC,GAAG,mCAA2B,EAAE,GAAG,CAAC,UAAU,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC;QAC1E,MAAM,KAAK,GAAG,CAAC,GAAG,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;QACjC,IAAI,CAAC,KAAK,IAAI,CAAC,8BAAsB,CAAC,IAAI,CAAC,KAAK,CAAC;YAAE,SAAS;QAC5D,MAAM,GAAG,GAAG,KAAK,CAAC,WAAW,EAAE,CAAC;QAChC,IAAI,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC;YAAE,SAAS;QAC9B,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QAChB,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACpB,CAAC;IACD,MAAM,QAAQ,GAAG,KAAK,CAAC,GAAG,CACxB,CAAC,IAAI,EAAE,EAAE,CACP,IAAI,MAAM,CACR,iEAAiE,IAAA,gCAAmB,EAAC,IAAI,CAAC,YAAY,EACtG,IAAI,CACL,CACJ,CAAC;IACF,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC;AACrC,CAAC;AAED;;;;;;GAMG;AACH,IAAI,cAAc,GAAgC,IAAI,CAAC;AACvD,SAAgB,mBAAmB;IACjC,IAAI,CAAC,cAAc;QAAE,cAAc,GAAG,mBAAmB,EAAE,CAAC;IAC5D,OAAO,cAAc,CAAC;AACxB,CAAC;AAED;;;GAGG;AACH,SAAgB,kBAAkB,CAChC,OAA6B,EAC7B,IAAY;IAEZ,OAAO,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC;AAChD,CAAC"}
@@ -0,0 +1,64 @@
1
+ import { VbaClassifier, VbaExtractorContext, VbaErrorPolicyState } from './context';
2
+ import { VbaExtractionRule } from './rules';
3
+ /**
4
+ * The error-propagation channel this corpus actually uses: a module-level or
5
+ * object field the failing procedure writes and the caller reads. §2.3 of the
6
+ * plan measures 3,602 handlers touching it against 16 that re-raise — VBA's
7
+ * own error mechanism unwinds one frame, the MESSAGE travels through one of
8
+ * these variables.
9
+ *
10
+ * Names only, never substrings, so `ErrorCount` cannot match `Error`.
11
+ *
12
+ * Issue #261 (task E4) moved this list — and the write matcher built from it —
13
+ * into `./error-channel`, so the two consumers can no longer fork: this
14
+ * classifier asks "is this statement a channel WRITE?", `module-vars.ts` asks
15
+ * "is this variable the channel?", and both now read one compiled object that
16
+ * `codegraph.json` → `vba.errorChannel` extends. Re-exported from here because
17
+ * this module was its home and the probe-agreement suite imports it.
18
+ */
19
+ export { DEFAULT_ERROR_CHANNEL_NAMES } from './error-channel';
20
+ /**
21
+ * Calls that make an error visible to a human. `MsgBox` is the form-code
22
+ * shape, `Debug.Print` the developer-only one; §2.3 counts both as "display",
23
+ * so this list — identical to the probe's `DEFAULT_DISPLAY_CALLS` — does too.
24
+ */
25
+ export declare const DEFAULT_DISPLAY_CALLS: readonly string[];
26
+ /** A fresh accumulator for a procedure body opening at `startLine`. */
27
+ export declare function newErrorPolicyState(startLine: number, edgeMark: number, refMark: number): VbaErrorPolicyState;
28
+ /**
29
+ * Issue #259: the declarative rule table for the error-policy concern. All
30
+ * four rules are `scan: 'masked'` and `requires: 'inside-procedure'`.
31
+ *
32
+ * `masked` is the #209 discipline: `s = "On Error GoTo errores"` is a string
33
+ * assignment, and a classifier that reads it as a handler would report a
34
+ * protected procedure that is not protected. `inside-procedure` is what keeps
35
+ * module-level noise out — there is no error policy without a procedure to
36
+ * attach it to.
37
+ *
38
+ * The three `On Error` rules re-scan their own line globally instead of
39
+ * acting on the dispatcher's single match, so a colon-separated single-line
40
+ * procedure carrying two `On Error GoTo` statements counts two.
41
+ */
42
+ export declare const RULES: readonly VbaExtractionRule<unknown>[];
43
+ /**
44
+ * Fold the open accumulator into the procedure's `metadata.errorPolicy` and
45
+ * clear it. `endLine` is the procedure's terminating `End` line — the handler
46
+ * region's closing boundary.
47
+ *
48
+ * Called from three places: the `End Sub` boundary (the normal path), a new
49
+ * procedure declaration while a body is somehow still open (malformed VBA
50
+ * with no `End`), and end-of-file. All three converge on the same shape, so a
51
+ * truncated module still records a policy instead of silently dropping it.
52
+ */
53
+ export declare function closeErrorPolicy(ctx: VbaExtractorContext, endLine: number): void;
54
+ /**
55
+ * Issue #259: factory for the error-policy classifier.
56
+ *
57
+ * `count` stays at 0 for the life of the classifier, deliberately. The
58
+ * orchestrator derives `hasAnySymbols` from the sum of every classifier's
59
+ * `count`, and this one emits no symbols at all — it only annotates nodes the
60
+ * procedures sweep already created. Letting it count would make a file whose
61
+ * only content is an `On Error` line look like a file with symbols.
62
+ */
63
+ export declare function createErrorPolicyClassifier(): VbaClassifier;
64
+ //# sourceMappingURL=errors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../src/extraction/vba/errors.ts"],"names":[],"mappings":"AA4EA,OAAO,EACL,aAAa,EACb,mBAAmB,EAGnB,mBAAmB,EACpB,MAAM,WAAW,CAAC;AAEnB,OAAO,EAAwB,iBAAiB,EAAE,MAAM,SAAS,CAAC;AA2ElE;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAE,2BAA2B,EAAE,MAAM,iBAAiB,CAAC;AAE9D;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,EAAE,SAAS,MAAM,EAA8B,CAAC;AAuKlF,uEAAuE;AACvE,wBAAgB,mBAAmB,CACjC,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,MAAM,GACd,mBAAmB,CAmBrB;AA6BD;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,KAAK,EAAE,SAAS,iBAAiB,CAAC,OAAO,CAAC,EAgKtD,CAAC;AAEF;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAC9B,GAAG,EAAE,mBAAmB,EACxB,OAAO,EAAE,MAAM,GACd,IAAI,CAgEN;AAkGD;;;;;;;;GAQG;AACH,wBAAgB,2BAA2B,IAAI,aAAa,CAuF3D"}