@lionweb/io-lionweb-mps-specific 0.8.0-beta.2 → 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.
- package/dist/deserializer.d.ts +3 -3
- package/dist/deserializer.d.ts.map +1 -1
- package/dist/deserializer.js +7 -3
- package/dist/deserializer.js.map +1 -1
- package/package.json +5 -5
- package/src/deserializer.ts +11 -12
package/dist/deserializer.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { LionWebJsonChunk } from "@lionweb/json";
|
|
2
|
-
import { Language,
|
|
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
|
|
6
|
+
* Problems are reported through the given {@link ProblemReporter} which defaults to {@link consoleProblemReporter}.
|
|
7
7
|
*/
|
|
8
|
-
export declare const deserializeLanguagesWithIoLionWebMpsSpecific: (serializationChunk: LionWebJsonChunk, problemHandler?:
|
|
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,
|
|
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"}
|
package/dist/deserializer.js
CHANGED
|
@@ -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 {
|
|
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
|
|
24
|
+
* Problems are reported through the given {@link ProblemReporter} which defaults to {@link consoleProblemReporter}.
|
|
25
25
|
*/
|
|
26
|
-
export const deserializeLanguagesWithIoLionWebMpsSpecific = (serializationChunk, problemHandler =
|
|
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
|
package/dist/deserializer.js.map
CHANGED
|
@@ -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,
|
|
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
|
+
"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.
|
|
19
|
-
"@lionweb/json": "0.8.0-beta.
|
|
20
|
-
"@lionweb/textgen-utils": "0.8.0-beta.
|
|
21
|
-
"@lionweb/ts-utils": "0.8.0-beta.
|
|
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": {
|
package/src/deserializer.ts
CHANGED
|
@@ -17,14 +17,13 @@
|
|
|
17
17
|
|
|
18
18
|
import { LionWebJsonChunk } from "@lionweb/json"
|
|
19
19
|
import {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
deserializeChunk,
|
|
20
|
+
consoleProblemReporter,
|
|
21
|
+
deserializerWith,
|
|
23
22
|
Language,
|
|
24
23
|
lioncore,
|
|
25
24
|
lioncoreBuiltins,
|
|
26
25
|
nodesExtractorUsing,
|
|
27
|
-
|
|
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
|
|
35
|
+
* Problems are reported through the given {@link ProblemReporter} which defaults to {@link consoleProblemReporter}.
|
|
37
36
|
*/
|
|
38
|
-
export const deserializeLanguagesWithIoLionWebMpsSpecific = (serializationChunk: LionWebJsonChunk, problemHandler:
|
|
39
|
-
|
|
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
|
-
|
|
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
|
|