parseman 0.50.5 → 0.50.6
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/index.js +1 -1
- package/dist/plugin/evaluator.d.ts.map +1 -1
- package/dist/plugin/index.js +4 -1
- package/dist/plugin/index.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/package.json +1 -1
- package/src/plugin/evaluator.ts +13 -0
- package/src/version.ts +1 -1
package/dist/version.d.ts
CHANGED
|
@@ -13,5 +13,5 @@
|
|
|
13
13
|
* Kept in sync with `package.json` by `test/unit/version-sync.test.ts`, which fails
|
|
14
14
|
* the build if this constant drifts from the published version.
|
|
15
15
|
*/
|
|
16
|
-
export declare const PARSEMAN_VERSION = "0.50.
|
|
16
|
+
export declare const PARSEMAN_VERSION = "0.50.6";
|
|
17
17
|
//# sourceMappingURL=version.d.ts.map
|
package/package.json
CHANGED
package/src/plugin/evaluator.ts
CHANGED
|
@@ -756,6 +756,19 @@ function exprToCombi(node: Expression, scope: XScope, code?: string, mfs?: strin
|
|
|
756
756
|
if (prov) carriedImports.push({ local: name, source: prov.source, imported: prov.imported })
|
|
757
757
|
else unresolved.push(name)
|
|
758
758
|
}
|
|
759
|
+
} else if (be!.type === 'Identifier' && typeof be!.name === 'string' && combi._def.buildSrc === be!.name) {
|
|
760
|
+
// A NAMED reducer that is a BARE IMPORTED identifier — `node(t, parser, mkRel)`
|
|
761
|
+
// where `mkRel` is `import { mkRel } from './astf'`. The table inlines the
|
|
762
|
+
// reducer as its NAME (`f:[mkRel]`), and a cross-package compose that re-lowers
|
|
763
|
+
// this carried piece re-emits that name verbatim into the consuming module —
|
|
764
|
+
// which does not import it, so the fused artifact throws ReferenceError. Carry
|
|
765
|
+
// the ONE import the emitted name needs so the downstream re-emit binds it. This
|
|
766
|
+
// is the reducer NAME's own import (unambiguous — it is THIS module's import),
|
|
767
|
+
// never the reducer BODY's internal free names (the `buildSigSrc` P1 trap): the
|
|
768
|
+
// guard `buildSrc === be.name` also excludes a foreign-factory reducer whose
|
|
769
|
+
// source was rewritten to a self-contained body above.
|
|
770
|
+
const prov = _builderImports?.(be!.name) ?? null
|
|
771
|
+
if (prov) carriedImports.push({ local: be!.name, source: prov.source, imported: prov.imported })
|
|
759
772
|
}
|
|
760
773
|
const staticError = [...report.structural, ...unresolved]
|
|
761
774
|
if (staticError.length > 0) combi._def.buildStaticError = staticError
|
package/src/version.ts
CHANGED