@velarscript/compiler 0.12.1 → 0.13.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 (109) hide show
  1. package/dist/advisory-suppression.d.ts +62 -0
  2. package/dist/advisory-suppression.d.ts.map +1 -0
  3. package/dist/advisory-suppression.js +179 -0
  4. package/dist/advisory-suppression.js.map +1 -0
  5. package/dist/analyzer.d.ts +405 -17
  6. package/dist/analyzer.d.ts.map +1 -1
  7. package/dist/analyzer.js +1755 -211
  8. package/dist/analyzer.js.map +1 -1
  9. package/dist/ast.d.ts +6 -3
  10. package/dist/ast.d.ts.map +1 -1
  11. package/dist/ast.js.map +1 -1
  12. package/dist/binding-stability.d.ts +22 -0
  13. package/dist/binding-stability.d.ts.map +1 -0
  14. package/dist/binding-stability.js +63 -0
  15. package/dist/binding-stability.js.map +1 -0
  16. package/dist/collection-lowering-runtime.d.ts +1 -1
  17. package/dist/collection-lowering-runtime.d.ts.map +1 -1
  18. package/dist/collection-lowering-runtime.js +183 -56
  19. package/dist/collection-lowering-runtime.js.map +1 -1
  20. package/dist/diagnostic.d.ts +34 -0
  21. package/dist/diagnostic.d.ts.map +1 -1
  22. package/dist/diagnostic.js +11 -1
  23. package/dist/diagnostic.js.map +1 -1
  24. package/dist/embedded-javascript.d.ts +12 -1
  25. package/dist/embedded-javascript.d.ts.map +1 -1
  26. package/dist/embedded-javascript.js +111 -2
  27. package/dist/embedded-javascript.js.map +1 -1
  28. package/dist/embedded-module.d.ts.map +1 -1
  29. package/dist/embedded-module.js +22 -0
  30. package/dist/embedded-module.js.map +1 -1
  31. package/dist/emitter.d.ts +83 -1
  32. package/dist/emitter.d.ts.map +1 -1
  33. package/dist/emitter.js +518 -41
  34. package/dist/emitter.js.map +1 -1
  35. package/dist/error-runtime.d.ts +9 -0
  36. package/dist/error-runtime.d.ts.map +1 -1
  37. package/dist/error-runtime.js +21 -0
  38. package/dist/error-runtime.js.map +1 -1
  39. package/dist/extension.d.ts +5 -2
  40. package/dist/extension.d.ts.map +1 -1
  41. package/dist/extension.js +2 -1
  42. package/dist/extension.js.map +1 -1
  43. package/dist/formatter.d.ts.map +1 -1
  44. package/dist/formatter.js +222 -91
  45. package/dist/formatter.js.map +1 -1
  46. package/dist/index.d.ts +10 -2
  47. package/dist/index.d.ts.map +1 -1
  48. package/dist/index.js +43 -5
  49. package/dist/index.js.map +1 -1
  50. package/dist/interpolated-string.d.ts.map +1 -1
  51. package/dist/interpolated-string.js +29 -2
  52. package/dist/interpolated-string.js.map +1 -1
  53. package/dist/json-runtime.d.ts.map +1 -1
  54. package/dist/json-runtime.js +27 -3
  55. package/dist/json-runtime.js.map +1 -1
  56. package/dist/lexer.d.ts +217 -1
  57. package/dist/lexer.d.ts.map +1 -1
  58. package/dist/lexer.js +799 -37
  59. package/dist/lexer.js.map +1 -1
  60. package/dist/limits.d.ts +9 -0
  61. package/dist/limits.d.ts.map +1 -1
  62. package/dist/limits.js +9 -0
  63. package/dist/limits.js.map +1 -1
  64. package/dist/mechanical-fix.d.ts.map +1 -1
  65. package/dist/mechanical-fix.js +38 -0
  66. package/dist/mechanical-fix.js.map +1 -1
  67. package/dist/parser.d.ts +30 -1
  68. package/dist/parser.d.ts.map +1 -1
  69. package/dist/parser.js +137 -21
  70. package/dist/parser.js.map +1 -1
  71. package/dist/promise-runtime.d.ts +20 -1
  72. package/dist/promise-runtime.d.ts.map +1 -1
  73. package/dist/promise-runtime.js +38 -3
  74. package/dist/promise-runtime.js.map +1 -1
  75. package/dist/reactive-bridge-runtime.d.ts.map +1 -1
  76. package/dist/reactive-bridge-runtime.js +7 -1
  77. package/dist/reactive-bridge-runtime.js.map +1 -1
  78. package/dist/runtime-abi.d.ts +21 -1
  79. package/dist/runtime-abi.d.ts.map +1 -1
  80. package/dist/runtime-abi.js +23 -3
  81. package/dist/runtime-abi.js.map +1 -1
  82. package/dist/source-names.d.ts +26 -0
  83. package/dist/source-names.d.ts.map +1 -1
  84. package/dist/source-names.js +49 -5
  85. package/dist/source-names.js.map +1 -1
  86. package/dist/source.d.ts.map +1 -1
  87. package/dist/source.js +13 -0
  88. package/dist/source.js.map +1 -1
  89. package/dist/stable-order.d.ts +16 -0
  90. package/dist/stable-order.d.ts.map +1 -0
  91. package/dist/stable-order.js +18 -0
  92. package/dist/stable-order.js.map +1 -0
  93. package/dist/text-runtime.d.ts.map +1 -1
  94. package/dist/text-runtime.js +182 -41
  95. package/dist/text-runtime.js.map +1 -1
  96. package/dist/token.d.ts +11 -0
  97. package/dist/token.d.ts.map +1 -1
  98. package/dist/token.js.map +1 -1
  99. package/dist/type-registry-runtime.d.ts.map +1 -1
  100. package/dist/type-registry-runtime.js +8 -1
  101. package/dist/type-registry-runtime.js.map +1 -1
  102. package/dist/type-validation-runtime.d.ts.map +1 -1
  103. package/dist/type-validation-runtime.js +129 -1
  104. package/dist/type-validation-runtime.js.map +1 -1
  105. package/dist/types.d.ts +17 -1
  106. package/dist/types.d.ts.map +1 -1
  107. package/dist/types.js +161 -17
  108. package/dist/types.js.map +1 -1
  109. package/package.json +1 -1
@@ -0,0 +1,62 @@
1
+ import { type Advisory, type Diagnostic } from "./diagnostic.ts";
2
+ import { type SourceText, type Span } from "./source.ts";
3
+ export interface AdvisorySuppression {
4
+ /** The advisory code this clause names, such as `A1`. */
5
+ readonly code: string;
6
+ /** The reason written after the colon, with the surrounding whitespace removed. */
7
+ readonly reason: string;
8
+ /** The clause itself, from `velar-allow` through the end of the reason. */
9
+ readonly span: Span;
10
+ /**
11
+ * The range a deletion takes with it, which is wider than `span`: the
12
+ * whitespace ahead of the clause, the `//` when the clause owns the whole
13
+ * comment, and the line itself when the comment owns the whole line.
14
+ */
15
+ readonly removal: Span;
16
+ }
17
+ export interface AdvisorySuppressionScan {
18
+ readonly suppressions: readonly AdvisorySuppression[];
19
+ readonly diagnostics: readonly Diagnostic[];
20
+ /**
21
+ * Where the comment's own text ends: the start of its first `velar-allow`
22
+ * clause when it carries one, and the trimmed end of the comment otherwise.
23
+ * An advisory that reads comment text — A1 reads it to decide whether the
24
+ * tail of the line is a bare arithmetic expression — must read
25
+ * `[bodyStart, contentEnd)` rather than the whole comment. D89's own example
26
+ * shows why:
27
+ *
28
+ * const step = total // 2 // velar-allow A1: 2 is a step number
29
+ *
30
+ * There is one comment there, not two, so A1 measured over the whole comment
31
+ * would see letters, refuse to fire, and turn the suppression that was
32
+ * written for it into a stale one. `contentEnd` cuts at the clause, and the
33
+ * `//` an author writes to set the clause apart goes with it.
34
+ */
35
+ readonly contentEnd: number;
36
+ }
37
+ /**
38
+ * Reads the `velar-allow` clauses of one line comment. `commentStart` is the
39
+ * comment's first character, `bodyStart` the first character of its text, and
40
+ * `commentEnd` the end of the physical line.
41
+ */
42
+ export declare function scanAdvisorySuppressions(text: string, commentStart: number, bodyStart: number, commentEnd: number): AdvisorySuppressionScan;
43
+ export interface AdvisoryResolution {
44
+ /** The advisories that survived; a suppressed one is gone rather than marked. */
45
+ readonly advisories: readonly Advisory[];
46
+ /** The stale-suppression failures, which belong to the diagnostic channel. */
47
+ readonly diagnostics: readonly Diagnostic[];
48
+ }
49
+ /**
50
+ * Applies the suppressions of a compile to its advisories. A suppression
51
+ * matches an advisory by line and by code, so it sits on the line the advisory
52
+ * points at and covers nothing else.
53
+ *
54
+ * `reportStale` is false where a stage that would have reported the advisory
55
+ * did not run — an earlier failure kept analysis from starting, or the caller
56
+ * only lexed and parsed. Answering "this advisory did not fire" there would
57
+ * blame the author for the compile stopping short.
58
+ */
59
+ export declare function resolveAdvisorySuppressions(source: SourceText, advisories: readonly Advisory[], suppressions: readonly AdvisorySuppression[], options: {
60
+ readonly reportStale: boolean;
61
+ }): AdvisoryResolution;
62
+ //# sourceMappingURL=advisory-suppression.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"advisory-suppression.d.ts","sourceRoot":"","sources":["../src/advisory-suppression.ts"],"names":[],"mappings":"AAAA,OAAO,EAA6B,KAAK,QAAQ,EAAE,KAAK,UAAU,E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**
4
+ * D89: an advisory is suppressed in place by a trailing line comment that
5
+ * names the advisory and says why the spelling is intended:
6
+ *
7
+ * const step = total // 2 // velar-allow A1: 2 is a step number
8
+ *
9
+ * The three rules are all enforced, and two of them are `diagnostics`, not
10
+ * advisories, so a suppression that is not answerable fails the build:
11
+ *
12
+ * 1. A suppression names one advisory. There is no blanket form, because a
13
+ * blanket one would also cover the next advisory to be reported on that
14
+ * line, which nobody read when they wrote it.
15
+ * 2. A suppression without a reason is `VEL1011`. The reason is the whole
16
+ * mechanism: it lands in the diff, a reviewer reads it, and writing one
17
+ * forces the author to check the spelling before claiming it is right.
18
+ * 3. A suppression whose advisory is not reported on its line is `VEL1012`,
19
+ * with the mechanical rewrite that deletes it. This follows TypeScript's
20
+ * `@ts-expect-error` rather than eslint's `eslint-disable`: a suppression
21
+ * may not rot in the file and mislead the next reader.
22
+ */
23
+ const SUPPRESSION_MARKER = "velar-allow";
24
+ /**
25
+ * The advisory roster's spelling. A suppression names one of these and nothing
26
+ * else: a diagnostic code cannot be suppressed, and a word that is not a code
27
+ * at all is the blanket form the first rule refuses.
28
+ */
29
+ const ADVISORY_CODE = /^A[0-9]+$/u;
30
+ /** The canonical spelling, quoted by both suppression diagnostics. */
31
+ function suppressionForm(code) {
32
+ return `// ${SUPPRESSION_MARKER} ${code}: why this spelling is intended`;
33
+ }
34
+ /**
35
+ * Reads the `velar-allow` clauses of one line comment. `commentStart` is the
36
+ * comment's first character, `bodyStart` the first character of its text, and
37
+ * `commentEnd` the end of the physical line.
38
+ */
39
+ export function scanAdvisorySuppressions(text, commentStart, bodyStart, commentEnd) {
40
+ const clauseStarts = markerOffsets(text, bodyStart, commentEnd);
41
+ if (clauseStarts.length === 0)
42
+ return { suppressions: [], diagnostics: [], contentEnd: trimmedEnd(text, bodyStart, commentEnd) };
43
+ const suppressions = [];
44
+ const diagnostics = [];
45
+ for (const [position, clauseStart] of clauseStarts.entries()) {
46
+ const clauseEnd = trimmedEnd(text, clauseStart, clauseStarts[position + 1] ?? commentEnd);
47
+ const clauseSpan = span(clauseStart, clauseEnd);
48
+ const parsed = parseClause(text, clauseStart + SUPPRESSION_MARKER.length, clauseEnd);
49
+ if (!ADVISORY_CODE.test(parsed.code)) {
50
+ diagnostics.push(diagnostic("VEL1011", `A '${SUPPRESSION_MARKER}' comment must name the advisory it suppresses ('A1', 'A2', …) and say why: write '${suppressionForm("A1")}'. There is no blanket form`, clauseSpan));
51
+ continue;
52
+ }
53
+ if (parsed.reason === "") {
54
+ diagnostics.push(diagnostic("VEL1011", `A '${SUPPRESSION_MARKER}' comment must give a reason: write '${suppressionForm(parsed.code)}'`, clauseSpan));
55
+ continue;
56
+ }
57
+ suppressions.push({
58
+ code: parsed.code,
59
+ reason: parsed.reason,
60
+ span: clauseSpan,
61
+ removal: removalSpan(text, commentStart, bodyStart, commentEnd, clauseStart, clauseEnd),
62
+ });
63
+ }
64
+ return { suppressions, diagnostics, contentEnd: clauseOpeningStart(text, bodyStart, clauseStarts[0]) };
65
+ }
66
+ /**
67
+ * Applies the suppressions of a compile to its advisories. A suppression
68
+ * matches an advisory by line and by code, so it sits on the line the advisory
69
+ * points at and covers nothing else.
70
+ *
71
+ * `reportStale` is false where a stage that would have reported the advisory
72
+ * did not run — an earlier failure kept analysis from starting, or the caller
73
+ * only lexed and parsed. Answering "this advisory did not fire" there would
74
+ * blame the author for the compile stopping short.
75
+ */
76
+ export function resolveAdvisorySuppressions(source, advisories, suppressions, options) {
77
+ if (suppressions.length === 0)
78
+ return { advisories, diagnostics: [] };
79
+ const byLineAndCode = new Map();
80
+ for (const suppression of suppressions) {
81
+ const key = `${source.location(suppression.span.start).line}\0${suppression.code}`;
82
+ const existing = byLineAndCode.get(key);
83
+ if (existing)
84
+ existing.push(suppression);
85
+ else
86
+ byLineAndCode.set(key, [suppression]);
87
+ }
88
+ const used = new Set();
89
+ const kept = advisories.filter((item) => {
90
+ const matched = byLineAndCode.get(`${source.location(item.span.start).line}\0${item.code}`);
91
+ if (!matched)
92
+ return true;
93
+ for (const suppression of matched)
94
+ used.add(suppression);
95
+ return false;
96
+ });
97
+ if (!options.reportStale)
98
+ return { advisories: kept, diagnostics: [] };
99
+ const diagnostics = suppressions.filter((suppression) => !used.has(suppression)).map((suppression) => diagnostic("VEL1012", `No ${suppression.code} advisory is reported on this line, so this '${SUPPRESSION_MARKER}' suppresses nothing; delete it`, suppression.span, mechanicalFix(suppression.removal, "", `Delete the stale '${SUPPRESSION_MARKER} ${suppression.code}' comment`)));
100
+ return { advisories: kept, diagnostics };
101
+ }
102
+ /** Every `velar-allow` written as a whole word, in source order. */
103
+ function markerOffsets(text, from, to) {
104
+ const offsets = [];
105
+ let index = text.indexOf(SUPPRESSION_MARKER, from);
106
+ while (index >= 0 && index + SUPPRESSION_MARKER.length <= to) {
107
+ if (!isMarkerPart(text[index - 1]) && !isMarkerPart(text[index + SUPPRESSION_MARKER.length]))
108
+ offsets.push(index);
109
+ index = text.indexOf(SUPPRESSION_MARKER, index + SUPPRESSION_MARKER.length);
110
+ }
111
+ return offsets;
112
+ }
113
+ function isMarkerPart(character) {
114
+ return character !== undefined && /[\p{L}\p{N}_-]/u.test(character);
115
+ }
116
+ function parseClause(text, from, to) {
117
+ let index = skipBlanks(text, from, to);
118
+ const codeStart = index;
119
+ if (index < to && /[A-Za-z]/u.test(text[index])) {
120
+ index += 1;
121
+ while (index < to && /[A-Za-z0-9]/u.test(text[index]))
122
+ index += 1;
123
+ }
124
+ const code = text.slice(codeStart, index);
125
+ if (code === "")
126
+ return { code: "", reason: "" };
127
+ index = skipBlanks(text, index, to);
128
+ if (text[index] !== ":")
129
+ return { code, reason: "" };
130
+ return { code, reason: text.slice(index + 1, to).trim() };
131
+ }
132
+ function skipBlanks(text, from, to) {
133
+ let index = from;
134
+ while (index < to && (text[index] === " " || text[index] === "\t"))
135
+ index += 1;
136
+ return index;
137
+ }
138
+ function trimmedEnd(text, from, to) {
139
+ let end = to;
140
+ while (end > from && (text[end - 1] === " " || text[end - 1] === "\t"))
141
+ end -= 1;
142
+ return end;
143
+ }
144
+ /**
145
+ * Where a clause begins once the whitespace ahead of it counts as part of it,
146
+ * along with the `//` an author writes to set the clause apart from the
147
+ * comment it rides on. The comment's own `//` is never taken: it sits below
148
+ * `bodyStart`.
149
+ */
150
+ function clauseOpeningStart(text, bodyStart, clauseStart) {
151
+ const trimmed = trimmedEnd(text, bodyStart, clauseStart);
152
+ return trimmed - 2 >= bodyStart && text.startsWith("//", trimmed - 2)
153
+ ? trimmedEnd(text, bodyStart, trimmed - 2)
154
+ : trimmed;
155
+ }
156
+ /**
157
+ * What deleting one clause takes with it. A clause that shares its comment
158
+ * with real prose loses only itself; a clause that owns the comment loses the
159
+ * `//` as well, and a comment that owns its line loses the line.
160
+ */
161
+ function removalSpan(text, commentStart, bodyStart, commentEnd, clauseStart, clauseEnd) {
162
+ const start = clauseOpeningStart(text, bodyStart, clauseStart);
163
+ if (start > bodyStart || clauseEnd !== trimmedEnd(text, bodyStart, commentEnd))
164
+ return span(start, clauseEnd);
165
+ let lineStart = commentStart;
166
+ while (lineStart > 0 && text[lineStart - 1] !== "\n" && text[lineStart - 1] !== "\r")
167
+ lineStart -= 1;
168
+ if (text.slice(lineStart, commentStart).trim() === "") {
169
+ const lineFeed = text[commentEnd] === "\r" && text[commentEnd + 1] === "\n" ? 2
170
+ : text[commentEnd] === "\n" || text[commentEnd] === "\r" ? 1
171
+ : 0;
172
+ return span(lineStart, commentEnd + lineFeed);
173
+ }
174
+ let codeEnd = commentStart;
175
+ while (codeEnd > lineStart && (text[codeEnd - 1] === " " || text[codeEnd - 1] === "\t"))
176
+ codeEnd -= 1;
177
+ return span(codeEnd, commentEnd);
178
+ }
179
+ //# sourceMappingURL=advisory-suppression.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"advisory-suppression.js","sourceRoot":"","sources":["../src/advisory-suppression.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,aAAa,EAAkC,MAAM,iBAAiB,CAAC;AAC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