aontu 0.63.0 → 0.65.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.
- package/README.md +8 -8
- package/dist/agentsmd.js +3 -3
- package/dist/agentsmd.js.map +1 -1
- package/dist/aontu.d.ts +3 -3
- package/dist/aontu.js +4 -6
- package/dist/aontu.js.map +1 -1
- package/dist/aontumodel.js +6 -12
- package/dist/aontumodel.js.map +1 -1
- package/dist/casing.d.ts +5 -0
- package/dist/casing.js +90 -0
- package/dist/casing.js.map +1 -0
- package/dist/cli.d.ts +16 -3
- package/dist/cli.js +653 -455
- package/dist/cli.js.map +1 -1
- package/dist/compat.d.ts +7 -0
- package/dist/compat.js +113 -0
- package/dist/compat.js.map +1 -0
- package/dist/helpdoc.js +5 -5
- package/dist/helpdoc.js.map +1 -1
- package/dist/hints.js +14 -5
- package/dist/hints.js.map +1 -1
- package/dist/lang.d.ts +1 -0
- package/dist/lang.js +8 -0
- package/dist/lang.js.map +1 -1
- package/dist/lsp.d.ts +1 -1
- package/dist/mcp.js +0 -36
- package/dist/mcp.js.map +1 -1
- package/dist/mod.d.ts +18 -3
- package/dist/mod.js +117 -46
- package/dist/mod.js.map +1 -1
- package/dist/pkg-net.d.ts +227 -0
- package/dist/pkg-net.js +1598 -0
- package/dist/pkg-net.js.map +1 -0
- package/dist/pkg-zip.d.ts +8 -0
- package/dist/pkg-zip.js +196 -0
- package/dist/pkg-zip.js.map +1 -0
- package/dist/pkg.d.ts +159 -0
- package/dist/pkg.js +767 -0
- package/dist/pkg.js.map +1 -0
- package/dist/profile.d.ts +9 -0
- package/dist/profile.js +28 -0
- package/dist/profile.js.map +1 -0
- package/dist/report-sarif.js +1 -1
- package/dist/report-sarif.js.map +1 -1
- package/dist/subsume.d.ts +3 -1
- package/dist/subsume.js +2 -0
- package/dist/subsume.js.map +1 -1
- package/dist/trace.d.ts +21 -0
- package/dist/trace.js +107 -0
- package/dist/trace.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/unify.js +1 -6
- package/dist/unify.js.map +1 -1
- package/dist/val/CmpFuncVal.d.ts +2 -0
- package/dist/val/CmpFuncVal.js +47 -13
- package/dist/val/CmpFuncVal.js.map +1 -1
- package/dist/val/NomFuncVal.js +11 -13
- package/dist/val/NomFuncVal.js.map +1 -1
- package/dist/val/ReferFuncVal.js +3 -0
- package/dist/val/ReferFuncVal.js.map +1 -1
- package/package.json +1 -1
- package/skill/SKILL.md +3 -3
- package/skill/error-codes.md +4 -4
- package/skill/examples.md +4 -4
- package/skill/grammar-card.md +1 -1
- package/skill/init/check.sh +2 -2
- package/skill/tasks.md +14 -12
- package/src/agentsmd.ts +3 -3
- package/src/aontu.ts +3 -8
- package/src/aontumodel.ts +6 -12
- package/src/casing.ts +95 -0
- package/src/cli.ts +758 -495
- package/src/compat.ts +148 -0
- package/src/helpdoc.ts +5 -5
- package/src/hints.ts +14 -7
- package/src/lang.ts +9 -1
- package/src/mcp.ts +0 -39
- package/src/mod.ts +142 -51
- package/src/pkg-net.ts +1945 -0
- package/src/pkg-zip.ts +228 -0
- package/src/pkg.ts +1018 -0
- package/src/profile.ts +42 -0
- package/src/report-sarif.ts +1 -1
- package/src/subsume.ts +2 -2
- package/src/trace.ts +157 -0
- package/src/unify.ts +1 -6
- package/src/val/CmpFuncVal.ts +66 -20
- package/src/val/NomFuncVal.ts +3 -5
- package/src/val/ReferFuncVal.ts +4 -0
- package/dist/lower.d.ts +0 -23
- package/dist/lower.js +0 -528
- package/dist/lower.js.map +0 -1
- package/dist/mod-tool.d.ts +0 -58
- package/dist/mod-tool.js +0 -403
- package/dist/mod-tool.js.map +0 -1
- package/dist/render.d.ts +0 -53
- package/dist/render.js +0 -432
- package/dist/render.js.map +0 -1
- package/src/lower.ts +0 -586
- package/src/mod-tool.ts +0 -561
- package/src/render.ts +0 -580
package/dist/render.js
DELETED
|
@@ -1,432 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/* Copyright (c) 2025 Richard Rodger, MIT License */
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.render = render;
|
|
5
|
-
exports.renderProfile = renderProfile;
|
|
6
|
-
exports.renderValue = renderValue;
|
|
7
|
-
const aontu_1 = require("./aontu");
|
|
8
|
-
const vet_1 = require("./vet");
|
|
9
|
-
const hcanon_1 = require("./hcanon");
|
|
10
|
-
const err_1 = require("./err");
|
|
11
|
-
const keyorder_1 = require("./keyorder");
|
|
12
|
-
const utility_1 = require("./utility");
|
|
13
|
-
const lower_1 = require("./lower");
|
|
14
|
-
const VOCABULARY = '@"aontu:code"';
|
|
15
|
-
// The bundled profiles, by lang: aontu:render/lang/<lang>.
|
|
16
|
-
const BUNDLED_LANGS = ['go', 'markdown', 'text', 'typescript'];
|
|
17
|
-
const PROFILE_VOCABULARY = '@"aontu:render"';
|
|
18
|
-
function finding(code, cls, path, message) {
|
|
19
|
-
return { code, class: cls, severity: 'error', path, message, sites: [] };
|
|
20
|
-
}
|
|
21
|
-
function errorReport(errors) {
|
|
22
|
-
return { verdict: 'error', units: [], lossy: [], errors };
|
|
23
|
-
}
|
|
24
|
-
function render(src, options) {
|
|
25
|
-
const opts = options ?? {};
|
|
26
|
-
const aontu = new aontu_1.Aontu((0, utility_1.includeOpts)(opts));
|
|
27
|
-
const rec = true === opts.trace || true === opts.coverage;
|
|
28
|
-
const reads = rec ? new Set() : undefined;
|
|
29
|
-
// COLLECT MODE, so a syntax error arrives on the context rather than
|
|
30
|
-
// as a throw (the jsonschema and vet precedent; no try/catch, for
|
|
31
|
-
// the reason those verbs have none).
|
|
32
|
-
const actx = aontu.ctx({ collect: true, reads });
|
|
33
|
-
const root = aontu.unify(src, { path: opts.path, collect: true }, actx);
|
|
34
|
-
if (0 < actx.err.length || true === root?.isNil) {
|
|
35
|
-
return errorReport([(0, vet_1.failureFinding)(actx, opts.path, root)]);
|
|
36
|
-
}
|
|
37
|
-
let node = root;
|
|
38
|
-
if (null != opts.at && '' !== opts.at) {
|
|
39
|
-
const found = (0, vet_1.anchorAt)(root, opts.at);
|
|
40
|
-
if (null == found) {
|
|
41
|
-
// The anchor names nothing: a `no_path` nil through the finding
|
|
42
|
-
// shape every other refusal here uses.
|
|
43
|
-
const nil = (0, err_1.makeNilErr)(actx, 'no_path', root, undefined, 'at');
|
|
44
|
-
actx.err.push(nil);
|
|
45
|
-
return errorReport([(0, vet_1.failureFinding)(actx, opts.path, root)]);
|
|
46
|
-
}
|
|
47
|
-
node = found;
|
|
48
|
-
}
|
|
49
|
-
const value = (0, hcanon_1.hcanon)(node);
|
|
50
|
-
const report = (0, vet_1.vet)(VOCABULARY, value);
|
|
51
|
-
if ('valid' !== report.verdict) {
|
|
52
|
-
return errorReport(report.findings);
|
|
53
|
-
}
|
|
54
|
-
const codeVal = node.peg.aontu?.peg?.Code;
|
|
55
|
-
const instance = new aontu_1.Aontu().generate(VOCABULARY + (undefined === codeVal ? '' : '\naontu: Code: ' + (0, hcanon_1.hcanon)(codeVal)));
|
|
56
|
-
const folded = renderValue(instance, opts);
|
|
57
|
-
if (rec && 'error' !== folded.verdict) {
|
|
58
|
-
const marks = emitted(node);
|
|
59
|
-
const trace = traceOf(marks, instance, folded.units);
|
|
60
|
-
if (0 < trace.length) {
|
|
61
|
-
folded.trace = trace;
|
|
62
|
-
}
|
|
63
|
-
if (true === opts.coverage) {
|
|
64
|
-
const cov = coverOf(root, node, reads, opts, marks, instance, folded.units);
|
|
65
|
-
if (undefined === cov) {
|
|
66
|
-
const nil = (0, err_1.makeNilErr)(actx, 'no_path', root, undefined, 'coverageAt');
|
|
67
|
-
actx.err.push(nil);
|
|
68
|
-
return errorReport([(0, vet_1.failureFinding)(actx, opts.path, root)]);
|
|
69
|
-
}
|
|
70
|
-
folded.coverage = cov;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
return folded;
|
|
74
|
-
}
|
|
75
|
-
// ---------------------------------------------------------------------
|
|
76
|
-
// THE TRACE AND THE COVERAGE REPORT (RENDER.0.md D11, P7).
|
|
77
|
-
// The one walk order both ports walk in: a list by index, a map by key
|
|
78
|
-
// in code-point order. `fn` answers whether to descend.
|
|
79
|
-
function walkVals(root, fn) {
|
|
80
|
-
const walk = (v, path) => {
|
|
81
|
-
if (null == v || true !== v.isVal || !fn(v, path)) {
|
|
82
|
-
return;
|
|
83
|
-
}
|
|
84
|
-
if (true === v.isList && null != v.peg) {
|
|
85
|
-
for (let i = 0; i < v.peg.length; i++) {
|
|
86
|
-
walk(v.peg[i], [...path, String(i)]);
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
else if (true === v.isMap && null != v.peg) {
|
|
90
|
-
for (const k of Object.keys(v.peg).sort(keyorder_1.cmpCodePoint)) {
|
|
91
|
-
if (!v.aliasKeys.includes(k)) {
|
|
92
|
-
walk(v.peg[k], [...path, k]);
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
};
|
|
97
|
-
walk(root, []);
|
|
98
|
-
}
|
|
99
|
-
// A path as an address: `$`, then a dot before every segment.
|
|
100
|
-
function addr(path) {
|
|
101
|
-
return '$' + path.map((seg) => '.' + seg).join('');
|
|
102
|
-
}
|
|
103
|
-
// Every piece a dispatch stamped, under the anchored value, in
|
|
104
|
-
// document order. The path is relative to the anchor, which is where
|
|
105
|
-
// the instance the fold reads is rooted too.
|
|
106
|
-
function emitted(node) {
|
|
107
|
-
const out = [];
|
|
108
|
-
walkVals(node, (v, path) => {
|
|
109
|
-
if (null != v.emitted) {
|
|
110
|
-
out.push({ path: addr(path), mark: v.emitted });
|
|
111
|
-
}
|
|
112
|
-
return true;
|
|
113
|
-
});
|
|
114
|
-
return out;
|
|
115
|
-
}
|
|
116
|
-
function traceOf(marks, instance, units) {
|
|
117
|
-
const pre = [];
|
|
118
|
-
unitList(instance).forEach((u, i) => {
|
|
119
|
-
if (units.some((r) => r.path === u.path)) {
|
|
120
|
-
pre.push({ at: '$.aontu.Code.units.' + i, path: u.path });
|
|
121
|
-
}
|
|
122
|
-
});
|
|
123
|
-
const out = [];
|
|
124
|
-
for (const m of marks) {
|
|
125
|
-
const hit = pre.find((p) => m.path === p.at || m.path.startsWith(p.at + '.'));
|
|
126
|
-
if (undefined === hit) {
|
|
127
|
-
continue;
|
|
128
|
-
}
|
|
129
|
-
out.push({ unit: hit.path, piece: m.path, node: m.mark.node, rule: m.mark.rule });
|
|
130
|
-
}
|
|
131
|
-
return out;
|
|
132
|
-
}
|
|
133
|
-
// Every proper ancestor of an address, `$` included.
|
|
134
|
-
function ancestors(a) {
|
|
135
|
-
const parts = a.split('.');
|
|
136
|
-
const out = [];
|
|
137
|
-
for (let i = 1; i < parts.length; i++) {
|
|
138
|
-
out.push(parts.slice(0, i).join('.'));
|
|
139
|
-
}
|
|
140
|
-
return out;
|
|
141
|
-
}
|
|
142
|
-
function covered(set, a) {
|
|
143
|
-
if (set.has(a)) {
|
|
144
|
-
return true;
|
|
145
|
-
}
|
|
146
|
-
for (const up of ancestors(a)) {
|
|
147
|
-
if (set.has(up)) {
|
|
148
|
-
return true;
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
return false;
|
|
152
|
-
}
|
|
153
|
-
function coverOf(root, node, reads, opts, marks, instance, units) {
|
|
154
|
-
// THE ANCHOR IS THE ONE render() ALREADY FOUND, so the namespace
|
|
155
|
-
// under it is named without asking a second time: `--at` is resolved
|
|
156
|
-
// before the vet, and an anchor that named nothing never reached here.
|
|
157
|
-
const codeAddr = addr(node.path.concat('aontu'));
|
|
158
|
-
let from = root;
|
|
159
|
-
let base = [];
|
|
160
|
-
if (null != opts.coverageAt && '' !== opts.coverageAt) {
|
|
161
|
-
const found = (0, vet_1.anchorAt)(root, opts.coverageAt);
|
|
162
|
-
if (null == found) {
|
|
163
|
-
return undefined;
|
|
164
|
-
}
|
|
165
|
-
from = found;
|
|
166
|
-
base = found.path;
|
|
167
|
-
}
|
|
168
|
-
const above = new Set(reads);
|
|
169
|
-
const below = new Set();
|
|
170
|
-
for (const r of reads) {
|
|
171
|
-
for (const up of ancestors(r)) {
|
|
172
|
-
below.add(up);
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
const dead = [];
|
|
176
|
-
walkVals(from, (_v, path) => {
|
|
177
|
-
const a = addr(base.concat(path));
|
|
178
|
-
if (a === codeAddr || covered(above, a)) {
|
|
179
|
-
return false;
|
|
180
|
-
}
|
|
181
|
-
if (below.has(a) || 0 === path.length) {
|
|
182
|
-
return true;
|
|
183
|
-
}
|
|
184
|
-
dead.push(a);
|
|
185
|
-
return false;
|
|
186
|
-
});
|
|
187
|
-
// A SILENT HOLE: a declaration of a rendered unit that no stamp
|
|
188
|
-
// touches -- neither its own, nor one on the unit above it, nor one
|
|
189
|
-
// on a piece inside it.
|
|
190
|
-
const stamped = new Set(marks.map((m) => m.path));
|
|
191
|
-
const inside = new Set();
|
|
192
|
-
for (const m of marks) {
|
|
193
|
-
for (const up of ancestors(m.path)) {
|
|
194
|
-
inside.add(up);
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
const unruled = [];
|
|
198
|
-
unitList(instance).forEach((unit, i) => {
|
|
199
|
-
if (!units.some((u) => u.path === unit.path)) {
|
|
200
|
-
return;
|
|
201
|
-
}
|
|
202
|
-
const decls = unit.decls;
|
|
203
|
-
decls.forEach((_d, j) => {
|
|
204
|
-
const a = '$.aontu.Code.units.' + i + '.decls.' + j;
|
|
205
|
-
if (!covered(stamped, a) && !inside.has(a)) {
|
|
206
|
-
unruled.push({ unit: unit.path, path: a });
|
|
207
|
-
}
|
|
208
|
-
});
|
|
209
|
-
});
|
|
210
|
-
return { read: [...reads].sort(keyorder_1.cmpCodePoint), dead, unruled };
|
|
211
|
-
}
|
|
212
|
-
// The bundled text profile, evaluated once: the profile of a unit
|
|
213
|
-
// whose declarations are fragments and text escapes only.
|
|
214
|
-
const bundled = {};
|
|
215
|
-
// A bundled profile, evaluated once: the meet of aontu:render/lang/<lang>
|
|
216
|
-
// with the vocabulary, so its defaults are in it.
|
|
217
|
-
function bundledProfile(lang) {
|
|
218
|
-
if (!BUNDLED_LANGS.includes(lang)) {
|
|
219
|
-
return undefined;
|
|
220
|
-
}
|
|
221
|
-
if (undefined === bundled[lang]) {
|
|
222
|
-
bundled[lang] = new aontu_1.Aontu().generate('@"aontu:render/lang/' + lang + '"').aontu.render.Lang;
|
|
223
|
-
}
|
|
224
|
-
return bundled[lang];
|
|
225
|
-
}
|
|
226
|
-
function profileFor(lang, given, fragOnly) {
|
|
227
|
-
const supplied = (given ?? []).find((p) => p?.lang === lang);
|
|
228
|
-
if (undefined !== supplied) {
|
|
229
|
-
return supplied;
|
|
230
|
-
}
|
|
231
|
-
const own = bundledProfile(lang);
|
|
232
|
-
if (undefined !== own) {
|
|
233
|
-
return own;
|
|
234
|
-
}
|
|
235
|
-
return fragOnly ? bundledProfile('text') : undefined;
|
|
236
|
-
}
|
|
237
|
-
function isMap(v) {
|
|
238
|
-
return null != v && 'object' === typeof v && !Array.isArray(v);
|
|
239
|
-
}
|
|
240
|
-
// An inline profile merged over its base, map by map, the inline
|
|
241
|
-
// value winning at a leaf; keys in code-point order, so the merge is
|
|
242
|
-
// the same in both ports.
|
|
243
|
-
function mergeProfile(base, over) {
|
|
244
|
-
const out = { ...base };
|
|
245
|
-
for (const k of Object.keys(over).sort(keyorder_1.cmpCodePoint)) {
|
|
246
|
-
out[k] = isMap(base[k]) && isMap(over[k]) ?
|
|
247
|
-
mergeProfile(base[k], over[k]) : over[k];
|
|
248
|
-
}
|
|
249
|
-
return out;
|
|
250
|
-
}
|
|
251
|
-
function pad(profile, at) {
|
|
252
|
-
const indent = profile.indent ?? { unit: ' ', width: 2 };
|
|
253
|
-
return (indent.unit ?? ' ').repeat((indent.width ?? 2) * at);
|
|
254
|
-
}
|
|
255
|
-
function line(profile, at, text) {
|
|
256
|
-
return ('' === text ? '' : pad(profile, at)) + text + '\n';
|
|
257
|
-
}
|
|
258
|
-
// A reference inline is its name: through the profile's identifier
|
|
259
|
-
// rules under a lowering, verbatim under text.
|
|
260
|
-
function inline(piece, ctx) {
|
|
261
|
-
if ('string' === typeof piece) {
|
|
262
|
-
return piece;
|
|
263
|
-
}
|
|
264
|
-
return undefined === ctx ? piece.name : (0, lower_1.ident)(piece.name, 'record', ctx, '', false);
|
|
265
|
-
}
|
|
266
|
-
function foldPiece(piece, profile, unit, path, lossy, ctx) {
|
|
267
|
-
if ('string' === typeof piece) {
|
|
268
|
-
return line(profile, 0, piece);
|
|
269
|
-
}
|
|
270
|
-
if ('line' === piece.k) {
|
|
271
|
-
return line(profile, piece.at ?? 0, piece.n.map((p) => inline(p, ctx)).join(''));
|
|
272
|
-
}
|
|
273
|
-
if ('blank' === piece.k) {
|
|
274
|
-
return '\n'.repeat(piece.n ?? 1);
|
|
275
|
-
}
|
|
276
|
-
lossy.push({
|
|
277
|
-
unit, path, tier: 3, construct: 'raw',
|
|
278
|
-
reason: 'verbatim text: the renderer re-indents it and checks nothing else',
|
|
279
|
-
});
|
|
280
|
-
const at = piece.at ?? 0;
|
|
281
|
-
const reindent = piece.reindent ?? true;
|
|
282
|
-
const lines = piece.text.split('\n');
|
|
283
|
-
if ('' === lines[lines.length - 1]) {
|
|
284
|
-
lines.pop();
|
|
285
|
-
}
|
|
286
|
-
return lines.map((l) => reindent ? line(profile, at, l) : l + '\n').join('');
|
|
287
|
-
}
|
|
288
|
-
function renderProfile(src, options) {
|
|
289
|
-
const opts = options ?? {};
|
|
290
|
-
const aontu = new aontu_1.Aontu((0, utility_1.includeOpts)(opts));
|
|
291
|
-
const actx = aontu.ctx({ collect: true });
|
|
292
|
-
const root = aontu.unify(src, { path: opts.path, collect: true }, actx);
|
|
293
|
-
if (0 < actx.err.length || true === root?.isNil) {
|
|
294
|
-
return { errors: [(0, vet_1.failureFinding)(actx, opts.path, root)] };
|
|
295
|
-
}
|
|
296
|
-
const report = (0, vet_1.vet)(PROFILE_VOCABULARY, (0, hcanon_1.hcanon)(root));
|
|
297
|
-
if ('valid' !== report.verdict) {
|
|
298
|
-
return { errors: report.findings };
|
|
299
|
-
}
|
|
300
|
-
// The meet, keyed as render's is: the vocabulary requires `profile`,
|
|
301
|
-
// so a value the vet admitted has one.
|
|
302
|
-
const instance = new aontu_1.Aontu().generate(PROFILE_VOCABULARY + '\naontu: render: Lang: ' +
|
|
303
|
-
(0, hcanon_1.hcanon)(root.peg.aontu.peg.render.peg.Lang));
|
|
304
|
-
return { profile: instance.aontu.render.Lang };
|
|
305
|
-
}
|
|
306
|
-
// The instance's unit list, or none: `code` is the vocabulary's own
|
|
307
|
-
// key and is always there, `units` is not. One reader, so the fold,
|
|
308
|
-
// the trace and the coverage report all see the same list.
|
|
309
|
-
function unitList(instance) {
|
|
310
|
-
return Array.isArray(instance?.aontu?.Code?.units) ?
|
|
311
|
-
instance.aontu.Code.units : [];
|
|
312
|
-
}
|
|
313
|
-
function renderValue(instance, options) {
|
|
314
|
-
const opts = options ?? {};
|
|
315
|
-
const errors = [];
|
|
316
|
-
const lossy = [];
|
|
317
|
-
const units = [];
|
|
318
|
-
const list = unitList(instance);
|
|
319
|
-
const seen = [];
|
|
320
|
-
let selected = 0;
|
|
321
|
-
list.forEach((unit, i) => {
|
|
322
|
-
const upath = '$.aontu.Code.units.' + i;
|
|
323
|
-
const path = unit.path;
|
|
324
|
-
const lang = unit.lang;
|
|
325
|
-
// A UNIT PATH IS RELATIVE, DESCENDS, AND IS ITS OWN (RENDER.0.md
|
|
326
|
-
// D8): an absolute path, a `..` segment or a repeat of another
|
|
327
|
-
// unit's path is refused before anything is written.
|
|
328
|
-
if (path.startsWith('/')) {
|
|
329
|
-
errors.push(finding('render_path', 'parse', upath + '.path', 'the unit path ' + path + ' is absolute.'));
|
|
330
|
-
return;
|
|
331
|
-
}
|
|
332
|
-
if (path.split('/').includes('..')) {
|
|
333
|
-
errors.push(finding('render_path', 'parse', upath + '.path', 'the unit path ' + path + ' climbs out of the output directory.'));
|
|
334
|
-
return;
|
|
335
|
-
}
|
|
336
|
-
if (seen.includes(path)) {
|
|
337
|
-
errors.push(finding('render_path', 'parse', upath + '.path', 'the unit path ' + path + ' repeats another unit\'s.'));
|
|
338
|
-
return;
|
|
339
|
-
}
|
|
340
|
-
seen.push(path);
|
|
341
|
-
if (undefined !== opts.unit && opts.unit !== path) {
|
|
342
|
-
return;
|
|
343
|
-
}
|
|
344
|
-
selected++;
|
|
345
|
-
const decls = unit.decls;
|
|
346
|
-
const fragOnly = decls.every((d) => 'frag' === d.k || 'text' === d.k);
|
|
347
|
-
const base = profileFor(lang, opts.profiles, fragOnly);
|
|
348
|
-
if (undefined === base) {
|
|
349
|
-
errors.push(finding('render_profile', 'parse', upath + '.lang', 'no profile renders ' + lang + ': a declaration needs a lowering, and ' +
|
|
350
|
-
'only fragments and text escapes render under aontu:render/lang/text.'));
|
|
351
|
-
return;
|
|
352
|
-
}
|
|
353
|
-
const profile = null == unit.profile ? base : mergeProfile(base, unit.profile);
|
|
354
|
-
const family = profile.lowering;
|
|
355
|
-
const ctx = undefined === family ? undefined
|
|
356
|
-
: { profile, family, unit: path, lossy };
|
|
357
|
-
let text = '';
|
|
358
|
-
if (undefined !== ctx) {
|
|
359
|
-
const header = (0, lower_1.lowerHeader)(unit, instance?.aontu?.Code?.source, ctx);
|
|
360
|
-
for (const piece of header) {
|
|
361
|
-
text += foldPiece(piece, profile, path, upath, lossy, ctx);
|
|
362
|
-
}
|
|
363
|
-
if (0 < header.length && 0 < decls.length) {
|
|
364
|
-
text += '\n';
|
|
365
|
-
}
|
|
366
|
-
}
|
|
367
|
-
let lowered = false;
|
|
368
|
-
decls.forEach((decl, j) => {
|
|
369
|
-
const dpath = upath + '.decls.' + j;
|
|
370
|
-
if ('frag' === decl.k) {
|
|
371
|
-
lowered = false;
|
|
372
|
-
// Lossy only against a language whose DECLARATIONS could have
|
|
373
|
-
// been lowered instead: a fragment is all the others have.
|
|
374
|
-
if (null != profile.lowering) {
|
|
375
|
-
lossy.push({
|
|
376
|
-
unit: path, path: dpath, tier: 2, construct: 'frag',
|
|
377
|
-
reason: 'a fragment says nothing about ' + lang + ' syntax',
|
|
378
|
-
});
|
|
379
|
-
}
|
|
380
|
-
decl.n.forEach((piece, n) => {
|
|
381
|
-
text += foldPiece(piece, profile, path, dpath + '.n.' + n, lossy, ctx);
|
|
382
|
-
});
|
|
383
|
-
}
|
|
384
|
-
else if ('text' === decl.k) {
|
|
385
|
-
lowered = false;
|
|
386
|
-
if (decl.lang !== lang) {
|
|
387
|
-
errors.push(finding('render_lang', 'conflict', dpath + '.lang', 'the text escape is ' + decl.lang + ' in a ' + lang + ' unit.'));
|
|
388
|
-
return;
|
|
389
|
-
}
|
|
390
|
-
lossy.push({
|
|
391
|
-
unit: path, path: dpath, tier: 3, construct: 'text',
|
|
392
|
-
reason: 'verbatim ' + lang + ': the renderer checks nothing in it',
|
|
393
|
-
});
|
|
394
|
-
text += decl.text;
|
|
395
|
-
}
|
|
396
|
-
else if (undefined !== ctx) {
|
|
397
|
-
if (lowered) {
|
|
398
|
-
text += '\n';
|
|
399
|
-
}
|
|
400
|
-
for (const piece of (0, lower_1.lowerDecl)(decl, dpath, ctx)) {
|
|
401
|
-
text += foldPiece(piece, profile, path, dpath, lossy, ctx);
|
|
402
|
-
}
|
|
403
|
-
lowered = true;
|
|
404
|
-
}
|
|
405
|
-
else {
|
|
406
|
-
errors.push(finding('render_profile', 'parse', dpath + '.k', 'a ' + decl.k + ' declaration has no lowering under the ' +
|
|
407
|
-
profile.lang + ' profile.'));
|
|
408
|
-
}
|
|
409
|
-
});
|
|
410
|
-
units.push({ path, lang, text });
|
|
411
|
-
});
|
|
412
|
-
if (undefined !== opts.unit && 0 === selected) {
|
|
413
|
-
errors.push(finding('render_unit', 'reference', '$.aontu.Code.units', 'no unit has the path ' + opts.unit + '.'));
|
|
414
|
-
}
|
|
415
|
-
if (true === opts.strict) {
|
|
416
|
-
for (const loss of lossy) {
|
|
417
|
-
if (3 === loss.tier) {
|
|
418
|
-
errors.push(finding('render_strict', 'conflict', loss.path, 'the ' + loss.construct + ' in ' + loss.unit +
|
|
419
|
-
' is an opaque escape, refused under strict.'));
|
|
420
|
-
}
|
|
421
|
-
}
|
|
422
|
-
}
|
|
423
|
-
if (0 < errors.length) {
|
|
424
|
-
return errorReport(errors);
|
|
425
|
-
}
|
|
426
|
-
return {
|
|
427
|
-
verdict: 0 < lossy.length ? 'lossy' : 'ok',
|
|
428
|
-
units,
|
|
429
|
-
lossy,
|
|
430
|
-
};
|
|
431
|
-
}
|
|
432
|
-
//# sourceMappingURL=render.js.map
|
package/dist/render.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"render.js","sourceRoot":"","sources":["../src/render.ts"],"names":[],"mappings":";AAAA,oDAAoD;;;;;AAGpD,mCAA+B;AAC/B,+BAAqD;AAErD,qCAAiC;AACjC,+BAAkC;AAClC,yCAAyC;AACzC,uCAAuC;AAEvC,mCAAuD;AAoEvD,MAAM,UAAU,GAAG,eAAe,CAAA;AAClC,2DAA2D;AAC3D,MAAM,aAAa,GAAG,CAAC,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,YAAY,CAAC,CAAA;AAC9D,MAAM,kBAAkB,GAAG,iBAAiB,CAAA;AAG5C,SAAS,OAAO,CACd,IAAY,EAAE,GAAW,EAAE,IAAY,EAAE,OAAe;IAExD,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,GAAU,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,EAAE,CAAA;AACjF,CAAC;AAGD,SAAS,WAAW,CAAC,MAAoB;IACvC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,CAAA;AAC3D,CAAC;AAGD,gBAAuB,GAAW,EAAE,OAAuB;IACzD,MAAM,IAAI,GAAG,OAAO,IAAI,EAAE,CAAA;IAC1B,MAAM,KAAK,GAAG,IAAI,aAAK,CA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