parseman 0.45.0 → 0.46.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/dist/analysis/choice-cost-gate.d.ts +158 -0
- package/dist/analysis/choice-cost-gate.d.ts.map +1 -0
- package/dist/analysis/choice-cost-render.d.ts +88 -0
- package/dist/analysis/choice-cost-render.d.ts.map +1 -0
- package/dist/analysis/choice-cost.d.ts +383 -0
- package/dist/analysis/choice-cost.d.ts.map +1 -0
- package/dist/analysis/corpus.d.ts +73 -0
- package/dist/analysis/corpus.d.ts.map +1 -0
- package/dist/analysis/diagnose-render.d.ts +65 -0
- package/dist/analysis/diagnose-render.d.ts.map +1 -0
- package/dist/analysis/diagnose.d.ts +15 -0
- package/dist/analysis/diagnose.d.ts.map +1 -1
- package/dist/analysis/diagnostics.cjs +11272 -0
- package/dist/analysis/diagnostics.cjs.map +7 -0
- package/dist/analysis/diagnostics.d.ts +27 -0
- package/dist/analysis/diagnostics.d.ts.map +1 -0
- package/dist/analysis/diagnostics.js +11249 -0
- package/dist/analysis/diagnostics.js.map +7 -0
- package/dist/analysis/fix-render.d.ts +43 -0
- package/dist/analysis/fix-render.d.ts.map +1 -0
- package/dist/analysis/fix.d.ts +172 -0
- package/dist/analysis/fix.d.ts.map +1 -0
- package/dist/analysis/gating.d.ts +8 -0
- package/dist/analysis/gating.d.ts.map +1 -1
- package/dist/analysis/rebuild.d.ts +61 -0
- package/dist/analysis/rebuild.d.ts.map +1 -0
- package/dist/analysis/terminal.d.ts +142 -0
- package/dist/analysis/terminal.d.ts.map +1 -0
- package/dist/cli/index.cjs +12507 -0
- package/dist/cli/index.cjs.map +7 -0
- package/dist/cli/index.d.ts +3 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +12484 -0
- package/dist/cli/index.js.map +7 -0
- package/dist/compiler/build-arity.d.ts.map +1 -1
- package/dist/compiler/linker.d.ts +44 -6
- package/dist/compiler/linker.d.ts.map +1 -1
- package/dist/compiler/module-hoist.d.ts +106 -0
- package/dist/compiler/module-hoist.d.ts.map +1 -0
- package/dist/index.cjs +1297 -297
- package/dist/index.cjs.map +4 -4
- package/dist/index.d.ts +8 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1297 -297
- package/dist/index.js.map +4 -4
- package/dist/language-service/index.cjs.map +2 -2
- package/dist/language-service/index.js.map +2 -2
- package/dist/plugin/evaluator.d.ts +1 -1
- package/dist/plugin/evaluator.d.ts.map +1 -1
- package/dist/plugin/free-identifiers.d.ts +23 -0
- package/dist/plugin/free-identifiers.d.ts.map +1 -0
- package/dist/plugin/index.cjs +429 -43
- package/dist/plugin/index.cjs.map +4 -4
- package/dist/plugin/index.d.ts.map +1 -1
- package/dist/plugin/index.js +429 -43
- package/dist/plugin/index.js.map +4 -4
- package/dist/plugin/reducer-resolver.d.ts +17 -1
- package/dist/plugin/reducer-resolver.d.ts.map +1 -1
- package/dist/spec/index.cjs +2 -1
- package/dist/spec/index.cjs.map +2 -2
- package/dist/spec/index.js +2 -1
- package/dist/spec/index.js.map +2 -2
- package/dist/version.d.ts +1 -1
- package/package.json +18 -3
|
@@ -4,7 +4,10 @@ type AnyNode = {
|
|
|
4
4
|
end: number;
|
|
5
5
|
} & Record<string, unknown>;
|
|
6
6
|
/** Why a reducer could not be reduced to a parameter list. `undefined` = it could. */
|
|
7
|
-
export type UnresolvedReason = 'rest-parameter' | 'arguments' | 'reassigned' | 'not-a-function' | 'unresolved-import' | 'not-found' | 'computed' | 'foreign-source'
|
|
7
|
+
export type UnresolvedReason = 'rest-parameter' | 'arguments' | 'reassigned' | 'not-a-function' | 'unresolved-import' | 'not-found' | 'computed' | 'foreign-source'
|
|
8
|
+
/** Two DISTINCT registered files hold byte-identical text, so the text no longer
|
|
9
|
+
* identifies the module an offset indexes. See `register`. */
|
|
10
|
+
| 'ambiguous-source';
|
|
8
11
|
export type ResolvedReducer = {
|
|
9
12
|
/** Declared positional arity, or `null` when genuinely undecidable. */
|
|
10
13
|
arity: number | null;
|
|
@@ -35,6 +38,19 @@ export type ReducerResolver = {
|
|
|
35
38
|
* implementation for what happens when it is not this resolver's.
|
|
36
39
|
*/
|
|
37
40
|
resolve(exprSrc: string, offset: number, src: string): ResolvedReducer | null;
|
|
41
|
+
/**
|
|
42
|
+
* Announce a module whose text the evaluator may later hand to `resolve` as `src` —
|
|
43
|
+
* an imported `rules()` factory is evaluated with `code: mod.src`, so its `node(…,
|
|
44
|
+
* build)` offsets index THAT file, not the entry file.
|
|
45
|
+
*
|
|
46
|
+
* Registering it makes those offsets answerable against the module's own scope tree.
|
|
47
|
+
* Without it `resolve` can only decline (`foreign-source`), which fails open to full
|
|
48
|
+
* capture — correct, but it charges every such node all five facilities.
|
|
49
|
+
*
|
|
50
|
+
* Returns whether the file could be analysed; an unreadable or unparseable module
|
|
51
|
+
* simply stays unregistered and keeps declining.
|
|
52
|
+
*/
|
|
53
|
+
register(file: string): boolean;
|
|
38
54
|
};
|
|
39
55
|
export declare function createReducerResolver(entryFile: string, body: unknown[], src: string): ReducerResolver;
|
|
40
56
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reducer-resolver.d.ts","sourceRoot":"","sources":["../../src/plugin/reducer-resolver.ts"],"names":[],"mappings":"AAqCA,KAAK,OAAO,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;AAErF,sFAAsF;AACtF,MAAM,MAAM,gBAAgB,GACxB,gBAAgB,GAChB,WAAW,GACX,YAAY,GACZ,gBAAgB,GAChB,mBAAmB,GACnB,WAAW,GACX,UAAU,GACV,gBAAgB,CAAA;
|
|
1
|
+
{"version":3,"file":"reducer-resolver.d.ts","sourceRoot":"","sources":["../../src/plugin/reducer-resolver.ts"],"names":[],"mappings":"AAqCA,KAAK,OAAO,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;AAErF,sFAAsF;AACtF,MAAM,MAAM,gBAAgB,GACxB,gBAAgB,GAChB,WAAW,GACX,YAAY,GACZ,gBAAgB,GAChB,mBAAmB,GACnB,WAAW,GACX,UAAU,GACV,gBAAgB;AAClB;+DAC+D;GAC7D,kBAAkB,CAAA;AAEtB,MAAM,MAAM,eAAe,GAAG;IAC5B,uEAAuE;IACvE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,8EAA8E;IAC9E,GAAG,EAAE,MAAM,GAAG,IAAI,CAAA;IAClB,MAAM,CAAC,EAAE,gBAAgB,CAAA;CAC1B,CAAA;AA0MD;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,EAAE,EAAE,OAAO,GAAG;IAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,MAAM,CAAC,EAAE,gBAAgB,CAAA;CAAE,CAa9F;AAoKD,MAAM,MAAM,eAAe,GAAG;IAC5B;;;;;;;;OAQG;IACH,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,eAAe,GAAG,IAAI,CAAA;IAC7E;;;;;;;;;;;OAWG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAA;CAChC,CAAA;AAKD,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,GAAG,EAAE,MAAM,GAAG,eAAe,CAkItG"}
|
package/dist/spec/index.cjs
CHANGED
|
@@ -2854,7 +2854,8 @@ var RESOLVER_REASONS = {
|
|
|
2854
2854
|
"unresolved-import": "its module could not be resolved or parsed",
|
|
2855
2855
|
"not-found": "the name did not resolve to any binding",
|
|
2856
2856
|
"computed": "it is a computed expression",
|
|
2857
|
-
"foreign-source": "it is named
|
|
2857
|
+
"foreign-source": "it is named in a module the resolver was never told about, so its offsets index no scope tree the resolver holds",
|
|
2858
|
+
"ambiguous-source": "two distinct registered modules hold byte-identical text, so that text no longer names the module its offsets index"
|
|
2858
2859
|
};
|
|
2859
2860
|
function unconfirmableReason(def, src) {
|
|
2860
2861
|
const declared = def.buildArityUnresolved;
|