@codegraft/core 0.1.0-beta.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/LICENSE +21 -0
- package/README.md +13 -0
- package/dist/assert.d.ts +8 -0
- package/dist/assert.d.ts.map +1 -0
- package/dist/assert.js +11 -0
- package/dist/assert.js.map +1 -0
- package/dist/collection.d.ts +164 -0
- package/dist/collection.d.ts.map +1 -0
- package/dist/collection.js +570 -0
- package/dist/collection.js.map +1 -0
- package/dist/comment-attachment.d.ts +25 -0
- package/dist/comment-attachment.d.ts.map +1 -0
- package/dist/comment-attachment.js +94 -0
- package/dist/comment-attachment.js.map +1 -0
- package/dist/edit-collector.d.ts +31 -0
- package/dist/edit-collector.d.ts.map +1 -0
- package/dist/edit-collector.js +75 -0
- package/dist/edit-collector.js.map +1 -0
- package/dist/evaluate.d.ts +15 -0
- package/dist/evaluate.d.ts.map +1 -0
- package/dist/evaluate.js +95 -0
- package/dist/evaluate.js.map +1 -0
- package/dist/extensions.d.ts +3 -0
- package/dist/extensions.d.ts.map +1 -0
- package/dist/extensions.js +19 -0
- package/dist/extensions.js.map +1 -0
- package/dist/generated/node-types.d.ts +31 -0
- package/dist/generated/node-types.d.ts.map +1 -0
- package/dist/generated/node-types.js +5 -0
- package/dist/generated/node-types.js.map +1 -0
- package/dist/helpers.d.ts +13 -0
- package/dist/helpers.d.ts.map +1 -0
- package/dist/helpers.js +27 -0
- package/dist/helpers.js.map +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -0
- package/dist/internal.d.ts +6 -0
- package/dist/internal.d.ts.map +1 -0
- package/dist/internal.js +9 -0
- package/dist/internal.js.map +1 -0
- package/dist/parser.d.ts +30 -0
- package/dist/parser.d.ts.map +1 -0
- package/dist/parser.js +125 -0
- package/dist/parser.js.map +1 -0
- package/dist/resolver.d.ts +27 -0
- package/dist/resolver.d.ts.map +1 -0
- package/dist/resolver.js +241 -0
- package/dist/resolver.js.map +1 -0
- package/dist/rich-node.d.ts +5 -0
- package/dist/rich-node.d.ts.map +1 -0
- package/dist/rich-node.js +101 -0
- package/dist/rich-node.js.map +1 -0
- package/dist/types.d.ts +112 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/dist/zone-splitter.d.ts +12 -0
- package/dist/zone-splitter.d.ts.map +1 -0
- package/dist/zone-splitter.js +23 -0
- package/dist/zone-splitter.js.map +1 -0
- package/package.json +62 -0
- package/wasm/tree-sitter-tsx.wasm +0 -0
- package/wasm/tree-sitter-typescript.wasm +0 -0
- package/wasm/tree-sitter-yaml.wasm +0 -0
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The node types that count as comments, per grammar — the single source of truth
|
|
3
|
+
* for "what is a comment node". Consumed by the attachment pass below and by
|
|
4
|
+
* `rich-node.ts` to keep comments out of `RichNode.children`.
|
|
5
|
+
*
|
|
6
|
+
* Every grammar Codegraft targets today names its comment node `comment`; the map is
|
|
7
|
+
* kept per-grammar so a future grammar with a different name slots in without
|
|
8
|
+
* touching either consumer.
|
|
9
|
+
*/
|
|
10
|
+
export const COMMENT_TYPES = {
|
|
11
|
+
javascript: new Set(['comment']),
|
|
12
|
+
typescript: new Set(['comment']),
|
|
13
|
+
tsx: new Set(['comment']),
|
|
14
|
+
html: new Set(['comment']),
|
|
15
|
+
css: new Set(['comment']),
|
|
16
|
+
yaml: new Set(['comment']),
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Classify every comment among its parent's named siblings onto the relevant RichNode's
|
|
20
|
+
* leading/trailing/inner array. Mutates in place; pure traversal, no parser dependency.
|
|
21
|
+
*
|
|
22
|
+
* - same row as the preceding node → trailing of it
|
|
23
|
+
* - in the contiguous comment run above a node → leading of that node
|
|
24
|
+
* - no following node, or a blank-line break → inner of the parent (it floats)
|
|
25
|
+
*
|
|
26
|
+
* The run is "contiguous" when each comment sits a row below the previous and the last a row above
|
|
27
|
+
* the node, so a stack of comments all lead it (topmost first) — which lets a directive stacked
|
|
28
|
+
* above another comment still attach to the node it gates.
|
|
29
|
+
*/
|
|
30
|
+
export function attachComments(root) {
|
|
31
|
+
visit(root);
|
|
32
|
+
}
|
|
33
|
+
function visit(node) {
|
|
34
|
+
// Post-order: comments live among named children, which are all reachable through
|
|
35
|
+
// the structural `children` list (comments and punctuation are leaves).
|
|
36
|
+
for (const child of node.children)
|
|
37
|
+
visit(child);
|
|
38
|
+
classify(node);
|
|
39
|
+
}
|
|
40
|
+
function isComment(node) {
|
|
41
|
+
return COMMENT_TYPES[node.language].has(node.type);
|
|
42
|
+
}
|
|
43
|
+
function classify(parent) {
|
|
44
|
+
const named = parent.allChildren.filter((n) => n.isNamed);
|
|
45
|
+
for (let i = 0; i < named.length; i++) {
|
|
46
|
+
const comment = named[i];
|
|
47
|
+
if (!isComment(comment))
|
|
48
|
+
continue;
|
|
49
|
+
const next = firstNonCommentAfter(named, i);
|
|
50
|
+
// No following node (e.g. a trailing comment tree-sitter absorbed as the last child) → inner.
|
|
51
|
+
if (next === null) {
|
|
52
|
+
parent.innerComments.push(comment);
|
|
53
|
+
continue;
|
|
54
|
+
}
|
|
55
|
+
// A comment sharing a line with the preceding node trails it — this takes precedence over
|
|
56
|
+
// the leading block, so it is never also pulled into the next node's leading comments.
|
|
57
|
+
const prev = lastNonCommentBefore(named, i);
|
|
58
|
+
if (prev !== null && comment.startPosition.row === prev.endPosition.row) {
|
|
59
|
+
prev.trailingComments.push(comment);
|
|
60
|
+
continue;
|
|
61
|
+
}
|
|
62
|
+
if (leadsContiguously(named, i, next))
|
|
63
|
+
next.leadingComments.push(comment);
|
|
64
|
+
else
|
|
65
|
+
parent.innerComments.push(comment);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
/** Whether `named[i]` is in the unbroken comment run directly above `next` — every row from the
|
|
69
|
+
* comment down to `next` filled by a comment, no blank-line gap. */
|
|
70
|
+
function leadsContiguously(named, i, next) {
|
|
71
|
+
let expectedRow = named[i].endPosition.row + 1;
|
|
72
|
+
for (let j = i + 1; j < named.length; j++) {
|
|
73
|
+
const node = named[j];
|
|
74
|
+
if (node === next)
|
|
75
|
+
return node.startPosition.row === expectedRow;
|
|
76
|
+
if (!isComment(node) || node.startPosition.row !== expectedRow)
|
|
77
|
+
return false;
|
|
78
|
+
expectedRow = node.endPosition.row + 1;
|
|
79
|
+
}
|
|
80
|
+
return false;
|
|
81
|
+
}
|
|
82
|
+
function lastNonCommentBefore(named, i) {
|
|
83
|
+
for (let j = i - 1; j >= 0; j--)
|
|
84
|
+
if (!isComment(named[j]))
|
|
85
|
+
return named[j];
|
|
86
|
+
return null;
|
|
87
|
+
}
|
|
88
|
+
function firstNonCommentAfter(named, i) {
|
|
89
|
+
for (let j = i + 1; j < named.length; j++)
|
|
90
|
+
if (!isComment(named[j]))
|
|
91
|
+
return named[j];
|
|
92
|
+
return null;
|
|
93
|
+
}
|
|
94
|
+
//# sourceMappingURL=comment-attachment.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"comment-attachment.js","sourceRoot":"","sources":["../src/comment-attachment.ts"],"names":[],"mappings":"AAEA;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,aAAa,GAA2C;IACnE,UAAU,EAAE,IAAI,GAAG,CAAC,CAAC,SAAS,CAAC,CAAC;IAChC,UAAU,EAAE,IAAI,GAAG,CAAC,CAAC,SAAS,CAAC,CAAC;IAChC,GAAG,EAAE,IAAI,GAAG,CAAC,CAAC,SAAS,CAAC,CAAC;IACzB,IAAI,EAAE,IAAI,GAAG,CAAC,CAAC,SAAS,CAAC,CAAC;IAC1B,GAAG,EAAE,IAAI,GAAG,CAAC,CAAC,SAAS,CAAC,CAAC;IACzB,IAAI,EAAE,IAAI,GAAG,CAAC,CAAC,SAAS,CAAC,CAAC;CAC3B,CAAA;AAED;;;;;;;;;;;GAWG;AACH,MA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KAAK,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE;QAAE,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;YAAE,OAAO,KAAK,CAAC,CAAC,CAAC,CAAA;IACpF,OAAO,IAAI,CAAA;AACb,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { SourceMap } from './types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Collects edits against a source string and produces the transformed code (and, on
|
|
4
|
+
* demand, a source map) via magic-string.
|
|
5
|
+
*
|
|
6
|
+
* Overlap is resolved **first-wins**: an edit overlapping one already accepted is
|
|
7
|
+
* dropped silently — the text-layer side of outer-wins. Because edits are applied
|
|
8
|
+
* through magic-string at their original offsets, the kept text keeps its original
|
|
9
|
+
* position, so the generated map is precise.
|
|
10
|
+
*/
|
|
11
|
+
export declare class EditCollector {
|
|
12
|
+
#private;
|
|
13
|
+
constructor(source: string);
|
|
14
|
+
/** Replace `[start, end)` with `replacement` (an empty range inserts before `start`). */
|
|
15
|
+
overwrite(start: number, end: number, replacement: string): void;
|
|
16
|
+
/** Delete `[start, end)`. */
|
|
17
|
+
remove(start: number, end: number): void;
|
|
18
|
+
/** Delete the whole lines `[start, end)` touches — from the start of `start`'s line (leading
|
|
19
|
+
* indentation included) through the newline after `end`'s line, so nothing blank is left behind.
|
|
20
|
+
* With `collapseBlankBefore`, also absorb whole blank lines immediately above (a separator before
|
|
21
|
+
* a dropped block). */
|
|
22
|
+
removeLines(start: number, end: number, collapseBlankBefore?: boolean): void;
|
|
23
|
+
/** Insert `text` at `index`, attached to the left chunk. A point insertion: it claims no
|
|
24
|
+
* range, so it composes with edits on either side (and survives removal of the right side). */
|
|
25
|
+
insertLeft(index: number, text: string): void;
|
|
26
|
+
/** Insert `text` at `index`, attached to the right chunk. */
|
|
27
|
+
insertRight(index: number, text: string): void;
|
|
28
|
+
toString(): string;
|
|
29
|
+
generateMap(source: string): SourceMap;
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=edit-collector.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"edit-collector.d.ts","sourceRoot":"","sources":["../src/edit-collector.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAA;AAE3C;;;;;;;;GAQG;AACH,qBAAa,aAAa;;gBAKZ,MAAM,EAAE,MAAM;IAK1B,yFAAyF;IACzF,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,IAAI;IAMhE,6BAA6B;IAC7B,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI;IAKxC;;;4BAGwB;IACxB,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,mBAAmB,UAAQ,GAAG,IAAI;IAa1E;oGACgG;IAChG,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI;IAI7C,6DAA6D;IAC7D,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI;IAI9C,QAAQ,IAAI,MAAM;IAIlB,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS;CAWvC"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import MagicString from 'magic-string';
|
|
2
|
+
/**
|
|
3
|
+
* Collects edits against a source string and produces the transformed code (and, on
|
|
4
|
+
* demand, a source map) via magic-string.
|
|
5
|
+
*
|
|
6
|
+
* Overlap is resolved **first-wins**: an edit overlapping one already accepted is
|
|
7
|
+
* dropped silently — the text-layer side of outer-wins. Because edits are applied
|
|
8
|
+
* through magic-string at their original offsets, the kept text keeps its original
|
|
9
|
+
* position, so the generated map is precise.
|
|
10
|
+
*/
|
|
11
|
+
export class EditCollector {
|
|
12
|
+
#magic;
|
|
13
|
+
#source;
|
|
14
|
+
#claimed = [];
|
|
15
|
+
constructor(source) {
|
|
16
|
+
this.#magic = new MagicString(source);
|
|
17
|
+
this.#source = source;
|
|
18
|
+
}
|
|
19
|
+
/** Replace `[start, end)` with `replacement` (an empty range inserts before `start`). */
|
|
20
|
+
overwrite(start, end, replacement) {
|
|
21
|
+
if (!this.#claim(start, end))
|
|
22
|
+
return;
|
|
23
|
+
if (start === end)
|
|
24
|
+
this.#magic.appendLeft(start, replacement);
|
|
25
|
+
else
|
|
26
|
+
this.#magic.update(start, end, replacement);
|
|
27
|
+
}
|
|
28
|
+
/** Delete `[start, end)`. */
|
|
29
|
+
remove(start, end) {
|
|
30
|
+
if (start === end || !this.#claim(start, end))
|
|
31
|
+
return;
|
|
32
|
+
this.#magic.remove(start, end);
|
|
33
|
+
}
|
|
34
|
+
/** Delete the whole lines `[start, end)` touches — from the start of `start`'s line (leading
|
|
35
|
+
* indentation included) through the newline after `end`'s line, so nothing blank is left behind.
|
|
36
|
+
* With `collapseBlankBefore`, also absorb whole blank lines immediately above (a separator before
|
|
37
|
+
* a dropped block). */
|
|
38
|
+
removeLines(start, end, collapseBlankBefore = false) {
|
|
39
|
+
let lineStart = this.#source.lastIndexOf('\n', start - 1) + 1;
|
|
40
|
+
if (collapseBlankBefore) {
|
|
41
|
+
while (lineStart > 0) {
|
|
42
|
+
const prevStart = this.#source.lastIndexOf('\n', lineStart - 2) + 1;
|
|
43
|
+
if (this.#source.slice(prevStart, lineStart - 1).trim() !== '')
|
|
44
|
+
break; // a non-blank line stops it
|
|
45
|
+
lineStart = prevStart;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
const newline = this.#source.indexOf('\n', end);
|
|
49
|
+
this.remove(lineStart, newline === -1 ? this.#source.length : newline + 1);
|
|
50
|
+
}
|
|
51
|
+
/** Insert `text` at `index`, attached to the left chunk. A point insertion: it claims no
|
|
52
|
+
* range, so it composes with edits on either side (and survives removal of the right side). */
|
|
53
|
+
insertLeft(index, text) {
|
|
54
|
+
this.#magic.appendLeft(index, text);
|
|
55
|
+
}
|
|
56
|
+
/** Insert `text` at `index`, attached to the right chunk. */
|
|
57
|
+
insertRight(index, text) {
|
|
58
|
+
this.#magic.appendRight(index, text);
|
|
59
|
+
}
|
|
60
|
+
toString() {
|
|
61
|
+
return this.#magic.toString();
|
|
62
|
+
}
|
|
63
|
+
generateMap(source) {
|
|
64
|
+
return this.#magic.generateMap({ source, includeContent: true, hires: true });
|
|
65
|
+
}
|
|
66
|
+
// Half-open intervals [start, end): reject one overlapping an accepted edit (touching
|
|
67
|
+
// boundaries don't overlap), so magic-string never sees a conflicting operation.
|
|
68
|
+
#claim(start, end) {
|
|
69
|
+
if (this.#claimed.some(([s, e]) => s < end && start < e))
|
|
70
|
+
return false;
|
|
71
|
+
this.#claimed.push([start, end]);
|
|
72
|
+
return true;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
//# sourceMappingURL=edit-collector.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"edit-collector.js","sourceRoot":"","sources":["../src/edit-collector.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,cAAc,CAAA;AAGtC;;;;;;;;GAQG;AACH,MAAM,OAAO,aAAa;IACf,MAAM,CAAa;IACnB,OAAO,CAAQ;IACf,QAAQ,GAA4B,EAAE,CAAA;IAE/C,YAAY,MAAc;QACxB,IAAI,CAAC,MAAM,GAAG,IAAI,WAAW,CAAC,MAAM,CAAC,CAAA;QACrC,IAAI,CAAC,OAAO,GAAG,MAAM,CAAA;IACvB,CAAC;IAED,yFAAyF;IACzF,SAAS,CAAC,KAAa,EAAE,GAAW,EAAE,WAAmB;QACvD,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,GAAG,CAAC;YAAE,OAAM;QACpC,IAAI,KAAK,KAAK,GAAG;YAAE,IAAI,CAAC,MAAM,CAAC,UAAU,CAA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,UAAU,CAAC,KAAa,EAAE,IAAY;QACpC,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,KAAK,EAAE,IAAI,CAAC,CAAA;IACrC,CAAC;IAED,6DAA6D;IAC7D,WAAW,CAAC,KAAa,EAAE,IAAY;QACrC,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,KAAK,EAAE,IAAI,CAAC,CAAA;IACtC,CAAC;IAED,QAAQ;QACN,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAA;IAC/B,CAAC;IAED,WAAW,CAAC,MAAc;QACxB,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,EAAE,MAAM,EAAE,cAAc,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAA;IAC/E,CAAC;IAED,sFAAsF;IACtF,iFAAiF;IACjF,MAAM,CAAC,KAAa,EAAE,GAAW;QAC/B,IAAI,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,GAAG,IAAI,KAAK,GAAG,CAAC,CAAC;YAAE,OAAO,KAAK,CAAA;QACtE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,CAAA;QAChC,OAAO,IAAI,CAAA;IACb,CAAC;CACF"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { RichNode } from './types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Evaluate a build-time condition against a context value — without `eval`.
|
|
4
|
+
*
|
|
5
|
+
* The expression's identifier root resolves to `context`, so `$$.BATI.has("auth")`
|
|
6
|
+
* computes `context.BATI.has("auth")`, and `!` / `&&` / `||` / comparisons compose as
|
|
7
|
+
* in JS. The input is either a parsed node (a captured `if`/ternary condition) or a
|
|
8
|
+
* string (a directive comment's expression, parsed as TypeScript).
|
|
9
|
+
*
|
|
10
|
+
* The supported subset is exactly what a pure-over-context condition needs; anything
|
|
11
|
+
* else — a runtime variable, an unsupported operator — asserts and names the offending
|
|
12
|
+
* node, so a condition that isn't statically decidable fails loudly rather than wrong.
|
|
13
|
+
*/
|
|
14
|
+
export declare function evaluate(input: RichNode | string, context: unknown): unknown;
|
|
15
|
+
//# sourceMappingURL=evaluate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"evaluate.d.ts","sourceRoot":"","sources":["../src/evaluate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAM1C;;;;;;;;;;;GAWG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,QAAQ,GAAG,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAE5E"}
|
package/dist/evaluate.js
ADDED
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { Parser } from './parser.js';
|
|
2
|
+
import { wrapNode } from './rich-node.js';
|
|
3
|
+
import { assert } from './assert.js';
|
|
4
|
+
/**
|
|
5
|
+
* Evaluate a build-time condition against a context value — without `eval`.
|
|
6
|
+
*
|
|
7
|
+
* The expression's identifier root resolves to `context`, so `$$.BATI.has("auth")`
|
|
8
|
+
* computes `context.BATI.has("auth")`, and `!` / `&&` / `||` / comparisons compose as
|
|
9
|
+
* in JS. The input is either a parsed node (a captured `if`/ternary condition) or a
|
|
10
|
+
* string (a directive comment's expression, parsed as TypeScript).
|
|
11
|
+
*
|
|
12
|
+
* The supported subset is exactly what a pure-over-context condition needs; anything
|
|
13
|
+
* else — a runtime variable, an unsupported operator — asserts and names the offending
|
|
14
|
+
* node, so a condition that isn't statically decidable fails loudly rather than wrong.
|
|
15
|
+
*/
|
|
16
|
+
export function evaluate(input, context) {
|
|
17
|
+
return evalNode(typeof input === 'string' ? parseExpression(input) : input, context);
|
|
18
|
+
}
|
|
19
|
+
/** Parse a bare expression (a comment's directive) as TypeScript and unwrap it. */
|
|
20
|
+
function parseExpression(text) {
|
|
21
|
+
const root = wrapNode(Parser.parse(text, 'typescript').rootNode, 'typescript', 0);
|
|
22
|
+
const expression = root.children[0]?.children[0];
|
|
23
|
+
assert(root.children[0]?.type === 'expression_statement' && expression !== undefined, `not an expression: '${text}'`);
|
|
24
|
+
return expression;
|
|
25
|
+
}
|
|
26
|
+
function evalNode(node, context) {
|
|
27
|
+
switch (node.type) {
|
|
28
|
+
case 'parenthesized_expression':
|
|
29
|
+
return evalNode(only(node), context);
|
|
30
|
+
case 'unary_expression':
|
|
31
|
+
assert(field(node, 'operator').text === '!', `unsupported unary operator in '${node.text}'`);
|
|
32
|
+
return !evalNode(field(node, 'argument'), context);
|
|
33
|
+
case 'binary_expression':
|
|
34
|
+
return evalBinary(node, context);
|
|
35
|
+
case 'member_expression': {
|
|
36
|
+
const object = evalNode(field(node, 'object'), context);
|
|
37
|
+
return object[field(node, 'property').text];
|
|
38
|
+
}
|
|
39
|
+
case 'call_expression': {
|
|
40
|
+
const callee = evalNode(field(node, 'function'), context);
|
|
41
|
+
assert(typeof callee === 'function', `not callable: '${field(node, 'function').text}'`);
|
|
42
|
+
const args = field(node, 'arguments').children.map((arg) => evalNode(arg, context));
|
|
43
|
+
return callee(...args);
|
|
44
|
+
}
|
|
45
|
+
case 'identifier':
|
|
46
|
+
return context; // the namespace root resolves to the context value
|
|
47
|
+
case 'string':
|
|
48
|
+
return node.children[0]?.text ?? ''; // the string_fragment, or '' for an empty string
|
|
49
|
+
case 'number':
|
|
50
|
+
return Number(node.text);
|
|
51
|
+
case 'true':
|
|
52
|
+
return true;
|
|
53
|
+
case 'false':
|
|
54
|
+
return false;
|
|
55
|
+
case 'null':
|
|
56
|
+
return null;
|
|
57
|
+
default:
|
|
58
|
+
assert(false, `cannot evaluate '${node.type}' in condition '${node.text}'`);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
function evalBinary(node, context) {
|
|
62
|
+
const operator = field(node, 'operator').text;
|
|
63
|
+
const left = () => evalNode(field(node, 'left'), context);
|
|
64
|
+
const right = () => evalNode(field(node, 'right'), context);
|
|
65
|
+
switch (operator) {
|
|
66
|
+
case '&&':
|
|
67
|
+
return left() && right();
|
|
68
|
+
case '||':
|
|
69
|
+
return left() || right();
|
|
70
|
+
case '===':
|
|
71
|
+
return left() === right();
|
|
72
|
+
case '!==':
|
|
73
|
+
return left() !== right();
|
|
74
|
+
case '<':
|
|
75
|
+
return left() < right();
|
|
76
|
+
case '<=':
|
|
77
|
+
return left() <= right();
|
|
78
|
+
case '>':
|
|
79
|
+
return left() > right();
|
|
80
|
+
case '>=':
|
|
81
|
+
return left() >= right();
|
|
82
|
+
default:
|
|
83
|
+
assert(false, `unsupported operator '${operator}' in condition '${node.text}'`);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
function field(node, name) {
|
|
87
|
+
const child = node.child(name);
|
|
88
|
+
assert(child, `${node.type} is missing field '${name}'`);
|
|
89
|
+
return child;
|
|
90
|
+
}
|
|
91
|
+
function only(node) {
|
|
92
|
+
assert(node.children.length === 1, `expected a single child of '${node.type}'`);
|
|
93
|
+
return node.children[0];
|
|
94
|
+
}
|
|
95
|
+
//# sourceMappingURL=evaluate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"evaluate.js","sourceRoot":"","sources":["../src/evaluate.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAEpC;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,QAAQ,CAAC,KAAwB,EAAE,OAAgB;IACjE,OAAO,QAAQ,CAAC,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,EAAE,OAAO,CAAC,CAAA;AACtF,CAAC;AAED,mFAAmF;AACnF,SA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":"","sources":["../src/extensions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAA;AAK3C,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAcvD,CAAA"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// Canonical file-extension → grammar metadata, shared by the cli and unplugin
|
|
2
|
+
// front-ends (the engine itself is extension-agnostic). SFC extensions like .vue are
|
|
3
|
+
// handled by a ZoneSplitter, not here.
|
|
4
|
+
export const EXTENSION_GRAMMAR = {
|
|
5
|
+
tsx: 'tsx',
|
|
6
|
+
jsx: 'tsx',
|
|
7
|
+
ts: 'typescript',
|
|
8
|
+
mts: 'typescript',
|
|
9
|
+
cts: 'typescript',
|
|
10
|
+
js: 'javascript',
|
|
11
|
+
mjs: 'javascript',
|
|
12
|
+
cjs: 'javascript',
|
|
13
|
+
html: 'html',
|
|
14
|
+
htm: 'html',
|
|
15
|
+
css: 'css',
|
|
16
|
+
yaml: 'yaml',
|
|
17
|
+
yml: 'yaml',
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=extensions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extensions.js","sourceRoot":"","sources":["../src/extensions.ts"],"names":[],"mappings":"AAEA,8EAA8E;AAC9E,qFAAqF;AACrF,uCAAuC;AACvC,MAAM,CAAC,MAAM,iBAAiB,GAA8B;IAC1D,GAAG,EAAE,KAAK;IACV,GAAG,EAAE,KAAK;IACV,EAAE,EAAE,YAAY;IAChB,GAAG,EAAE,YAAY;IACjB,GAAG,EAAE,YAAY;IACjB,EAAE,EAAE,YAAY;IAChB,GAAG,EAAE,YAAY;IACjB,GAAG,EAAE,YAAY;IACjB,IAAI,EAAE,MAAM;IACZ,GAAG,EAAE,MAAM;IACX,GAAG,EAAE,KAAK;IACV,IAAI,EAAE,MAAM;IACZ,GAAG,EAAE,MAAM;CACZ,CAAA"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export type JavascriptNodeType = "arguments" | "array" | "array_pattern" | "arrow_function" | "assignment_expression" | "assignment_pattern" | "augmented_assignment_expression" | "await_expression" | "binary_expression" | "break_statement" | "call_expression" | "catch_clause" | "class" | "class_body" | "class_declaration" | "class_heritage" | "class_static_block" | "comment" | "computed_property_name" | "continue_statement" | "debugger_statement" | "declaration" | "decorator" | "do_statement" | "else_clause" | "empty_statement" | "escape_sequence" | "export_clause" | "export_specifier" | "export_statement" | "expression" | "expression_statement" | "false" | "field_definition" | "finally_clause" | "for_in_statement" | "for_statement" | "formal_parameters" | "function_declaration" | "function_expression" | "generator_function" | "generator_function_declaration" | "hash_bang_line" | "html_character_reference" | "html_comment" | "identifier" | "if_statement" | "import" | "import_attribute" | "import_clause" | "import_specifier" | "import_statement" | "jsx_attribute" | "jsx_closing_element" | "jsx_element" | "jsx_expression" | "jsx_namespace_name" | "jsx_opening_element" | "jsx_self_closing_element" | "jsx_text" | "labeled_statement" | "lexical_declaration" | "member_expression" | "meta_property" | "method_definition" | "named_imports" | "namespace_export" | "namespace_import" | "new_expression" | "null" | "number" | "object" | "object_assignment_pattern" | "object_pattern" | "optional_chain" | "pair" | "pair_pattern" | "parenthesized_expression" | "pattern" | "primary_expression" | "private_property_identifier" | "program" | "property_identifier" | "regex" | "regex_flags" | "regex_pattern" | "rest_pattern" | "return_statement" | "sequence_expression" | "shorthand_property_identifier" | "shorthand_property_identifier_pattern" | "spread_element" | "statement" | "statement_block" | "statement_identifier" | "string" | "string_fragment" | "subscript_expression" | "super" | "switch_body" | "switch_case" | "switch_default" | "switch_statement" | "template_string" | "template_substitution" | "ternary_expression" | "this" | "throw_statement" | "true" | "try_statement" | "unary_expression" | "undefined" | "update_expression" | "using_declaration" | "variable_declaration" | "variable_declarator" | "while_statement" | "with_statement" | "yield_expression";
|
|
2
|
+
export type TypescriptNodeType = "abstract_class_declaration" | "abstract_method_signature" | "accessibility_modifier" | "adding_type_annotation" | "ambient_declaration" | "arguments" | "array" | "array_pattern" | "array_type" | "arrow_function" | "as_expression" | "asserts" | "asserts_annotation" | "assignment_expression" | "assignment_pattern" | "augmented_assignment_expression" | "await_expression" | "binary_expression" | "break_statement" | "call_expression" | "call_signature" | "catch_clause" | "class" | "class_body" | "class_declaration" | "class_heritage" | "class_static_block" | "comment" | "computed_property_name" | "conditional_type" | "constraint" | "construct_signature" | "constructor_type" | "continue_statement" | "debugger_statement" | "declaration" | "decorator" | "default_type" | "do_statement" | "else_clause" | "empty_statement" | "enum_assignment" | "enum_body" | "enum_declaration" | "escape_sequence" | "existential_type" | "export_clause" | "export_specifier" | "export_statement" | "expression" | "expression_statement" | "extends_clause" | "extends_type_clause" | "false" | "finally_clause" | "flow_maybe_type" | "for_in_statement" | "for_statement" | "formal_parameters" | "function_declaration" | "function_expression" | "function_signature" | "function_type" | "generator_function" | "generator_function_declaration" | "generic_type" | "hash_bang_line" | "html_comment" | "identifier" | "if_statement" | "implements_clause" | "import" | "import_alias" | "import_attribute" | "import_clause" | "import_require_clause" | "import_specifier" | "import_statement" | "index_signature" | "index_type_query" | "infer_type" | "instantiation_expression" | "interface_body" | "interface_declaration" | "internal_module" | "intersection_type" | "labeled_statement" | "lexical_declaration" | "literal_type" | "lookup_type" | "mapped_type_clause" | "member_expression" | "meta_property" | "method_definition" | "method_signature" | "module" | "named_imports" | "namespace_export" | "namespace_import" | "nested_identifier" | "nested_type_identifier" | "new_expression" | "non_null_expression" | "null" | "number" | "object" | "object_assignment_pattern" | "object_pattern" | "object_type" | "omitting_type_annotation" | "opting_type_annotation" | "optional_chain" | "optional_parameter" | "optional_type" | "override_modifier" | "pair" | "pair_pattern" | "parenthesized_expression" | "parenthesized_type" | "pattern" | "predefined_type" | "primary_expression" | "primary_type" | "private_property_identifier" | "program" | "property_identifier" | "property_signature" | "public_field_definition" | "readonly_type" | "regex" | "regex_flags" | "regex_pattern" | "required_parameter" | "rest_pattern" | "rest_type" | "return_statement" | "satisfies_expression" | "sequence_expression" | "shorthand_property_identifier" | "shorthand_property_identifier_pattern" | "spread_element" | "statement" | "statement_block" | "statement_identifier" | "string" | "string_fragment" | "subscript_expression" | "super" | "switch_body" | "switch_case" | "switch_default" | "switch_statement" | "template_literal_type" | "template_string" | "template_substitution" | "template_type" | "ternary_expression" | "this" | "this_type" | "throw_statement" | "true" | "try_statement" | "tuple_type" | "type" | "type_alias_declaration" | "type_annotation" | "type_arguments" | "type_assertion" | "type_identifier" | "type_parameter" | "type_parameters" | "type_predicate" | "type_predicate_annotation" | "type_query" | "unary_expression" | "undefined" | "union_type" | "update_expression" | "variable_declaration" | "variable_declarator" | "while_statement" | "with_statement" | "yield_expression";
|
|
3
|
+
export type TsxNodeType = "abstract_class_declaration" | "abstract_method_signature" | "accessibility_modifier" | "adding_type_annotation" | "ambient_declaration" | "arguments" | "array" | "array_pattern" | "array_type" | "arrow_function" | "as_expression" | "asserts" | "asserts_annotation" | "assignment_expression" | "assignment_pattern" | "augmented_assignment_expression" | "await_expression" | "binary_expression" | "break_statement" | "call_expression" | "call_signature" | "catch_clause" | "class" | "class_body" | "class_declaration" | "class_heritage" | "class_static_block" | "comment" | "computed_property_name" | "conditional_type" | "constraint" | "construct_signature" | "constructor_type" | "continue_statement" | "debugger_statement" | "declaration" | "decorator" | "default_type" | "do_statement" | "else_clause" | "empty_statement" | "enum_assignment" | "enum_body" | "enum_declaration" | "escape_sequence" | "existential_type" | "export_clause" | "export_specifier" | "export_statement" | "expression" | "expression_statement" | "extends_clause" | "extends_type_clause" | "false" | "finally_clause" | "flow_maybe_type" | "for_in_statement" | "for_statement" | "formal_parameters" | "function_declaration" | "function_expression" | "function_signature" | "function_type" | "generator_function" | "generator_function_declaration" | "generic_type" | "hash_bang_line" | "html_character_reference" | "html_comment" | "identifier" | "if_statement" | "implements_clause" | "import" | "import_alias" | "import_attribute" | "import_clause" | "import_require_clause" | "import_specifier" | "import_statement" | "index_signature" | "index_type_query" | "infer_type" | "instantiation_expression" | "interface_body" | "interface_declaration" | "internal_module" | "intersection_type" | "jsx_attribute" | "jsx_closing_element" | "jsx_element" | "jsx_expression" | "jsx_namespace_name" | "jsx_opening_element" | "jsx_self_closing_element" | "jsx_text" | "labeled_statement" | "lexical_declaration" | "literal_type" | "lookup_type" | "mapped_type_clause" | "member_expression" | "meta_property" | "method_definition" | "method_signature" | "module" | "named_imports" | "namespace_export" | "namespace_import" | "nested_identifier" | "nested_type_identifier" | "new_expression" | "non_null_expression" | "null" | "number" | "object" | "object_assignment_pattern" | "object_pattern" | "object_type" | "omitting_type_annotation" | "opting_type_annotation" | "optional_chain" | "optional_parameter" | "optional_type" | "override_modifier" | "pair" | "pair_pattern" | "parenthesized_expression" | "parenthesized_type" | "pattern" | "predefined_type" | "primary_expression" | "primary_type" | "private_property_identifier" | "program" | "property_identifier" | "property_signature" | "public_field_definition" | "readonly_type" | "regex" | "regex_flags" | "regex_pattern" | "required_parameter" | "rest_pattern" | "rest_type" | "return_statement" | "satisfies_expression" | "sequence_expression" | "shorthand_property_identifier" | "shorthand_property_identifier_pattern" | "spread_element" | "statement" | "statement_block" | "statement_identifier" | "string" | "string_fragment" | "subscript_expression" | "super" | "switch_body" | "switch_case" | "switch_default" | "switch_statement" | "template_literal_type" | "template_string" | "template_substitution" | "template_type" | "ternary_expression" | "this" | "this_type" | "throw_statement" | "true" | "try_statement" | "tuple_type" | "type" | "type_alias_declaration" | "type_annotation" | "type_arguments" | "type_identifier" | "type_parameter" | "type_parameters" | "type_predicate" | "type_predicate_annotation" | "type_query" | "unary_expression" | "undefined" | "union_type" | "update_expression" | "variable_declaration" | "variable_declarator" | "while_statement" | "with_statement" | "yield_expression";
|
|
4
|
+
export type HtmlNodeType = "attribute" | "attribute_name" | "attribute_value" | "comment" | "doctype" | "document" | "element" | "end_tag" | "entity" | "erroneous_end_tag" | "erroneous_end_tag_name" | "quoted_attribute_value" | "raw_text" | "script_element" | "self_closing_tag" | "start_tag" | "style_element" | "tag_name" | "text";
|
|
5
|
+
export type CssNodeType = "adjacent_sibling_selector" | "arguments" | "at_keyword" | "at_rule" | "attribute_name" | "attribute_selector" | "binary_expression" | "binary_query" | "block" | "call_expression" | "charset_statement" | "child_selector" | "class_name" | "class_selector" | "color_value" | "comment" | "declaration" | "descendant_selector" | "escape_sequence" | "feature_name" | "feature_query" | "float_value" | "from" | "function_name" | "grid_value" | "id_name" | "id_selector" | "identifier" | "import_statement" | "important" | "important_value" | "integer_value" | "js_comment" | "keyframe_block" | "keyframe_block_list" | "keyframes_name" | "keyframes_statement" | "keyword_query" | "media_statement" | "namespace_name" | "namespace_selector" | "namespace_statement" | "nesting_selector" | "parenthesized_query" | "parenthesized_value" | "plain_value" | "postcss_statement" | "property_name" | "pseudo_class_selector" | "pseudo_element_selector" | "rule_set" | "scope_statement" | "selector_query" | "selectors" | "sibling_selector" | "string_content" | "string_value" | "stylesheet" | "supports_statement" | "tag_name" | "to" | "unary_query" | "unit" | "universal_selector";
|
|
6
|
+
export type YamlNodeType = "alias" | "alias_name" | "anchor" | "anchor_name" | "block_mapping" | "block_mapping_pair" | "block_node" | "block_scalar" | "block_sequence" | "block_sequence_item" | "boolean_scalar" | "comment" | "directive_name" | "directive_parameter" | "document" | "double_quote_scalar" | "escape_sequence" | "float_scalar" | "flow_mapping" | "flow_node" | "flow_pair" | "flow_sequence" | "integer_scalar" | "null_scalar" | "plain_scalar" | "reserved_directive" | "single_quote_scalar" | "stream" | "string_scalar" | "tag" | "tag_directive" | "tag_handle" | "tag_prefix" | "timestamp_scalar" | "yaml_directive" | "yaml_version";
|
|
7
|
+
export type JavascriptNodeTypeAll = "-" | "--" | "-=" | "," | ";" | ":" | "!" | "!=" | "!==" | "?" | "??" | "??=" | "." | "..." | "'" | "\"" | "(" | ")" | "[" | "]" | "{" | "}" | "@" | "*" | "**" | "**=" | "*=" | "/" | "/=" | "/>" | "&" | "&&" | "&&=" | "&=" | "%" | "%=" | "`" | "^" | "^=" | "+" | "++" | "+=" | "<" | "</" | "<<" | "<<=" | "<=" | "=" | "==" | "===" | "=>" | ">" | ">=" | ">>" | ">>=" | ">>>" | ">>>=" | "|" | "|=" | "||" | "||=" | "~" | "${" | "arguments" | "array" | "array_pattern" | "arrow_function" | "as" | "assignment_expression" | "assignment_pattern" | "async" | "augmented_assignment_expression" | "await" | "await_expression" | "binary_expression" | "break" | "break_statement" | "call_expression" | "case" | "catch" | "catch_clause" | "class" | "class_body" | "class_declaration" | "class_heritage" | "class_static_block" | "comment" | "computed_property_name" | "const" | "continue" | "continue_statement" | "debugger" | "debugger_statement" | "declaration" | "decorator" | "default" | "delete" | "do" | "do_statement" | "else" | "else_clause" | "empty_statement" | "escape_sequence" | "export" | "export_clause" | "export_specifier" | "export_statement" | "expression" | "expression_statement" | "extends" | "false" | "field_definition" | "finally" | "finally_clause" | "for" | "for_in_statement" | "for_statement" | "formal_parameters" | "from" | "function" | "function_declaration" | "function_expression" | "generator_function" | "generator_function_declaration" | "get" | "hash_bang_line" | "html_character_reference" | "html_comment" | "identifier" | "if" | "if_statement" | "import" | "import_attribute" | "import_clause" | "import_specifier" | "import_statement" | "in" | "instanceof" | "jsx_attribute" | "jsx_closing_element" | "jsx_element" | "jsx_expression" | "jsx_namespace_name" | "jsx_opening_element" | "jsx_self_closing_element" | "jsx_text" | "labeled_statement" | "let" | "lexical_declaration" | "member_expression" | "meta" | "meta_property" | "method_definition" | "named_imports" | "namespace_export" | "namespace_import" | "new" | "new_expression" | "null" | "number" | "object" | "object_assignment_pattern" | "object_pattern" | "of" | "optional_chain" | "pair" | "pair_pattern" | "parenthesized_expression" | "pattern" | "primary_expression" | "private_property_identifier" | "program" | "property_identifier" | "regex" | "regex_flags" | "regex_pattern" | "rest_pattern" | "return" | "return_statement" | "sequence_expression" | "set" | "shorthand_property_identifier" | "shorthand_property_identifier_pattern" | "spread_element" | "statement" | "statement_block" | "statement_identifier" | "static" | "static get" | "string" | "string_fragment" | "subscript_expression" | "super" | "switch" | "switch_body" | "switch_case" | "switch_default" | "switch_statement" | "target" | "template_string" | "template_substitution" | "ternary_expression" | "this" | "throw" | "throw_statement" | "true" | "try" | "try_statement" | "typeof" | "unary_expression" | "undefined" | "update_expression" | "using" | "using_declaration" | "var" | "variable_declaration" | "variable_declarator" | "void" | "while" | "while_statement" | "with" | "with_statement" | "yield" | "yield_expression";
|
|
8
|
+
export type TypescriptNodeTypeAll = "-" | "--" | "-?:" | "-=" | "," | ";" | ":" | "!" | "!=" | "!==" | "?" | "?:" | "??" | "??=" | "?." | "." | "..." | "'" | "\"" | "(" | ")" | "[" | "]" | "{" | "{|" | "}" | "@" | "*" | "**" | "**=" | "*=" | "/" | "/=" | "&" | "&&" | "&&=" | "&=" | "%" | "%=" | "`" | "^" | "^=" | "+" | "+?:" | "++" | "+=" | "<" | "<<" | "<<=" | "<=" | "=" | "==" | "===" | "=>" | ">" | ">=" | ">>" | ">>=" | ">>>" | ">>>=" | "|" | "|}" | "|=" | "||" | "||=" | "~" | "${" | "abstract" | "abstract_class_declaration" | "abstract_method_signature" | "accessibility_modifier" | "accessor" | "adding_type_annotation" | "ambient_declaration" | "any" | "arguments" | "array" | "array_pattern" | "array_type" | "arrow_function" | "as" | "as_expression" | "assert" | "asserts" | "asserts_annotation" | "assignment_expression" | "assignment_pattern" | "async" | "augmented_assignment_expression" | "await" | "await_expression" | "binary_expression" | "boolean" | "break" | "break_statement" | "call_expression" | "call_signature" | "case" | "catch" | "catch_clause" | "class" | "class_body" | "class_declaration" | "class_heritage" | "class_static_block" | "comment" | "computed_property_name" | "conditional_type" | "const" | "constraint" | "construct_signature" | "constructor_type" | "continue" | "continue_statement" | "debugger" | "debugger_statement" | "declaration" | "declare" | "decorator" | "default" | "default_type" | "delete" | "do" | "do_statement" | "else" | "else_clause" | "empty_statement" | "enum" | "enum_assignment" | "enum_body" | "enum_declaration" | "escape_sequence" | "existential_type" | "export" | "export_clause" | "export_specifier" | "export_statement" | "expression" | "expression_statement" | "extends" | "extends_clause" | "extends_type_clause" | "false" | "finally" | "finally_clause" | "flow_maybe_type" | "for" | "for_in_statement" | "for_statement" | "formal_parameters" | "from" | "function" | "function_declaration" | "function_expression" | "function_signature" | "function_type" | "generator_function" | "generator_function_declaration" | "generic_type" | "get" | "global" | "hash_bang_line" | "html_comment" | "identifier" | "if" | "if_statement" | "implements" | "implements_clause" | "import" | "import_alias" | "import_attribute" | "import_clause" | "import_require_clause" | "import_specifier" | "import_statement" | "in" | "index_signature" | "index_type_query" | "infer" | "infer_type" | "instanceof" | "instantiation_expression" | "interface" | "interface_body" | "interface_declaration" | "internal_module" | "intersection_type" | "is" | "keyof" | "labeled_statement" | "let" | "lexical_declaration" | "literal_type" | "lookup_type" | "mapped_type_clause" | "member_expression" | "meta" | "meta_property" | "method_definition" | "method_signature" | "module" | "named_imports" | "namespace" | "namespace_export" | "namespace_import" | "nested_identifier" | "nested_type_identifier" | "never" | "new" | "new_expression" | "non_null_expression" | "null" | "number" | "object" | "object_assignment_pattern" | "object_pattern" | "object_type" | "of" | "omitting_type_annotation" | "opting_type_annotation" | "optional_chain" | "optional_parameter" | "optional_type" | "override" | "override_modifier" | "pair" | "pair_pattern" | "parenthesized_expression" | "parenthesized_type" | "pattern" | "predefined_type" | "primary_expression" | "primary_type" | "private" | "private_property_identifier" | "program" | "property_identifier" | "property_signature" | "protected" | "public" | "public_field_definition" | "readonly" | "readonly_type" | "regex" | "regex_flags" | "regex_pattern" | "require" | "required_parameter" | "rest_pattern" | "rest_type" | "return" | "return_statement" | "satisfies" | "satisfies_expression" | "sequence_expression" | "set" | "shorthand_property_identifier" | "shorthand_property_identifier_pattern" | "spread_element" | "statement" | "statement_block" | "statement_identifier" | "static" | "string" | "string_fragment" | "subscript_expression" | "super" | "switch" | "switch_body" | "switch_case" | "switch_default" | "switch_statement" | "symbol" | "target" | "template_literal_type" | "template_string" | "template_substitution" | "template_type" | "ternary_expression" | "this" | "this_type" | "throw" | "throw_statement" | "true" | "try" | "try_statement" | "tuple_type" | "type" | "type_alias_declaration" | "type_annotation" | "type_arguments" | "type_assertion" | "type_identifier" | "type_parameter" | "type_parameters" | "type_predicate" | "type_predicate_annotation" | "type_query" | "typeof" | "unary_expression" | "undefined" | "union_type" | "unique symbol" | "unknown" | "update_expression" | "using" | "var" | "variable_declaration" | "variable_declarator" | "void" | "while" | "while_statement" | "with" | "with_statement" | "yield" | "yield_expression";
|
|
9
|
+
export type TsxNodeTypeAll = "-" | "--" | "-?:" | "-=" | "," | ";" | ":" | "!" | "!=" | "!==" | "?" | "?:" | "??" | "??=" | "?." | "." | "..." | "'" | "\"" | "(" | ")" | "[" | "]" | "{" | "{|" | "}" | "@" | "*" | "**" | "**=" | "*=" | "/" | "/=" | "/>" | "&" | "&&" | "&&=" | "&=" | "%" | "%=" | "`" | "^" | "^=" | "+" | "+?:" | "++" | "+=" | "<" | "</" | "<<" | "<<=" | "<=" | "=" | "==" | "===" | "=>" | ">" | ">=" | ">>" | ">>=" | ">>>" | ">>>=" | "|" | "|}" | "|=" | "||" | "||=" | "~" | "${" | "abstract" | "abstract_class_declaration" | "abstract_method_signature" | "accessibility_modifier" | "accessor" | "adding_type_annotation" | "ambient_declaration" | "any" | "arguments" | "array" | "array_pattern" | "array_type" | "arrow_function" | "as" | "as_expression" | "assert" | "asserts" | "asserts_annotation" | "assignment_expression" | "assignment_pattern" | "async" | "augmented_assignment_expression" | "await" | "await_expression" | "binary_expression" | "boolean" | "break" | "break_statement" | "call_expression" | "call_signature" | "case" | "catch" | "catch_clause" | "class" | "class_body" | "class_declaration" | "class_heritage" | "class_static_block" | "comment" | "computed_property_name" | "conditional_type" | "const" | "constraint" | "construct_signature" | "constructor_type" | "continue" | "continue_statement" | "debugger" | "debugger_statement" | "declaration" | "declare" | "decorator" | "default" | "default_type" | "delete" | "do" | "do_statement" | "else" | "else_clause" | "empty_statement" | "enum" | "enum_assignment" | "enum_body" | "enum_declaration" | "escape_sequence" | "existential_type" | "export" | "export_clause" | "export_specifier" | "export_statement" | "expression" | "expression_statement" | "extends" | "extends_clause" | "extends_type_clause" | "false" | "finally" | "finally_clause" | "flow_maybe_type" | "for" | "for_in_statement" | "for_statement" | "formal_parameters" | "from" | "function" | "function_declaration" | "function_expression" | "function_signature" | "function_type" | "generator_function" | "generator_function_declaration" | "generic_type" | "get" | "global" | "hash_bang_line" | "html_character_reference" | "html_comment" | "identifier" | "if" | "if_statement" | "implements" | "implements_clause" | "import" | "import_alias" | "import_attribute" | "import_clause" | "import_require_clause" | "import_specifier" | "import_statement" | "in" | "index_signature" | "index_type_query" | "infer" | "infer_type" | "instanceof" | "instantiation_expression" | "interface" | "interface_body" | "interface_declaration" | "internal_module" | "intersection_type" | "is" | "jsx_attribute" | "jsx_closing_element" | "jsx_element" | "jsx_expression" | "jsx_namespace_name" | "jsx_opening_element" | "jsx_self_closing_element" | "jsx_text" | "keyof" | "labeled_statement" | "let" | "lexical_declaration" | "literal_type" | "lookup_type" | "mapped_type_clause" | "member_expression" | "meta" | "meta_property" | "method_definition" | "method_signature" | "module" | "named_imports" | "namespace" | "namespace_export" | "namespace_import" | "nested_identifier" | "nested_type_identifier" | "never" | "new" | "new_expression" | "non_null_expression" | "null" | "number" | "object" | "object_assignment_pattern" | "object_pattern" | "object_type" | "of" | "omitting_type_annotation" | "opting_type_annotation" | "optional_chain" | "optional_parameter" | "optional_type" | "override" | "override_modifier" | "pair" | "pair_pattern" | "parenthesized_expression" | "parenthesized_type" | "pattern" | "predefined_type" | "primary_expression" | "primary_type" | "private" | "private_property_identifier" | "program" | "property_identifier" | "property_signature" | "protected" | "public" | "public_field_definition" | "readonly" | "readonly_type" | "regex" | "regex_flags" | "regex_pattern" | "require" | "required_parameter" | "rest_pattern" | "rest_type" | "return" | "return_statement" | "satisfies" | "satisfies_expression" | "sequence_expression" | "set" | "shorthand_property_identifier" | "shorthand_property_identifier_pattern" | "spread_element" | "statement" | "statement_block" | "statement_identifier" | "static" | "string" | "string_fragment" | "subscript_expression" | "super" | "switch" | "switch_body" | "switch_case" | "switch_default" | "switch_statement" | "symbol" | "target" | "template_literal_type" | "template_string" | "template_substitution" | "template_type" | "ternary_expression" | "this" | "this_type" | "throw" | "throw_statement" | "true" | "try" | "try_statement" | "tuple_type" | "type" | "type_alias_declaration" | "type_annotation" | "type_arguments" | "type_identifier" | "type_parameter" | "type_parameters" | "type_predicate" | "type_predicate_annotation" | "type_query" | "typeof" | "unary_expression" | "undefined" | "union_type" | "unique symbol" | "unknown" | "update_expression" | "using" | "var" | "variable_declaration" | "variable_declarator" | "void" | "while" | "while_statement" | "with" | "with_statement" | "yield" | "yield_expression";
|
|
10
|
+
export type HtmlNodeTypeAll = "'" | "\"" | "/>" | "<" | "<!" | "</" | "=" | ">" | "attribute" | "attribute_name" | "attribute_value" | "comment" | "doctype" | "document" | "element" | "end_tag" | "entity" | "erroneous_end_tag" | "erroneous_end_tag_name" | "quoted_attribute_value" | "raw_text" | "script_element" | "self_closing_tag" | "start_tag" | "style_element" | "tag_name" | "text";
|
|
11
|
+
export type CssNodeTypeAll = "-" | "," | ";" | ":" | "::" | "." | "'" | "\"" | "(" | ")" | "[" | "]" | "{" | "}" | "@charset" | "@import" | "@keyframes" | "@media" | "@namespace" | "@scope" | "@supports" | "*" | "*=" | "/" | "#" | "^=" | "+" | "=" | ">" | "|" | "|=" | "~" | "~=" | "$=" | "adjacent_sibling_selector" | "and" | "arguments" | "at_keyword" | "at_rule" | "attribute_name" | "attribute_selector" | "binary_expression" | "binary_query" | "block" | "call_expression" | "charset_statement" | "child_selector" | "class_name" | "class_selector" | "color_value" | "comment" | "declaration" | "descendant_selector" | "escape_sequence" | "feature_name" | "feature_query" | "float_value" | "from" | "function_name" | "grid_value" | "id_name" | "id_selector" | "identifier" | "import_statement" | "important" | "important_value" | "integer_value" | "js_comment" | "keyframe_block" | "keyframe_block_list" | "keyframes_name" | "keyframes_statement" | "keyword_query" | "media_statement" | "namespace_name" | "namespace_selector" | "namespace_statement" | "nesting_selector" | "not" | "of" | "only" | "or" | "parenthesized_query" | "parenthesized_value" | "plain_value" | "postcss_statement" | "property_name" | "pseudo_class_selector" | "pseudo_element_selector" | "rule_set" | "scope_statement" | "selector" | "selector_query" | "selectors" | "sibling_selector" | "string_content" | "string_value" | "stylesheet" | "supports_statement" | "tag_name" | "to" | "unary_query" | "unit" | "universal_selector";
|
|
12
|
+
export type YamlNodeTypeAll = "-" | "---" | "," | ":" | "?" | "..." | "'" | "\"" | "[" | "]" | "{" | "}" | "*" | "&" | ">" | "|" | "alias" | "alias_name" | "anchor" | "anchor_name" | "block_mapping" | "block_mapping_pair" | "block_node" | "block_scalar" | "block_sequence" | "block_sequence_item" | "boolean_scalar" | "comment" | "directive_name" | "directive_parameter" | "document" | "double_quote_scalar" | "escape_sequence" | "float_scalar" | "flow_mapping" | "flow_node" | "flow_pair" | "flow_sequence" | "integer_scalar" | "null_scalar" | "plain_scalar" | "reserved_directive" | "single_quote_scalar" | "stream" | "string_scalar" | "tag" | "tag_directive" | "tag_handle" | "tag_prefix" | "timestamp_scalar" | "yaml_directive" | "yaml_version";
|
|
13
|
+
export type JavascriptFieldName = "alias" | "alternative" | "argument" | "arguments" | "attribute" | "body" | "close_tag" | "condition" | "consequence" | "constructor" | "declaration" | "decorator" | "finalizer" | "flags" | "function" | "handler" | "increment" | "index" | "initializer" | "key" | "kind" | "label" | "left" | "member" | "name" | "object" | "open_tag" | "operator" | "optional_chain" | "parameter" | "parameters" | "pattern" | "property" | "right" | "source" | "value";
|
|
14
|
+
export type TypescriptFieldName = "alias" | "alternative" | "argument" | "arguments" | "body" | "condition" | "consequence" | "constraint" | "constructor" | "declaration" | "decorator" | "finalizer" | "flags" | "function" | "handler" | "increment" | "index" | "index_type" | "initializer" | "key" | "kind" | "label" | "left" | "module" | "name" | "object" | "operator" | "optional_chain" | "parameter" | "parameters" | "pattern" | "property" | "return_type" | "right" | "sign" | "source" | "type" | "type_arguments" | "type_parameters" | "value";
|
|
15
|
+
export type TsxFieldName = "alias" | "alternative" | "argument" | "arguments" | "attribute" | "body" | "close_tag" | "condition" | "consequence" | "constraint" | "constructor" | "declaration" | "decorator" | "finalizer" | "flags" | "function" | "handler" | "increment" | "index" | "index_type" | "initializer" | "key" | "kind" | "label" | "left" | "module" | "name" | "object" | "open_tag" | "operator" | "optional_chain" | "parameter" | "parameters" | "pattern" | "property" | "return_type" | "right" | "sign" | "source" | "type" | "type_arguments" | "type_parameters" | "value";
|
|
16
|
+
export type HtmlFieldName = never;
|
|
17
|
+
export type CssFieldName = never;
|
|
18
|
+
export type YamlFieldName = "key" | "value";
|
|
19
|
+
/** Every named node type across the built-in grammars — the `find` domain. */
|
|
20
|
+
export type NodeType = JavascriptNodeType | TypescriptNodeType | TsxNodeType | HtmlNodeType | CssNodeType | YamlNodeType;
|
|
21
|
+
/** Every node type, named or anonymous — the `RichNode.type` domain. */
|
|
22
|
+
export type NodeTypeAll = JavascriptNodeTypeAll | TypescriptNodeTypeAll | TsxNodeTypeAll | HtmlNodeTypeAll | CssNodeTypeAll | YamlNodeTypeAll;
|
|
23
|
+
/** Every field name across the built-in grammars. */
|
|
24
|
+
export type FieldName = JavascriptFieldName | TypescriptFieldName | TsxFieldName | HtmlFieldName | CssFieldName | YamlFieldName;
|
|
25
|
+
/** The a node type valid in grammar `G` — e.g. `NodeTypeOf<'typescript'>`. */
|
|
26
|
+
export type NodeTypeOf<G extends 'javascript' | 'typescript' | 'tsx' | 'html' | 'css' | 'yaml'> = G extends 'javascript' ? JavascriptNodeType : G extends 'typescript' ? TypescriptNodeType : G extends 'tsx' ? TsxNodeType : G extends 'html' ? HtmlNodeType : G extends 'css' ? CssNodeType : G extends 'yaml' ? YamlNodeType : never;
|
|
27
|
+
/** The a node type (named or anonymous) valid in grammar `G` — e.g. `NodeTypeAllOf<'typescript'>`. */
|
|
28
|
+
export type NodeTypeAllOf<G extends 'javascript' | 'typescript' | 'tsx' | 'html' | 'css' | 'yaml'> = G extends 'javascript' ? JavascriptNodeTypeAll : G extends 'typescript' ? TypescriptNodeTypeAll : G extends 'tsx' ? TsxNodeTypeAll : G extends 'html' ? HtmlNodeTypeAll : G extends 'css' ? CssNodeTypeAll : G extends 'yaml' ? YamlNodeTypeAll : never;
|
|
29
|
+
/** The a field name valid in grammar `G` — e.g. `FieldNameOf<'typescript'>`. */
|
|
30
|
+
export type FieldNameOf<G extends 'javascript' | 'typescript' | 'tsx' | 'html' | 'css' | 'yaml'> = G extends 'javascript' ? JavascriptFieldName : G extends 'typescript' ? TypescriptFieldName : G extends 'tsx' ? TsxFieldName : G extends 'html' ? HtmlFieldName : G extends 'css' ? CssFieldName : G extends 'yaml' ? YamlFieldName : never;
|
|
31
|
+
//# sourceMappingURL=node-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node-types.d.ts","sourceRoot":"","sources":["../../src/generated/node-types.ts"],"names":[],"mappings":"AAMA,MAAM,MAAM,kBAAkB,GAC1B,WAAW,GACX,OAAO,GACP,eAAe,GACf,gBAAgB,GAChB,uBAAuB,GACvB,oBAAoB,GACpB,iCAAiC,GACjC,kBAAkB,GAClB,mBAAmB,GACnB,iBAAiB,GACjB,iBAAiB,GACjB,cAAc,GACd,OAAO,GACP,YAAY,GACZ,mBAAmB,GACnB,gBAAgB,GAChB,oBAAoB,GACpB,SAAS,GACT,wBAAwB,GACxB,oBAAoB,GACpB,oBAAoB,GACpB,aAAa,GACb,WAAW,GACX,cAAc,GACd,aAAa,GACb,iBAAiB,GACjB,iBAAiB,GACjB,eAAe,GACf,kBAAkB,GAClB,kBAAkB,GAClB,YAAY,GACZ,sBAAsB,GACtB,OAAO,GACP,kBAAkB,GAClB,gBAAgB,GAChB,kBAAkB,GAClB,eAAe,GACf,mBAAmB,GACnB,sBAAsB,GACtB,qBAAqB,GACrB,oBAAoB,GACpB,gCAAgC,GAChC,gBAAgB,GAChB,0BAA0B,GAC1B,cAAc,GACd,YAAY,GACZ,cAAc,GACd,QAAQ,GACR,kBAAkB,GAClB,eAAe,GACf,kBAAkB,GAClB,kBAAkB,GAClB,eAAe,GACf,qBAAqB,GACrB,aAAa,GAC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7F,CAAC,SAAS,YAAY,GAAG,mBAAmB,GAC5C,CAAC,SAAS,YAAY,GAAG,mBAAmB,GAC5C,CAAC,SAAS,KAAK,GAAG,YAAY,GAC9B,CAAC,SAAS,MAAM,GAAG,aAAa,GAChC,CAAC,SAAS,KAAK,GAAG,YAAY,GAC9B,CAAC,SAAS,MAAM,GAAG,aAAa,GAChC,KAAK,CAAA"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
// Generated by `pnpm --filter @codegraft/core regen-node-types` — do not edit by hand.
|
|
2
|
+
// source: tree-sitter-javascript@0.25.0, tree-sitter-typescript@0.23.2, tree-sitter-html@0.23.2, tree-sitter-css@0.25.0, @tree-sitter-grammars/tree-sitter-yaml@0.7.1
|
|
3
|
+
// A dependency-free leaf module: imports nothing, so it never cycles with types.ts.
|
|
4
|
+
export {};
|
|
5
|
+
//# sourceMappingURL=node-types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node-types.js","sourceRoot":"","sources":["../../src/generated/node-types.ts"],"names":[],"mappings":"AAAA,uFAAuF;AACvF,sKAAsK;AACtK,oFAAoF"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { RichNode } from './types.js';
|
|
2
|
+
export declare function getPropertySignatures(objectType: RichNode): RichNode[];
|
|
3
|
+
export declare function getPropertyName(signature: RichNode): string | null;
|
|
4
|
+
/**
|
|
5
|
+
* The `{ name, type }` branches of an object type, with each property's `: T` annotation
|
|
6
|
+
* unwrapped to `T`. The canonical use is collapsing a `BATI.If<{ featureA: T; default: U }>`
|
|
7
|
+
* conditional type to the branch whose name is an enabled feature (else `default`).
|
|
8
|
+
*/
|
|
9
|
+
export declare function getConditionalBranches(objectType: RichNode): Array<{
|
|
10
|
+
name: string;
|
|
11
|
+
type: RichNode;
|
|
12
|
+
}>;
|
|
13
|
+
//# sourceMappingURL=helpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../src/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAM1C,wBAAgB,qBAAqB,CAAC,UAAU,EAAE,QAAQ,GAAG,QAAQ,EAAE,CAEtE;AAED,wBAAgB,eAAe,CAAC,SAAS,EAAE,QAAQ,GAAG,MAAM,GAAG,IAAI,CAElE;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,UAAU,EAAE,QAAQ,GAAG,KAAK,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,QAAQ,CAAA;CAAE,CAAC,CAUpG"}
|