Skip to content

Commit a61244d

Browse files
committed
Release version 1.6.0
1 parent f637875 commit a61244d

File tree

3 files changed

+14
-9
lines changed

3 files changed

+14
-9
lines changed

CHANGELOG.md

+6-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,12 @@
22
All notable changes to this project from version 1.2.0 upwards are documented in this file.
33
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
44

5-
## [1.5.8] – 2024-03-27
5+
## [1.6.0] – 2024-02-28
6+
7+
## Added
8+
- Lionweb deserialization into Tylasu nodes
9+
10+
## [1.5.8] – 2024-02-27
611

712
Included all the changes in the 1.4.x branch (versions 1.4.7 and 1.4.8).
813

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"description": "AST building blocks for TypeScript/JavaScript, part of the *lasu family, with optional integrations with ANTLR4 and Ecore.",
44
"author": "Strumenta s.r.l.",
55
"publisher": "strumenta",
6-
"version": "1.5.8",
6+
"version": "1.6.0",
77
"license": "Apache-2.0",
88
"keywords": [
99
"antlr",

src/interop/lionweb.ts

+7-7
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {
88
} from "@lionweb/core";
99
import {Node} from "..";
1010

11-
export class TylasuNode implements LionwebNode {
11+
export class TylasuNodeWrapper implements LionwebNode {
1212
id: Id;
1313
node: Node;
1414
parent?: LionwebNode;
@@ -34,16 +34,16 @@ export class LanguageMapping {
3434
}
3535
}
3636

37-
export class TylasuInstantiationFacade implements InstantiationFacade<TylasuNode> {
37+
export class TylasuInstantiationFacade implements InstantiationFacade<TylasuNodeWrapper> {
3838

3939
constructor(public languageMappings: LanguageMapping[] = [STARLASU_LANGUAGE_MAPPING]) {}
4040

4141
encodingOf(): unknown {
4242
return undefined;
4343
}
44-
nodeFor(parent: TylasuNode | undefined, classifier: Classifier, id: string, propertySettings: {
44+
nodeFor(parent: TylasuNodeWrapper | undefined, classifier: Classifier, id: string, propertySettings: {
4545
[p: string]: unknown
46-
}): TylasuNode {
46+
}): TylasuNodeWrapper {
4747
let node: Node | undefined;
4848
for (const language of this.languageMappings) {
4949
const nodeType = language.classifiers.get(classifier);
@@ -63,12 +63,12 @@ export class TylasuInstantiationFacade implements InstantiationFacade<TylasuNode
6363
throw new Error("Unknown classifier: " + classifier.id);
6464
}
6565
}
66-
setFeatureValue(node: TylasuNode, feature: Feature, value: unknown): void {
66+
setFeatureValue(node: TylasuNodeWrapper, feature: Feature, value: unknown): void {
6767
if (feature instanceof Containment) {
6868
if (feature.multiple) {
69-
node.node.addChild(feature.name, (value as TylasuNode)?.node);
69+
node.node.addChild(feature.name, (value as TylasuNodeWrapper)?.node);
7070
} else {
71-
node.node.setChild(feature.name, (value as TylasuNode)?.node);
71+
node.node.setChild(feature.name, (value as TylasuNodeWrapper)?.node);
7272
}
7373
} else {
7474
node.node[feature.name] = value;

0 commit comments

Comments
 (0)