@descent-vtt/spec-guard 0.10.3 → 0.12.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 (162) hide show
  1. package/CHANGELOG.md +410 -0
  2. package/README.md +385 -27
  3. package/dist/cites.d.ts +192 -0
  4. package/dist/cites.d.ts.map +1 -0
  5. package/dist/cites.js +599 -0
  6. package/dist/cites.js.map +1 -0
  7. package/dist/cli.d.ts +14 -6
  8. package/dist/cli.d.ts.map +1 -1
  9. package/dist/cli.js +315 -22
  10. package/dist/cli.js.map +1 -1
  11. package/dist/comments.d.ts +51 -2
  12. package/dist/comments.d.ts.map +1 -1
  13. package/dist/comments.js +353 -57
  14. package/dist/comments.js.map +1 -1
  15. package/dist/config.d.ts +3 -0
  16. package/dist/config.d.ts.map +1 -1
  17. package/dist/config.js +46 -5
  18. package/dist/config.js.map +1 -1
  19. package/dist/engine.d.ts.map +1 -1
  20. package/dist/engine.js +38 -14
  21. package/dist/engine.js.map +1 -1
  22. package/dist/glob.d.ts +128 -24
  23. package/dist/glob.d.ts.map +1 -1
  24. package/dist/glob.js +304 -61
  25. package/dist/glob.js.map +1 -1
  26. package/dist/impact.d.ts +179 -0
  27. package/dist/impact.d.ts.map +1 -0
  28. package/dist/impact.js +360 -0
  29. package/dist/impact.js.map +1 -0
  30. package/dist/imports.d.ts.map +1 -1
  31. package/dist/imports.js +5 -58
  32. package/dist/imports.js.map +1 -1
  33. package/dist/index.d.ts +13 -5
  34. package/dist/index.d.ts.map +1 -1
  35. package/dist/index.js +7 -3
  36. package/dist/index.js.map +1 -1
  37. package/dist/mcp.d.ts +16 -75
  38. package/dist/mcp.d.ts.map +1 -1
  39. package/dist/mcp.js +198 -370
  40. package/dist/mcp.js.map +1 -1
  41. package/dist/overlay.d.ts +39 -0
  42. package/dist/overlay.d.ts.map +1 -0
  43. package/dist/overlay.js +133 -0
  44. package/dist/overlay.js.map +1 -0
  45. package/dist/parser.d.ts +41 -24
  46. package/dist/parser.d.ts.map +1 -1
  47. package/dist/parser.js +217 -160
  48. package/dist/parser.js.map +1 -1
  49. package/dist/prove.d.ts +46 -0
  50. package/dist/prove.d.ts.map +1 -0
  51. package/dist/prove.js +549 -0
  52. package/dist/prove.js.map +1 -0
  53. package/dist/query.d.ts +11 -0
  54. package/dist/query.d.ts.map +1 -1
  55. package/dist/query.js +9 -3
  56. package/dist/query.js.map +1 -1
  57. package/dist/reporter.d.ts +139 -1
  58. package/dist/reporter.d.ts.map +1 -1
  59. package/dist/reporter.js +593 -21
  60. package/dist/reporter.js.map +1 -1
  61. package/dist/rules.js +3 -3
  62. package/dist/rules.js.map +1 -1
  63. package/dist/runner.d.ts +24 -1
  64. package/dist/runner.d.ts.map +1 -1
  65. package/dist/runner.js +84 -21
  66. package/dist/runner.js.map +1 -1
  67. package/dist/specs.d.ts +5 -1
  68. package/dist/specs.d.ts.map +1 -1
  69. package/dist/specs.js +5 -1
  70. package/dist/specs.js.map +1 -1
  71. package/dist/structure.d.ts.map +1 -1
  72. package/dist/structure.js +7 -6
  73. package/dist/structure.js.map +1 -1
  74. package/dist/types.d.ts +193 -0
  75. package/dist/types.d.ts.map +1 -1
  76. package/dist/vendor/spec-core/jsonrpc/index.d.ts +3 -0
  77. package/dist/vendor/spec-core/jsonrpc/index.d.ts.map +1 -0
  78. package/dist/vendor/spec-core/jsonrpc/index.js +2 -0
  79. package/dist/vendor/spec-core/jsonrpc/index.js.map +1 -0
  80. package/dist/vendor/spec-core/jsonrpc/mcp.d.ts +158 -0
  81. package/dist/vendor/spec-core/jsonrpc/mcp.d.ts.map +1 -0
  82. package/dist/vendor/spec-core/jsonrpc/mcp.js +353 -0
  83. package/dist/vendor/spec-core/jsonrpc/mcp.js.map +1 -0
  84. package/dist/vendor/spec-core/markdown/frontmatter.d.ts +104 -0
  85. package/dist/vendor/spec-core/markdown/frontmatter.d.ts.map +1 -0
  86. package/dist/vendor/spec-core/markdown/frontmatter.js +459 -0
  87. package/dist/vendor/spec-core/markdown/frontmatter.js.map +1 -0
  88. package/dist/vendor/spec-core/markdown/headings.d.ts +46 -0
  89. package/dist/vendor/spec-core/markdown/headings.d.ts.map +1 -0
  90. package/dist/vendor/spec-core/markdown/headings.js +199 -0
  91. package/dist/vendor/spec-core/markdown/headings.js.map +1 -0
  92. package/dist/vendor/spec-core/markdown/index.d.ts +6 -0
  93. package/dist/vendor/spec-core/markdown/index.d.ts.map +1 -0
  94. package/dist/vendor/spec-core/markdown/index.js +4 -0
  95. package/dist/vendor/spec-core/markdown/index.js.map +1 -0
  96. package/dist/vendor/spec-core/markdown/layout.d.ts +40 -0
  97. package/dist/vendor/spec-core/markdown/layout.d.ts.map +1 -0
  98. package/dist/vendor/spec-core/markdown/layout.js +28 -0
  99. package/dist/vendor/spec-core/markdown/layout.js.map +1 -0
  100. package/dist/vendor/spec-core/markdown/links.d.ts +23 -0
  101. package/dist/vendor/spec-core/markdown/links.d.ts.map +1 -0
  102. package/dist/vendor/spec-core/markdown/links.js +364 -0
  103. package/dist/vendor/spec-core/markdown/links.js.map +1 -0
  104. package/dist/vendor/spec-core/markdown/lists.d.ts +23 -0
  105. package/dist/vendor/spec-core/markdown/lists.d.ts.map +1 -0
  106. package/dist/vendor/spec-core/markdown/lists.js +127 -0
  107. package/dist/vendor/spec-core/markdown/lists.js.map +1 -0
  108. package/dist/vendor/spec-core/markdown/scan.d.ts +37 -0
  109. package/dist/vendor/spec-core/markdown/scan.d.ts.map +1 -0
  110. package/dist/vendor/spec-core/markdown/scan.js +439 -0
  111. package/dist/vendor/spec-core/markdown/scan.js.map +1 -0
  112. package/dist/vendor/spec-core/markdown/syntax.d.ts +76 -0
  113. package/dist/vendor/spec-core/markdown/syntax.d.ts.map +1 -0
  114. package/dist/vendor/spec-core/markdown/syntax.js +181 -0
  115. package/dist/vendor/spec-core/markdown/syntax.js.map +1 -0
  116. package/dist/vendor/spec-core/markdown/tables.d.ts +19 -0
  117. package/dist/vendor/spec-core/markdown/tables.d.ts.map +1 -0
  118. package/dist/vendor/spec-core/markdown/tables.js +86 -0
  119. package/dist/vendor/spec-core/markdown/tables.js.map +1 -0
  120. package/dist/vendor/spec-core/markdown/types.d.ts +288 -0
  121. package/dist/vendor/spec-core/markdown/types.d.ts.map +1 -0
  122. package/dist/vendor/spec-core/markdown/types.js +9 -0
  123. package/dist/vendor/spec-core/markdown/types.js.map +1 -0
  124. package/dist/vendor/spec-core/path/index.d.ts +2 -0
  125. package/dist/vendor/spec-core/path/index.d.ts.map +1 -0
  126. package/dist/vendor/spec-core/path/index.js +2 -0
  127. package/dist/vendor/spec-core/path/index.js.map +1 -0
  128. package/dist/vendor/spec-core/path/posix.d.ts +84 -0
  129. package/dist/vendor/spec-core/path/posix.d.ts.map +1 -0
  130. package/dist/vendor/spec-core/path/posix.js +150 -0
  131. package/dist/vendor/spec-core/path/posix.js.map +1 -0
  132. package/dist/vendor/spec-core/pattern/automaton.d.ts +130 -0
  133. package/dist/vendor/spec-core/pattern/automaton.d.ts.map +1 -0
  134. package/dist/vendor/spec-core/pattern/automaton.js +340 -0
  135. package/dist/vendor/spec-core/pattern/automaton.js.map +1 -0
  136. package/dist/vendor/spec-core/pattern/charset.d.ts +59 -0
  137. package/dist/vendor/spec-core/pattern/charset.d.ts.map +1 -0
  138. package/dist/vendor/spec-core/pattern/charset.js +116 -0
  139. package/dist/vendor/spec-core/pattern/charset.js.map +1 -0
  140. package/dist/vendor/spec-core/pattern/glob.d.ts +122 -0
  141. package/dist/vendor/spec-core/pattern/glob.d.ts.map +1 -0
  142. package/dist/vendor/spec-core/pattern/glob.js +481 -0
  143. package/dist/vendor/spec-core/pattern/glob.js.map +1 -0
  144. package/dist/vendor/spec-core/pattern/index.d.ts +7 -0
  145. package/dist/vendor/spec-core/pattern/index.d.ts.map +1 -0
  146. package/dist/vendor/spec-core/pattern/index.js +4 -0
  147. package/dist/vendor/spec-core/pattern/index.js.map +1 -0
  148. package/dist/vendor/spec-core/pattern/regex.d.ts +68 -0
  149. package/dist/vendor/spec-core/pattern/regex.d.ts.map +1 -0
  150. package/dist/vendor/spec-core/pattern/regex.js +813 -0
  151. package/dist/vendor/spec-core/pattern/regex.js.map +1 -0
  152. package/dist/vendor/spec-core/text/index.d.ts +3 -0
  153. package/dist/vendor/spec-core/text/index.d.ts.map +1 -0
  154. package/dist/vendor/spec-core/text/index.js +2 -0
  155. package/dist/vendor/spec-core/text/index.js.map +1 -0
  156. package/dist/vendor/spec-core/text/lines.d.ts +73 -0
  157. package/dist/vendor/spec-core/text/lines.d.ts.map +1 -0
  158. package/dist/vendor/spec-core/text/lines.js +156 -0
  159. package/dist/vendor/spec-core/text/lines.js.map +1 -0
  160. package/package.json +8 -1
  161. package/src/vendor/spec-core/LICENSE +21 -0
  162. package/src/vendor/spec-core/README.md +8 -0
package/dist/comments.js CHANGED
@@ -5,7 +5,7 @@
5
5
  * available: the comment recording that a symbol was deleted is itself a match
6
6
  * for that symbol. `@assert-absence symbol="LegacyThing"` then fails on
7
7
  *
8
- * // LegacyThing was removed in ADR-398
8
+ * // LegacyThing was removed; do not reintroduce it
9
9
  *
10
10
  * which is the sentence proving the assertion true. So matches are classified
11
11
  * and, by default, those inside comments do not count.
@@ -27,15 +27,74 @@
27
27
  * understood.
28
28
  */
29
29
  import path from 'node:path';
30
+ /**
31
+ * Words after which a `/` opens a regular expression rather than dividing.
32
+ *
33
+ * The remaining ambiguity is `)` and `}`, where this follows the usual
34
+ * heuristic. Both tables are shared with the import tokenizer in `imports.ts`,
35
+ * which is where they were written and proved: two copies would be two answers
36
+ * to "is this a regular expression", and the only thing worse than one
37
+ * heuristic is two of them disagreeing about the same file.
38
+ */
39
+ export const REGEX_AFTER_WORD = new Set([
40
+ 'return',
41
+ 'typeof',
42
+ 'instanceof',
43
+ 'in',
44
+ 'of',
45
+ 'new',
46
+ 'delete',
47
+ 'void',
48
+ 'throw',
49
+ 'case',
50
+ 'do',
51
+ 'else',
52
+ 'yield',
53
+ 'await',
54
+ ]);
55
+ /**
56
+ * `<` is deliberately absent: in JSX every closing tag is `</`, and reading that
57
+ * as the start of a regular expression loses the scan for the rest of the line.
58
+ * The cost is that `a < /re/.test(b)` is misread instead, which is a shape that
59
+ * does not occur in practice.
60
+ *
61
+ * `}` stays, for a regular expression that opens a statement after a block,
62
+ * except before `/>`. That is a JSX element closing after an expression
63
+ * attribute, `<App x={y} />`. `/>` after anything else is still one - `/>/` is a
64
+ * regular expression, and HTML escaping is full of `replace(/>/g, ...)`.
65
+ */
66
+ export const REGEX_AFTER_PUNCT = new Set([
67
+ '(',
68
+ ',',
69
+ '=',
70
+ ':',
71
+ '[',
72
+ '!',
73
+ '&',
74
+ '|',
75
+ '?',
76
+ '{',
77
+ '}',
78
+ ';',
79
+ '+',
80
+ '-',
81
+ '*',
82
+ '/',
83
+ '%',
84
+ '^',
85
+ '~',
86
+ '>',
87
+ ]);
30
88
  const QUOTES = [
31
89
  { open: '"', close: '"', escape: true },
32
90
  { open: "'", close: "'", escape: true },
33
91
  ];
34
92
  // Every profile writes the same keys in the same order, flags included where
35
- // they are false. The lexer reads these on every character of every file, and
36
- // objects of one shape keep those reads monomorphic: with the flags left off
37
- // where unused, each profile was a shape of its own, and a run that had seen
38
- // four of them read C about a fifth slower than 0.10.2 did.
93
+ // they are false, so the lexer's reads of them stay monomorphic. With the
94
+ // flags left off where unused, each profile was a shape of its own, and a run
95
+ // that had seen four of them read C about a fifth slower than 0.10.2 did. The
96
+ // scan reads a profile once per file now rather than once per character, which
97
+ // makes this cheaper to get wrong than it was - and no less wrong.
39
98
  const C_LIKE = {
40
99
  name: 'c-like',
41
100
  line: ['//'],
@@ -48,13 +107,35 @@ const C_LIKE = {
48
107
  // change which wrong answer a misread file gets.
49
108
  digitSeparators: true,
50
109
  wordComments: false,
110
+ wordQuotes: false,
111
+ regexLiterals: false,
112
+ jsxText: false,
51
113
  strings: QUOTES,
52
114
  };
115
+ /**
116
+ * A quoted string in JavaScript cannot hold a line break - only a template
117
+ * can - so one that reaches the end of its line was never a string.
118
+ *
119
+ * The same backstop Rust's character literal got in 0.10.3, for the same
120
+ * reason: whatever this table misreads next, it costs a line rather than a
121
+ * file. It is also what JSX text costs. `<p>Don't click</p>` opens a literal
122
+ * that no quote closes, and bounded to its line that literal is read as code -
123
+ * which is what the text is.
124
+ */
125
+ const JS_QUOTES = [
126
+ { open: '"', close: '"', escape: true, singleLine: true },
127
+ { open: "'", close: "'", escape: true, singleLine: true },
128
+ ];
53
129
  const JS_LIKE = {
54
130
  ...C_LIKE,
55
131
  name: 'javascript',
56
132
  digitSeparators: false,
57
- strings: [...QUOTES, { open: '`', close: '`', escape: true }],
133
+ // Until 0.11.0 no profile read a regular expression, so a quote inside one -
134
+ // `/'/`, `/["']/` - opened a string that closed on some later quote, and the
135
+ // comments in between were read as code. See ADR-0006.
136
+ regexLiterals: true,
137
+ jsxText: true,
138
+ strings: [...JS_QUOTES, { open: '`', close: '`', escape: true }],
58
139
  };
59
140
  const C_SHARP = {
60
141
  ...C_LIKE,
@@ -86,6 +167,9 @@ const RUST = {
86
167
  lifetimes: true,
87
168
  digitSeparators: false,
88
169
  wordComments: false,
170
+ wordQuotes: false,
171
+ regexLiterals: false,
172
+ jsxText: false,
89
173
  strings: [
90
174
  // Before 0.10.3 only r"…" and r#"…"# were known, and r##"…"## read as an
91
175
  // ordinary string that closed at the first quote inside it.
@@ -108,6 +192,9 @@ const HASH = {
108
192
  lifetimes: false,
109
193
  digitSeparators: false,
110
194
  wordComments: false,
195
+ wordQuotes: false,
196
+ regexLiterals: false,
197
+ jsxText: false,
111
198
  // Triple quotes first: a Python docstring is a string, not a comment, and
112
199
  // treating it as code is the conservative reading.
113
200
  strings: [
@@ -117,35 +204,76 @@ const HASH = {
117
204
  ],
118
205
  };
119
206
  /**
120
- * Shell scripts and YAML: `#` comments, but only where a word starts.
207
+ * Shell scripts: `#` comments, but only where a word starts.
121
208
  *
122
- * Both say so. A shell ignores a word *beginning* with `#`, so `${path##*.}`,
123
- * `${#items[@]}` and `$#` are code; YAML needs whitespace before a comment, so
124
- * `https://example.com/#top` is one value. Read as Python reads `#`, each of
125
- * those hid the rest of its line. (The basename expansion, whose pattern ends
126
- * in a star and a slash, is the commonest of them, and cannot be written in a
127
- * comment like this one without closing it.)
209
+ * POSIX says so. A shell ignores a word *beginning* with `#`, so `${path##*.}`,
210
+ * `${#items[@]}` and `$#` are code; read as Python reads `#`, each of those hid
211
+ * the rest of its line. (The basename expansion, whose pattern ends in a star
212
+ * and a slash, is the commonest of them, and cannot be written in a comment
213
+ * like this one without closing it.)
128
214
  *
129
215
  * A comment written straight after code, as in `x;# note`, is read as code
130
216
  * here, which is the direction that fails loudly.
131
217
  */
132
- const SHELL_LIKE = {
133
- name: 'shell-like',
218
+ const SHELL = {
219
+ name: 'shell',
134
220
  line: ['#'],
135
221
  block: [],
136
222
  nested: false,
137
223
  lifetimes: false,
138
224
  digitSeparators: false,
139
225
  wordComments: true,
226
+ // A shell quote opens anywhere, and has to: in `dir='C:\'` and `echo a'b'`
227
+ // the quote is mid-word, and a `#` inside one it did not open would comment
228
+ // out the rest of the line.
229
+ wordQuotes: false,
230
+ regexLiterals: false,
231
+ jsxText: false,
140
232
  strings: [
141
233
  // ANSI-C quoting, the one single-quoted form a backslash escapes in.
142
234
  { open: "$'", close: "'", escape: true },
143
235
  { open: '"', close: '"', escape: true },
144
- // Nothing escapes inside single quotes, in either language: 'C:\' is
145
- // complete. YAML writes a quote inside one as '', two strings side by side.
236
+ // Nothing escapes inside single quotes: 'C:\' is a complete string.
146
237
  { open: "'", close: "'", escape: false },
147
238
  ],
148
239
  };
240
+ /**
241
+ * YAML: a shell's `#` rule, and quotes only where a value starts.
242
+ *
243
+ * YAML needs whitespace before a comment, so `https://example.com/#top` is one
244
+ * value - the rule a shell shares. What it does not share is the quoting. Most
245
+ * YAML scalars are plain, which is to say unquoted, and a plain scalar may hold
246
+ * an apostrophe: `- name: Build the decoder's artefact` is a sentence, not a
247
+ * string opening. Read as a shell reads it, that apostrophe opened a literal
248
+ * that closed on the next one in the file - often lines away, in another
249
+ * sentence - and every `#` between them stopped being a comment.
250
+ *
251
+ * So a quote here opens a scalar only where a word could start, which is where
252
+ * YAML puts one: after `key:`, after `- `, or at the start of a line. A quote
253
+ * anywhere else is text. The limit is a quote in the middle of a plain scalar
254
+ * with a space in front of it, `title: the 'quoted' word`, which is still read
255
+ * as a string - harmlessly, because such quotes come in pairs, and it is the
256
+ * unpaired apostrophe that used to run away.
257
+ */
258
+ const YAML = {
259
+ name: 'yaml',
260
+ line: ['#'],
261
+ block: [],
262
+ nested: false,
263
+ lifetimes: false,
264
+ digitSeparators: false,
265
+ wordComments: true,
266
+ wordQuotes: true,
267
+ regexLiterals: false,
268
+ jsxText: false,
269
+ strings: [
270
+ { open: '"', close: '"', escape: true },
271
+ // A single-quoted scalar has no backslash escapes. The one escape it has is
272
+ // a doubled quote, `'it''s'`, and reading that as two scalars would leave
273
+ // `s` outside a string - with a `#` after it free to open a comment.
274
+ { open: "'", close: "'", escape: false, doubled: true },
275
+ ],
276
+ };
149
277
  const SQL_LIKE = {
150
278
  name: 'sql-like',
151
279
  line: ['--'],
@@ -154,6 +282,9 @@ const SQL_LIKE = {
154
282
  lifetimes: false,
155
283
  digitSeparators: false,
156
284
  wordComments: false,
285
+ wordQuotes: false,
286
+ regexLiterals: false,
287
+ jsxText: false,
157
288
  strings: QUOTES,
158
289
  };
159
290
  const MARKUP = {
@@ -164,6 +295,9 @@ const MARKUP = {
164
295
  lifetimes: false,
165
296
  digitSeparators: false,
166
297
  wordComments: false,
298
+ wordQuotes: false,
299
+ regexLiterals: false,
300
+ jsxText: false,
167
301
  strings: [],
168
302
  };
169
303
  /**
@@ -183,6 +317,9 @@ const NO_COMMENTS = {
183
317
  lifetimes: false,
184
318
  digitSeparators: false,
185
319
  wordComments: false,
320
+ wordQuotes: false,
321
+ regexLiterals: false,
322
+ jsxText: false,
186
323
  strings: [],
187
324
  };
188
325
  /** Extension to comment syntax. Anything absent is left unclassified. */
@@ -224,7 +361,8 @@ register(C_SHARP, ['.cs', '.csx']);
224
361
  register(RUST, ['.rs']);
225
362
  register(GO, ['.go']);
226
363
  register(HASH, ['.py', '.pyi', '.rb', '.toml', '.tf', '.pl', '.r']);
227
- register(SHELL_LIKE, ['.sh', '.bash', '.zsh', '.yaml', '.yml']);
364
+ register(SHELL, ['.sh', '.bash', '.zsh']);
365
+ register(YAML, ['.yaml', '.yml']);
228
366
  register(SQL_LIKE, ['.sql', '.lua', '.hs', '.elm']);
229
367
  register(MARKUP, ['.html', '.htm', '.xml', '.svg', '.vue', '.svelte', '.md', '.markdown']);
230
368
  // MSBuild's files, and the rest of .NET's XML. A project file is where a
@@ -273,12 +411,23 @@ function endOfString(source, { rule, text, close }) {
273
411
  index += 2;
274
412
  continue;
275
413
  }
276
- if (source.startsWith(close, index))
414
+ if (source.startsWith(close, index)) {
415
+ // A doubled delimiter is an escaped one, so the literal carries on.
416
+ if (rule.doubled && source.startsWith(close, index + close.length)) {
417
+ index += close.length * 2;
418
+ continue;
419
+ }
277
420
  return { end: index + close.length, closed: true };
421
+ }
278
422
  index += 1;
279
423
  }
280
424
  return { end: source.length, closed: false };
281
425
  }
426
+ /** A line comment's opener, and a YAML scalar's quote, is where a word could start. */
427
+ function startsWord(source, at) {
428
+ const before = source[at - 1];
429
+ return before === undefined || before === ' ' || before === '\t' || before === '\n';
430
+ }
282
431
  /**
283
432
  * Where the code that starts at `at` with a quote ends, or `at` itself when
284
433
  * the quote opens a literal - or there is no quote.
@@ -290,6 +439,10 @@ function endOfString(source, { rule, text, close }) {
290
439
  * digit is still that number, where `u8'a'` is a character.
291
440
  */
292
441
  function codeAfterQuote(source, at, syntax) {
442
+ // YAML: a scalar is quoted only when the quote is where its value starts, so
443
+ // an apostrophe inside a word is part of a sentence.
444
+ if (syntax.wordQuotes && !startsWord(source, at))
445
+ return at + 1;
293
446
  if (source[at] !== "'")
294
447
  return at;
295
448
  if (syntax.lifetimes) {
@@ -310,10 +463,119 @@ function codeAfterQuote(source, at, syntax) {
310
463
  }
311
464
  return at;
312
465
  }
313
- /** A line comment's opener is where a word could start. */
314
- function startsWord(source, at) {
315
- const before = source[at - 1];
316
- return before === undefined || before === ' ' || before === '\t' || before === '\n';
466
+ /**
467
+ * Whether the `/` at `at` opens a regular expression rather than dividing.
468
+ *
469
+ * The one question in JavaScript a character cannot answer by itself, and the
470
+ * reason no profile read a regular expression until 0.11.0: `/` divides or
471
+ * quotes according to what came before it. So this looks back, past the
472
+ * whitespace and past the comments - `// note` and then a line that opens with
473
+ * a regular expression is ordinary code - and asks the same two tables the
474
+ * import tokenizer asks.
475
+ */
476
+ function opensRegex(source, at, comments) {
477
+ const word = /[A-Za-z0-9_$]/;
478
+ let index = at - 1;
479
+ let recent = comments.length - 1;
480
+ for (;;) {
481
+ while (index >= 0) {
482
+ const char = source[index];
483
+ if (char !== ' ' && char !== '\t' && char !== '\n' && char !== '\r')
484
+ break;
485
+ index -= 1;
486
+ }
487
+ // A comment is not a token. Step over the whole of it and ask again, which
488
+ // the ranges collected so far already say how to do.
489
+ while (recent >= 0 && comments[recent][0] > index)
490
+ recent -= 1;
491
+ const range = comments[recent];
492
+ if (range === undefined || range[1] <= index)
493
+ break;
494
+ index = range[0] - 1;
495
+ }
496
+ // Nothing before it at all: a file may open with a regular expression.
497
+ if (index < 0)
498
+ return true;
499
+ const before = source[index];
500
+ if (word.test(before)) {
501
+ let from = index;
502
+ while (from > 0 && word.test(source[from - 1]))
503
+ from -= 1;
504
+ return REGEX_AFTER_WORD.has(source.slice(from, index + 1));
505
+ }
506
+ return REGEX_AFTER_PUNCT.has(before) && !(before === '}' && source[at + 1] === '>');
507
+ }
508
+ /**
509
+ * Where the regular expression opened at `at` ends, or `at` itself when
510
+ * nothing closes it before the end of the line - in which case the `/` divided
511
+ * after all.
512
+ *
513
+ * A regular expression is one line long, and that is the backstop here: a `/`
514
+ * this reads wrongly costs at most the rest of its line, never the rest of the
515
+ * file, the same bound a Rust character literal got in 0.10.3.
516
+ */
517
+ function endOfRegex(source, at) {
518
+ let index = at + 1;
519
+ let inClass = false;
520
+ while (index < source.length) {
521
+ const char = source[index];
522
+ if (char === '\\') {
523
+ index += 2;
524
+ continue;
525
+ }
526
+ if (char === '\n')
527
+ return at;
528
+ if (char === '[')
529
+ inClass = true;
530
+ else if (char === ']')
531
+ inClass = false;
532
+ // Inside a character class `/` is an ordinary character: /[/]/ is one
533
+ // literal, and `replace(/[/\\]/g, …)` is how a path is split.
534
+ else if (char === '/' && !inClass)
535
+ return index + 1;
536
+ index += 1;
537
+ }
538
+ return at;
539
+ }
540
+ /**
541
+ * The ASCII characters that can begin anything a profile reads.
542
+ *
543
+ * Every comment token and every literal opener in this table starts with one
544
+ * of a handful of characters, and a source file is mostly none of them. So the
545
+ * scan asks this first, and a character that begins nothing costs one array
546
+ * read instead of four searches that were always going to fail.
547
+ *
548
+ * It is also what keeps a rule cheap for the languages that do not have it.
549
+ * Adding the regular-expression branch below to the scan made C 16% slower
550
+ * before this existed - not the branch's work, which C never reaches, but its
551
+ * presence: the same branch with its body deleted cost the same, and so did an
552
+ * unrelated one bolted onto 0.10.3. A question asked per character is paid for
553
+ * per character whether or not it is answered.
554
+ *
555
+ * The table is ASCII-wide, and deliberately has no bounds check at either end.
556
+ * A typed array ignores a write past its end and reads back `undefined`, which
557
+ * is not `0`, so a delimiter in some other script marks nothing and every
558
+ * character of that script takes the slow path - read correctly, and slowly.
559
+ * Both halves of that are the language's own behaviour rather than a branch
560
+ * that no file anyone has could reach.
561
+ *
562
+ * A profile that reads regular expressions needs `/` marked, and gets it from
563
+ * the `//` that opens its line comments; one that has the JSX rule needs it
564
+ * too, and gets it from `/*`. Both are the same character, and no language
565
+ * has one without the other.
566
+ */
567
+ function openingCharacters(syntax) {
568
+ const starts = new Uint8Array(128);
569
+ const mark = (token) => {
570
+ starts[token.charCodeAt(0)] = 1;
571
+ };
572
+ for (const token of syntax.line)
573
+ mark(token);
574
+ for (const [open] of syntax.block)
575
+ mark(open);
576
+ for (const rule of syntax.strings)
577
+ mark(rule.open);
578
+ return starts;
317
579
  }
318
580
  /** Where the block comment opened at `at` ends, or the end of the file. */
319
581
  function endOfBlock(source, at, pair, nested) {
@@ -351,49 +613,83 @@ function endOfBlock(source, at, pair, nested) {
351
613
  export function lexRanges(source, syntax) {
352
614
  const comments = [];
353
615
  const strings = [];
616
+ // Read once, at the top: the loop below reaches for each of these wherever
617
+ // a character opens something, and the profile itself is never touched
618
+ // inside it. 0.10.3 paid a tenth of the scan for a question asked per
619
+ // character and concluded that the profiles must all be one object shape;
620
+ // they still are, for the rules read at an opener. Nothing mutates a
621
+ // profile, so these cannot go stale mid-scan.
622
+ const { line, block, strings: literals, nested, wordComments, regexLiterals, jsxText } = syntax;
623
+ const starts = openingCharacters(syntax);
354
624
  let unterminated = false;
355
625
  let index = 0;
356
626
  while (index < source.length) {
357
627
  const start = index;
358
- const startsWith = (token) => source.startsWith(token, start);
359
- // First match wins, in this order: a literal hides comment markers inside
360
- // it, and a line comment hides a block opener on the same line. Each lookup
361
- // sits in the branch that needs it, so none of them runs speculatively -
362
- // which is why a quote is asked whether it is code only once a literal
363
- // would open there. Asked on every character, it cost a tenth of the scan.
364
- const opener = openerAt(source, start, syntax.strings);
365
- if (opener) {
366
- const code = codeAfterQuote(source, start, syntax);
367
- if (code > start) {
368
- index = code;
369
- }
370
- else {
371
- const span = endOfString(source, opener);
372
- index = span.end;
373
- strings.push([start, index]);
374
- if (!span.closed)
375
- unterminated = true;
376
- }
377
- }
378
- else {
379
- const lineToken = syntax.line.find((token) => startsWith(token));
380
- if (lineToken !== undefined && (!syntax.wordComments || startsWord(source, start))) {
381
- // A line comment is closed by the end of the file as legitimately as by
382
- // a newline, so running off the end is not a lost scan.
383
- const newline = source.indexOf('\n', start);
384
- index = newline === -1 ? source.length : newline;
385
- comments.push([start, index]);
386
- }
387
- else {
388
- const blockPair = syntax.block.find(([open]) => startsWith(open));
389
- if (blockPair) {
390
- const span = endOfBlock(source, start, blockPair, syntax.nested);
628
+ // A character that opens nothing in this language is code, and there is
629
+ // nothing further to ask about it. Written this way round because a
630
+ // character outside the table's reach reads back `undefined`, which is not
631
+ // `0`: an unknown character is asked the long questions, not skipped.
632
+ if (starts[source.charCodeAt(start)] !== 0) {
633
+ const startsWith = (token) => source.startsWith(token, start);
634
+ // First match wins, in this order: a literal hides comment markers inside
635
+ // it, a line comment hides a block opener on the same line, and a `/` is
636
+ // asked whether it opens a regular expression only once it has failed to
637
+ // open either comment. Each lookup sits in the branch that needs it, so
638
+ // none of them runs speculatively - which is why a quote is asked whether
639
+ // it is code only once a literal would open there. Asked on every
640
+ // character, that question cost a tenth of the scan.
641
+ const opener = openerAt(source, start, literals);
642
+ if (opener) {
643
+ const code = codeAfterQuote(source, start, syntax);
644
+ if (code > start) {
645
+ index = code;
646
+ }
647
+ else {
648
+ const span = endOfString(source, opener);
391
649
  index = span.end;
392
- comments.push([start, index]);
650
+ strings.push([start, index]);
393
651
  if (!span.closed)
394
652
  unterminated = true;
395
653
  }
396
654
  }
655
+ else {
656
+ const lineToken = line.find((token) => startsWith(token));
657
+ if (lineToken !== undefined && (!wordComments || startsWord(source, start))) {
658
+ // A line comment is closed by the end of the file as legitimately as
659
+ // by a newline, so running off the end is not a lost scan.
660
+ const newline = source.indexOf('\n', start);
661
+ index = newline === -1 ? source.length : newline;
662
+ comments.push([start, index]);
663
+ }
664
+ else {
665
+ const blockPair = block.find(([open]) => startsWith(open));
666
+ // In JSX a `>` ends a tag, and what follows is text that may say
667
+ // anything: `<div>/*</div>` opens no comment, and reading one there
668
+ // hid every line up to the next `*/` in the file.
669
+ if (blockPair && !(jsxText && source[start - 1] === '>')) {
670
+ const span = endOfBlock(source, start, blockPair, nested);
671
+ index = span.end;
672
+ comments.push([start, index]);
673
+ if (!span.closed)
674
+ unterminated = true;
675
+ }
676
+ else if (regexLiterals && source[start] === '/' && source[start + 1] !== '*' && opensRegex(source, start, comments)) {
677
+ // No regular expression begins with `*`, so the only `/*` that
678
+ // reaches here is the JSX text above, and it stays code.
679
+ //
680
+ // The test for `/` looks redundant, because in this profile every
681
+ // other opening character opens a literal. It is not: a rule whose
682
+ // opener may open nothing - Rust's `r`, which needs a quote after
683
+ // its hashes - reaches here too, and without this the scan would
684
+ // read from that `r` to the next slash on the line.
685
+ const end = endOfRegex(source, start);
686
+ if (end > start) {
687
+ index = end;
688
+ strings.push([start, index]);
689
+ }
690
+ }
691
+ }
692
+ }
397
693
  }
398
694
  // The single advance point, and the only place termination depends on.
399
695
  if (index <= start)
@@ -1 +1 @@
1
- {"version":3,"file":"comments.js","sourceRoot":"","sources":["../src/comments.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,IAAI,MAAM,WAAW,CAAC;AAwD7B,MAAM,MAAM,GAA0B;IACpC,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE;IACvC,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE;CACxC,CAAC;AAEF,6EAA6E;AAC7E,8EAA8E;AAC9E,6EAA6E;AAC7E,6EAA6E;AAC7E,4DAA4D;AAE5D,MAAM,MAAM,GAAkB;IAC5B,IAAI,EAAE,QAAQ;IACd,IAAI,EAAE,CAAC,IAAI,CAAC;IACZ,KAAK,EAAE,CAAC,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IACrB,MAAM,EAAE,KAAK;IACb,SAAS,EAAE,KAAK;IAChB,yEAAyE;IACzE,6EAA6E;IAC7E,yEAAyE;IACzE,iDAAiD;IACjD,eAAe,EAAE,IAAI;IACrB,YAAY,EAAE,KAAK;IACnB,OAAO,EAAE,MAAM;CAChB,CAAC;AAEF,MAAM,OAAO,GAAkB;IAC7B,GAAG,MAAM;IACT,IAAI,EAAE,YAAY;IAClB,eAAe,EAAE,KAAK;IACtB,OAAO,EAAE,CAAC,GAAG,MAAM,EAAE,EAA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,GAAG,CAAC,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC;gBAC9B,MAAM,CAAC,KAAK,EAAE,GAAG,CAAC,GAAG,MAAM,CAAC,GAAG,CAAiB,CAAC;gBACjD,IAAI,MAAM,GAAG,KAAK;oBAAE,IAAI,GAAG,GAAG,GAAG,CAAC,CAAC;qBAC9B,IAAI,MAAM,IAAI,GAAG;oBAAE,GAAG,GAAG,GAAG,GAAG,CAAC,CAAC;;oBACjC,OAAO,IAAI,CAAC;YACnB,CAAC;YACD,OAAO,KAAK,CAAC;QACf,CAAC;KACF,CAAC;AACJ,CAAC"}
package/dist/config.d.ts CHANGED
@@ -9,6 +9,7 @@
9
9
  * ADR-0014.
10
10
  */
11
11
  import type { EnginePreference } from './engine.js';
12
+ import type { CiteFamily } from './types.js';
12
13
  /** The name the options sit under in `package.json`. */
13
14
  export declare const CONFIG_KEY = "specGuard";
14
15
  /**
@@ -29,6 +30,8 @@ export interface ProjectConfig {
29
30
  defaultSkips?: boolean;
30
31
  maxSnippets?: number;
31
32
  concurrency?: number;
33
+ /** The documents code comments cite, for `spec-guard cites`: an id template and the files it names. */
34
+ cites?: CiteFamily[];
32
35
  }
33
36
  export type ConfigKey = keyof ProjectConfig;
34
37
  /** Every key, in the order the documentation lists them. */
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAGpD,wDAAwD;AACxD,eAAO,MAAM,UAAU,cAAc,CAAC;AAEtC;;;GAGG;AACH,eAAO,MAAM,WAAW,qBAAqB,CAAC;AAE9C,uEAAuE;AACvE,MAAM,WAAW,aAAa;IAC5B,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,MAAM,CAAC,EAAE,gBAAgB,CAAC;IAC1B,MAAM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