@likec4/language-server 1.5.0 → 1.6.1
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/contrib/likec4.tmLanguage.json +1 -1
- package/package.json +17 -5
- package/src/Rpc.ts +2 -1
- package/src/ast.ts +10 -5
- package/src/generated/ast.ts +355 -238
- package/src/generated/grammar.ts +1 -1
- package/src/generated-lib/icons.ts +952 -0
- package/src/like-c4.langium +85 -54
- package/src/likec4lib.ts +7 -0
- package/src/lsp/DocumentSymbolProvider.ts +28 -1
- package/src/lsp/SemanticTokenProvider.ts +30 -9
- package/src/model/model-parser.ts +126 -74
- package/src/model-change/changeElementStyle.ts +4 -4
- package/src/model-graph/compute-view/__test__/fixture.ts +3 -3
- package/src/model-graph/compute-view/compute.ts +4 -4
- package/src/model-graph/dynamic-view/__test__/fixture.ts +2 -2
- package/src/references/scope-computation.ts +113 -60
- package/src/shared/NodeKindProvider.ts +1 -0
- package/src/shared/WorkspaceManager.ts +15 -6
- package/src/validation/dynamic-view-rule.ts +19 -24
- package/src/validation/index.ts +8 -7
- package/src/validation/property-checks.ts +23 -1
- package/src/validation/view-predicates/custom-element-expr.ts +9 -7
- package/src/validation/view-predicates/custom-relation-expr.ts +4 -3
- package/src/validation/view-predicates/expanded-element.ts +13 -24
- package/src/validation/view-predicates/incoming.ts +5 -5
- package/src/validation/view-predicates/outgoing.ts +5 -5
package/src/generated/ast.ts
CHANGED
|
@@ -11,6 +11,7 @@ export const LikeC4Terminals = {
|
|
|
11
11
|
BLOCK_COMMENT: /\/\*[\s\S]*?\*\//,
|
|
12
12
|
LINE_COMMENT: /\/\/[^\n\r]*/,
|
|
13
13
|
WS: /\s+/,
|
|
14
|
+
LIB_ICON: /\b(aws|gcp|tech):[-\w]*/,
|
|
14
15
|
URI_WITH_SCHEMA: /\w+:\/\/\S+/,
|
|
15
16
|
URI_RELATIVE: /\.{0,2}\/[^\/]\S+/,
|
|
16
17
|
DotUnderscore: /\b\._/,
|
|
@@ -22,7 +23,7 @@ export const LikeC4Terminals = {
|
|
|
22
23
|
Eq: /\={1,2}/,
|
|
23
24
|
Percent: /\b\d+%/,
|
|
24
25
|
String: /"[^"]*"|'[^']*'/,
|
|
25
|
-
IdTerminal:
|
|
26
|
+
IdTerminal: /[_]*[a-zA-Z][-\w]*/,
|
|
26
27
|
};
|
|
27
28
|
|
|
28
29
|
export type ArrowType = 'crow' | 'diamond' | 'dot' | 'none' | 'normal' | 'odiamond' | 'odot' | 'onormal' | 'open' | 'vee';
|
|
@@ -43,31 +44,31 @@ export function isDotId(item: unknown): item is DotId {
|
|
|
43
44
|
return typeof item === 'string';
|
|
44
45
|
}
|
|
45
46
|
|
|
46
|
-
export type
|
|
47
|
+
export type DynamicViewElementExpression = CustomElementExpression | ElementExpression;
|
|
47
48
|
|
|
48
|
-
export const
|
|
49
|
+
export const DynamicViewElementExpression = 'DynamicViewElementExpression';
|
|
49
50
|
|
|
50
|
-
export function
|
|
51
|
-
return reflection.isInstance(item,
|
|
51
|
+
export function isDynamicViewElementExpression(item: unknown): item is DynamicViewElementExpression {
|
|
52
|
+
return reflection.isInstance(item, DynamicViewElementExpression);
|
|
52
53
|
}
|
|
53
54
|
|
|
54
|
-
export type
|
|
55
|
+
export type DynamicViewRule = DynamicViewRulePredicate | ViewRuleAutoLayout | ViewRuleStyle;
|
|
55
56
|
|
|
56
|
-
export const
|
|
57
|
+
export const DynamicViewRule = 'DynamicViewRule';
|
|
57
58
|
|
|
58
|
-
export function
|
|
59
|
-
return reflection.isInstance(item,
|
|
59
|
+
export function isDynamicViewRule(item: unknown): item is DynamicViewRule {
|
|
60
|
+
return reflection.isInstance(item, DynamicViewRule);
|
|
60
61
|
}
|
|
61
62
|
|
|
62
|
-
export type
|
|
63
|
+
export type ElementExpression = ElementDescedantsExpression | ElementKindExpression | ElementRef | ElementTagExpression | ExpandElementExpression | WildcardExpression;
|
|
63
64
|
|
|
64
|
-
export const
|
|
65
|
+
export const ElementExpression = 'ElementExpression';
|
|
65
66
|
|
|
66
|
-
export function
|
|
67
|
-
return reflection.isInstance(item,
|
|
67
|
+
export function isElementExpression(item: unknown): item is ElementExpression {
|
|
68
|
+
return reflection.isInstance(item, ElementExpression);
|
|
68
69
|
}
|
|
69
70
|
|
|
70
|
-
export type ElementProperty = ElementStringProperty | LinkProperty | StyleProperties;
|
|
71
|
+
export type ElementProperty = ElementStringProperty | IconProperty | LinkProperty | StyleProperties;
|
|
71
72
|
|
|
72
73
|
export const ElementProperty = 'ElementProperty';
|
|
73
74
|
|
|
@@ -81,10 +82,24 @@ export function isElementShape(item: unknown): item is ElementShape {
|
|
|
81
82
|
return item === 'rectangle' || item === 'person' || item === 'browser' || item === 'mobile' || item === 'cylinder' || item === 'storage' || item === 'queue';
|
|
82
83
|
}
|
|
83
84
|
|
|
85
|
+
export type Expression = CustomElementExpression | CustomRelationExpression | ElementExpression | RelationExpression;
|
|
86
|
+
|
|
87
|
+
export const Expression = 'Expression';
|
|
88
|
+
|
|
89
|
+
export function isExpression(item: unknown): item is Expression {
|
|
90
|
+
return reflection.isInstance(item, Expression);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export type IconId = string;
|
|
94
|
+
|
|
95
|
+
export function isIconId(item: unknown): item is IconId {
|
|
96
|
+
return (typeof item === 'string' && (/\b(aws|gcp|tech):[-\w]*/.test(item)));
|
|
97
|
+
}
|
|
98
|
+
|
|
84
99
|
export type Id = 'element' | 'model' | ArrowType | ElementShape | LineOptions | ThemeColor | string;
|
|
85
100
|
|
|
86
101
|
export function isId(item: unknown): item is Id {
|
|
87
|
-
return isElementShape(item) || isThemeColor(item) || isArrowType(item) || isLineOptions(item) || item === 'element' || item === 'model' || (typeof item === 'string' && (
|
|
102
|
+
return isElementShape(item) || isThemeColor(item) || isArrowType(item) || isLineOptions(item) || item === 'element' || item === 'model' || (typeof item === 'string' && (/[_]*[a-zA-Z][-\w]*/.test(item)));
|
|
88
103
|
}
|
|
89
104
|
|
|
90
105
|
export type LikeC4View = DynamicView | ElementView;
|
|
@@ -109,12 +124,12 @@ export function isRelation(item: unknown): item is Relation {
|
|
|
109
124
|
return reflection.isInstance(item, Relation);
|
|
110
125
|
}
|
|
111
126
|
|
|
112
|
-
export type
|
|
127
|
+
export type RelationExpression = DirectedRelationExpression | InOutRelationExpression | IncomingRelationExpression | OutgoingRelationExpression;
|
|
113
128
|
|
|
114
|
-
export const
|
|
129
|
+
export const RelationExpression = 'RelationExpression';
|
|
115
130
|
|
|
116
|
-
export function
|
|
117
|
-
return reflection.isInstance(item,
|
|
131
|
+
export function isRelationExpression(item: unknown): item is RelationExpression {
|
|
132
|
+
return reflection.isInstance(item, RelationExpression);
|
|
118
133
|
}
|
|
119
134
|
|
|
120
135
|
export type RelationProperty = LinkProperty | RelationStringProperty | RelationStyleProperty;
|
|
@@ -197,24 +212,8 @@ export function isViewRulePredicate(item: unknown): item is ViewRulePredicate {
|
|
|
197
212
|
return reflection.isInstance(item, ViewRulePredicate);
|
|
198
213
|
}
|
|
199
214
|
|
|
200
|
-
export type ViewRulePredicateExpr = ElementPredicateExpression | RelationPredicateExpression;
|
|
201
|
-
|
|
202
|
-
export const ViewRulePredicateExpr = 'ViewRulePredicateExpr';
|
|
203
|
-
|
|
204
|
-
export function isViewRulePredicateExpr(item: unknown): item is ViewRulePredicateExpr {
|
|
205
|
-
return reflection.isInstance(item, ViewRulePredicateExpr);
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
export type ViewRulePredicateRelations = CustomRelationExpr | InOutExpr | IncomingExpr | RelationExpr;
|
|
209
|
-
|
|
210
|
-
export const ViewRulePredicateRelations = 'ViewRulePredicateRelations';
|
|
211
|
-
|
|
212
|
-
export function isViewRulePredicateRelations(item: unknown): item is ViewRulePredicateRelations {
|
|
213
|
-
return reflection.isInstance(item, ViewRulePredicateRelations);
|
|
214
|
-
}
|
|
215
|
-
|
|
216
215
|
export interface ArrowProperty extends AstNode {
|
|
217
|
-
readonly $container:
|
|
216
|
+
readonly $container: CustomRelationProperties | RelationStyleProperty | SpecificationRelationshipKind;
|
|
218
217
|
readonly $type: 'ArrowProperty';
|
|
219
218
|
key: 'head' | 'tail';
|
|
220
219
|
value: ArrowType;
|
|
@@ -227,7 +226,7 @@ export function isArrowProperty(item: unknown): item is ArrowProperty {
|
|
|
227
226
|
}
|
|
228
227
|
|
|
229
228
|
export interface BorderProperty extends AstNode {
|
|
230
|
-
readonly $container:
|
|
229
|
+
readonly $container: CustomElementProperties | StyleProperties | ViewRuleStyle;
|
|
231
230
|
readonly $type: 'BorderProperty';
|
|
232
231
|
key: 'border';
|
|
233
232
|
value: BorderStyleValue;
|
|
@@ -240,7 +239,7 @@ export function isBorderProperty(item: unknown): item is BorderProperty {
|
|
|
240
239
|
}
|
|
241
240
|
|
|
242
241
|
export interface ColorProperty extends AstNode {
|
|
243
|
-
readonly $container:
|
|
242
|
+
readonly $container: CustomElementProperties | CustomRelationProperties | RelationStyleProperty | SpecificationRelationshipKind | StyleProperties | ViewRuleStyle;
|
|
244
243
|
readonly $type: 'ColorProperty';
|
|
245
244
|
key: 'color';
|
|
246
245
|
value: ThemeColor;
|
|
@@ -252,66 +251,67 @@ export function isColorProperty(item: unknown): item is ColorProperty {
|
|
|
252
251
|
return reflection.isInstance(item, ColorProperty);
|
|
253
252
|
}
|
|
254
253
|
|
|
255
|
-
export interface
|
|
256
|
-
readonly $container:
|
|
257
|
-
readonly $type: '
|
|
258
|
-
|
|
259
|
-
target:
|
|
254
|
+
export interface CustomElementExpression extends AstNode {
|
|
255
|
+
readonly $container: DynamicViewRulePredicateIterator | Expressions;
|
|
256
|
+
readonly $type: 'CustomElementExpression';
|
|
257
|
+
custom: CustomElementProperties;
|
|
258
|
+
target: ElementExpression;
|
|
260
259
|
}
|
|
261
260
|
|
|
262
|
-
export const
|
|
261
|
+
export const CustomElementExpression = 'CustomElementExpression';
|
|
263
262
|
|
|
264
|
-
export function
|
|
265
|
-
return reflection.isInstance(item,
|
|
263
|
+
export function isCustomElementExpression(item: unknown): item is CustomElementExpression {
|
|
264
|
+
return reflection.isInstance(item, CustomElementExpression);
|
|
266
265
|
}
|
|
267
266
|
|
|
268
|
-
export interface
|
|
269
|
-
readonly $container:
|
|
270
|
-
readonly $type: '
|
|
267
|
+
export interface CustomElementProperties extends AstNode {
|
|
268
|
+
readonly $container: CustomElementExpression;
|
|
269
|
+
readonly $type: 'CustomElementProperties';
|
|
271
270
|
props: Array<ElementStringProperty | NavigateToProperty | StyleProperty>;
|
|
272
271
|
}
|
|
273
272
|
|
|
274
|
-
export const
|
|
273
|
+
export const CustomElementProperties = 'CustomElementProperties';
|
|
275
274
|
|
|
276
|
-
export function
|
|
277
|
-
return reflection.isInstance(item,
|
|
275
|
+
export function isCustomElementProperties(item: unknown): item is CustomElementProperties {
|
|
276
|
+
return reflection.isInstance(item, CustomElementProperties);
|
|
278
277
|
}
|
|
279
278
|
|
|
280
|
-
export interface
|
|
281
|
-
readonly $container:
|
|
282
|
-
readonly $type: '
|
|
283
|
-
|
|
284
|
-
relation:
|
|
279
|
+
export interface CustomRelationExpression extends AstNode {
|
|
280
|
+
readonly $container: Expressions;
|
|
281
|
+
readonly $type: 'CustomRelationExpression';
|
|
282
|
+
custom: CustomRelationProperties;
|
|
283
|
+
relation: RelationExpression;
|
|
285
284
|
}
|
|
286
285
|
|
|
287
|
-
export const
|
|
286
|
+
export const CustomRelationExpression = 'CustomRelationExpression';
|
|
288
287
|
|
|
289
|
-
export function
|
|
290
|
-
return reflection.isInstance(item,
|
|
288
|
+
export function isCustomRelationExpression(item: unknown): item is CustomRelationExpression {
|
|
289
|
+
return reflection.isInstance(item, CustomRelationExpression);
|
|
291
290
|
}
|
|
292
291
|
|
|
293
|
-
export interface
|
|
294
|
-
readonly $container:
|
|
295
|
-
readonly $type: '
|
|
292
|
+
export interface CustomRelationProperties extends AstNode {
|
|
293
|
+
readonly $container: CustomRelationExpression;
|
|
294
|
+
readonly $type: 'CustomRelationProperties';
|
|
296
295
|
props: Array<RelationStringProperty | RelationshipStyleProperty>;
|
|
297
296
|
}
|
|
298
297
|
|
|
299
|
-
export const
|
|
298
|
+
export const CustomRelationProperties = 'CustomRelationProperties';
|
|
300
299
|
|
|
301
|
-
export function
|
|
302
|
-
return reflection.isInstance(item,
|
|
300
|
+
export function isCustomRelationProperties(item: unknown): item is CustomRelationProperties {
|
|
301
|
+
return reflection.isInstance(item, CustomRelationProperties);
|
|
303
302
|
}
|
|
304
303
|
|
|
305
|
-
export interface
|
|
306
|
-
readonly $container:
|
|
307
|
-
readonly $type: '
|
|
308
|
-
|
|
304
|
+
export interface DirectedRelationExpression extends AstNode {
|
|
305
|
+
readonly $container: CustomRelationExpression | Expressions;
|
|
306
|
+
readonly $type: 'DirectedRelationExpression';
|
|
307
|
+
source: OutgoingRelationExpression;
|
|
308
|
+
target: ElementExpression;
|
|
309
309
|
}
|
|
310
310
|
|
|
311
|
-
export const
|
|
311
|
+
export const DirectedRelationExpression = 'DirectedRelationExpression';
|
|
312
312
|
|
|
313
|
-
export function
|
|
314
|
-
return reflection.isInstance(item,
|
|
313
|
+
export function isDirectedRelationExpression(item: unknown): item is DirectedRelationExpression {
|
|
314
|
+
return reflection.isInstance(item, DirectedRelationExpression);
|
|
315
315
|
}
|
|
316
316
|
|
|
317
317
|
export interface DynamicView extends AstNode {
|
|
@@ -345,7 +345,7 @@ export function isDynamicViewBody(item: unknown): item is DynamicViewBody {
|
|
|
345
345
|
export interface DynamicViewRulePredicate extends AstNode {
|
|
346
346
|
readonly $container: DynamicViewBody;
|
|
347
347
|
readonly $type: 'DynamicViewRulePredicate';
|
|
348
|
-
|
|
348
|
+
exprs: DynamicViewRulePredicateIterator;
|
|
349
349
|
}
|
|
350
350
|
|
|
351
351
|
export const DynamicViewRulePredicate = 'DynamicViewRulePredicate';
|
|
@@ -354,6 +354,19 @@ export function isDynamicViewRulePredicate(item: unknown): item is DynamicViewRu
|
|
|
354
354
|
return reflection.isInstance(item, DynamicViewRulePredicate);
|
|
355
355
|
}
|
|
356
356
|
|
|
357
|
+
export interface DynamicViewRulePredicateIterator extends AstNode {
|
|
358
|
+
readonly $container: DynamicViewRulePredicate | DynamicViewRulePredicateIterator;
|
|
359
|
+
readonly $type: 'DynamicViewRulePredicateIterator';
|
|
360
|
+
prev?: DynamicViewRulePredicateIterator;
|
|
361
|
+
value: DynamicViewElementExpression;
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
export const DynamicViewRulePredicateIterator = 'DynamicViewRulePredicateIterator';
|
|
365
|
+
|
|
366
|
+
export function isDynamicViewRulePredicateIterator(item: unknown): item is DynamicViewRulePredicateIterator {
|
|
367
|
+
return reflection.isInstance(item, DynamicViewRulePredicateIterator);
|
|
368
|
+
}
|
|
369
|
+
|
|
357
370
|
export interface DynamicViewStep extends AstNode {
|
|
358
371
|
readonly $container: DynamicViewBody;
|
|
359
372
|
readonly $type: 'DynamicViewStep';
|
|
@@ -399,6 +412,31 @@ export function isElementBody(item: unknown): item is ElementBody {
|
|
|
399
412
|
return reflection.isInstance(item, ElementBody);
|
|
400
413
|
}
|
|
401
414
|
|
|
415
|
+
export interface ElementDescedantsExpression extends AstNode {
|
|
416
|
+
readonly $container: CustomElementExpression | DirectedRelationExpression | DynamicViewRulePredicateIterator | ElementExpressionsIterator | Expressions | IncomingRelationExpression | OutgoingRelationExpression;
|
|
417
|
+
readonly $type: 'ElementDescedantsExpression';
|
|
418
|
+
parent: ElementRef;
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
export const ElementDescedantsExpression = 'ElementDescedantsExpression';
|
|
422
|
+
|
|
423
|
+
export function isElementDescedantsExpression(item: unknown): item is ElementDescedantsExpression {
|
|
424
|
+
return reflection.isInstance(item, ElementDescedantsExpression);
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
export interface ElementExpressionsIterator extends AstNode {
|
|
428
|
+
readonly $container: ElementExpressionsIterator | ViewRuleStyle;
|
|
429
|
+
readonly $type: 'ElementExpressionsIterator';
|
|
430
|
+
prev?: ElementExpressionsIterator;
|
|
431
|
+
value: ElementExpression;
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
export const ElementExpressionsIterator = 'ElementExpressionsIterator';
|
|
435
|
+
|
|
436
|
+
export function isElementExpressionsIterator(item: unknown): item is ElementExpressionsIterator {
|
|
437
|
+
return reflection.isInstance(item, ElementExpressionsIterator);
|
|
438
|
+
}
|
|
439
|
+
|
|
402
440
|
export interface ElementKind extends AstNode {
|
|
403
441
|
readonly $container: SpecificationElementKind;
|
|
404
442
|
readonly $type: 'ElementKind';
|
|
@@ -411,21 +449,21 @@ export function isElementKind(item: unknown): item is ElementKind {
|
|
|
411
449
|
return reflection.isInstance(item, ElementKind);
|
|
412
450
|
}
|
|
413
451
|
|
|
414
|
-
export interface
|
|
415
|
-
readonly $container:
|
|
416
|
-
readonly $type: '
|
|
452
|
+
export interface ElementKindExpression extends AstNode {
|
|
453
|
+
readonly $container: CustomElementExpression | DirectedRelationExpression | DynamicViewRulePredicateIterator | ElementExpressionsIterator | Expressions | IncomingRelationExpression | OutgoingRelationExpression;
|
|
454
|
+
readonly $type: 'ElementKindExpression';
|
|
417
455
|
isEqual: boolean;
|
|
418
|
-
kind
|
|
456
|
+
kind?: Reference<ElementKind>;
|
|
419
457
|
}
|
|
420
458
|
|
|
421
|
-
export const
|
|
459
|
+
export const ElementKindExpression = 'ElementKindExpression';
|
|
422
460
|
|
|
423
|
-
export function
|
|
424
|
-
return reflection.isInstance(item,
|
|
461
|
+
export function isElementKindExpression(item: unknown): item is ElementKindExpression {
|
|
462
|
+
return reflection.isInstance(item, ElementKindExpression);
|
|
425
463
|
}
|
|
426
464
|
|
|
427
465
|
export interface ElementRef extends AstNode {
|
|
428
|
-
readonly $container:
|
|
466
|
+
readonly $container: CustomElementExpression | DirectedRelationExpression | DynamicViewRulePredicateIterator | DynamicViewStep | ElementDescedantsExpression | ElementExpressionsIterator | ElementRef | ElementView | ExpandElementExpression | ExplicitRelation | Expressions | ImplicitRelation | IncomingRelationExpression | OutgoingRelationExpression;
|
|
429
467
|
readonly $type: 'ElementRef';
|
|
430
468
|
dot?: string;
|
|
431
469
|
el: Reference<Element>;
|
|
@@ -439,7 +477,7 @@ export function isElementRef(item: unknown): item is ElementRef {
|
|
|
439
477
|
}
|
|
440
478
|
|
|
441
479
|
export interface ElementStringProperty extends AstNode {
|
|
442
|
-
readonly $container:
|
|
480
|
+
readonly $container: CustomElementProperties | ElementBody;
|
|
443
481
|
readonly $type: 'ElementStringProperty';
|
|
444
482
|
key: 'description' | 'technology' | 'title';
|
|
445
483
|
value: string;
|
|
@@ -451,17 +489,17 @@ export function isElementStringProperty(item: unknown): item is ElementStringPro
|
|
|
451
489
|
return reflection.isInstance(item, ElementStringProperty);
|
|
452
490
|
}
|
|
453
491
|
|
|
454
|
-
export interface
|
|
455
|
-
readonly $container:
|
|
456
|
-
readonly $type: '
|
|
492
|
+
export interface ElementTagExpression extends AstNode {
|
|
493
|
+
readonly $container: CustomElementExpression | DirectedRelationExpression | DynamicViewRulePredicateIterator | ElementExpressionsIterator | Expressions | IncomingRelationExpression | OutgoingRelationExpression;
|
|
494
|
+
readonly $type: 'ElementTagExpression';
|
|
457
495
|
isEqual: boolean;
|
|
458
|
-
tag
|
|
496
|
+
tag?: Reference<Tag>;
|
|
459
497
|
}
|
|
460
498
|
|
|
461
|
-
export const
|
|
499
|
+
export const ElementTagExpression = 'ElementTagExpression';
|
|
462
500
|
|
|
463
|
-
export function
|
|
464
|
-
return reflection.isInstance(item,
|
|
501
|
+
export function isElementTagExpression(item: unknown): item is ElementTagExpression {
|
|
502
|
+
return reflection.isInstance(item, ElementTagExpression);
|
|
465
503
|
}
|
|
466
504
|
|
|
467
505
|
export interface ElementView extends AstNode {
|
|
@@ -508,7 +546,7 @@ export function isElementViewRef(item: unknown): item is ElementViewRef {
|
|
|
508
546
|
export interface ExcludePredicate extends AstNode {
|
|
509
547
|
readonly $container: ElementViewBody;
|
|
510
548
|
readonly $type: 'ExcludePredicate';
|
|
511
|
-
|
|
549
|
+
exprs: Expressions;
|
|
512
550
|
}
|
|
513
551
|
|
|
514
552
|
export const ExcludePredicate = 'ExcludePredicate';
|
|
@@ -517,16 +555,16 @@ export function isExcludePredicate(item: unknown): item is ExcludePredicate {
|
|
|
517
555
|
return reflection.isInstance(item, ExcludePredicate);
|
|
518
556
|
}
|
|
519
557
|
|
|
520
|
-
export interface
|
|
521
|
-
readonly $container:
|
|
522
|
-
readonly $type: '
|
|
523
|
-
|
|
558
|
+
export interface ExpandElementExpression extends AstNode {
|
|
559
|
+
readonly $container: CustomElementExpression | DirectedRelationExpression | DynamicViewRulePredicateIterator | ElementExpressionsIterator | Expressions | IncomingRelationExpression | OutgoingRelationExpression;
|
|
560
|
+
readonly $type: 'ExpandElementExpression';
|
|
561
|
+
expand: ElementRef;
|
|
524
562
|
}
|
|
525
563
|
|
|
526
|
-
export const
|
|
564
|
+
export const ExpandElementExpression = 'ExpandElementExpression';
|
|
527
565
|
|
|
528
|
-
export function
|
|
529
|
-
return reflection.isInstance(item,
|
|
566
|
+
export function isExpandElementExpression(item: unknown): item is ExpandElementExpression {
|
|
567
|
+
return reflection.isInstance(item, ExpandElementExpression);
|
|
530
568
|
}
|
|
531
569
|
|
|
532
570
|
export interface ExplicitRelation extends AstNode {
|
|
@@ -546,6 +584,19 @@ export function isExplicitRelation(item: unknown): item is ExplicitRelation {
|
|
|
546
584
|
return reflection.isInstance(item, ExplicitRelation);
|
|
547
585
|
}
|
|
548
586
|
|
|
587
|
+
export interface Expressions extends AstNode {
|
|
588
|
+
readonly $container: ExcludePredicate | Expressions | IncludePredicate;
|
|
589
|
+
readonly $type: 'Expressions';
|
|
590
|
+
prev?: Expressions;
|
|
591
|
+
value: Expression;
|
|
592
|
+
}
|
|
593
|
+
|
|
594
|
+
export const Expressions = 'Expressions';
|
|
595
|
+
|
|
596
|
+
export function isExpressions(item: unknown): item is Expressions {
|
|
597
|
+
return reflection.isInstance(item, Expressions);
|
|
598
|
+
}
|
|
599
|
+
|
|
549
600
|
export interface ExtendElement extends AstNode {
|
|
550
601
|
readonly $container: Model;
|
|
551
602
|
readonly $type: 'ExtendElement';
|
|
@@ -586,10 +637,11 @@ export function isFqnElementRef(item: unknown): item is FqnElementRef {
|
|
|
586
637
|
}
|
|
587
638
|
|
|
588
639
|
export interface IconProperty extends AstNode {
|
|
589
|
-
readonly $container:
|
|
640
|
+
readonly $container: CustomElementProperties | ElementBody | StyleProperties | ViewRuleStyle;
|
|
590
641
|
readonly $type: 'IconProperty';
|
|
591
642
|
key: 'icon';
|
|
592
|
-
|
|
643
|
+
libicon?: Reference<LibIcon>;
|
|
644
|
+
value?: Uri;
|
|
593
645
|
}
|
|
594
646
|
|
|
595
647
|
export const IconProperty = 'IconProperty';
|
|
@@ -617,7 +669,7 @@ export function isImplicitRelation(item: unknown): item is ImplicitRelation {
|
|
|
617
669
|
export interface IncludePredicate extends AstNode {
|
|
618
670
|
readonly $container: ElementViewBody;
|
|
619
671
|
readonly $type: 'IncludePredicate';
|
|
620
|
-
|
|
672
|
+
exprs: Expressions;
|
|
621
673
|
}
|
|
622
674
|
|
|
623
675
|
export const IncludePredicate = 'IncludePredicate';
|
|
@@ -626,32 +678,45 @@ export function isIncludePredicate(item: unknown): item is IncludePredicate {
|
|
|
626
678
|
return reflection.isInstance(item, IncludePredicate);
|
|
627
679
|
}
|
|
628
680
|
|
|
629
|
-
export interface
|
|
630
|
-
readonly $container:
|
|
631
|
-
readonly $type: '
|
|
632
|
-
to:
|
|
681
|
+
export interface IncomingRelationExpression extends AstNode {
|
|
682
|
+
readonly $container: CustomRelationExpression | Expressions | InOutRelationExpression;
|
|
683
|
+
readonly $type: 'IncomingRelationExpression';
|
|
684
|
+
to: ElementExpression;
|
|
633
685
|
}
|
|
634
686
|
|
|
635
|
-
export const
|
|
687
|
+
export const IncomingRelationExpression = 'IncomingRelationExpression';
|
|
636
688
|
|
|
637
|
-
export function
|
|
638
|
-
return reflection.isInstance(item,
|
|
689
|
+
export function isIncomingRelationExpression(item: unknown): item is IncomingRelationExpression {
|
|
690
|
+
return reflection.isInstance(item, IncomingRelationExpression);
|
|
639
691
|
}
|
|
640
692
|
|
|
641
|
-
export interface
|
|
642
|
-
readonly $container:
|
|
643
|
-
readonly $type: '
|
|
644
|
-
inout:
|
|
693
|
+
export interface InOutRelationExpression extends AstNode {
|
|
694
|
+
readonly $container: CustomRelationExpression | Expressions;
|
|
695
|
+
readonly $type: 'InOutRelationExpression';
|
|
696
|
+
inout: IncomingRelationExpression;
|
|
645
697
|
}
|
|
646
698
|
|
|
647
|
-
export const
|
|
699
|
+
export const InOutRelationExpression = 'InOutRelationExpression';
|
|
648
700
|
|
|
649
|
-
export function
|
|
650
|
-
return reflection.isInstance(item,
|
|
701
|
+
export function isInOutRelationExpression(item: unknown): item is InOutRelationExpression {
|
|
702
|
+
return reflection.isInstance(item, InOutRelationExpression);
|
|
703
|
+
}
|
|
704
|
+
|
|
705
|
+
export interface LibIcon extends AstNode {
|
|
706
|
+
readonly $container: LikeC4Lib;
|
|
707
|
+
readonly $type: 'LibIcon';
|
|
708
|
+
name: IconId;
|
|
709
|
+
}
|
|
710
|
+
|
|
711
|
+
export const LibIcon = 'LibIcon';
|
|
712
|
+
|
|
713
|
+
export function isLibIcon(item: unknown): item is LibIcon {
|
|
714
|
+
return reflection.isInstance(item, LibIcon);
|
|
651
715
|
}
|
|
652
716
|
|
|
653
717
|
export interface LikeC4Grammar extends AstNode {
|
|
654
718
|
readonly $type: 'LikeC4Grammar';
|
|
719
|
+
likec4lib: Array<LikeC4Lib>;
|
|
655
720
|
models: Array<Model>;
|
|
656
721
|
specifications: Array<SpecificationRule>;
|
|
657
722
|
views: Array<ModelViews>;
|
|
@@ -663,8 +728,20 @@ export function isLikeC4Grammar(item: unknown): item is LikeC4Grammar {
|
|
|
663
728
|
return reflection.isInstance(item, LikeC4Grammar);
|
|
664
729
|
}
|
|
665
730
|
|
|
731
|
+
export interface LikeC4Lib extends AstNode {
|
|
732
|
+
readonly $container: LikeC4Grammar;
|
|
733
|
+
readonly $type: 'LikeC4Lib';
|
|
734
|
+
icons: Array<LibIcon>;
|
|
735
|
+
}
|
|
736
|
+
|
|
737
|
+
export const LikeC4Lib = 'LikeC4Lib';
|
|
738
|
+
|
|
739
|
+
export function isLikeC4Lib(item: unknown): item is LikeC4Lib {
|
|
740
|
+
return reflection.isInstance(item, LikeC4Lib);
|
|
741
|
+
}
|
|
742
|
+
|
|
666
743
|
export interface LineProperty extends AstNode {
|
|
667
|
-
readonly $container:
|
|
744
|
+
readonly $container: CustomRelationProperties | RelationStyleProperty | SpecificationRelationshipKind;
|
|
668
745
|
readonly $type: 'LineProperty';
|
|
669
746
|
key: 'line';
|
|
670
747
|
value: LineOptions;
|
|
@@ -716,7 +793,7 @@ export function isModelViews(item: unknown): item is ModelViews {
|
|
|
716
793
|
}
|
|
717
794
|
|
|
718
795
|
export interface NavigateToProperty extends AstNode {
|
|
719
|
-
readonly $container:
|
|
796
|
+
readonly $container: CustomElementProperties;
|
|
720
797
|
readonly $type: 'NavigateToProperty';
|
|
721
798
|
key: 'navigateTo';
|
|
722
799
|
value: ViewRef;
|
|
@@ -729,7 +806,7 @@ export function isNavigateToProperty(item: unknown): item is NavigateToProperty
|
|
|
729
806
|
}
|
|
730
807
|
|
|
731
808
|
export interface OpacityProperty extends AstNode {
|
|
732
|
-
readonly $container:
|
|
809
|
+
readonly $container: CustomElementProperties | StyleProperties | ViewRuleStyle;
|
|
733
810
|
readonly $type: 'OpacityProperty';
|
|
734
811
|
key: 'opacity';
|
|
735
812
|
value: string;
|
|
@@ -741,16 +818,18 @@ export function isOpacityProperty(item: unknown): item is OpacityProperty {
|
|
|
741
818
|
return reflection.isInstance(item, OpacityProperty);
|
|
742
819
|
}
|
|
743
820
|
|
|
744
|
-
export interface
|
|
745
|
-
readonly $container:
|
|
746
|
-
readonly $type: '
|
|
747
|
-
from:
|
|
821
|
+
export interface OutgoingRelationExpression extends AstNode {
|
|
822
|
+
readonly $container: CustomRelationExpression | DirectedRelationExpression | Expressions;
|
|
823
|
+
readonly $type: 'OutgoingRelationExpression';
|
|
824
|
+
from: ElementExpression;
|
|
825
|
+
isBidirectional: boolean;
|
|
826
|
+
kind?: Reference<RelationshipKind>;
|
|
748
827
|
}
|
|
749
828
|
|
|
750
|
-
export const
|
|
829
|
+
export const OutgoingRelationExpression = 'OutgoingRelationExpression';
|
|
751
830
|
|
|
752
|
-
export function
|
|
753
|
-
return reflection.isInstance(item,
|
|
831
|
+
export function isOutgoingRelationExpression(item: unknown): item is OutgoingRelationExpression {
|
|
832
|
+
return reflection.isInstance(item, OutgoingRelationExpression);
|
|
754
833
|
}
|
|
755
834
|
|
|
756
835
|
export interface RelationBody extends AstNode {
|
|
@@ -766,20 +845,6 @@ export function isRelationBody(item: unknown): item is RelationBody {
|
|
|
766
845
|
return reflection.isInstance(item, RelationBody);
|
|
767
846
|
}
|
|
768
847
|
|
|
769
|
-
export interface RelationExpr extends AstNode {
|
|
770
|
-
readonly $container: CustomRelationExpr | ExcludePredicate | IncludePredicate;
|
|
771
|
-
readonly $type: 'RelationExpr';
|
|
772
|
-
isBidirectional: boolean;
|
|
773
|
-
source: ElementExpr;
|
|
774
|
-
target: ElementExpr;
|
|
775
|
-
}
|
|
776
|
-
|
|
777
|
-
export const RelationExpr = 'RelationExpr';
|
|
778
|
-
|
|
779
|
-
export function isRelationExpr(item: unknown): item is RelationExpr {
|
|
780
|
-
return reflection.isInstance(item, RelationExpr);
|
|
781
|
-
}
|
|
782
|
-
|
|
783
848
|
export interface RelationshipKind extends AstNode {
|
|
784
849
|
readonly $container: SpecificationRelationshipKind;
|
|
785
850
|
readonly $type: 'RelationshipKind';
|
|
@@ -793,7 +858,7 @@ export function isRelationshipKind(item: unknown): item is RelationshipKind {
|
|
|
793
858
|
}
|
|
794
859
|
|
|
795
860
|
export interface RelationStringProperty extends AstNode {
|
|
796
|
-
readonly $container:
|
|
861
|
+
readonly $container: CustomRelationProperties | RelationBody;
|
|
797
862
|
readonly $type: 'RelationStringProperty';
|
|
798
863
|
key: 'title';
|
|
799
864
|
value: string;
|
|
@@ -819,7 +884,7 @@ export function isRelationStyleProperty(item: unknown): item is RelationStylePro
|
|
|
819
884
|
}
|
|
820
885
|
|
|
821
886
|
export interface ShapeProperty extends AstNode {
|
|
822
|
-
readonly $container:
|
|
887
|
+
readonly $container: CustomElementProperties | StyleProperties | ViewRuleStyle;
|
|
823
888
|
readonly $type: 'ShapeProperty';
|
|
824
889
|
key: 'shape';
|
|
825
890
|
value: ElementShape;
|
|
@@ -948,8 +1013,8 @@ export function isViewRuleAutoLayout(item: unknown): item is ViewRuleAutoLayout
|
|
|
948
1013
|
export interface ViewRuleStyle extends AstNode {
|
|
949
1014
|
readonly $container: DynamicViewBody | ElementViewBody;
|
|
950
1015
|
readonly $type: 'ViewRuleStyle';
|
|
951
|
-
|
|
952
|
-
|
|
1016
|
+
props: Array<StyleProperty>;
|
|
1017
|
+
target: ElementExpressionsIterator;
|
|
953
1018
|
}
|
|
954
1019
|
|
|
955
1020
|
export const ViewRuleStyle = 'ViewRuleStyle';
|
|
@@ -971,57 +1036,64 @@ export function isViewStringProperty(item: unknown): item is ViewStringProperty
|
|
|
971
1036
|
return reflection.isInstance(item, ViewStringProperty);
|
|
972
1037
|
}
|
|
973
1038
|
|
|
974
|
-
export interface
|
|
975
|
-
readonly $container:
|
|
976
|
-
readonly $type: '
|
|
1039
|
+
export interface WildcardExpression extends AstNode {
|
|
1040
|
+
readonly $container: CustomElementExpression | DirectedRelationExpression | DynamicViewRulePredicateIterator | ElementExpressionsIterator | Expressions | IncomingRelationExpression | OutgoingRelationExpression;
|
|
1041
|
+
readonly $type: 'WildcardExpression';
|
|
977
1042
|
isWildcard: boolean;
|
|
978
1043
|
}
|
|
979
1044
|
|
|
980
|
-
export const
|
|
1045
|
+
export const WildcardExpression = 'WildcardExpression';
|
|
981
1046
|
|
|
982
|
-
export function
|
|
983
|
-
return reflection.isInstance(item,
|
|
1047
|
+
export function isWildcardExpression(item: unknown): item is WildcardExpression {
|
|
1048
|
+
return reflection.isInstance(item, WildcardExpression);
|
|
984
1049
|
}
|
|
985
1050
|
|
|
986
1051
|
export type LikeC4AstType = {
|
|
987
1052
|
ArrowProperty: ArrowProperty
|
|
988
1053
|
BorderProperty: BorderProperty
|
|
989
1054
|
ColorProperty: ColorProperty
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
1055
|
+
CustomElementExpression: CustomElementExpression
|
|
1056
|
+
CustomElementProperties: CustomElementProperties
|
|
1057
|
+
CustomRelationExpression: CustomRelationExpression
|
|
1058
|
+
CustomRelationProperties: CustomRelationProperties
|
|
1059
|
+
DirectedRelationExpression: DirectedRelationExpression
|
|
995
1060
|
DynamicView: DynamicView
|
|
996
1061
|
DynamicViewBody: DynamicViewBody
|
|
1062
|
+
DynamicViewElementExpression: DynamicViewElementExpression
|
|
997
1063
|
DynamicViewRule: DynamicViewRule
|
|
998
1064
|
DynamicViewRulePredicate: DynamicViewRulePredicate
|
|
1065
|
+
DynamicViewRulePredicateIterator: DynamicViewRulePredicateIterator
|
|
999
1066
|
DynamicViewStep: DynamicViewStep
|
|
1000
1067
|
Element: Element
|
|
1001
1068
|
ElementBody: ElementBody
|
|
1002
|
-
|
|
1069
|
+
ElementDescedantsExpression: ElementDescedantsExpression
|
|
1070
|
+
ElementExpression: ElementExpression
|
|
1071
|
+
ElementExpressionsIterator: ElementExpressionsIterator
|
|
1003
1072
|
ElementKind: ElementKind
|
|
1004
|
-
|
|
1005
|
-
ElementPredicateExpression: ElementPredicateExpression
|
|
1073
|
+
ElementKindExpression: ElementKindExpression
|
|
1006
1074
|
ElementProperty: ElementProperty
|
|
1007
1075
|
ElementRef: ElementRef
|
|
1008
1076
|
ElementStringProperty: ElementStringProperty
|
|
1009
|
-
|
|
1077
|
+
ElementTagExpression: ElementTagExpression
|
|
1010
1078
|
ElementView: ElementView
|
|
1011
1079
|
ElementViewBody: ElementViewBody
|
|
1012
1080
|
ElementViewRef: ElementViewRef
|
|
1013
1081
|
ExcludePredicate: ExcludePredicate
|
|
1014
|
-
|
|
1082
|
+
ExpandElementExpression: ExpandElementExpression
|
|
1015
1083
|
ExplicitRelation: ExplicitRelation
|
|
1084
|
+
Expression: Expression
|
|
1085
|
+
Expressions: Expressions
|
|
1016
1086
|
ExtendElement: ExtendElement
|
|
1017
1087
|
ExtendElementBody: ExtendElementBody
|
|
1018
1088
|
FqnElementRef: FqnElementRef
|
|
1019
1089
|
IconProperty: IconProperty
|
|
1020
1090
|
ImplicitRelation: ImplicitRelation
|
|
1021
|
-
|
|
1091
|
+
InOutRelationExpression: InOutRelationExpression
|
|
1022
1092
|
IncludePredicate: IncludePredicate
|
|
1023
|
-
|
|
1093
|
+
IncomingRelationExpression: IncomingRelationExpression
|
|
1094
|
+
LibIcon: LibIcon
|
|
1024
1095
|
LikeC4Grammar: LikeC4Grammar
|
|
1096
|
+
LikeC4Lib: LikeC4Lib
|
|
1025
1097
|
LikeC4View: LikeC4View
|
|
1026
1098
|
LineProperty: LineProperty
|
|
1027
1099
|
LinkProperty: LinkProperty
|
|
@@ -1029,11 +1101,10 @@ export type LikeC4AstType = {
|
|
|
1029
1101
|
ModelViews: ModelViews
|
|
1030
1102
|
NavigateToProperty: NavigateToProperty
|
|
1031
1103
|
OpacityProperty: OpacityProperty
|
|
1032
|
-
|
|
1104
|
+
OutgoingRelationExpression: OutgoingRelationExpression
|
|
1033
1105
|
Relation: Relation
|
|
1034
1106
|
RelationBody: RelationBody
|
|
1035
|
-
|
|
1036
|
-
RelationPredicateExpression: RelationPredicateExpression
|
|
1107
|
+
RelationExpression: RelationExpression
|
|
1037
1108
|
RelationProperty: RelationProperty
|
|
1038
1109
|
RelationStringProperty: RelationStringProperty
|
|
1039
1110
|
RelationStyleProperty: RelationStyleProperty
|
|
@@ -1054,17 +1125,15 @@ export type LikeC4AstType = {
|
|
|
1054
1125
|
ViewRule: ViewRule
|
|
1055
1126
|
ViewRuleAutoLayout: ViewRuleAutoLayout
|
|
1056
1127
|
ViewRulePredicate: ViewRulePredicate
|
|
1057
|
-
ViewRulePredicateExpr: ViewRulePredicateExpr
|
|
1058
|
-
ViewRulePredicateRelations: ViewRulePredicateRelations
|
|
1059
1128
|
ViewRuleStyle: ViewRuleStyle
|
|
1060
1129
|
ViewStringProperty: ViewStringProperty
|
|
1061
|
-
|
|
1130
|
+
WildcardExpression: WildcardExpression
|
|
1062
1131
|
}
|
|
1063
1132
|
|
|
1064
1133
|
export class LikeC4AstReflection extends AbstractAstReflection {
|
|
1065
1134
|
|
|
1066
1135
|
getAllTypes(): string[] {
|
|
1067
|
-
return [ArrowProperty, BorderProperty, ColorProperty,
|
|
1136
|
+
return [ArrowProperty, BorderProperty, ColorProperty, CustomElementExpression, CustomElementProperties, CustomRelationExpression, CustomRelationProperties, DirectedRelationExpression, DynamicView, DynamicViewBody, DynamicViewElementExpression, DynamicViewRule, DynamicViewRulePredicate, DynamicViewRulePredicateIterator, DynamicViewStep, Element, ElementBody, ElementDescedantsExpression, ElementExpression, ElementExpressionsIterator, ElementKind, ElementKindExpression, ElementProperty, ElementRef, ElementStringProperty, ElementTagExpression, ElementView, ElementViewBody, ElementViewRef, ExcludePredicate, ExpandElementExpression, ExplicitRelation, Expression, Expressions, ExtendElement, ExtendElementBody, FqnElementRef, IconProperty, ImplicitRelation, InOutRelationExpression, IncludePredicate, IncomingRelationExpression, LibIcon, LikeC4Grammar, LikeC4Lib, LikeC4View, LineProperty, LinkProperty, Model, ModelViews, NavigateToProperty, OpacityProperty, OutgoingRelationExpression, Relation, RelationBody, RelationExpression, RelationProperty, RelationStringProperty, RelationStyleProperty, RelationshipKind, RelationshipStyleProperty, ShapeProperty, SpecificationElementKind, SpecificationRelationshipKind, SpecificationRule, SpecificationTag, StringProperty, StyleProperties, StyleProperty, Tag, Tags, ViewProperty, ViewRef, ViewRule, ViewRuleAutoLayout, ViewRulePredicate, ViewRuleStyle, ViewStringProperty, WildcardExpression];
|
|
1068
1137
|
}
|
|
1069
1138
|
|
|
1070
1139
|
protected override computeIsSubtype(subtype: string, supertype: string): boolean {
|
|
@@ -1074,7 +1143,6 @@ export class LikeC4AstReflection extends AbstractAstReflection {
|
|
|
1074
1143
|
return this.isSubtype(RelationshipStyleProperty, supertype);
|
|
1075
1144
|
}
|
|
1076
1145
|
case BorderProperty:
|
|
1077
|
-
case IconProperty:
|
|
1078
1146
|
case OpacityProperty:
|
|
1079
1147
|
case ShapeProperty: {
|
|
1080
1148
|
return this.isSubtype(StyleProperty, supertype);
|
|
@@ -1082,23 +1150,19 @@ export class LikeC4AstReflection extends AbstractAstReflection {
|
|
|
1082
1150
|
case ColorProperty: {
|
|
1083
1151
|
return this.isSubtype(RelationshipStyleProperty, supertype) || this.isSubtype(StyleProperty, supertype);
|
|
1084
1152
|
}
|
|
1085
|
-
case
|
|
1086
|
-
case
|
|
1087
|
-
return this.isSubtype(
|
|
1153
|
+
case CustomElementExpression:
|
|
1154
|
+
case ElementExpression: {
|
|
1155
|
+
return this.isSubtype(DynamicViewElementExpression, supertype) || this.isSubtype(Expression, supertype);
|
|
1088
1156
|
}
|
|
1089
|
-
case
|
|
1090
|
-
case
|
|
1091
|
-
|
|
1092
|
-
case RelationExpr: {
|
|
1093
|
-
return this.isSubtype(ViewRulePredicateRelations, supertype);
|
|
1157
|
+
case CustomRelationExpression:
|
|
1158
|
+
case RelationExpression: {
|
|
1159
|
+
return this.isSubtype(Expression, supertype);
|
|
1094
1160
|
}
|
|
1095
|
-
case
|
|
1096
|
-
case
|
|
1097
|
-
case
|
|
1098
|
-
case
|
|
1099
|
-
|
|
1100
|
-
case WildcardExpr: {
|
|
1101
|
-
return this.isSubtype(ElementExpr, supertype);
|
|
1161
|
+
case DirectedRelationExpression:
|
|
1162
|
+
case IncomingRelationExpression:
|
|
1163
|
+
case InOutRelationExpression:
|
|
1164
|
+
case OutgoingRelationExpression: {
|
|
1165
|
+
return this.isSubtype(RelationExpression, supertype);
|
|
1102
1166
|
}
|
|
1103
1167
|
case DynamicView:
|
|
1104
1168
|
case ElementView: {
|
|
@@ -1107,9 +1171,13 @@ export class LikeC4AstReflection extends AbstractAstReflection {
|
|
|
1107
1171
|
case DynamicViewRulePredicate: {
|
|
1108
1172
|
return this.isSubtype(DynamicViewRule, supertype);
|
|
1109
1173
|
}
|
|
1110
|
-
case
|
|
1111
|
-
case
|
|
1112
|
-
|
|
1174
|
+
case ElementDescedantsExpression:
|
|
1175
|
+
case ElementKindExpression:
|
|
1176
|
+
case ElementRef:
|
|
1177
|
+
case ElementTagExpression:
|
|
1178
|
+
case ExpandElementExpression:
|
|
1179
|
+
case WildcardExpression: {
|
|
1180
|
+
return this.isSubtype(ElementExpression, supertype);
|
|
1113
1181
|
}
|
|
1114
1182
|
case ElementStringProperty: {
|
|
1115
1183
|
return this.isSubtype(ElementProperty, supertype) || this.isSubtype(StringProperty, supertype);
|
|
@@ -1122,13 +1190,12 @@ export class LikeC4AstReflection extends AbstractAstReflection {
|
|
|
1122
1190
|
case ImplicitRelation: {
|
|
1123
1191
|
return this.isSubtype(Relation, supertype);
|
|
1124
1192
|
}
|
|
1193
|
+
case IconProperty: {
|
|
1194
|
+
return this.isSubtype(ElementProperty, supertype) || this.isSubtype(StyleProperty, supertype);
|
|
1195
|
+
}
|
|
1125
1196
|
case LinkProperty: {
|
|
1126
1197
|
return this.isSubtype(ElementProperty, supertype) || this.isSubtype(RelationProperty, supertype) || this.isSubtype(ViewProperty, supertype);
|
|
1127
1198
|
}
|
|
1128
|
-
case OutgoingExpr:
|
|
1129
|
-
case ViewRulePredicateRelations: {
|
|
1130
|
-
return this.isSubtype(RelationPredicateExpression, supertype);
|
|
1131
|
-
}
|
|
1132
1199
|
case RelationStringProperty: {
|
|
1133
1200
|
return this.isSubtype(RelationProperty, supertype) || this.isSubtype(StringProperty, supertype);
|
|
1134
1201
|
}
|
|
@@ -1159,24 +1226,28 @@ export class LikeC4AstReflection extends AbstractAstReflection {
|
|
|
1159
1226
|
switch (referenceId) {
|
|
1160
1227
|
case 'DynamicViewStep:kind':
|
|
1161
1228
|
case 'ExplicitRelation:kind':
|
|
1162
|
-
case 'ImplicitRelation:kind':
|
|
1229
|
+
case 'ImplicitRelation:kind':
|
|
1230
|
+
case 'OutgoingRelationExpression:kind': {
|
|
1163
1231
|
return RelationshipKind;
|
|
1164
1232
|
}
|
|
1165
1233
|
case 'Element:kind':
|
|
1166
|
-
case '
|
|
1234
|
+
case 'ElementKindExpression:kind': {
|
|
1167
1235
|
return ElementKind;
|
|
1168
1236
|
}
|
|
1169
1237
|
case 'ElementRef:el':
|
|
1170
1238
|
case 'FqnElementRef:el': {
|
|
1171
1239
|
return Element;
|
|
1172
1240
|
}
|
|
1173
|
-
case '
|
|
1241
|
+
case 'ElementTagExpression:tag':
|
|
1174
1242
|
case 'Tags:value': {
|
|
1175
1243
|
return Tag;
|
|
1176
1244
|
}
|
|
1177
1245
|
case 'ElementViewRef:view': {
|
|
1178
1246
|
return ElementView;
|
|
1179
1247
|
}
|
|
1248
|
+
case 'IconProperty:libicon': {
|
|
1249
|
+
return LibIcon;
|
|
1250
|
+
}
|
|
1180
1251
|
case 'ViewRef:view': {
|
|
1181
1252
|
return LikeC4View;
|
|
1182
1253
|
}
|
|
@@ -1215,45 +1286,46 @@ export class LikeC4AstReflection extends AbstractAstReflection {
|
|
|
1215
1286
|
]
|
|
1216
1287
|
};
|
|
1217
1288
|
}
|
|
1218
|
-
case
|
|
1289
|
+
case CustomElementExpression: {
|
|
1219
1290
|
return {
|
|
1220
|
-
name:
|
|
1291
|
+
name: CustomElementExpression,
|
|
1221
1292
|
properties: [
|
|
1222
|
-
{ name: '
|
|
1293
|
+
{ name: 'custom' },
|
|
1223
1294
|
{ name: 'target' }
|
|
1224
1295
|
]
|
|
1225
1296
|
};
|
|
1226
1297
|
}
|
|
1227
|
-
case
|
|
1298
|
+
case CustomElementProperties: {
|
|
1228
1299
|
return {
|
|
1229
|
-
name:
|
|
1300
|
+
name: CustomElementProperties,
|
|
1230
1301
|
properties: [
|
|
1231
1302
|
{ name: 'props', defaultValue: [] }
|
|
1232
1303
|
]
|
|
1233
1304
|
};
|
|
1234
1305
|
}
|
|
1235
|
-
case
|
|
1306
|
+
case CustomRelationExpression: {
|
|
1236
1307
|
return {
|
|
1237
|
-
name:
|
|
1308
|
+
name: CustomRelationExpression,
|
|
1238
1309
|
properties: [
|
|
1239
|
-
{ name: '
|
|
1310
|
+
{ name: 'custom' },
|
|
1240
1311
|
{ name: 'relation' }
|
|
1241
1312
|
]
|
|
1242
1313
|
};
|
|
1243
1314
|
}
|
|
1244
|
-
case
|
|
1315
|
+
case CustomRelationProperties: {
|
|
1245
1316
|
return {
|
|
1246
|
-
name:
|
|
1317
|
+
name: CustomRelationProperties,
|
|
1247
1318
|
properties: [
|
|
1248
1319
|
{ name: 'props', defaultValue: [] }
|
|
1249
1320
|
]
|
|
1250
1321
|
};
|
|
1251
1322
|
}
|
|
1252
|
-
case
|
|
1323
|
+
case DirectedRelationExpression: {
|
|
1253
1324
|
return {
|
|
1254
|
-
name:
|
|
1325
|
+
name: DirectedRelationExpression,
|
|
1255
1326
|
properties: [
|
|
1256
|
-
{ name: '
|
|
1327
|
+
{ name: 'source' },
|
|
1328
|
+
{ name: 'target' }
|
|
1257
1329
|
]
|
|
1258
1330
|
};
|
|
1259
1331
|
}
|
|
@@ -1281,7 +1353,16 @@ export class LikeC4AstReflection extends AbstractAstReflection {
|
|
|
1281
1353
|
return {
|
|
1282
1354
|
name: DynamicViewRulePredicate,
|
|
1283
1355
|
properties: [
|
|
1284
|
-
{ name: '
|
|
1356
|
+
{ name: 'exprs' }
|
|
1357
|
+
]
|
|
1358
|
+
};
|
|
1359
|
+
}
|
|
1360
|
+
case DynamicViewRulePredicateIterator: {
|
|
1361
|
+
return {
|
|
1362
|
+
name: DynamicViewRulePredicateIterator,
|
|
1363
|
+
properties: [
|
|
1364
|
+
{ name: 'prev' },
|
|
1365
|
+
{ name: 'value' }
|
|
1285
1366
|
]
|
|
1286
1367
|
};
|
|
1287
1368
|
}
|
|
@@ -1318,6 +1399,23 @@ export class LikeC4AstReflection extends AbstractAstReflection {
|
|
|
1318
1399
|
]
|
|
1319
1400
|
};
|
|
1320
1401
|
}
|
|
1402
|
+
case ElementDescedantsExpression: {
|
|
1403
|
+
return {
|
|
1404
|
+
name: ElementDescedantsExpression,
|
|
1405
|
+
properties: [
|
|
1406
|
+
{ name: 'parent' }
|
|
1407
|
+
]
|
|
1408
|
+
};
|
|
1409
|
+
}
|
|
1410
|
+
case ElementExpressionsIterator: {
|
|
1411
|
+
return {
|
|
1412
|
+
name: ElementExpressionsIterator,
|
|
1413
|
+
properties: [
|
|
1414
|
+
{ name: 'prev' },
|
|
1415
|
+
{ name: 'value' }
|
|
1416
|
+
]
|
|
1417
|
+
};
|
|
1418
|
+
}
|
|
1321
1419
|
case ElementKind: {
|
|
1322
1420
|
return {
|
|
1323
1421
|
name: ElementKind,
|
|
@@ -1326,9 +1424,9 @@ export class LikeC4AstReflection extends AbstractAstReflection {
|
|
|
1326
1424
|
]
|
|
1327
1425
|
};
|
|
1328
1426
|
}
|
|
1329
|
-
case
|
|
1427
|
+
case ElementKindExpression: {
|
|
1330
1428
|
return {
|
|
1331
|
-
name:
|
|
1429
|
+
name: ElementKindExpression,
|
|
1332
1430
|
properties: [
|
|
1333
1431
|
{ name: 'isEqual', defaultValue: false },
|
|
1334
1432
|
{ name: 'kind' }
|
|
@@ -1354,9 +1452,9 @@ export class LikeC4AstReflection extends AbstractAstReflection {
|
|
|
1354
1452
|
]
|
|
1355
1453
|
};
|
|
1356
1454
|
}
|
|
1357
|
-
case
|
|
1455
|
+
case ElementTagExpression: {
|
|
1358
1456
|
return {
|
|
1359
|
-
name:
|
|
1457
|
+
name: ElementTagExpression,
|
|
1360
1458
|
properties: [
|
|
1361
1459
|
{ name: 'isEqual', defaultValue: false },
|
|
1362
1460
|
{ name: 'tag' }
|
|
@@ -1396,15 +1494,15 @@ export class LikeC4AstReflection extends AbstractAstReflection {
|
|
|
1396
1494
|
return {
|
|
1397
1495
|
name: ExcludePredicate,
|
|
1398
1496
|
properties: [
|
|
1399
|
-
{ name: '
|
|
1497
|
+
{ name: 'exprs' }
|
|
1400
1498
|
]
|
|
1401
1499
|
};
|
|
1402
1500
|
}
|
|
1403
|
-
case
|
|
1501
|
+
case ExpandElementExpression: {
|
|
1404
1502
|
return {
|
|
1405
|
-
name:
|
|
1503
|
+
name: ExpandElementExpression,
|
|
1406
1504
|
properties: [
|
|
1407
|
-
{ name: '
|
|
1505
|
+
{ name: 'expand' }
|
|
1408
1506
|
]
|
|
1409
1507
|
};
|
|
1410
1508
|
}
|
|
@@ -1421,6 +1519,15 @@ export class LikeC4AstReflection extends AbstractAstReflection {
|
|
|
1421
1519
|
]
|
|
1422
1520
|
};
|
|
1423
1521
|
}
|
|
1522
|
+
case Expressions: {
|
|
1523
|
+
return {
|
|
1524
|
+
name: Expressions,
|
|
1525
|
+
properties: [
|
|
1526
|
+
{ name: 'prev' },
|
|
1527
|
+
{ name: 'value' }
|
|
1528
|
+
]
|
|
1529
|
+
};
|
|
1530
|
+
}
|
|
1424
1531
|
case ExtendElement: {
|
|
1425
1532
|
return {
|
|
1426
1533
|
name: ExtendElement,
|
|
@@ -1453,6 +1560,7 @@ export class LikeC4AstReflection extends AbstractAstReflection {
|
|
|
1453
1560
|
name: IconProperty,
|
|
1454
1561
|
properties: [
|
|
1455
1562
|
{ name: 'key' },
|
|
1563
|
+
{ name: 'libicon' },
|
|
1456
1564
|
{ name: 'value' }
|
|
1457
1565
|
]
|
|
1458
1566
|
};
|
|
@@ -1473,36 +1581,53 @@ export class LikeC4AstReflection extends AbstractAstReflection {
|
|
|
1473
1581
|
return {
|
|
1474
1582
|
name: IncludePredicate,
|
|
1475
1583
|
properties: [
|
|
1476
|
-
{ name: '
|
|
1584
|
+
{ name: 'exprs' }
|
|
1477
1585
|
]
|
|
1478
1586
|
};
|
|
1479
1587
|
}
|
|
1480
|
-
case
|
|
1588
|
+
case IncomingRelationExpression: {
|
|
1481
1589
|
return {
|
|
1482
|
-
name:
|
|
1590
|
+
name: IncomingRelationExpression,
|
|
1483
1591
|
properties: [
|
|
1484
1592
|
{ name: 'to' }
|
|
1485
1593
|
]
|
|
1486
1594
|
};
|
|
1487
1595
|
}
|
|
1488
|
-
case
|
|
1596
|
+
case InOutRelationExpression: {
|
|
1489
1597
|
return {
|
|
1490
|
-
name:
|
|
1598
|
+
name: InOutRelationExpression,
|
|
1491
1599
|
properties: [
|
|
1492
1600
|
{ name: 'inout' }
|
|
1493
1601
|
]
|
|
1494
1602
|
};
|
|
1495
1603
|
}
|
|
1604
|
+
case LibIcon: {
|
|
1605
|
+
return {
|
|
1606
|
+
name: LibIcon,
|
|
1607
|
+
properties: [
|
|
1608
|
+
{ name: 'name' }
|
|
1609
|
+
]
|
|
1610
|
+
};
|
|
1611
|
+
}
|
|
1496
1612
|
case LikeC4Grammar: {
|
|
1497
1613
|
return {
|
|
1498
1614
|
name: LikeC4Grammar,
|
|
1499
1615
|
properties: [
|
|
1616
|
+
{ name: 'likec4lib', defaultValue: [] },
|
|
1500
1617
|
{ name: 'models', defaultValue: [] },
|
|
1501
1618
|
{ name: 'specifications', defaultValue: [] },
|
|
1502
1619
|
{ name: 'views', defaultValue: [] }
|
|
1503
1620
|
]
|
|
1504
1621
|
};
|
|
1505
1622
|
}
|
|
1623
|
+
case LikeC4Lib: {
|
|
1624
|
+
return {
|
|
1625
|
+
name: LikeC4Lib,
|
|
1626
|
+
properties: [
|
|
1627
|
+
{ name: 'icons', defaultValue: [] }
|
|
1628
|
+
]
|
|
1629
|
+
};
|
|
1630
|
+
}
|
|
1506
1631
|
case LineProperty: {
|
|
1507
1632
|
return {
|
|
1508
1633
|
name: LineProperty,
|
|
@@ -1557,11 +1682,13 @@ export class LikeC4AstReflection extends AbstractAstReflection {
|
|
|
1557
1682
|
]
|
|
1558
1683
|
};
|
|
1559
1684
|
}
|
|
1560
|
-
case
|
|
1685
|
+
case OutgoingRelationExpression: {
|
|
1561
1686
|
return {
|
|
1562
|
-
name:
|
|
1687
|
+
name: OutgoingRelationExpression,
|
|
1563
1688
|
properties: [
|
|
1564
|
-
{ name: 'from' }
|
|
1689
|
+
{ name: 'from' },
|
|
1690
|
+
{ name: 'isBidirectional', defaultValue: false },
|
|
1691
|
+
{ name: 'kind' }
|
|
1565
1692
|
]
|
|
1566
1693
|
};
|
|
1567
1694
|
}
|
|
@@ -1574,16 +1701,6 @@ export class LikeC4AstReflection extends AbstractAstReflection {
|
|
|
1574
1701
|
]
|
|
1575
1702
|
};
|
|
1576
1703
|
}
|
|
1577
|
-
case RelationExpr: {
|
|
1578
|
-
return {
|
|
1579
|
-
name: RelationExpr,
|
|
1580
|
-
properties: [
|
|
1581
|
-
{ name: 'isBidirectional', defaultValue: false },
|
|
1582
|
-
{ name: 'source' },
|
|
1583
|
-
{ name: 'target' }
|
|
1584
|
-
]
|
|
1585
|
-
};
|
|
1586
|
-
}
|
|
1587
1704
|
case RelationshipKind: {
|
|
1588
1705
|
return {
|
|
1589
1706
|
name: RelationshipKind,
|
|
@@ -1701,8 +1818,8 @@ export class LikeC4AstReflection extends AbstractAstReflection {
|
|
|
1701
1818
|
return {
|
|
1702
1819
|
name: ViewRuleStyle,
|
|
1703
1820
|
properties: [
|
|
1704
|
-
{ name: '
|
|
1705
|
-
{ name: '
|
|
1821
|
+
{ name: 'props', defaultValue: [] },
|
|
1822
|
+
{ name: 'target' }
|
|
1706
1823
|
]
|
|
1707
1824
|
};
|
|
1708
1825
|
}
|
|
@@ -1715,9 +1832,9 @@ export class LikeC4AstReflection extends AbstractAstReflection {
|
|
|
1715
1832
|
]
|
|
1716
1833
|
};
|
|
1717
1834
|
}
|
|
1718
|
-
case
|
|
1835
|
+
case WildcardExpression: {
|
|
1719
1836
|
return {
|
|
1720
|
-
name:
|
|
1837
|
+
name: WildcardExpression,
|
|
1721
1838
|
properties: [
|
|
1722
1839
|
{ name: 'isWildcard', defaultValue: false }
|
|
1723
1840
|
]
|