@skillstech/thunderlang 1.1.0 → 1.2.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/CHANGELOG.md +81 -0
- package/README.md +4 -1
- package/dist/core.cjs +1 -1
- package/dist/index.cjs +1 -1
- package/dist/learn.cjs +7510 -503
- package/package.json +2 -2
- package/src/cli-home.mjs +242 -0
- package/src/cli.mjs +107 -38
- package/src/core/cli.mjs +65 -14
- package/src/core/diagnostics.mjs +1 -0
- package/src/core/engine-core.mjs +572 -0
- package/src/core/engine-values.mjs +1054 -0
- package/src/core/engine-worker.mjs +15 -0
- package/src/core/engine.mjs +63 -0
- package/src/core/index.mjs +1 -0
- package/src/core/project.mjs +16 -6
- package/src/core/runtime-typescript.mjs +119 -0
- package/src/core/target-python.mjs +2 -1
- package/src/core/target-typescript.mjs +466 -0
- package/src/core/typescript-run.mjs +114 -0
- package/src/emit.mjs +1 -1
- package/src/learn-lessons.mjs +245 -1
- package/src/learn.d.mts +8 -0
- package/src/learn.mjs +40 -4
- package/src/read-level.mjs +146 -0
- package/src/term.mjs +89 -0
- package/src/try-cli.mjs +225 -0
- package/src/why-cli.mjs +17 -7
- package/src/why.d.mts +17 -7
- package/src/why.mjs +114 -33
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// Runs the Thunder engine on its own thread, with a stack deep enough for the recursion Python allows (about 1000
|
|
2
|
+
// calls). engine.mjs starts it and waits for the answer (see runSync there).
|
|
3
|
+
import { workerData } from 'node:worker_threads';
|
|
4
|
+
import { runInProcess, testInProcess } from './engine.mjs';
|
|
5
|
+
|
|
6
|
+
const { shared, port, job } = workerData;
|
|
7
|
+
let result;
|
|
8
|
+
try {
|
|
9
|
+
result = job.tests ? testInProcess(job) : runInProcess(job);
|
|
10
|
+
} catch (e) {
|
|
11
|
+
result = { status: 70, stdout: '', stderr: `The Thunder engine failed: ${e?.stack ?? e}\n` };
|
|
12
|
+
}
|
|
13
|
+
port.postMessage(result);
|
|
14
|
+
Atomics.store(shared, 0, 1);
|
|
15
|
+
Atomics.notify(shared, 0);
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
// The Thunder engine: runs Thunder Core directly, with no Python (thunder run --engine thunder).
|
|
2
|
+
//
|
|
3
|
+
// It runs the SAME checked program the Python target compiles (compileCore -> program + info), so there is one
|
|
4
|
+
// meaning of Thunder, not two. The language itself lives in engine-core.mjs (no Node APIs, so it also runs in a
|
|
5
|
+
// browser); this file adds what a command line needs: reading files from disk, and a worker thread with a deep stack
|
|
6
|
+
// for programs that nest calls deeper than the calling thread allows. compiler/test/core-engine.test.mjs runs every
|
|
7
|
+
// Core test program on both engines and compares the output, errors included. A difference is a bug in one of them.
|
|
8
|
+
//
|
|
9
|
+
// A program that uses a Python module ("Use csv as csv") is not run here: Thunder never imitates a library.
|
|
10
|
+
|
|
11
|
+
import { readFileSync } from 'node:fs';
|
|
12
|
+
import { Worker, MessageChannel, receiveMessageOnPort } from 'node:worker_threads';
|
|
13
|
+
import { resolve as resolvePath } from 'node:path';
|
|
14
|
+
import { ENGINES, pythonModulesUsed, refusalText, runInProcess as runCore, testInProcess as testCore, ThunderErr, PyErr } from './engine-core.mjs';
|
|
15
|
+
|
|
16
|
+
export { ENGINES, pythonModulesUsed, refusalText, ThunderErr, PyErr };
|
|
17
|
+
|
|
18
|
+
/** Files a program reads come from disk, relative to the folder it runs in. */
|
|
19
|
+
const readText = (path, cwd) => readFileSync(resolvePath(cwd, path), 'utf8');
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Run a program with the Thunder engine. `entry` is a compileCore result. Returns { status, stdout, stderr }, the way
|
|
23
|
+
* `python main.py` would end: status 0, or 1 after an error reported in Thunder words. On this thread first (fast, no
|
|
24
|
+
* worker); only a program that nests calls deeper than this thread's stack allows is run again on a worker with a
|
|
25
|
+
* deep stack. Running again is safe: the engine only collects output and reads.
|
|
26
|
+
*/
|
|
27
|
+
export function runWithEngine({ entry, cwd = process.cwd() } = {}) {
|
|
28
|
+
const uses = pythonModulesUsed([entry]);
|
|
29
|
+
if (uses.length) return { status: 2, stdout: '', stderr: `${refusalText(uses)}\n`, refused: uses };
|
|
30
|
+
const r = runCore({ entry, cwd, deeper: true, readText });
|
|
31
|
+
return r.needsDeeperStack ? runSync({ entry, cwd }) : r;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/** The same, on the calling thread only. */
|
|
35
|
+
export function runInProcess({ entry, cwd = process.cwd(), deeper = false } = {}) { return runCore({ entry, cwd, deeper, readText }); }
|
|
36
|
+
|
|
37
|
+
/** Run every Test block, the way run_tests.py does: one line per test, then the totals. */
|
|
38
|
+
export function testWithEngine({ results, cwd = process.cwd() } = {}) {
|
|
39
|
+
const uses = pythonModulesUsed(results);
|
|
40
|
+
if (uses.length) return { status: 2, stdout: '', stderr: `${refusalText(uses)}\n`, refused: uses };
|
|
41
|
+
const r = testCore({ results, cwd, deeper: true, readText });
|
|
42
|
+
return r.needsDeeperStack ? runSync({ results, cwd, tests: true }) : r;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/** The same, on the calling thread only. */
|
|
46
|
+
export function testInProcess({ results, cwd = process.cwd(), deeper = false } = {}) { return testCore({ results, cwd, deeper, readText }); }
|
|
47
|
+
|
|
48
|
+
function runSync(job) {
|
|
49
|
+
const shared = new Int32Array(new SharedArrayBuffer(4));
|
|
50
|
+
const { port1, port2 } = new MessageChannel();
|
|
51
|
+
const worker = new Worker(new URL('./engine-worker.mjs', import.meta.url), {
|
|
52
|
+
workerData: { shared, port: port2, job }, transferList: [port2], resourceLimits: { stackSizeMb: 256 }, stdout: false, stderr: false,
|
|
53
|
+
});
|
|
54
|
+
try {
|
|
55
|
+
while (Atomics.wait(shared, 0, 0, 1000) === 'timed-out') { if (!worker.threadId) break; }
|
|
56
|
+
const msg = receiveMessageOnPort(port1);
|
|
57
|
+
return msg ? msg.message : { status: 70, stdout: '', stderr: 'The Thunder engine stopped without an answer.\n' };
|
|
58
|
+
} finally {
|
|
59
|
+
worker.terminate();
|
|
60
|
+
port1.close();
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
package/src/core/index.mjs
CHANGED
|
@@ -13,6 +13,7 @@ import { formatDiagnostic } from './diagnostics.mjs';
|
|
|
13
13
|
export { parseCore } from './parser.mjs';
|
|
14
14
|
export { checkCore } from './check.mjs';
|
|
15
15
|
export { toPython } from './target-python.mjs';
|
|
16
|
+
export { toTypeScript, pythonOnlyUses } from './target-typescript.mjs';
|
|
16
17
|
export { PYTHON_RUNTIME, RUNTIME_VERSION } from './runtime-python.mjs';
|
|
17
18
|
export { CODES, formatDiagnostic } from './diagnostics.mjs';
|
|
18
19
|
export { formatCore } from './format.mjs';
|
package/src/core/project.mjs
CHANGED
|
@@ -8,6 +8,10 @@ import { join, dirname, relative, resolve, basename } from 'node:path';
|
|
|
8
8
|
import { spawnSync } from 'node:child_process';
|
|
9
9
|
import { compileCore } from './index.mjs';
|
|
10
10
|
import { PYTHON_RUNTIME } from './runtime-python.mjs';
|
|
11
|
+
import { writeTypeScript, typescriptDiagnostics } from './typescript-run.mjs';
|
|
12
|
+
|
|
13
|
+
/** The languages a Thunder Core project can be compiled to. */
|
|
14
|
+
export const TARGETS = ['python', 'typescript'];
|
|
11
15
|
|
|
12
16
|
export const PROJECT_FILE = 'thunder.toml';
|
|
13
17
|
|
|
@@ -44,7 +48,7 @@ export function loadProject(root) {
|
|
|
44
48
|
const toml = parseToml(readFileSync(join(root, PROJECT_FILE), 'utf8'));
|
|
45
49
|
const build = toml.build ?? {};
|
|
46
50
|
const target = String(build.target ?? 'python');
|
|
47
|
-
if (target
|
|
51
|
+
if (!TARGETS.includes(target)) throw new Error(`thunder.toml: target "${target}" is not supported yet. Thunder Core builds Python (target = "python") or TypeScript (target = "typescript").`);
|
|
48
52
|
return {
|
|
49
53
|
root,
|
|
50
54
|
name: toml.project?.name ?? basename(root),
|
|
@@ -52,7 +56,7 @@ export function loadProject(root) {
|
|
|
52
56
|
target,
|
|
53
57
|
src: build.source ?? 'src',
|
|
54
58
|
tests: build.tests ?? 'tests',
|
|
55
|
-
out: build.output ??
|
|
59
|
+
out: build.output ?? `generated/${target}`,
|
|
56
60
|
entry: build.entry ?? null,
|
|
57
61
|
};
|
|
58
62
|
}
|
|
@@ -72,13 +76,16 @@ export function moduleNameFor(file) {
|
|
|
72
76
|
* Compile a project (or a single file when `single` is given). Writes generated/python/<module>.py for every
|
|
73
77
|
* file plus thunder_runtime.py. Returns { ok, results: [{ file, module, ok, diagnostics }], outDir, entryModule }.
|
|
74
78
|
*/
|
|
75
|
-
export function buildProject({ root, single = null, includeTests = false, write = true, config = null }) {
|
|
79
|
+
export function buildProject({ root, single = null, includeTests = false, write = true, config = null, target = null }) {
|
|
76
80
|
const cfg = config ?? (single && !findProjectRoot(single) ? null : loadProject(root));
|
|
77
81
|
const base = cfg ? cfg.root : dirname(resolve(single));
|
|
82
|
+
// --target overrides thunder.toml; a different target than the project's builds into generated/<target>.
|
|
83
|
+
const tgt = target ?? cfg?.target ?? 'python';
|
|
84
|
+
if (!TARGETS.includes(tgt)) throw new Error(`there is no target "${tgt}". Thunder Core builds python (the default) or typescript.`);
|
|
78
85
|
const srcFiles = cfg ? thunderFiles(join(cfg.root, cfg.src)) : [];
|
|
79
86
|
if (single && !srcFiles.includes(resolve(single))) srcFiles.unshift(resolve(single));
|
|
80
87
|
const testFiles = includeTests && cfg ? thunderFiles(join(cfg.root, cfg.tests)) : [];
|
|
81
|
-
const outDir = join(base, cfg ? cfg.out :
|
|
88
|
+
const outDir = join(base, cfg && (target == null || target === cfg.target) ? cfg.out : `generated/${tgt}`);
|
|
82
89
|
const results = [];
|
|
83
90
|
const used = new Set();
|
|
84
91
|
const uniqueModule = (f, prefix = '') => { let n = prefix + moduleNameFor(f); let k = 2; while (used.has(n)) n = `${prefix}${moduleNameFor(f)}_${k++}`; used.add(n); return n; };
|
|
@@ -93,8 +100,11 @@ export function buildProject({ root, single = null, includeTests = false, write
|
|
|
93
100
|
const r = compileCore(readFileSync(f, 'utf8'), { file: rel, imported: srcOk, srcModules: srcOk.map((x) => x.module) });
|
|
94
101
|
results.push({ ...r, path: f, rel, module: uniqueModule(f, 'tests_'), kind: 'test' });
|
|
95
102
|
}
|
|
103
|
+
// A Python module (Use) cannot be compiled to TypeScript: refuse it before anything is written (TC405).
|
|
104
|
+
if (tgt === 'typescript') for (const r of results.filter((x) => x.ok)) { const d = typescriptDiagnostics(r); if (d.length) { r.diagnostics = [...r.diagnostics, ...d]; r.ok = false; } }
|
|
96
105
|
const ok = results.every((r) => r.ok);
|
|
97
|
-
if (ok && write)
|
|
106
|
+
if (ok && write && tgt === 'typescript') writeTypeScript(results, outDir);
|
|
107
|
+
if (ok && write && tgt === 'python') {
|
|
98
108
|
mkdirSync(outDir, { recursive: true });
|
|
99
109
|
writeFileSync(join(outDir, 'thunder_runtime.py'), PYTHON_RUNTIME);
|
|
100
110
|
for (const r of results) writeFileSync(join(outDir, `${r.module}.py`), r.python);
|
|
@@ -109,7 +119,7 @@ export function buildProject({ root, single = null, includeTests = false, write
|
|
|
109
119
|
}
|
|
110
120
|
const entryPath = single ? resolve(single) : cfg?.entry ? join(cfg.root, cfg.entry) : join(base, cfg?.src ?? '.', 'main.thunder');
|
|
111
121
|
const entry = results.find((r) => r.path === entryPath) ?? results.find((r) => r.kind === 'src');
|
|
112
|
-
return { ok, results, outDir, base, entryModule: entry?.module ?? null, entry, config: cfg };
|
|
122
|
+
return { ok, results, outDir, base, entryModule: entry?.module ?? null, entry, config: cfg, target: tgt };
|
|
113
123
|
}
|
|
114
124
|
|
|
115
125
|
/** The local Python 3.10+: $THUNDER_PYTHON, then python3, then python. Returns { cmd, version } or { error }. */
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
// thunder_runtime.mjs, the runtime compiled TypeScript uses, and its declarations (thunder_runtime.d.mts).
|
|
2
|
+
//
|
|
3
|
+
// One meaning of Thunder: the runtime is engine-values.mjs, byte for byte (the same values, rules, and messages the
|
|
4
|
+
// Thunder engine uses), followed by a small Node part: call frames for error lines, output, reading files, and
|
|
5
|
+
// running the program or its tests. compiler/test/core-engines.mjs runs every Core test program on Python, the
|
|
6
|
+
// Thunder engine, and compiled TypeScript, and requires the same output from all three.
|
|
7
|
+
import { readFileSync } from 'node:fs';
|
|
8
|
+
import * as VALUES from './engine-values.mjs';
|
|
9
|
+
|
|
10
|
+
const VALUES_SOURCE = readFileSync(new URL('./engine-values.mjs', import.meta.url), 'utf8');
|
|
11
|
+
|
|
12
|
+
/** The Node part: everything here is about running, not about what a value means. */
|
|
13
|
+
const NODE_PART = `
|
|
14
|
+
// ── Running compiled TypeScript: frames (for error lines), output, files, and the program or its tests ───────────
|
|
15
|
+
import { readFileSync as nodeReadFile, realpathSync as nodeRealpath } from 'node:fs';
|
|
16
|
+
import { resolve as nodeResolve } from 'node:path';
|
|
17
|
+
|
|
18
|
+
const frames = [];
|
|
19
|
+
let aborted = false;
|
|
20
|
+
const snapshot = () => frames.map((f) => ({ file: f.file, line: f.line }));
|
|
21
|
+
|
|
22
|
+
/** A frame for a program, a test, or a kept value (as the engine's withFrame). */
|
|
23
|
+
export function enterFrame(file, line) {
|
|
24
|
+
if (frames.length >= MAX_FRAMES) throw new PyErr('RecursionError', 'maximum recursion depth exceeded');
|
|
25
|
+
const f = { file, line };
|
|
26
|
+
frames.push(f);
|
|
27
|
+
return f;
|
|
28
|
+
}
|
|
29
|
+
/** A frame for a call; \`first\` is the Thunder line the function starts on (where Python stops when it is too deep). */
|
|
30
|
+
export function enterCall(file, line, first) {
|
|
31
|
+
if (frames.length >= MAX_FRAMES) {
|
|
32
|
+
const err = new PyErr('RecursionError', 'maximum recursion depth exceeded');
|
|
33
|
+
if (first != null) err.where = [...snapshot(), { file, line: first }];
|
|
34
|
+
throw err;
|
|
35
|
+
}
|
|
36
|
+
const f = { file, line };
|
|
37
|
+
frames.push(f);
|
|
38
|
+
return f;
|
|
39
|
+
}
|
|
40
|
+
export function leave() { frames.pop(); }
|
|
41
|
+
/** The innermost frame (a record's Never rule runs in its caller's frame). */
|
|
42
|
+
export function topFrame() { return frames[frames.length - 1]; }
|
|
43
|
+
/** An error on its way out of a frame: remember where it happened (the innermost frames first seen). */
|
|
44
|
+
export function fail(e) { const err = asPyErr(e); if (!err.where) err.where = snapshot(); return err; }
|
|
45
|
+
function withFrame(frame, fn) {
|
|
46
|
+
if (frames.length >= MAX_FRAMES) throw new PyErr('RecursionError', 'maximum recursion depth exceeded');
|
|
47
|
+
frames.push(frame);
|
|
48
|
+
try { return fn(); } catch (e) { throw fail(e); } finally { frames.pop(); }
|
|
49
|
+
}
|
|
50
|
+
/** A key for sorting by a field: it runs in a frame at the sorting line, as the generated Python's lambda does. */
|
|
51
|
+
export function keyAt(F, get) { const frame = { file: F.file, line: F.line }; return (item) => withFrame(frame, () => get(item)); }
|
|
52
|
+
|
|
53
|
+
export function say(text) { process.stdout.write(\`\${text}\\n\`); }
|
|
54
|
+
export function readText(path) { return readTextVia((p, c) => nodeReadFile(nodeResolve(c, p), 'utf8'), process.cwd(), path); }
|
|
55
|
+
|
|
56
|
+
/** Records: their kind (name, fields, and Never rules), making one, and setting a field. */
|
|
57
|
+
export function recordKind(py, fields, rules = {}) { return { isRecord: true, py, fields, rules }; }
|
|
58
|
+
export function setAttr(obj, name, value) {
|
|
59
|
+
setAttrWith((rec) => { for (const r of rec.cls.rules[name] ?? []) never(r.cond(value), r.text, r.line, value); }, obj, name, value);
|
|
60
|
+
}
|
|
61
|
+
export function setField(obj, key, value) { setFieldWith(setAttr, obj, key, value); }
|
|
62
|
+
export function newRecord(cls, pairs) { return newRecordWith(setAttr, cls, new Map(pairs)); }
|
|
63
|
+
|
|
64
|
+
function report(e) { process.stderr.write(\`\${describeError(asPyErr(e))}\\n\`); process.exitCode = 1; aborted = true; }
|
|
65
|
+
/** Work out a file's kept values; an error stops the program with a Thunder message. */
|
|
66
|
+
export function init(file, fn) {
|
|
67
|
+
if (aborted) return;
|
|
68
|
+
const F = { file, line: 0 };
|
|
69
|
+
try { withFrame(F, () => fn(F)); } catch (e) { report(e); }
|
|
70
|
+
}
|
|
71
|
+
/** Is this module the one Node was asked to run? */
|
|
72
|
+
export function isEntry(url) {
|
|
73
|
+
const arg = process.argv[1];
|
|
74
|
+
if (!arg) return false;
|
|
75
|
+
const real = (p) => { try { return nodeRealpath(p); } catch { return p; } };
|
|
76
|
+
const strip = (p) => real(p).replace(/\\\\/g, '/').replace(/\\.(ts|mts|js|mjs)$/, '');
|
|
77
|
+
return strip(decodeURIComponent(new URL(url).pathname)) === strip(nodeResolve(arg));
|
|
78
|
+
}
|
|
79
|
+
export function run(main) { if (aborted) return; try { main(); } catch (e) { report(e); } }
|
|
80
|
+
/** Every Test block, the way run_tests.py runs them: one line per test, then the totals. */
|
|
81
|
+
export function runTests(modules) {
|
|
82
|
+
if (aborted) return;
|
|
83
|
+
let passed = 0, failed = 0;
|
|
84
|
+
for (const [file, tests] of modules) {
|
|
85
|
+
for (const [title, fn, line] of tests) {
|
|
86
|
+
try { fn(); passed++; say(\`PASS \${title} (\${file}, line \${line})\`); }
|
|
87
|
+
catch (e) { failed++; say(\`FAIL \${title} (\${file}, line \${line})\`); say(\` \${describeError(asPyErr(e))}\`); }
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
const total = passed + failed;
|
|
91
|
+
say(\`\${total} test\${total === 1 ? '' : 's'}: \${passed} passed, \${failed} failed\`);
|
|
92
|
+
if (failed) process.exitCode = 1;
|
|
93
|
+
}
|
|
94
|
+
`;
|
|
95
|
+
|
|
96
|
+
const NODE_EXPORTS = { functions: ['enterFrame', 'enterCall', 'leave', 'topFrame', 'fail', 'keyAt', 'say', 'readText', 'recordKind', 'setAttr', 'setField', 'newRecord', 'init', 'isEntry', 'run', 'runTests'] };
|
|
97
|
+
|
|
98
|
+
const HEADER = `// thunder_runtime.mjs: written by the Thunder compiler next to compiled TypeScript. Standard library only.
|
|
99
|
+
// The values and rules here are the Thunder engine's own (engine-values.mjs), so compiled TypeScript, the Thunder
|
|
100
|
+
// engine, and compiled Python say the same thing for the same program.
|
|
101
|
+
`;
|
|
102
|
+
|
|
103
|
+
export const TS_RUNTIME = `${HEADER}\n${VALUES_SOURCE.trimEnd()}\n${NODE_PART}`;
|
|
104
|
+
|
|
105
|
+
const isClass = (v) => typeof v === 'function' && /^class\b/.test(Function.prototype.toString.call(v));
|
|
106
|
+
|
|
107
|
+
/** Declarations for the runtime, made from its exports: every function takes and gives values of any kind. */
|
|
108
|
+
function declarations() {
|
|
109
|
+
const L = ['// thunder_runtime.d.mts: types for thunder_runtime.mjs (written by the Thunder compiler).', '// Thunder values are checked when the program runs; to TypeScript they are of any kind.', ''];
|
|
110
|
+
for (const [name, v] of Object.entries(VALUES).sort(([a], [b]) => a.localeCompare(b))) {
|
|
111
|
+
if (isClass(v)) L.push(`export declare class ${name} { constructor(...args: any[]); [key: string]: any; static [key: string]: any; }`);
|
|
112
|
+
else if (typeof v === 'function') L.push(`export declare function ${name}(...args: any[]): any;`);
|
|
113
|
+
else L.push(`export declare const ${name}: any;`);
|
|
114
|
+
}
|
|
115
|
+
for (const f of NODE_EXPORTS.functions) L.push(`export declare function ${f}(...args: any[]): any;`);
|
|
116
|
+
return `${L.join('\n')}\n`;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export const TS_RUNTIME_DTS = declarations();
|
|
@@ -350,7 +350,8 @@ class Gen {
|
|
|
350
350
|
const A = (c) => ({ c, p: P.atom });
|
|
351
351
|
const sub = (k) => this.x(k, ctx);
|
|
352
352
|
switch (e.k) {
|
|
353
|
-
|
|
353
|
+
// A whole number: Python refuses leading zeros (007), and Thunder means 7.
|
|
354
|
+
case 'num': if (e.whole) return A(e.text.replace(/^0+(?=\d)/, '')); this.needDecimal = true; return A(`Decimal(${py(e.text)})`);
|
|
354
355
|
case 'money': return A(`${this.R('Money')}(${py(e.text)})`);
|
|
355
356
|
case 'percent': this.needDecimal = true; return A(`Decimal(${py(percentDecimal(e.text))})`);
|
|
356
357
|
case 'bool': return A(e.v ? 'True' : 'False');
|