@lionweb/io-lionweb-mps-specific 0.8.0-beta.3 → 0.8.0-beta.4

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.
@@ -1,9 +1,9 @@
1
1
  import { LionWebJsonChunk } from "@lionweb/json";
2
- import { Language, SimplisticHandler } from "@lionweb/core";
2
+ import { Language, ProblemReporter } from "@lionweb/core";
3
3
  /**
4
4
  * @return the deserialization of the given {@link LionWebJsonChunk serialization chunk} as an array of {@link Language languages}.
5
5
  * Any LionCore/M3 node can be annotated using annotations from the `io.lionweb.mps.specific` language.
6
- * Problems are reported through the given {@link SimplisticHandler} which defaults to {@link defaultSimplisticHandler}.
6
+ * Problems are reported through the given {@link ProblemReporter} which defaults to {@link consoleProblemReporter}.
7
7
  */
8
- export declare const deserializeLanguagesWithIoLionWebMpsSpecific: (serializationChunk: LionWebJsonChunk, problemHandler?: SimplisticHandler) => Language[];
8
+ export declare const deserializeLanguagesWithIoLionWebMpsSpecific: (serializationChunk: LionWebJsonChunk, problemHandler?: ProblemReporter) => Language[];
9
9
  //# sourceMappingURL=deserializer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"deserializer.d.ts","sourceRoot":"","sources":["../src/deserializer.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAA;AAChD,OAAO,EAIH,QAAQ,EAIR,iBAAiB,EACpB,MAAM,eAAe,CAAA;AAKtB;;;;GAIG;AACH,eAAO,MAAM,4CAA4C,GAAI,oBAAoB,gBAAgB,EAAE,iBAAgB,iBAA4C,KAQ3G,QAAQ,EAAE,CAAA"}
1
+ {"version":3,"file":"deserializer.d.ts","sourceRoot":"","sources":["../src/deserializer.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAA;AAChD,OAAO,EAGH,QAAQ,EAIR,eAAe,EAClB,MAAM,eAAe,CAAA;AAKtB;;;;GAIG;AACH,eAAO,MAAM,4CAA4C,GAAI,oBAAoB,gBAAgB,EAAE,iBAAgB,eAAwC,KAQvG,QAAQ,EAAE,CAAA"}
@@ -14,14 +14,18 @@
14
14
  //
15
15
  // SPDX-FileCopyrightText: 2025 TRUMPF Laser SE and other contributors
16
16
  // SPDX-License-Identifier: Apache-2.0
17
- import { builtinPropertyValueDeserializer, defaultSimplisticHandler, deserializeChunk, Language, lioncore, lioncoreBuiltins, nodesExtractorUsing } from "@lionweb/core";
17
+ import { consoleProblemReporter, deserializerWith, Language, lioncore, lioncoreBuiltins, nodesExtractorUsing } from "@lionweb/core";
18
18
  import { lioncoreExtractionFacade } from "@lionweb/core/dist/m3/facade.js";
19
19
  import { ioLionWebMpsSpecificLanguage } from "./definition.js";
20
20
  import { combinedWriter } from "./facade.js";
21
21
  /**
22
22
  * @return the deserialization of the given {@link LionWebJsonChunk serialization chunk} as an array of {@link Language languages}.
23
23
  * Any LionCore/M3 node can be annotated using annotations from the `io.lionweb.mps.specific` language.
24
- * Problems are reported through the given {@link SimplisticHandler} which defaults to {@link defaultSimplisticHandler}.
24
+ * Problems are reported through the given {@link ProblemReporter} which defaults to {@link consoleProblemReporter}.
25
25
  */
26
- export const deserializeLanguagesWithIoLionWebMpsSpecific = (serializationChunk, problemHandler = defaultSimplisticHandler) => deserializeChunk(serializationChunk, combinedWriter, [lioncore, ioLionWebMpsSpecificLanguage], [lioncore, lioncoreBuiltins].flatMap(nodesExtractorUsing(lioncoreExtractionFacade)), builtinPropertyValueDeserializer, problemHandler).filter((node) => node instanceof Language);
26
+ export const deserializeLanguagesWithIoLionWebMpsSpecific = (serializationChunk, problemHandler = consoleProblemReporter) => deserializerWith({
27
+ writer: combinedWriter,
28
+ languages: [lioncore, ioLionWebMpsSpecificLanguage],
29
+ problemReporter: problemHandler
30
+ })(serializationChunk, [lioncore, lioncoreBuiltins].flatMap(nodesExtractorUsing(lioncoreExtractionFacade))).filter((node) => node instanceof Language);
27
31
  //# sourceMappingURL=deserializer.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"deserializer.js","sourceRoot":"","sources":["../src/deserializer.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,EAAE;AACF,iEAAiE;AACjE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,iDAAiD;AACjD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AACjC,EAAE;AACF,sEAAsE;AACtE,sCAAsC;AAGtC,OAAO,EACH,gCAAgC,EAChC,wBAAwB,EACxB,gBAAgB,EAChB,QAAQ,EACR,QAAQ,EACR,gBAAgB,EAChB,mBAAmB,EAEtB,MAAM,eAAe,CAAA;AACtB,OAAO,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAA;AAC1E,OAAO,EAAE,4BAA4B,EAAE,MAAM,iBAAiB,CAAA;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAE5C;;;;GAIG;AACH,MAAM,CAAC,MAAM,4CAA4C,GAAG,CAAC,kBAAoC,EAAE,iBAAoC,wBAAwB,EAAE,EAAE,CAC/J,gBAAgB,CACZ,kBAAkB,EAClB,cAAc,EACd,CAAC,QAAQ,EAAE,4BAA4B,CAAC,EACxC,CAAC,QAAQ,EAAE,gBAAgB,CAAC,CAAC,OAAO,CAAC,mBAAmB,CAAC,wBAAwB,CAAC,CAAC,EACnF,gCAAgC,EAChC,cAAc,CACjB,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,YAAY,QAAQ,CAAe,CAAA"}
1
+ {"version":3,"file":"deserializer.js","sourceRoot":"","sources":["../src/deserializer.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,EAAE;AACF,iEAAiE;AACjE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,iDAAiD;AACjD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AACjC,EAAE;AACF,sEAAsE;AACtE,sCAAsC;AAGtC,OAAO,EACH,sBAAsB,EACtB,gBAAgB,EAChB,QAAQ,EACR,QAAQ,EACR,gBAAgB,EAChB,mBAAmB,EAEtB,MAAM,eAAe,CAAA;AACtB,OAAO,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAA;AAC1E,OAAO,EAAE,4BAA4B,EAAE,MAAM,iBAAiB,CAAA;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAE5C;;;;GAIG;AACH,MAAM,CAAC,MAAM,4CAA4C,GAAG,CAAC,kBAAoC,EAAE,iBAAkC,sBAAsB,EAAE,EAAE,CAC3J,gBAAgB,CAAC;IACb,MAAM,EAAE,cAAc;IACtB,SAAS,EAAE,CAAC,QAAQ,EAAE,4BAA4B,CAAC;IACnD,eAAe,EAAE,cAAc;CAClC,CAAC,CACE,kBAAkB,EAClB,CAAC,QAAQ,EAAE,gBAAgB,CAAC,CAAC,OAAO,CAAC,mBAAmB,CAAC,wBAAwB,CAAC,CAAC,CACtF,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,YAAY,QAAQ,CAAe,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lionweb/io-lionweb-mps-specific",
3
- "version": "0.8.0-beta.3",
3
+ "version": "0.8.0-beta.4",
4
4
  "description": "TypeScript implementation of the io.lionweb.mps.specific language",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -15,10 +15,10 @@
15
15
  "url": "https://github.com/LionWeb-io/lionweb-typescript/issues"
16
16
  },
17
17
  "dependencies": {
18
- "@lionweb/core": "0.8.0-beta.3",
19
- "@lionweb/json": "0.8.0-beta.3",
20
- "@lionweb/textgen-utils": "0.8.0-beta.3",
21
- "@lionweb/ts-utils": "0.8.0-beta.3",
18
+ "@lionweb/core": "0.8.0-beta.4",
19
+ "@lionweb/json": "0.8.0-beta.4",
20
+ "@lionweb/textgen-utils": "0.8.0-beta.4",
21
+ "@lionweb/ts-utils": "0.8.0-beta.4",
22
22
  "littoral-templates": "0.5.1"
23
23
  },
24
24
  "scripts": {
@@ -17,14 +17,13 @@
17
17
 
18
18
  import { LionWebJsonChunk } from "@lionweb/json"
19
19
  import {
20
- builtinPropertyValueDeserializer,
21
- defaultSimplisticHandler,
22
- deserializeChunk,
20
+ consoleProblemReporter,
21
+ deserializerWith,
23
22
  Language,
24
23
  lioncore,
25
24
  lioncoreBuiltins,
26
25
  nodesExtractorUsing,
27
- SimplisticHandler
26
+ ProblemReporter
28
27
  } from "@lionweb/core"
29
28
  import { lioncoreExtractionFacade } from "@lionweb/core/dist/m3/facade.js"
30
29
  import { ioLionWebMpsSpecificLanguage } from "./definition.js"
@@ -33,15 +32,15 @@ import { combinedWriter } from "./facade.js"
33
32
  /**
34
33
  * @return the deserialization of the given {@link LionWebJsonChunk serialization chunk} as an array of {@link Language languages}.
35
34
  * Any LionCore/M3 node can be annotated using annotations from the `io.lionweb.mps.specific` language.
36
- * Problems are reported through the given {@link SimplisticHandler} which defaults to {@link defaultSimplisticHandler}.
35
+ * Problems are reported through the given {@link ProblemReporter} which defaults to {@link consoleProblemReporter}.
37
36
  */
38
- export const deserializeLanguagesWithIoLionWebMpsSpecific = (serializationChunk: LionWebJsonChunk, problemHandler: SimplisticHandler = defaultSimplisticHandler) =>
39
- deserializeChunk(
37
+ export const deserializeLanguagesWithIoLionWebMpsSpecific = (serializationChunk: LionWebJsonChunk, problemHandler: ProblemReporter = consoleProblemReporter) =>
38
+ deserializerWith({
39
+ writer: combinedWriter,
40
+ languages: [lioncore, ioLionWebMpsSpecificLanguage],
41
+ problemReporter: problemHandler
42
+ })(
40
43
  serializationChunk,
41
- combinedWriter,
42
- [lioncore, ioLionWebMpsSpecificLanguage],
43
- [lioncore, lioncoreBuiltins].flatMap(nodesExtractorUsing(lioncoreExtractionFacade)),
44
- builtinPropertyValueDeserializer,
45
- problemHandler
44
+ [lioncore, lioncoreBuiltins].flatMap(nodesExtractorUsing(lioncoreExtractionFacade))
46
45
  ).filter((node) => node instanceof Language) as Language[]
47
46