8
8
} from "@lionweb/core" ;
9
9
import { Node } from ".." ;
10
10
11
- export class TylasuNode implements LionwebNode {
11
+ export class TylasuNodeWrapper implements LionwebNode {
12
12
id : Id ;
13
13
node : Node ;
14
14
parent ?: LionwebNode ;
@@ -34,16 +34,16 @@ export class LanguageMapping {
34
34
}
35
35
}
36
36
37
- export class TylasuInstantiationFacade implements InstantiationFacade < TylasuNode > {
37
+ export class TylasuInstantiationFacade implements InstantiationFacade < TylasuNodeWrapper > {
38
38
39
39
constructor ( public languageMappings : LanguageMapping [ ] = [ STARLASU_LANGUAGE_MAPPING ] ) { }
40
40
41
41
encodingOf ( ) : unknown {
42
42
return undefined ;
43
43
}
44
- nodeFor ( parent : TylasuNode | undefined , classifier : Classifier , id : string , propertySettings : {
44
+ nodeFor ( parent : TylasuNodeWrapper | undefined , classifier : Classifier , id : string , propertySettings : {
45
45
[ p : string ] : unknown
46
- } ) : TylasuNode {
46
+ } ) : TylasuNodeWrapper {
47
47
let node : Node | undefined ;
48
48
for ( const language of this . languageMappings ) {
49
49
const nodeType = language . classifiers . get ( classifier ) ;
@@ -63,12 +63,12 @@ export class TylasuInstantiationFacade implements InstantiationFacade<TylasuNode
63
63
throw new Error ( "Unknown classifier: " + classifier . id ) ;
64
64
}
65
65
}
66
- setFeatureValue ( node : TylasuNode , feature : Feature , value : unknown ) : void {
66
+ setFeatureValue ( node : TylasuNodeWrapper , feature : Feature , value : unknown ) : void {
67
67
if ( feature instanceof Containment ) {
68
68
if ( feature . multiple ) {
69
- node . node . addChild ( feature . name , ( value as TylasuNode ) ?. node ) ;
69
+ node . node . addChild ( feature . name , ( value as TylasuNodeWrapper ) ?. node ) ;
70
70
} else {
71
- node . node . setChild ( feature . name , ( value as TylasuNode ) ?. node ) ;
71
+ node . node . setChild ( feature . name , ( value as TylasuNodeWrapper ) ?. node ) ;
72
72
}
73
73
} else {
74
74
node . node [ feature . name ] = value ;
0 commit comments