@likec4/language-server 1.6.1 → 1.7.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 +23 -19
- package/src/Rpc.ts +1 -1
- package/src/ast.ts +34 -9
- package/src/{browser/index.ts → browser.ts} +4 -1
- package/src/generated/ast.ts +498 -152
- package/src/generated/grammar.ts +2 -2
- package/src/generated/module.ts +1 -1
- package/src/index.ts +1 -1
- package/src/like-c4.langium +116 -44
- package/src/logger.ts +76 -55
- package/src/lsp/DocumentLinkProvider.ts +1 -1
- package/src/lsp/DocumentSymbolProvider.ts +1 -1
- package/src/lsp/HoverProvider.ts +1 -1
- package/src/lsp/SemanticTokenProvider.ts +54 -26
- package/src/model/model-builder.ts +11 -8
- package/src/model/model-locator.ts +12 -25
- package/src/model/model-parser-where.ts +75 -0
- package/src/model/model-parser.ts +168 -68
- package/src/model-change/ModelChanges.ts +2 -3
- package/src/model-change/changeElementStyle.ts +4 -1
- package/src/model-change/changeViewLayout.ts +8 -8
- package/src/model-change/saveManualLayout.ts +4 -6
- package/src/model-graph/LikeC4ModelGraph.ts +50 -48
- package/src/model-graph/compute-view/__test__/fixture.ts +41 -16
- package/src/model-graph/compute-view/compute.ts +135 -69
- package/src/model-graph/compute-view/predicates.ts +232 -136
- package/src/model-graph/dynamic-view/__test__/fixture.ts +5 -1
- package/src/model-graph/dynamic-view/compute.ts +50 -41
- package/src/model-graph/utils/applyCustomElementProperties.ts +31 -29
- package/src/model-graph/utils/applyCustomRelationProperties.ts +52 -15
- package/src/model-graph/utils/elementExpressionToPredicate.ts +8 -3
- package/src/module.ts +4 -18
- package/src/{node/index.ts → node.ts} +1 -1
- package/src/protocol.ts +2 -2
- package/src/shared/NodeKindProvider.ts +4 -2
- package/src/test/setup.ts +13 -0
- package/src/test/testServices.ts +1 -1
- package/src/validation/dynamic-view-rule.ts +12 -12
- package/src/validation/index.ts +6 -6
- package/src/validation/relation.ts +1 -1
- package/src/validation/view-predicates/{custom-element-expr.ts → element-with.ts} +11 -10
- package/src/validation/view-predicates/expanded-element.ts +2 -10
- package/src/validation/view-predicates/incoming.ts +1 -1
- package/src/validation/view-predicates/index.ts +2 -2
- package/src/validation/view-predicates/outgoing.ts +1 -1
- package/src/validation/view-predicates/{custom-relation-expr.ts → relation-with.ts} +2 -2
- package/src/validation/view.ts +8 -9
- package/src/view-utils/manual-layout.ts +65 -72
- package/src/view-utils/resolve-relative-paths.ts +28 -17
- package/src/view-utils/view-hash.ts +33 -0
package/src/generated/ast.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/******************************************************************************
|
|
2
|
-
* This file was generated by langium-cli 3.1.
|
|
2
|
+
* This file was generated by langium-cli 3.1.1.
|
|
3
3
|
* DO NOT EDIT MANUALLY!
|
|
4
4
|
******************************************************************************/
|
|
5
5
|
|
|
@@ -11,7 +11,7 @@ export const LikeC4Terminals = {
|
|
|
11
11
|
BLOCK_COMMENT: /\/\*[\s\S]*?\*\//,
|
|
12
12
|
LINE_COMMENT: /\/\/[^\n\r]*/,
|
|
13
13
|
WS: /\s+/,
|
|
14
|
-
LIB_ICON:
|
|
14
|
+
LIB_ICON: /(aws|gcp|tech):[-\w]*/,
|
|
15
15
|
URI_WITH_SCHEMA: /\w+:\/\/\S+/,
|
|
16
16
|
URI_RELATIVE: /\.{0,2}\/[^\/]\S+/,
|
|
17
17
|
DotUnderscore: /\b\._/,
|
|
@@ -44,15 +44,7 @@ export function isDotId(item: unknown): item is DotId {
|
|
|
44
44
|
return typeof item === 'string';
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
-
export type
|
|
48
|
-
|
|
49
|
-
export const DynamicViewElementExpression = 'DynamicViewElementExpression';
|
|
50
|
-
|
|
51
|
-
export function isDynamicViewElementExpression(item: unknown): item is DynamicViewElementExpression {
|
|
52
|
-
return reflection.isInstance(item, DynamicViewElementExpression);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
export type DynamicViewRule = DynamicViewRulePredicate | ViewRuleAutoLayout | ViewRuleStyle;
|
|
47
|
+
export type DynamicViewRule = DynamicViewIncludePredicate | ViewRuleAutoLayout | ViewRuleStyle;
|
|
56
48
|
|
|
57
49
|
export const DynamicViewRule = 'DynamicViewRule';
|
|
58
50
|
|
|
@@ -68,6 +60,22 @@ export function isElementExpression(item: unknown): item is ElementExpression {
|
|
|
68
60
|
return reflection.isInstance(item, ElementExpression);
|
|
69
61
|
}
|
|
70
62
|
|
|
63
|
+
export type ElementPredicate = ElementPredicateOrWhere | ElementPredicateWith;
|
|
64
|
+
|
|
65
|
+
export const ElementPredicate = 'ElementPredicate';
|
|
66
|
+
|
|
67
|
+
export function isElementPredicate(item: unknown): item is ElementPredicate {
|
|
68
|
+
return reflection.isInstance(item, ElementPredicate);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export type ElementPredicateOrWhere = ElementExpression | ElementPredicateWhere;
|
|
72
|
+
|
|
73
|
+
export const ElementPredicateOrWhere = 'ElementPredicateOrWhere';
|
|
74
|
+
|
|
75
|
+
export function isElementPredicateOrWhere(item: unknown): item is ElementPredicateOrWhere {
|
|
76
|
+
return reflection.isInstance(item, ElementPredicateOrWhere);
|
|
77
|
+
}
|
|
78
|
+
|
|
71
79
|
export type ElementProperty = ElementStringProperty | IconProperty | LinkProperty | StyleProperties;
|
|
72
80
|
|
|
73
81
|
export const ElementProperty = 'ElementProperty';
|
|
@@ -82,18 +90,10 @@ export function isElementShape(item: unknown): item is ElementShape {
|
|
|
82
90
|
return item === 'rectangle' || item === 'person' || item === 'browser' || item === 'mobile' || item === 'cylinder' || item === 'storage' || item === 'queue';
|
|
83
91
|
}
|
|
84
92
|
|
|
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
93
|
export type IconId = string;
|
|
94
94
|
|
|
95
95
|
export function isIconId(item: unknown): item is IconId {
|
|
96
|
-
return (typeof item === 'string' && (
|
|
96
|
+
return (typeof item === 'string' && (/(aws|gcp|tech):[-\w]*/.test(item)));
|
|
97
97
|
}
|
|
98
98
|
|
|
99
99
|
export type Id = 'element' | 'model' | ArrowType | ElementShape | LineOptions | ThemeColor | string;
|
|
@@ -116,6 +116,14 @@ export function isLineOptions(item: unknown): item is LineOptions {
|
|
|
116
116
|
return item === 'solid' || item === 'dashed' || item === 'dotted';
|
|
117
117
|
}
|
|
118
118
|
|
|
119
|
+
export type Predicate = ElementPredicate | RelationPredicate;
|
|
120
|
+
|
|
121
|
+
export const Predicate = 'Predicate';
|
|
122
|
+
|
|
123
|
+
export function isPredicate(item: unknown): item is Predicate {
|
|
124
|
+
return reflection.isInstance(item, Predicate);
|
|
125
|
+
}
|
|
126
|
+
|
|
119
127
|
export type Relation = ExplicitRelation | ImplicitRelation;
|
|
120
128
|
|
|
121
129
|
export const Relation = 'Relation';
|
|
@@ -132,6 +140,22 @@ export function isRelationExpression(item: unknown): item is RelationExpression
|
|
|
132
140
|
return reflection.isInstance(item, RelationExpression);
|
|
133
141
|
}
|
|
134
142
|
|
|
143
|
+
export type RelationPredicate = RelationPredicateOrWhere | RelationPredicateWith;
|
|
144
|
+
|
|
145
|
+
export const RelationPredicate = 'RelationPredicate';
|
|
146
|
+
|
|
147
|
+
export function isRelationPredicate(item: unknown): item is RelationPredicate {
|
|
148
|
+
return reflection.isInstance(item, RelationPredicate);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
export type RelationPredicateOrWhere = RelationExpression | RelationPredicateWhere;
|
|
152
|
+
|
|
153
|
+
export const RelationPredicateOrWhere = 'RelationPredicateOrWhere';
|
|
154
|
+
|
|
155
|
+
export function isRelationPredicateOrWhere(item: unknown): item is RelationPredicateOrWhere {
|
|
156
|
+
return reflection.isInstance(item, RelationPredicateOrWhere);
|
|
157
|
+
}
|
|
158
|
+
|
|
135
159
|
export type RelationProperty = LinkProperty | RelationStringProperty | RelationStyleProperty;
|
|
136
160
|
|
|
137
161
|
export const RelationProperty = 'RelationProperty';
|
|
@@ -212,6 +236,62 @@ export function isViewRulePredicate(item: unknown): item is ViewRulePredicate {
|
|
|
212
236
|
return reflection.isInstance(item, ViewRulePredicate);
|
|
213
237
|
}
|
|
214
238
|
|
|
239
|
+
export type WhereElement = WhereElementKind | WhereElementTag;
|
|
240
|
+
|
|
241
|
+
export const WhereElement = 'WhereElement';
|
|
242
|
+
|
|
243
|
+
export function isWhereElement(item: unknown): item is WhereElement {
|
|
244
|
+
return reflection.isInstance(item, WhereElement);
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
export type WhereElementExpression = WhereBinaryExpression | WhereElement | WhereElementNegation;
|
|
248
|
+
|
|
249
|
+
export const WhereElementExpression = 'WhereElementExpression';
|
|
250
|
+
|
|
251
|
+
export function isWhereElementExpression(item: unknown): item is WhereElementExpression {
|
|
252
|
+
return reflection.isInstance(item, WhereElementExpression);
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
export type WhereExpression = WhereElementExpression | WhereRelationExpression;
|
|
256
|
+
|
|
257
|
+
export const WhereExpression = 'WhereExpression';
|
|
258
|
+
|
|
259
|
+
export function isWhereExpression(item: unknown): item is WhereExpression {
|
|
260
|
+
return reflection.isInstance(item, WhereExpression);
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
export type WhereKindEqual = WhereElementKind | WhereRelationKind;
|
|
264
|
+
|
|
265
|
+
export const WhereKindEqual = 'WhereKindEqual';
|
|
266
|
+
|
|
267
|
+
export function isWhereKindEqual(item: unknown): item is WhereKindEqual {
|
|
268
|
+
return reflection.isInstance(item, WhereKindEqual);
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
export type WhereRelation = WhereRelationKind | WhereRelationTag;
|
|
272
|
+
|
|
273
|
+
export const WhereRelation = 'WhereRelation';
|
|
274
|
+
|
|
275
|
+
export function isWhereRelation(item: unknown): item is WhereRelation {
|
|
276
|
+
return reflection.isInstance(item, WhereRelation);
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
export type WhereRelationExpression = WhereBinaryExpression | WhereRelation | WhereRelationNegation;
|
|
280
|
+
|
|
281
|
+
export const WhereRelationExpression = 'WhereRelationExpression';
|
|
282
|
+
|
|
283
|
+
export function isWhereRelationExpression(item: unknown): item is WhereRelationExpression {
|
|
284
|
+
return reflection.isInstance(item, WhereRelationExpression);
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
export type WhereTagEqual = WhereElementTag | WhereRelationTag;
|
|
288
|
+
|
|
289
|
+
export const WhereTagEqual = 'WhereTagEqual';
|
|
290
|
+
|
|
291
|
+
export function isWhereTagEqual(item: unknown): item is WhereTagEqual {
|
|
292
|
+
return reflection.isInstance(item, WhereTagEqual);
|
|
293
|
+
}
|
|
294
|
+
|
|
215
295
|
export interface ArrowProperty extends AstNode {
|
|
216
296
|
readonly $container: CustomRelationProperties | RelationStyleProperty | SpecificationRelationshipKind;
|
|
217
297
|
readonly $type: 'ArrowProperty';
|
|
@@ -251,21 +331,8 @@ export function isColorProperty(item: unknown): item is ColorProperty {
|
|
|
251
331
|
return reflection.isInstance(item, ColorProperty);
|
|
252
332
|
}
|
|
253
333
|
|
|
254
|
-
export interface CustomElementExpression extends AstNode {
|
|
255
|
-
readonly $container: DynamicViewRulePredicateIterator | Expressions;
|
|
256
|
-
readonly $type: 'CustomElementExpression';
|
|
257
|
-
custom: CustomElementProperties;
|
|
258
|
-
target: ElementExpression;
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
export const CustomElementExpression = 'CustomElementExpression';
|
|
262
|
-
|
|
263
|
-
export function isCustomElementExpression(item: unknown): item is CustomElementExpression {
|
|
264
|
-
return reflection.isInstance(item, CustomElementExpression);
|
|
265
|
-
}
|
|
266
|
-
|
|
267
334
|
export interface CustomElementProperties extends AstNode {
|
|
268
|
-
readonly $container:
|
|
335
|
+
readonly $container: ElementPredicateWith;
|
|
269
336
|
readonly $type: 'CustomElementProperties';
|
|
270
337
|
props: Array<ElementStringProperty | NavigateToProperty | StyleProperty>;
|
|
271
338
|
}
|
|
@@ -276,21 +343,8 @@ export function isCustomElementProperties(item: unknown): item is CustomElementP
|
|
|
276
343
|
return reflection.isInstance(item, CustomElementProperties);
|
|
277
344
|
}
|
|
278
345
|
|
|
279
|
-
export interface CustomRelationExpression extends AstNode {
|
|
280
|
-
readonly $container: Expressions;
|
|
281
|
-
readonly $type: 'CustomRelationExpression';
|
|
282
|
-
custom: CustomRelationProperties;
|
|
283
|
-
relation: RelationExpression;
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
export const CustomRelationExpression = 'CustomRelationExpression';
|
|
287
|
-
|
|
288
|
-
export function isCustomRelationExpression(item: unknown): item is CustomRelationExpression {
|
|
289
|
-
return reflection.isInstance(item, CustomRelationExpression);
|
|
290
|
-
}
|
|
291
|
-
|
|
292
346
|
export interface CustomRelationProperties extends AstNode {
|
|
293
|
-
readonly $container:
|
|
347
|
+
readonly $container: DynamicViewStep | RelationPredicateWith;
|
|
294
348
|
readonly $type: 'CustomRelationProperties';
|
|
295
349
|
props: Array<RelationStringProperty | RelationshipStyleProperty>;
|
|
296
350
|
}
|
|
@@ -302,7 +356,7 @@ export function isCustomRelationProperties(item: unknown): item is CustomRelatio
|
|
|
302
356
|
}
|
|
303
357
|
|
|
304
358
|
export interface DirectedRelationExpression extends AstNode {
|
|
305
|
-
readonly $container:
|
|
359
|
+
readonly $container: Predicates | RelationPredicateWhere | RelationPredicateWith;
|
|
306
360
|
readonly $type: 'DirectedRelationExpression';
|
|
307
361
|
source: OutgoingRelationExpression;
|
|
308
362
|
target: ElementExpression;
|
|
@@ -317,7 +371,7 @@ export function isDirectedRelationExpression(item: unknown): item is DirectedRel
|
|
|
317
371
|
export interface DynamicView extends AstNode {
|
|
318
372
|
readonly $container: ModelViews;
|
|
319
373
|
readonly $type: 'DynamicView';
|
|
320
|
-
body
|
|
374
|
+
body?: DynamicViewBody;
|
|
321
375
|
name: Id;
|
|
322
376
|
}
|
|
323
377
|
|
|
@@ -342,34 +396,35 @@ export function isDynamicViewBody(item: unknown): item is DynamicViewBody {
|
|
|
342
396
|
return reflection.isInstance(item, DynamicViewBody);
|
|
343
397
|
}
|
|
344
398
|
|
|
345
|
-
export interface
|
|
399
|
+
export interface DynamicViewIncludePredicate extends AstNode {
|
|
346
400
|
readonly $container: DynamicViewBody;
|
|
347
|
-
readonly $type: '
|
|
348
|
-
|
|
401
|
+
readonly $type: 'DynamicViewIncludePredicate';
|
|
402
|
+
predicates: DynamicViewPredicateIterator;
|
|
349
403
|
}
|
|
350
404
|
|
|
351
|
-
export const
|
|
405
|
+
export const DynamicViewIncludePredicate = 'DynamicViewIncludePredicate';
|
|
352
406
|
|
|
353
|
-
export function
|
|
354
|
-
return reflection.isInstance(item,
|
|
407
|
+
export function isDynamicViewIncludePredicate(item: unknown): item is DynamicViewIncludePredicate {
|
|
408
|
+
return reflection.isInstance(item, DynamicViewIncludePredicate);
|
|
355
409
|
}
|
|
356
410
|
|
|
357
|
-
export interface
|
|
358
|
-
readonly $container:
|
|
359
|
-
readonly $type: '
|
|
360
|
-
prev?:
|
|
361
|
-
value:
|
|
411
|
+
export interface DynamicViewPredicateIterator extends AstNode {
|
|
412
|
+
readonly $container: DynamicViewIncludePredicate | DynamicViewPredicateIterator;
|
|
413
|
+
readonly $type: 'DynamicViewPredicateIterator';
|
|
414
|
+
prev?: DynamicViewPredicateIterator;
|
|
415
|
+
value: ElementPredicate;
|
|
362
416
|
}
|
|
363
417
|
|
|
364
|
-
export const
|
|
418
|
+
export const DynamicViewPredicateIterator = 'DynamicViewPredicateIterator';
|
|
365
419
|
|
|
366
|
-
export function
|
|
367
|
-
return reflection.isInstance(item,
|
|
420
|
+
export function isDynamicViewPredicateIterator(item: unknown): item is DynamicViewPredicateIterator {
|
|
421
|
+
return reflection.isInstance(item, DynamicViewPredicateIterator);
|
|
368
422
|
}
|
|
369
423
|
|
|
370
424
|
export interface DynamicViewStep extends AstNode {
|
|
371
425
|
readonly $container: DynamicViewBody;
|
|
372
426
|
readonly $type: 'DynamicViewStep';
|
|
427
|
+
custom?: CustomRelationProperties;
|
|
373
428
|
isBackward: boolean;
|
|
374
429
|
kind?: Reference<RelationshipKind>;
|
|
375
430
|
source: ElementRef;
|
|
@@ -413,7 +468,7 @@ export function isElementBody(item: unknown): item is ElementBody {
|
|
|
413
468
|
}
|
|
414
469
|
|
|
415
470
|
export interface ElementDescedantsExpression extends AstNode {
|
|
416
|
-
readonly $container:
|
|
471
|
+
readonly $container: DirectedRelationExpression | DynamicViewPredicateIterator | ElementExpressionsIterator | ElementPredicateWhere | ElementPredicateWith | IncomingRelationExpression | OutgoingRelationExpression | Predicates;
|
|
417
472
|
readonly $type: 'ElementDescedantsExpression';
|
|
418
473
|
parent: ElementRef;
|
|
419
474
|
}
|
|
@@ -450,7 +505,7 @@ export function isElementKind(item: unknown): item is ElementKind {
|
|
|
450
505
|
}
|
|
451
506
|
|
|
452
507
|
export interface ElementKindExpression extends AstNode {
|
|
453
|
-
readonly $container:
|
|
508
|
+
readonly $container: DirectedRelationExpression | DynamicViewPredicateIterator | ElementExpressionsIterator | ElementPredicateWhere | ElementPredicateWith | IncomingRelationExpression | OutgoingRelationExpression | Predicates;
|
|
454
509
|
readonly $type: 'ElementKindExpression';
|
|
455
510
|
isEqual: boolean;
|
|
456
511
|
kind?: Reference<ElementKind>;
|
|
@@ -462,10 +517,35 @@ export function isElementKindExpression(item: unknown): item is ElementKindExpre
|
|
|
462
517
|
return reflection.isInstance(item, ElementKindExpression);
|
|
463
518
|
}
|
|
464
519
|
|
|
520
|
+
export interface ElementPredicateWhere extends AstNode {
|
|
521
|
+
readonly $container: DynamicViewPredicateIterator | ElementPredicateWith | Predicates;
|
|
522
|
+
readonly $type: 'ElementPredicateWhere';
|
|
523
|
+
subject: ElementExpression;
|
|
524
|
+
where?: WhereElementExpression;
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
export const ElementPredicateWhere = 'ElementPredicateWhere';
|
|
528
|
+
|
|
529
|
+
export function isElementPredicateWhere(item: unknown): item is ElementPredicateWhere {
|
|
530
|
+
return reflection.isInstance(item, ElementPredicateWhere);
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
export interface ElementPredicateWith extends AstNode {
|
|
534
|
+
readonly $container: DynamicViewPredicateIterator | Predicates;
|
|
535
|
+
readonly $type: 'ElementPredicateWith';
|
|
536
|
+
custom?: CustomElementProperties;
|
|
537
|
+
subject: ElementPredicateOrWhere;
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
export const ElementPredicateWith = 'ElementPredicateWith';
|
|
541
|
+
|
|
542
|
+
export function isElementPredicateWith(item: unknown): item is ElementPredicateWith {
|
|
543
|
+
return reflection.isInstance(item, ElementPredicateWith);
|
|
544
|
+
}
|
|
545
|
+
|
|
465
546
|
export interface ElementRef extends AstNode {
|
|
466
|
-
readonly $container:
|
|
547
|
+
readonly $container: DirectedRelationExpression | DynamicViewPredicateIterator | DynamicViewStep | ElementDescedantsExpression | ElementExpressionsIterator | ElementPredicateWhere | ElementPredicateWith | ElementRef | ElementView | ExpandElementExpression | ExplicitRelation | ImplicitRelation | IncomingRelationExpression | OutgoingRelationExpression | Predicates;
|
|
467
548
|
readonly $type: 'ElementRef';
|
|
468
|
-
dot?: string;
|
|
469
549
|
el: Reference<Element>;
|
|
470
550
|
parent?: ElementRef;
|
|
471
551
|
}
|
|
@@ -490,7 +570,7 @@ export function isElementStringProperty(item: unknown): item is ElementStringPro
|
|
|
490
570
|
}
|
|
491
571
|
|
|
492
572
|
export interface ElementTagExpression extends AstNode {
|
|
493
|
-
readonly $container:
|
|
573
|
+
readonly $container: DirectedRelationExpression | DynamicViewPredicateIterator | ElementExpressionsIterator | ElementPredicateWhere | ElementPredicateWith | IncomingRelationExpression | OutgoingRelationExpression | Predicates;
|
|
494
574
|
readonly $type: 'ElementTagExpression';
|
|
495
575
|
isEqual: boolean;
|
|
496
576
|
tag?: Reference<Tag>;
|
|
@@ -505,7 +585,7 @@ export function isElementTagExpression(item: unknown): item is ElementTagExpress
|
|
|
505
585
|
export interface ElementView extends AstNode {
|
|
506
586
|
readonly $container: ModelViews;
|
|
507
587
|
readonly $type: 'ElementView';
|
|
508
|
-
body
|
|
588
|
+
body?: ElementViewBody;
|
|
509
589
|
extends?: ElementViewRef;
|
|
510
590
|
name?: Id;
|
|
511
591
|
viewOf?: ElementRef;
|
|
@@ -546,7 +626,7 @@ export function isElementViewRef(item: unknown): item is ElementViewRef {
|
|
|
546
626
|
export interface ExcludePredicate extends AstNode {
|
|
547
627
|
readonly $container: ElementViewBody;
|
|
548
628
|
readonly $type: 'ExcludePredicate';
|
|
549
|
-
|
|
629
|
+
predicates: Predicates;
|
|
550
630
|
}
|
|
551
631
|
|
|
552
632
|
export const ExcludePredicate = 'ExcludePredicate';
|
|
@@ -556,7 +636,7 @@ export function isExcludePredicate(item: unknown): item is ExcludePredicate {
|
|
|
556
636
|
}
|
|
557
637
|
|
|
558
638
|
export interface ExpandElementExpression extends AstNode {
|
|
559
|
-
readonly $container:
|
|
639
|
+
readonly $container: DirectedRelationExpression | DynamicViewPredicateIterator | ElementExpressionsIterator | ElementPredicateWhere | ElementPredicateWith | IncomingRelationExpression | OutgoingRelationExpression | Predicates;
|
|
560
640
|
readonly $type: 'ExpandElementExpression';
|
|
561
641
|
expand: ElementRef;
|
|
562
642
|
}
|
|
@@ -584,19 +664,6 @@ export function isExplicitRelation(item: unknown): item is ExplicitRelation {
|
|
|
584
664
|
return reflection.isInstance(item, ExplicitRelation);
|
|
585
665
|
}
|
|
586
666
|
|
|
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
|
-
|
|
600
667
|
export interface ExtendElement extends AstNode {
|
|
601
668
|
readonly $container: Model;
|
|
602
669
|
readonly $type: 'ExtendElement';
|
|
@@ -625,7 +692,6 @@ export function isExtendElementBody(item: unknown): item is ExtendElementBody {
|
|
|
625
692
|
export interface FqnElementRef extends AstNode {
|
|
626
693
|
readonly $container: ExtendElement | FqnElementRef;
|
|
627
694
|
readonly $type: 'FqnElementRef';
|
|
628
|
-
dot?: string;
|
|
629
695
|
el: Reference<Element>;
|
|
630
696
|
parent?: FqnElementRef;
|
|
631
697
|
}
|
|
@@ -669,7 +735,7 @@ export function isImplicitRelation(item: unknown): item is ImplicitRelation {
|
|
|
669
735
|
export interface IncludePredicate extends AstNode {
|
|
670
736
|
readonly $container: ElementViewBody;
|
|
671
737
|
readonly $type: 'IncludePredicate';
|
|
672
|
-
|
|
738
|
+
predicates: Predicates;
|
|
673
739
|
}
|
|
674
740
|
|
|
675
741
|
export const IncludePredicate = 'IncludePredicate';
|
|
@@ -679,7 +745,7 @@ export function isIncludePredicate(item: unknown): item is IncludePredicate {
|
|
|
679
745
|
}
|
|
680
746
|
|
|
681
747
|
export interface IncomingRelationExpression extends AstNode {
|
|
682
|
-
readonly $container:
|
|
748
|
+
readonly $container: InOutRelationExpression | Predicates | RelationPredicateWhere | RelationPredicateWith;
|
|
683
749
|
readonly $type: 'IncomingRelationExpression';
|
|
684
750
|
to: ElementExpression;
|
|
685
751
|
}
|
|
@@ -691,7 +757,7 @@ export function isIncomingRelationExpression(item: unknown): item is IncomingRel
|
|
|
691
757
|
}
|
|
692
758
|
|
|
693
759
|
export interface InOutRelationExpression extends AstNode {
|
|
694
|
-
readonly $container:
|
|
760
|
+
readonly $container: Predicates | RelationPredicateWhere | RelationPredicateWith;
|
|
695
761
|
readonly $type: 'InOutRelationExpression';
|
|
696
762
|
inout: IncomingRelationExpression;
|
|
697
763
|
}
|
|
@@ -783,7 +849,7 @@ export interface ModelViews extends AstNode {
|
|
|
783
849
|
readonly $container: LikeC4Grammar;
|
|
784
850
|
readonly $type: 'ModelViews';
|
|
785
851
|
name: 'views';
|
|
786
|
-
views: Array<
|
|
852
|
+
views: Array<LikeC4View>;
|
|
787
853
|
}
|
|
788
854
|
|
|
789
855
|
export const ModelViews = 'ModelViews';
|
|
@@ -819,7 +885,7 @@ export function isOpacityProperty(item: unknown): item is OpacityProperty {
|
|
|
819
885
|
}
|
|
820
886
|
|
|
821
887
|
export interface OutgoingRelationExpression extends AstNode {
|
|
822
|
-
readonly $container:
|
|
888
|
+
readonly $container: DirectedRelationExpression | Predicates | RelationPredicateWhere | RelationPredicateWith;
|
|
823
889
|
readonly $type: 'OutgoingRelationExpression';
|
|
824
890
|
from: ElementExpression;
|
|
825
891
|
isBidirectional: boolean;
|
|
@@ -832,6 +898,19 @@ export function isOutgoingRelationExpression(item: unknown): item is OutgoingRel
|
|
|
832
898
|
return reflection.isInstance(item, OutgoingRelationExpression);
|
|
833
899
|
}
|
|
834
900
|
|
|
901
|
+
export interface Predicates extends AstNode {
|
|
902
|
+
readonly $container: ExcludePredicate | IncludePredicate | Predicates;
|
|
903
|
+
readonly $type: 'Predicates';
|
|
904
|
+
prev?: Predicates;
|
|
905
|
+
value: Predicate;
|
|
906
|
+
}
|
|
907
|
+
|
|
908
|
+
export const Predicates = 'Predicates';
|
|
909
|
+
|
|
910
|
+
export function isPredicates(item: unknown): item is Predicates {
|
|
911
|
+
return reflection.isInstance(item, Predicates);
|
|
912
|
+
}
|
|
913
|
+
|
|
835
914
|
export interface RelationBody extends AstNode {
|
|
836
915
|
readonly $container: ExplicitRelation | ImplicitRelation;
|
|
837
916
|
readonly $type: 'RelationBody';
|
|
@@ -845,6 +924,32 @@ export function isRelationBody(item: unknown): item is RelationBody {
|
|
|
845
924
|
return reflection.isInstance(item, RelationBody);
|
|
846
925
|
}
|
|
847
926
|
|
|
927
|
+
export interface RelationPredicateWhere extends AstNode {
|
|
928
|
+
readonly $container: Predicates | RelationPredicateWith;
|
|
929
|
+
readonly $type: 'RelationPredicateWhere';
|
|
930
|
+
subject: RelationExpression;
|
|
931
|
+
where?: WhereRelationExpression;
|
|
932
|
+
}
|
|
933
|
+
|
|
934
|
+
export const RelationPredicateWhere = 'RelationPredicateWhere';
|
|
935
|
+
|
|
936
|
+
export function isRelationPredicateWhere(item: unknown): item is RelationPredicateWhere {
|
|
937
|
+
return reflection.isInstance(item, RelationPredicateWhere);
|
|
938
|
+
}
|
|
939
|
+
|
|
940
|
+
export interface RelationPredicateWith extends AstNode {
|
|
941
|
+
readonly $container: Predicates;
|
|
942
|
+
readonly $type: 'RelationPredicateWith';
|
|
943
|
+
custom?: CustomRelationProperties;
|
|
944
|
+
subject: RelationPredicateOrWhere;
|
|
945
|
+
}
|
|
946
|
+
|
|
947
|
+
export const RelationPredicateWith = 'RelationPredicateWith';
|
|
948
|
+
|
|
949
|
+
export function isRelationPredicateWith(item: unknown): item is RelationPredicateWith {
|
|
950
|
+
return reflection.isInstance(item, RelationPredicateWith);
|
|
951
|
+
}
|
|
952
|
+
|
|
848
953
|
export interface RelationshipKind extends AstNode {
|
|
849
954
|
readonly $container: SpecificationRelationshipKind;
|
|
850
955
|
readonly $type: 'RelationshipKind';
|
|
@@ -860,7 +965,7 @@ export function isRelationshipKind(item: unknown): item is RelationshipKind {
|
|
|
860
965
|
export interface RelationStringProperty extends AstNode {
|
|
861
966
|
readonly $container: CustomRelationProperties | RelationBody;
|
|
862
967
|
readonly $type: 'RelationStringProperty';
|
|
863
|
-
key: 'title';
|
|
968
|
+
key: 'description' | 'technology' | 'title';
|
|
864
969
|
value: string;
|
|
865
970
|
}
|
|
866
971
|
|
|
@@ -975,9 +1080,10 @@ export function isTag(item: unknown): item is Tag {
|
|
|
975
1080
|
}
|
|
976
1081
|
|
|
977
1082
|
export interface Tags extends AstNode {
|
|
978
|
-
readonly $container: DynamicViewBody | ElementBody | ElementViewBody | ExplicitRelation | ImplicitRelation | RelationBody;
|
|
1083
|
+
readonly $container: DynamicViewBody | ElementBody | ElementViewBody | ExplicitRelation | ImplicitRelation | RelationBody | Tags;
|
|
979
1084
|
readonly $type: 'Tags';
|
|
980
|
-
|
|
1085
|
+
prev?: Tags;
|
|
1086
|
+
values: Array<Reference<Tag>>;
|
|
981
1087
|
}
|
|
982
1088
|
|
|
983
1089
|
export const Tags = 'Tags';
|
|
@@ -1036,8 +1142,102 @@ export function isViewStringProperty(item: unknown): item is ViewStringProperty
|
|
|
1036
1142
|
return reflection.isInstance(item, ViewStringProperty);
|
|
1037
1143
|
}
|
|
1038
1144
|
|
|
1145
|
+
export interface WhereBinaryExpression extends AstNode {
|
|
1146
|
+
readonly $container: ElementPredicateWhere | RelationPredicateWhere | WhereBinaryExpression | WhereElementNegation | WhereRelationNegation;
|
|
1147
|
+
readonly $type: 'WhereBinaryExpression';
|
|
1148
|
+
left: WhereElementExpression | WhereRelationExpression;
|
|
1149
|
+
operator: 'and' | 'or';
|
|
1150
|
+
right: WhereElementExpression | WhereRelationExpression;
|
|
1151
|
+
}
|
|
1152
|
+
|
|
1153
|
+
export const WhereBinaryExpression = 'WhereBinaryExpression';
|
|
1154
|
+
|
|
1155
|
+
export function isWhereBinaryExpression(item: unknown): item is WhereBinaryExpression {
|
|
1156
|
+
return reflection.isInstance(item, WhereBinaryExpression);
|
|
1157
|
+
}
|
|
1158
|
+
|
|
1159
|
+
export interface WhereElementKind extends AstNode {
|
|
1160
|
+
readonly $container: ElementPredicateWhere | WhereBinaryExpression | WhereElementNegation;
|
|
1161
|
+
readonly $type: 'WhereElementKind';
|
|
1162
|
+
not: boolean;
|
|
1163
|
+
operator: 'is' | string;
|
|
1164
|
+
value?: Reference<ElementKind>;
|
|
1165
|
+
}
|
|
1166
|
+
|
|
1167
|
+
export const WhereElementKind = 'WhereElementKind';
|
|
1168
|
+
|
|
1169
|
+
export function isWhereElementKind(item: unknown): item is WhereElementKind {
|
|
1170
|
+
return reflection.isInstance(item, WhereElementKind);
|
|
1171
|
+
}
|
|
1172
|
+
|
|
1173
|
+
export interface WhereElementNegation extends AstNode {
|
|
1174
|
+
readonly $container: ElementPredicateWhere | WhereBinaryExpression | WhereElementNegation;
|
|
1175
|
+
readonly $type: 'WhereElementNegation';
|
|
1176
|
+
value: WhereElementExpression;
|
|
1177
|
+
}
|
|
1178
|
+
|
|
1179
|
+
export const WhereElementNegation = 'WhereElementNegation';
|
|
1180
|
+
|
|
1181
|
+
export function isWhereElementNegation(item: unknown): item is WhereElementNegation {
|
|
1182
|
+
return reflection.isInstance(item, WhereElementNegation);
|
|
1183
|
+
}
|
|
1184
|
+
|
|
1185
|
+
export interface WhereElementTag extends AstNode {
|
|
1186
|
+
readonly $container: ElementPredicateWhere | WhereBinaryExpression | WhereElementNegation;
|
|
1187
|
+
readonly $type: 'WhereElementTag';
|
|
1188
|
+
not: boolean;
|
|
1189
|
+
operator: 'is' | string;
|
|
1190
|
+
value?: Reference<Tag>;
|
|
1191
|
+
}
|
|
1192
|
+
|
|
1193
|
+
export const WhereElementTag = 'WhereElementTag';
|
|
1194
|
+
|
|
1195
|
+
export function isWhereElementTag(item: unknown): item is WhereElementTag {
|
|
1196
|
+
return reflection.isInstance(item, WhereElementTag);
|
|
1197
|
+
}
|
|
1198
|
+
|
|
1199
|
+
export interface WhereRelationKind extends AstNode {
|
|
1200
|
+
readonly $container: RelationPredicateWhere | WhereBinaryExpression | WhereRelationNegation;
|
|
1201
|
+
readonly $type: 'WhereRelationKind';
|
|
1202
|
+
not: boolean;
|
|
1203
|
+
operator: 'is' | string;
|
|
1204
|
+
value?: Reference<RelationshipKind>;
|
|
1205
|
+
}
|
|
1206
|
+
|
|
1207
|
+
export const WhereRelationKind = 'WhereRelationKind';
|
|
1208
|
+
|
|
1209
|
+
export function isWhereRelationKind(item: unknown): item is WhereRelationKind {
|
|
1210
|
+
return reflection.isInstance(item, WhereRelationKind);
|
|
1211
|
+
}
|
|
1212
|
+
|
|
1213
|
+
export interface WhereRelationNegation extends AstNode {
|
|
1214
|
+
readonly $container: RelationPredicateWhere | WhereBinaryExpression | WhereRelationNegation;
|
|
1215
|
+
readonly $type: 'WhereRelationNegation';
|
|
1216
|
+
value: WhereRelationExpression;
|
|
1217
|
+
}
|
|
1218
|
+
|
|
1219
|
+
export const WhereRelationNegation = 'WhereRelationNegation';
|
|
1220
|
+
|
|
1221
|
+
export function isWhereRelationNegation(item: unknown): item is WhereRelationNegation {
|
|
1222
|
+
return reflection.isInstance(item, WhereRelationNegation);
|
|
1223
|
+
}
|
|
1224
|
+
|
|
1225
|
+
export interface WhereRelationTag extends AstNode {
|
|
1226
|
+
readonly $container: RelationPredicateWhere | WhereBinaryExpression | WhereRelationNegation;
|
|
1227
|
+
readonly $type: 'WhereRelationTag';
|
|
1228
|
+
not: boolean;
|
|
1229
|
+
operator: 'is' | string;
|
|
1230
|
+
value?: Reference<Tag>;
|
|
1231
|
+
}
|
|
1232
|
+
|
|
1233
|
+
export const WhereRelationTag = 'WhereRelationTag';
|
|
1234
|
+
|
|
1235
|
+
export function isWhereRelationTag(item: unknown): item is WhereRelationTag {
|
|
1236
|
+
return reflection.isInstance(item, WhereRelationTag);
|
|
1237
|
+
}
|
|
1238
|
+
|
|
1039
1239
|
export interface WildcardExpression extends AstNode {
|
|
1040
|
-
readonly $container:
|
|
1240
|
+
readonly $container: DirectedRelationExpression | DynamicViewPredicateIterator | ElementExpressionsIterator | ElementPredicateWhere | ElementPredicateWith | IncomingRelationExpression | OutgoingRelationExpression | Predicates;
|
|
1041
1241
|
readonly $type: 'WildcardExpression';
|
|
1042
1242
|
isWildcard: boolean;
|
|
1043
1243
|
}
|
|
@@ -1052,17 +1252,14 @@ export type LikeC4AstType = {
|
|
|
1052
1252
|
ArrowProperty: ArrowProperty
|
|
1053
1253
|
BorderProperty: BorderProperty
|
|
1054
1254
|
ColorProperty: ColorProperty
|
|
1055
|
-
CustomElementExpression: CustomElementExpression
|
|
1056
1255
|
CustomElementProperties: CustomElementProperties
|
|
1057
|
-
CustomRelationExpression: CustomRelationExpression
|
|
1058
1256
|
CustomRelationProperties: CustomRelationProperties
|
|
1059
1257
|
DirectedRelationExpression: DirectedRelationExpression
|
|
1060
1258
|
DynamicView: DynamicView
|
|
1061
1259
|
DynamicViewBody: DynamicViewBody
|
|
1062
|
-
|
|
1260
|
+
DynamicViewIncludePredicate: DynamicViewIncludePredicate
|
|
1261
|
+
DynamicViewPredicateIterator: DynamicViewPredicateIterator
|
|
1063
1262
|
DynamicViewRule: DynamicViewRule
|
|
1064
|
-
DynamicViewRulePredicate: DynamicViewRulePredicate
|
|
1065
|
-
DynamicViewRulePredicateIterator: DynamicViewRulePredicateIterator
|
|
1066
1263
|
DynamicViewStep: DynamicViewStep
|
|
1067
1264
|
Element: Element
|
|
1068
1265
|
ElementBody: ElementBody
|
|
@@ -1071,6 +1268,10 @@ export type LikeC4AstType = {
|
|
|
1071
1268
|
ElementExpressionsIterator: ElementExpressionsIterator
|
|
1072
1269
|
ElementKind: ElementKind
|
|
1073
1270
|
ElementKindExpression: ElementKindExpression
|
|
1271
|
+
ElementPredicate: ElementPredicate
|
|
1272
|
+
ElementPredicateOrWhere: ElementPredicateOrWhere
|
|
1273
|
+
ElementPredicateWhere: ElementPredicateWhere
|
|
1274
|
+
ElementPredicateWith: ElementPredicateWith
|
|
1074
1275
|
ElementProperty: ElementProperty
|
|
1075
1276
|
ElementRef: ElementRef
|
|
1076
1277
|
ElementStringProperty: ElementStringProperty
|
|
@@ -1081,8 +1282,6 @@ export type LikeC4AstType = {
|
|
|
1081
1282
|
ExcludePredicate: ExcludePredicate
|
|
1082
1283
|
ExpandElementExpression: ExpandElementExpression
|
|
1083
1284
|
ExplicitRelation: ExplicitRelation
|
|
1084
|
-
Expression: Expression
|
|
1085
|
-
Expressions: Expressions
|
|
1086
1285
|
ExtendElement: ExtendElement
|
|
1087
1286
|
ExtendElementBody: ExtendElementBody
|
|
1088
1287
|
FqnElementRef: FqnElementRef
|
|
@@ -1102,9 +1301,15 @@ export type LikeC4AstType = {
|
|
|
1102
1301
|
NavigateToProperty: NavigateToProperty
|
|
1103
1302
|
OpacityProperty: OpacityProperty
|
|
1104
1303
|
OutgoingRelationExpression: OutgoingRelationExpression
|
|
1304
|
+
Predicate: Predicate
|
|
1305
|
+
Predicates: Predicates
|
|
1105
1306
|
Relation: Relation
|
|
1106
1307
|
RelationBody: RelationBody
|
|
1107
1308
|
RelationExpression: RelationExpression
|
|
1309
|
+
RelationPredicate: RelationPredicate
|
|
1310
|
+
RelationPredicateOrWhere: RelationPredicateOrWhere
|
|
1311
|
+
RelationPredicateWhere: RelationPredicateWhere
|
|
1312
|
+
RelationPredicateWith: RelationPredicateWith
|
|
1108
1313
|
RelationProperty: RelationProperty
|
|
1109
1314
|
RelationStringProperty: RelationStringProperty
|
|
1110
1315
|
RelationStyleProperty: RelationStyleProperty
|
|
@@ -1127,13 +1332,27 @@ export type LikeC4AstType = {
|
|
|
1127
1332
|
ViewRulePredicate: ViewRulePredicate
|
|
1128
1333
|
ViewRuleStyle: ViewRuleStyle
|
|
1129
1334
|
ViewStringProperty: ViewStringProperty
|
|
1335
|
+
WhereBinaryExpression: WhereBinaryExpression
|
|
1336
|
+
WhereElement: WhereElement
|
|
1337
|
+
WhereElementExpression: WhereElementExpression
|
|
1338
|
+
WhereElementKind: WhereElementKind
|
|
1339
|
+
WhereElementNegation: WhereElementNegation
|
|
1340
|
+
WhereElementTag: WhereElementTag
|
|
1341
|
+
WhereExpression: WhereExpression
|
|
1342
|
+
WhereKindEqual: WhereKindEqual
|
|
1343
|
+
WhereRelation: WhereRelation
|
|
1344
|
+
WhereRelationExpression: WhereRelationExpression
|
|
1345
|
+
WhereRelationKind: WhereRelationKind
|
|
1346
|
+
WhereRelationNegation: WhereRelationNegation
|
|
1347
|
+
WhereRelationTag: WhereRelationTag
|
|
1348
|
+
WhereTagEqual: WhereTagEqual
|
|
1130
1349
|
WildcardExpression: WildcardExpression
|
|
1131
1350
|
}
|
|
1132
1351
|
|
|
1133
1352
|
export class LikeC4AstReflection extends AbstractAstReflection {
|
|
1134
1353
|
|
|
1135
1354
|
getAllTypes(): string[] {
|
|
1136
|
-
return [ArrowProperty, BorderProperty, ColorProperty,
|
|
1355
|
+
return [ArrowProperty, BorderProperty, ColorProperty, CustomElementProperties, CustomRelationProperties, DirectedRelationExpression, DynamicView, DynamicViewBody, DynamicViewIncludePredicate, DynamicViewPredicateIterator, DynamicViewRule, DynamicViewStep, Element, ElementBody, ElementDescedantsExpression, ElementExpression, ElementExpressionsIterator, ElementKind, ElementKindExpression, ElementPredicate, ElementPredicateOrWhere, ElementPredicateWhere, ElementPredicateWith, ElementProperty, ElementRef, ElementStringProperty, ElementTagExpression, ElementView, ElementViewBody, ElementViewRef, ExcludePredicate, ExpandElementExpression, ExplicitRelation, ExtendElement, ExtendElementBody, FqnElementRef, IconProperty, ImplicitRelation, InOutRelationExpression, IncludePredicate, IncomingRelationExpression, LibIcon, LikeC4Grammar, LikeC4Lib, LikeC4View, LineProperty, LinkProperty, Model, ModelViews, NavigateToProperty, OpacityProperty, OutgoingRelationExpression, Predicate, Predicates, Relation, RelationBody, RelationExpression, RelationPredicate, RelationPredicateOrWhere, RelationPredicateWhere, RelationPredicateWith, RelationProperty, RelationStringProperty, RelationStyleProperty, RelationshipKind, RelationshipStyleProperty, ShapeProperty, SpecificationElementKind, SpecificationRelationshipKind, SpecificationRule, SpecificationTag, StringProperty, StyleProperties, StyleProperty, Tag, Tags, ViewProperty, ViewRef, ViewRule, ViewRuleAutoLayout, ViewRulePredicate, ViewRuleStyle, ViewStringProperty, WhereBinaryExpression, WhereElement, WhereElementExpression, WhereElementKind, WhereElementNegation, WhereElementTag, WhereExpression, WhereKindEqual, WhereRelation, WhereRelationExpression, WhereRelationKind, WhereRelationNegation, WhereRelationTag, WhereTagEqual, WildcardExpression];
|
|
1137
1356
|
}
|
|
1138
1357
|
|
|
1139
1358
|
protected override computeIsSubtype(subtype: string, supertype: string): boolean {
|
|
@@ -1150,14 +1369,6 @@ export class LikeC4AstReflection extends AbstractAstReflection {
|
|
|
1150
1369
|
case ColorProperty: {
|
|
1151
1370
|
return this.isSubtype(RelationshipStyleProperty, supertype) || this.isSubtype(StyleProperty, supertype);
|
|
1152
1371
|
}
|
|
1153
|
-
case CustomElementExpression:
|
|
1154
|
-
case ElementExpression: {
|
|
1155
|
-
return this.isSubtype(DynamicViewElementExpression, supertype) || this.isSubtype(Expression, supertype);
|
|
1156
|
-
}
|
|
1157
|
-
case CustomRelationExpression:
|
|
1158
|
-
case RelationExpression: {
|
|
1159
|
-
return this.isSubtype(Expression, supertype);
|
|
1160
|
-
}
|
|
1161
1372
|
case DirectedRelationExpression:
|
|
1162
1373
|
case IncomingRelationExpression:
|
|
1163
1374
|
case InOutRelationExpression:
|
|
@@ -1168,7 +1379,7 @@ export class LikeC4AstReflection extends AbstractAstReflection {
|
|
|
1168
1379
|
case ElementView: {
|
|
1169
1380
|
return this.isSubtype(LikeC4View, supertype);
|
|
1170
1381
|
}
|
|
1171
|
-
case
|
|
1382
|
+
case DynamicViewIncludePredicate: {
|
|
1172
1383
|
return this.isSubtype(DynamicViewRule, supertype);
|
|
1173
1384
|
}
|
|
1174
1385
|
case ElementDescedantsExpression:
|
|
@@ -1179,6 +1390,18 @@ export class LikeC4AstReflection extends AbstractAstReflection {
|
|
|
1179
1390
|
case WildcardExpression: {
|
|
1180
1391
|
return this.isSubtype(ElementExpression, supertype);
|
|
1181
1392
|
}
|
|
1393
|
+
case ElementExpression:
|
|
1394
|
+
case ElementPredicateWhere: {
|
|
1395
|
+
return this.isSubtype(ElementPredicateOrWhere, supertype);
|
|
1396
|
+
}
|
|
1397
|
+
case ElementPredicate:
|
|
1398
|
+
case RelationPredicate: {
|
|
1399
|
+
return this.isSubtype(Predicate, supertype);
|
|
1400
|
+
}
|
|
1401
|
+
case ElementPredicateOrWhere:
|
|
1402
|
+
case ElementPredicateWith: {
|
|
1403
|
+
return this.isSubtype(ElementPredicate, supertype);
|
|
1404
|
+
}
|
|
1182
1405
|
case ElementStringProperty: {
|
|
1183
1406
|
return this.isSubtype(ElementProperty, supertype) || this.isSubtype(StringProperty, supertype);
|
|
1184
1407
|
}
|
|
@@ -1196,6 +1419,14 @@ export class LikeC4AstReflection extends AbstractAstReflection {
|
|
|
1196
1419
|
case LinkProperty: {
|
|
1197
1420
|
return this.isSubtype(ElementProperty, supertype) || this.isSubtype(RelationProperty, supertype) || this.isSubtype(ViewProperty, supertype);
|
|
1198
1421
|
}
|
|
1422
|
+
case RelationExpression:
|
|
1423
|
+
case RelationPredicateWhere: {
|
|
1424
|
+
return this.isSubtype(RelationPredicateOrWhere, supertype);
|
|
1425
|
+
}
|
|
1426
|
+
case RelationPredicateOrWhere:
|
|
1427
|
+
case RelationPredicateWith: {
|
|
1428
|
+
return this.isSubtype(RelationPredicate, supertype);
|
|
1429
|
+
}
|
|
1199
1430
|
case RelationStringProperty: {
|
|
1200
1431
|
return this.isSubtype(RelationProperty, supertype) || this.isSubtype(StringProperty, supertype);
|
|
1201
1432
|
}
|
|
@@ -1215,6 +1446,33 @@ export class LikeC4AstReflection extends AbstractAstReflection {
|
|
|
1215
1446
|
case ViewStringProperty: {
|
|
1216
1447
|
return this.isSubtype(StringProperty, supertype) || this.isSubtype(ViewProperty, supertype);
|
|
1217
1448
|
}
|
|
1449
|
+
case WhereBinaryExpression: {
|
|
1450
|
+
return this.isSubtype(WhereElementExpression, supertype) || this.isSubtype(WhereRelationExpression, supertype);
|
|
1451
|
+
}
|
|
1452
|
+
case WhereElement:
|
|
1453
|
+
case WhereElementNegation: {
|
|
1454
|
+
return this.isSubtype(WhereElementExpression, supertype);
|
|
1455
|
+
}
|
|
1456
|
+
case WhereElementExpression:
|
|
1457
|
+
case WhereRelationExpression: {
|
|
1458
|
+
return this.isSubtype(WhereExpression, supertype);
|
|
1459
|
+
}
|
|
1460
|
+
case WhereElementKind: {
|
|
1461
|
+
return this.isSubtype(WhereElement, supertype) || this.isSubtype(WhereKindEqual, supertype);
|
|
1462
|
+
}
|
|
1463
|
+
case WhereElementTag: {
|
|
1464
|
+
return this.isSubtype(WhereElement, supertype) || this.isSubtype(WhereTagEqual, supertype);
|
|
1465
|
+
}
|
|
1466
|
+
case WhereRelation:
|
|
1467
|
+
case WhereRelationNegation: {
|
|
1468
|
+
return this.isSubtype(WhereRelationExpression, supertype);
|
|
1469
|
+
}
|
|
1470
|
+
case WhereRelationKind: {
|
|
1471
|
+
return this.isSubtype(WhereKindEqual, supertype) || this.isSubtype(WhereRelation, supertype);
|
|
1472
|
+
}
|
|
1473
|
+
case WhereRelationTag: {
|
|
1474
|
+
return this.isSubtype(WhereRelation, supertype) || this.isSubtype(WhereTagEqual, supertype);
|
|
1475
|
+
}
|
|
1218
1476
|
default: {
|
|
1219
1477
|
return false;
|
|
1220
1478
|
}
|
|
@@ -1227,11 +1485,13 @@ export class LikeC4AstReflection extends AbstractAstReflection {
|
|
|
1227
1485
|
case 'DynamicViewStep:kind':
|
|
1228
1486
|
case 'ExplicitRelation:kind':
|
|
1229
1487
|
case 'ImplicitRelation:kind':
|
|
1230
|
-
case 'OutgoingRelationExpression:kind':
|
|
1488
|
+
case 'OutgoingRelationExpression:kind':
|
|
1489
|
+
case 'WhereRelationKind:value': {
|
|
1231
1490
|
return RelationshipKind;
|
|
1232
1491
|
}
|
|
1233
1492
|
case 'Element:kind':
|
|
1234
|
-
case 'ElementKindExpression:kind':
|
|
1493
|
+
case 'ElementKindExpression:kind':
|
|
1494
|
+
case 'WhereElementKind:value': {
|
|
1235
1495
|
return ElementKind;
|
|
1236
1496
|
}
|
|
1237
1497
|
case 'ElementRef:el':
|
|
@@ -1239,7 +1499,9 @@ export class LikeC4AstReflection extends AbstractAstReflection {
|
|
|
1239
1499
|
return Element;
|
|
1240
1500
|
}
|
|
1241
1501
|
case 'ElementTagExpression:tag':
|
|
1242
|
-
case 'Tags:
|
|
1502
|
+
case 'Tags:values':
|
|
1503
|
+
case 'WhereElementTag:value':
|
|
1504
|
+
case 'WhereRelationTag:value': {
|
|
1243
1505
|
return Tag;
|
|
1244
1506
|
}
|
|
1245
1507
|
case 'ElementViewRef:view': {
|
|
@@ -1286,15 +1548,6 @@ export class LikeC4AstReflection extends AbstractAstReflection {
|
|
|
1286
1548
|
]
|
|
1287
1549
|
};
|
|
1288
1550
|
}
|
|
1289
|
-
case CustomElementExpression: {
|
|
1290
|
-
return {
|
|
1291
|
-
name: CustomElementExpression,
|
|
1292
|
-
properties: [
|
|
1293
|
-
{ name: 'custom' },
|
|
1294
|
-
{ name: 'target' }
|
|
1295
|
-
]
|
|
1296
|
-
};
|
|
1297
|
-
}
|
|
1298
1551
|
case CustomElementProperties: {
|
|
1299
1552
|
return {
|
|
1300
1553
|
name: CustomElementProperties,
|
|
@@ -1303,15 +1556,6 @@ export class LikeC4AstReflection extends AbstractAstReflection {
|
|
|
1303
1556
|
]
|
|
1304
1557
|
};
|
|
1305
1558
|
}
|
|
1306
|
-
case CustomRelationExpression: {
|
|
1307
|
-
return {
|
|
1308
|
-
name: CustomRelationExpression,
|
|
1309
|
-
properties: [
|
|
1310
|
-
{ name: 'custom' },
|
|
1311
|
-
{ name: 'relation' }
|
|
1312
|
-
]
|
|
1313
|
-
};
|
|
1314
|
-
}
|
|
1315
1559
|
case CustomRelationProperties: {
|
|
1316
1560
|
return {
|
|
1317
1561
|
name: CustomRelationProperties,
|
|
@@ -1349,17 +1593,17 @@ export class LikeC4AstReflection extends AbstractAstReflection {
|
|
|
1349
1593
|
]
|
|
1350
1594
|
};
|
|
1351
1595
|
}
|
|
1352
|
-
case
|
|
1596
|
+
case DynamicViewIncludePredicate: {
|
|
1353
1597
|
return {
|
|
1354
|
-
name:
|
|
1598
|
+
name: DynamicViewIncludePredicate,
|
|
1355
1599
|
properties: [
|
|
1356
|
-
{ name: '
|
|
1600
|
+
{ name: 'predicates' }
|
|
1357
1601
|
]
|
|
1358
1602
|
};
|
|
1359
1603
|
}
|
|
1360
|
-
case
|
|
1604
|
+
case DynamicViewPredicateIterator: {
|
|
1361
1605
|
return {
|
|
1362
|
-
name:
|
|
1606
|
+
name: DynamicViewPredicateIterator,
|
|
1363
1607
|
properties: [
|
|
1364
1608
|
{ name: 'prev' },
|
|
1365
1609
|
{ name: 'value' }
|
|
@@ -1370,6 +1614,7 @@ export class LikeC4AstReflection extends AbstractAstReflection {
|
|
|
1370
1614
|
return {
|
|
1371
1615
|
name: DynamicViewStep,
|
|
1372
1616
|
properties: [
|
|
1617
|
+
{ name: 'custom' },
|
|
1373
1618
|
{ name: 'isBackward', defaultValue: false },
|
|
1374
1619
|
{ name: 'kind' },
|
|
1375
1620
|
{ name: 'source' },
|
|
@@ -1433,11 +1678,28 @@ export class LikeC4AstReflection extends AbstractAstReflection {
|
|
|
1433
1678
|
]
|
|
1434
1679
|
};
|
|
1435
1680
|
}
|
|
1681
|
+
case ElementPredicateWhere: {
|
|
1682
|
+
return {
|
|
1683
|
+
name: ElementPredicateWhere,
|
|
1684
|
+
properties: [
|
|
1685
|
+
{ name: 'subject' },
|
|
1686
|
+
{ name: 'where' }
|
|
1687
|
+
]
|
|
1688
|
+
};
|
|
1689
|
+
}
|
|
1690
|
+
case ElementPredicateWith: {
|
|
1691
|
+
return {
|
|
1692
|
+
name: ElementPredicateWith,
|
|
1693
|
+
properties: [
|
|
1694
|
+
{ name: 'custom' },
|
|
1695
|
+
{ name: 'subject' }
|
|
1696
|
+
]
|
|
1697
|
+
};
|
|
1698
|
+
}
|
|
1436
1699
|
case ElementRef: {
|
|
1437
1700
|
return {
|
|
1438
1701
|
name: ElementRef,
|
|
1439
1702
|
properties: [
|
|
1440
|
-
{ name: 'dot' },
|
|
1441
1703
|
{ name: 'el' },
|
|
1442
1704
|
{ name: 'parent' }
|
|
1443
1705
|
]
|
|
@@ -1494,7 +1756,7 @@ export class LikeC4AstReflection extends AbstractAstReflection {
|
|
|
1494
1756
|
return {
|
|
1495
1757
|
name: ExcludePredicate,
|
|
1496
1758
|
properties: [
|
|
1497
|
-
{ name: '
|
|
1759
|
+
{ name: 'predicates' }
|
|
1498
1760
|
]
|
|
1499
1761
|
};
|
|
1500
1762
|
}
|
|
@@ -1519,15 +1781,6 @@ export class LikeC4AstReflection extends AbstractAstReflection {
|
|
|
1519
1781
|
]
|
|
1520
1782
|
};
|
|
1521
1783
|
}
|
|
1522
|
-
case Expressions: {
|
|
1523
|
-
return {
|
|
1524
|
-
name: Expressions,
|
|
1525
|
-
properties: [
|
|
1526
|
-
{ name: 'prev' },
|
|
1527
|
-
{ name: 'value' }
|
|
1528
|
-
]
|
|
1529
|
-
};
|
|
1530
|
-
}
|
|
1531
1784
|
case ExtendElement: {
|
|
1532
1785
|
return {
|
|
1533
1786
|
name: ExtendElement,
|
|
@@ -1549,7 +1802,6 @@ export class LikeC4AstReflection extends AbstractAstReflection {
|
|
|
1549
1802
|
return {
|
|
1550
1803
|
name: FqnElementRef,
|
|
1551
1804
|
properties: [
|
|
1552
|
-
{ name: 'dot' },
|
|
1553
1805
|
{ name: 'el' },
|
|
1554
1806
|
{ name: 'parent' }
|
|
1555
1807
|
]
|
|
@@ -1581,7 +1833,7 @@ export class LikeC4AstReflection extends AbstractAstReflection {
|
|
|
1581
1833
|
return {
|
|
1582
1834
|
name: IncludePredicate,
|
|
1583
1835
|
properties: [
|
|
1584
|
-
{ name: '
|
|
1836
|
+
{ name: 'predicates' }
|
|
1585
1837
|
]
|
|
1586
1838
|
};
|
|
1587
1839
|
}
|
|
@@ -1692,6 +1944,15 @@ export class LikeC4AstReflection extends AbstractAstReflection {
|
|
|
1692
1944
|
]
|
|
1693
1945
|
};
|
|
1694
1946
|
}
|
|
1947
|
+
case Predicates: {
|
|
1948
|
+
return {
|
|
1949
|
+
name: Predicates,
|
|
1950
|
+
properties: [
|
|
1951
|
+
{ name: 'prev' },
|
|
1952
|
+
{ name: 'value' }
|
|
1953
|
+
]
|
|
1954
|
+
};
|
|
1955
|
+
}
|
|
1695
1956
|
case RelationBody: {
|
|
1696
1957
|
return {
|
|
1697
1958
|
name: RelationBody,
|
|
@@ -1701,6 +1962,24 @@ export class LikeC4AstReflection extends AbstractAstReflection {
|
|
|
1701
1962
|
]
|
|
1702
1963
|
};
|
|
1703
1964
|
}
|
|
1965
|
+
case RelationPredicateWhere: {
|
|
1966
|
+
return {
|
|
1967
|
+
name: RelationPredicateWhere,
|
|
1968
|
+
properties: [
|
|
1969
|
+
{ name: 'subject' },
|
|
1970
|
+
{ name: 'where' }
|
|
1971
|
+
]
|
|
1972
|
+
};
|
|
1973
|
+
}
|
|
1974
|
+
case RelationPredicateWith: {
|
|
1975
|
+
return {
|
|
1976
|
+
name: RelationPredicateWith,
|
|
1977
|
+
properties: [
|
|
1978
|
+
{ name: 'custom' },
|
|
1979
|
+
{ name: 'subject' }
|
|
1980
|
+
]
|
|
1981
|
+
};
|
|
1982
|
+
}
|
|
1704
1983
|
case RelationshipKind: {
|
|
1705
1984
|
return {
|
|
1706
1985
|
name: RelationshipKind,
|
|
@@ -1794,7 +2073,8 @@ export class LikeC4AstReflection extends AbstractAstReflection {
|
|
|
1794
2073
|
return {
|
|
1795
2074
|
name: Tags,
|
|
1796
2075
|
properties: [
|
|
1797
|
-
{ name: '
|
|
2076
|
+
{ name: 'prev' },
|
|
2077
|
+
{ name: 'values', defaultValue: [] }
|
|
1798
2078
|
]
|
|
1799
2079
|
};
|
|
1800
2080
|
}
|
|
@@ -1832,6 +2112,72 @@ export class LikeC4AstReflection extends AbstractAstReflection {
|
|
|
1832
2112
|
]
|
|
1833
2113
|
};
|
|
1834
2114
|
}
|
|
2115
|
+
case WhereBinaryExpression: {
|
|
2116
|
+
return {
|
|
2117
|
+
name: WhereBinaryExpression,
|
|
2118
|
+
properties: [
|
|
2119
|
+
{ name: 'left' },
|
|
2120
|
+
{ name: 'operator' },
|
|
2121
|
+
{ name: 'right' }
|
|
2122
|
+
]
|
|
2123
|
+
};
|
|
2124
|
+
}
|
|
2125
|
+
case WhereElementKind: {
|
|
2126
|
+
return {
|
|
2127
|
+
name: WhereElementKind,
|
|
2128
|
+
properties: [
|
|
2129
|
+
{ name: 'not', defaultValue: false },
|
|
2130
|
+
{ name: 'operator' },
|
|
2131
|
+
{ name: 'value' }
|
|
2132
|
+
]
|
|
2133
|
+
};
|
|
2134
|
+
}
|
|
2135
|
+
case WhereElementNegation: {
|
|
2136
|
+
return {
|
|
2137
|
+
name: WhereElementNegation,
|
|
2138
|
+
properties: [
|
|
2139
|
+
{ name: 'value' }
|
|
2140
|
+
]
|
|
2141
|
+
};
|
|
2142
|
+
}
|
|
2143
|
+
case WhereElementTag: {
|
|
2144
|
+
return {
|
|
2145
|
+
name: WhereElementTag,
|
|
2146
|
+
properties: [
|
|
2147
|
+
{ name: 'not', defaultValue: false },
|
|
2148
|
+
{ name: 'operator' },
|
|
2149
|
+
{ name: 'value' }
|
|
2150
|
+
]
|
|
2151
|
+
};
|
|
2152
|
+
}
|
|
2153
|
+
case WhereRelationKind: {
|
|
2154
|
+
return {
|
|
2155
|
+
name: WhereRelationKind,
|
|
2156
|
+
properties: [
|
|
2157
|
+
{ name: 'not', defaultValue: false },
|
|
2158
|
+
{ name: 'operator' },
|
|
2159
|
+
{ name: 'value' }
|
|
2160
|
+
]
|
|
2161
|
+
};
|
|
2162
|
+
}
|
|
2163
|
+
case WhereRelationNegation: {
|
|
2164
|
+
return {
|
|
2165
|
+
name: WhereRelationNegation,
|
|
2166
|
+
properties: [
|
|
2167
|
+
{ name: 'value' }
|
|
2168
|
+
]
|
|
2169
|
+
};
|
|
2170
|
+
}
|
|
2171
|
+
case WhereRelationTag: {
|
|
2172
|
+
return {
|
|
2173
|
+
name: WhereRelationTag,
|
|
2174
|
+
properties: [
|
|
2175
|
+
{ name: 'not', defaultValue: false },
|
|
2176
|
+
{ name: 'operator' },
|
|
2177
|
+
{ name: 'value' }
|
|
2178
|
+
]
|
|
2179
|
+
};
|
|
2180
|
+
}
|
|
1835
2181
|
case WildcardExpression: {
|
|
1836
2182
|
return {
|
|
1837
2183
|
name: WildcardExpression,
|