@likec4/language-server 1.19.2 → 1.20.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/dist/generated/ast.d.ts +33 -5
- package/dist/generated/ast.js +50 -3
- package/dist/generated/grammar.js +1 -1
- package/dist/like-c4.langium +9 -5
- package/dist/lsp/SemanticTokenProvider.d.ts +1 -1
- package/dist/lsp/SemanticTokenProvider.js +7 -0
- package/dist/model/model-parser-where.js +12 -6
- package/package.json +10 -10
- package/src/generated/ast.ts +88 -7
- package/src/generated/grammar.ts +1 -1
- package/src/like-c4.langium +9 -5
- package/src/lsp/SemanticTokenProvider.ts +51 -44
- package/src/model/model-parser-where.ts +22 -14
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
},
|
|
13
13
|
{
|
|
14
14
|
"name": "keyword.control.likec4",
|
|
15
|
-
"match": "\\b(BottomTop|LeftRight|RightLeft|TopBottom|amber|and|autoLayout|blue|border|browser|color|crow|cylinder|dashed|deployment|deploymentNode|description|diamond|dot|dotted|dynamic|dynamicPredicateGroup|element|element\\.kind|element\\.tag|exclude|extend|extends|global|gray|green|group|head|icon|icons|include|indigo|instance|instanceOf|is|kind|likec4lib|line|link|metadata|mobile|model|muted|navigateTo|node|none|normal|not|notation|notes|odiamond|odot|of|onormal|opacity|open|or|par|parallel|person|predicate|predicateGroup|primary|queue|rectangle|red|relationship|secondary|shape|sky|slate|solid|specification|storage|style|styleGroup|tag|tail|technology|title|vee|view|views|where|with)\\b"
|
|
15
|
+
"match": "\\b(BottomTop|LeftRight|RightLeft|TopBottom|amber|and|autoLayout|blue|border|browser|color|crow|cylinder|dashed|deployment|deploymentNode|description|diamond|dot|dotted|dynamic|dynamicPredicateGroup|element|element\\.kind|element\\.tag|exclude|extend|extends|global|gray|green|group|head|icon|icons|include|indigo|instance|instanceOf|is|kind|likec4lib|line|link|metadata|mobile|model|muted|navigateTo|node|none|normal|not|notation|notes|odiamond|odot|of|onormal|opacity|open|or|par|parallel|person|predicate|predicateGroup|primary|queue|rectangle|red|relationship|secondary|shape|sky|slate|solid|source|specification|storage|style|styleGroup|tag|tail|target|technology|title|vee|view|views|where|with)\\b"
|
|
16
16
|
},
|
|
17
17
|
{
|
|
18
18
|
"name": "string.quoted.double.likec4",
|
package/dist/generated/ast.d.ts
CHANGED
|
@@ -26,7 +26,7 @@ export declare const LikeC4Terminals: {
|
|
|
26
26
|
Hex: RegExp;
|
|
27
27
|
};
|
|
28
28
|
export type LikeC4TerminalNames = keyof typeof LikeC4Terminals;
|
|
29
|
-
export type LikeC4KeywordNames = "(" | ")" | "*" | "," | "->" | "-[" | ":" | ";" | "<-" | "<->" | "BottomTop" | "LeftRight" | "RightLeft" | "TopBottom" | "]->" | "amber" | "and" | "autoLayout" | "blue" | "border" | "browser" | "color" | "crow" | "cylinder" | "dashed" | "deployment" | "deploymentNode" | "description" | "diamond" | "dot" | "dotted" | "dynamic" | "dynamicPredicateGroup" | "element" | "element.kind" | "element.tag" | "exclude" | "extend" | "extends" | "global" | "gray" | "green" | "group" | "head" | "icon" | "icons" | "include" | "indigo" | "instance" | "instanceOf" | "is" | "kind" | "likec4lib" | "line" | "link" | "metadata" | "mobile" | "model" | "muted" | "navigateTo" | "node" | "none" | "normal" | "not" | "notation" | "notes" | "odiamond" | "odot" | "of" | "onormal" | "opacity" | "open" | "or" | "par" | "parallel" | "person" | "predicate" | "predicateGroup" | "primary" | "queue" | "rectangle" | "red" | "relationship" | "secondary" | "shape" | "sky" | "slate" | "solid" | "specification" | "storage" | "style" | "styleGroup" | "tag" | "tail" | "technology" | "title" | "vee" | "view" | "views" | "where" | "with" | "{" | "}";
|
|
29
|
+
export type LikeC4KeywordNames = "(" | ")" | "*" | "," | "->" | "-[" | ":" | ";" | "<-" | "<->" | "BottomTop" | "LeftRight" | "RightLeft" | "TopBottom" | "]->" | "amber" | "and" | "autoLayout" | "blue" | "border" | "browser" | "color" | "crow" | "cylinder" | "dashed" | "deployment" | "deploymentNode" | "description" | "diamond" | "dot" | "dotted" | "dynamic" | "dynamicPredicateGroup" | "element" | "element.kind" | "element.tag" | "exclude" | "extend" | "extends" | "global" | "gray" | "green" | "group" | "head" | "icon" | "icons" | "include" | "indigo" | "instance" | "instanceOf" | "is" | "kind" | "likec4lib" | "line" | "link" | "metadata" | "mobile" | "model" | "muted" | "navigateTo" | "node" | "none" | "normal" | "not" | "notation" | "notes" | "odiamond" | "odot" | "of" | "onormal" | "opacity" | "open" | "or" | "par" | "parallel" | "person" | "predicate" | "predicateGroup" | "primary" | "queue" | "rectangle" | "red" | "relationship" | "secondary" | "shape" | "sky" | "slate" | "solid" | "source" | "specification" | "storage" | "style" | "styleGroup" | "tag" | "tail" | "target" | "technology" | "title" | "vee" | "view" | "views" | "where" | "with" | "{" | "}";
|
|
30
30
|
export type LikeC4TokenNames = LikeC4TerminalNames | LikeC4KeywordNames;
|
|
31
31
|
export type ArrowType = 'crow' | 'diamond' | 'dot' | 'none' | 'normal' | 'odiamond' | 'odot' | 'onormal' | 'open' | 'vee';
|
|
32
32
|
export declare function isArrowType(item: unknown): item is ArrowType;
|
|
@@ -39,6 +39,9 @@ export declare function isCustomColorValue(item: unknown): item is CustomColorVa
|
|
|
39
39
|
export type DeploymentElement = DeployedInstance | DeploymentNode;
|
|
40
40
|
export declare const DeploymentElement = "DeploymentElement";
|
|
41
41
|
export declare function isDeploymentElement(item: unknown): item is DeploymentElement;
|
|
42
|
+
export type DeploymentNodeOrElementKind = DeploymentNodeKind | ElementKind;
|
|
43
|
+
export declare const DeploymentNodeOrElementKind = "DeploymentNodeOrElementKind";
|
|
44
|
+
export declare function isDeploymentNodeOrElementKind(item: unknown): item is DeploymentNodeOrElementKind;
|
|
42
45
|
export type DeploymentViewRule = DeploymentViewRulePredicate | DeploymentViewRuleStyle | ViewRuleAutoLayout;
|
|
43
46
|
export declare const DeploymentViewRule = "DeploymentViewRule";
|
|
44
47
|
export declare function isDeploymentViewRule(item: unknown): item is DeploymentViewRule;
|
|
@@ -72,7 +75,7 @@ export declare const FqnReferenceable = "FqnReferenceable";
|
|
|
72
75
|
export declare function isFqnReferenceable(item: unknown): item is FqnReferenceable;
|
|
73
76
|
export type IconId = string;
|
|
74
77
|
export declare function isIconId(item: unknown): item is IconId;
|
|
75
|
-
export type Id = 'deployment' | 'element' | 'group' | 'instance' | 'model' | 'node' | ArrowType | ElementShape | LineOptions | ThemeColor | string;
|
|
78
|
+
export type Id = 'deployment' | 'element' | 'group' | 'instance' | 'model' | 'node' | ArrowType | ElementShape | LineOptions | Participant | ThemeColor | string;
|
|
76
79
|
export declare function isId(item: unknown): item is Id;
|
|
77
80
|
export type LikeC4View = DeploymentView | DynamicView | ElementView;
|
|
78
81
|
export declare const LikeC4View = "LikeC4View";
|
|
@@ -82,6 +85,8 @@ export declare function isLineOptions(item: unknown): item is LineOptions;
|
|
|
82
85
|
export type MetadataProperty = MetadataBody;
|
|
83
86
|
export declare const MetadataProperty = "MetadataProperty";
|
|
84
87
|
export declare function isMetadataProperty(item: unknown): item is MetadataProperty;
|
|
88
|
+
export type Participant = 'source' | 'target';
|
|
89
|
+
export declare function isParticipant(item: unknown): item is Participant;
|
|
85
90
|
export type Predicate = ElementPredicate | RelationPredicate;
|
|
86
91
|
export declare const Predicate = "Predicate";
|
|
87
92
|
export declare function isPredicate(item: unknown): item is Predicate;
|
|
@@ -144,16 +149,16 @@ export declare function isWhereElementExpression(item: unknown): item is WhereEl
|
|
|
144
149
|
export type WhereExpression = WhereElementExpression | WhereRelationExpression;
|
|
145
150
|
export declare const WhereExpression = "WhereExpression";
|
|
146
151
|
export declare function isWhereExpression(item: unknown): item is WhereExpression;
|
|
147
|
-
export type WhereKindEqual = WhereElementKind | WhereRelationKind;
|
|
152
|
+
export type WhereKindEqual = WhereElementKind | WhereRelationKind | WhereRelationParticipantKind;
|
|
148
153
|
export declare const WhereKindEqual = "WhereKindEqual";
|
|
149
154
|
export declare function isWhereKindEqual(item: unknown): item is WhereKindEqual;
|
|
150
|
-
export type WhereRelation = WhereRelationKind | WhereRelationTag;
|
|
155
|
+
export type WhereRelation = WhereRelationKind | WhereRelationParticipantKind | WhereRelationParticipantTag | WhereRelationTag;
|
|
151
156
|
export declare const WhereRelation = "WhereRelation";
|
|
152
157
|
export declare function isWhereRelation(item: unknown): item is WhereRelation;
|
|
153
158
|
export type WhereRelationExpression = WhereBinaryExpression | WhereRelation | WhereRelationNegation;
|
|
154
159
|
export declare const WhereRelationExpression = "WhereRelationExpression";
|
|
155
160
|
export declare function isWhereRelationExpression(item: unknown): item is WhereRelationExpression;
|
|
156
|
-
export type WhereTagEqual = WhereElementTag | WhereRelationTag;
|
|
161
|
+
export type WhereTagEqual = WhereElementTag | WhereRelationParticipantTag | WhereRelationTag;
|
|
157
162
|
export declare const WhereTagEqual = "WhereTagEqual";
|
|
158
163
|
export declare function isWhereTagEqual(item: unknown): item is WhereTagEqual;
|
|
159
164
|
export interface ArrowProperty extends AstNode {
|
|
@@ -1079,6 +1084,26 @@ export interface WhereRelationNegation extends AstNode {
|
|
|
1079
1084
|
}
|
|
1080
1085
|
export declare const WhereRelationNegation = "WhereRelationNegation";
|
|
1081
1086
|
export declare function isWhereRelationNegation(item: unknown): item is WhereRelationNegation;
|
|
1087
|
+
export interface WhereRelationParticipantKind extends AstNode {
|
|
1088
|
+
readonly $container: RelationPredicateWhere | RelationPredicateWhereV2 | WhereBinaryExpression | WhereRelationNegation;
|
|
1089
|
+
readonly $type: 'WhereRelationParticipantKind';
|
|
1090
|
+
not: boolean;
|
|
1091
|
+
operator: 'is' | string;
|
|
1092
|
+
participant: Participant;
|
|
1093
|
+
value?: Reference<DeploymentNodeOrElementKind>;
|
|
1094
|
+
}
|
|
1095
|
+
export declare const WhereRelationParticipantKind = "WhereRelationParticipantKind";
|
|
1096
|
+
export declare function isWhereRelationParticipantKind(item: unknown): item is WhereRelationParticipantKind;
|
|
1097
|
+
export interface WhereRelationParticipantTag extends AstNode {
|
|
1098
|
+
readonly $container: RelationPredicateWhere | RelationPredicateWhereV2 | WhereBinaryExpression | WhereRelationNegation;
|
|
1099
|
+
readonly $type: 'WhereRelationParticipantTag';
|
|
1100
|
+
not: boolean;
|
|
1101
|
+
operator: 'is' | string;
|
|
1102
|
+
participant: Participant;
|
|
1103
|
+
value?: Reference<Tag>;
|
|
1104
|
+
}
|
|
1105
|
+
export declare const WhereRelationParticipantTag = "WhereRelationParticipantTag";
|
|
1106
|
+
export declare function isWhereRelationParticipantTag(item: unknown): item is WhereRelationParticipantTag;
|
|
1082
1107
|
export interface WhereRelationTag extends AstNode {
|
|
1083
1108
|
readonly $container: RelationPredicateWhere | RelationPredicateWhereV2 | WhereBinaryExpression | WhereRelationNegation;
|
|
1084
1109
|
readonly $type: 'WhereRelationTag';
|
|
@@ -1108,6 +1133,7 @@ export type LikeC4AstType = {
|
|
|
1108
1133
|
DeploymentNode: DeploymentNode;
|
|
1109
1134
|
DeploymentNodeBody: DeploymentNodeBody;
|
|
1110
1135
|
DeploymentNodeKind: DeploymentNodeKind;
|
|
1136
|
+
DeploymentNodeOrElementKind: DeploymentNodeOrElementKind;
|
|
1111
1137
|
DeploymentRelation: DeploymentRelation;
|
|
1112
1138
|
DeploymentRelationBody: DeploymentRelationBody;
|
|
1113
1139
|
DeploymentView: DeploymentView;
|
|
@@ -1242,6 +1268,8 @@ export type LikeC4AstType = {
|
|
|
1242
1268
|
WhereRelationExpression: WhereRelationExpression;
|
|
1243
1269
|
WhereRelationKind: WhereRelationKind;
|
|
1244
1270
|
WhereRelationNegation: WhereRelationNegation;
|
|
1271
|
+
WhereRelationParticipantKind: WhereRelationParticipantKind;
|
|
1272
|
+
WhereRelationParticipantTag: WhereRelationParticipantTag;
|
|
1245
1273
|
WhereRelationTag: WhereRelationTag;
|
|
1246
1274
|
WhereTagEqual: WhereTagEqual;
|
|
1247
1275
|
WildcardExpression: WildcardExpression;
|
package/dist/generated/ast.js
CHANGED
|
@@ -36,6 +36,10 @@ export const DeploymentElement = "DeploymentElement";
|
|
|
36
36
|
export function isDeploymentElement(item) {
|
|
37
37
|
return reflection.isInstance(item, DeploymentElement);
|
|
38
38
|
}
|
|
39
|
+
export const DeploymentNodeOrElementKind = "DeploymentNodeOrElementKind";
|
|
40
|
+
export function isDeploymentNodeOrElementKind(item) {
|
|
41
|
+
return reflection.isInstance(item, DeploymentNodeOrElementKind);
|
|
42
|
+
}
|
|
39
43
|
export const DeploymentViewRule = "DeploymentViewRule";
|
|
40
44
|
export function isDeploymentViewRule(item) {
|
|
41
45
|
return reflection.isInstance(item, DeploymentViewRule);
|
|
@@ -82,7 +86,7 @@ export function isIconId(item) {
|
|
|
82
86
|
return typeof item === "string" && /(aws|azure|gcp|tech):[-\w]*/.test(item);
|
|
83
87
|
}
|
|
84
88
|
export function isId(item) {
|
|
85
|
-
return isElementShape(item) || isThemeColor(item) || isArrowType(item) || isLineOptions(item) || item === "element" || item === "model" || item === "group" || item === "node" || item === "deployment" || item === "instance" || typeof item === "string" && /[_]*[a-zA-Z][-\w]*/.test(item);
|
|
89
|
+
return isElementShape(item) || isThemeColor(item) || isArrowType(item) || isLineOptions(item) || isParticipant(item) || item === "element" || item === "model" || item === "group" || item === "node" || item === "deployment" || item === "instance" || typeof item === "string" && /[_]*[a-zA-Z][-\w]*/.test(item);
|
|
86
90
|
}
|
|
87
91
|
export const LikeC4View = "LikeC4View";
|
|
88
92
|
export function isLikeC4View(item) {
|
|
@@ -95,6 +99,9 @@ export const MetadataProperty = "MetadataProperty";
|
|
|
95
99
|
export function isMetadataProperty(item) {
|
|
96
100
|
return reflection.isInstance(item, MetadataProperty);
|
|
97
101
|
}
|
|
102
|
+
export function isParticipant(item) {
|
|
103
|
+
return item === "source" || item === "target";
|
|
104
|
+
}
|
|
98
105
|
export const Predicate = "Predicate";
|
|
99
106
|
export function isPredicate(item) {
|
|
100
107
|
return reflection.isInstance(item, Predicate);
|
|
@@ -647,6 +654,14 @@ export const WhereRelationNegation = "WhereRelationNegation";
|
|
|
647
654
|
export function isWhereRelationNegation(item) {
|
|
648
655
|
return reflection.isInstance(item, WhereRelationNegation);
|
|
649
656
|
}
|
|
657
|
+
export const WhereRelationParticipantKind = "WhereRelationParticipantKind";
|
|
658
|
+
export function isWhereRelationParticipantKind(item) {
|
|
659
|
+
return reflection.isInstance(item, WhereRelationParticipantKind);
|
|
660
|
+
}
|
|
661
|
+
export const WhereRelationParticipantTag = "WhereRelationParticipantTag";
|
|
662
|
+
export function isWhereRelationParticipantTag(item) {
|
|
663
|
+
return reflection.isInstance(item, WhereRelationParticipantTag);
|
|
664
|
+
}
|
|
650
665
|
export const WhereRelationTag = "WhereRelationTag";
|
|
651
666
|
export function isWhereRelationTag(item) {
|
|
652
667
|
return reflection.isInstance(item, WhereRelationTag);
|
|
@@ -657,7 +672,7 @@ export function isWildcardExpression(item) {
|
|
|
657
672
|
}
|
|
658
673
|
export class LikeC4AstReflection extends AbstractAstReflection {
|
|
659
674
|
getAllTypes() {
|
|
660
|
-
return [ArrowProperty, BorderProperty, ColorProperty, CustomColor, CustomElementProperties, CustomRelationProperties, DeployedInstance, DeployedInstanceBody, DeploymentElement, DeploymentNode, DeploymentNodeBody, DeploymentNodeKind, DeploymentRelation, DeploymentRelationBody, DeploymentView, DeploymentViewBody, DeploymentViewRule, DeploymentViewRulePredicate, DeploymentViewRulePredicateExpression, DeploymentViewRuleStyle, DirectedRelationExpr, DirectedRelationExpression, DynamicView, DynamicViewBody, DynamicViewGlobalPredicateRef, DynamicViewIncludePredicate, DynamicViewParallelSteps, DynamicViewPredicateIterator, DynamicViewRef, DynamicViewRule, DynamicViewStep, Element, ElementBody, ElementDescedantsExpression, ElementExpression, ElementExpressionsIterator, ElementKind, ElementKindExpression, ElementPredicate, ElementPredicateOrWhere, ElementPredicateWhere, ElementPredicateWith, ElementProperty, ElementRef, ElementStringProperty, ElementStyleProperty, ElementTagExpression, ElementView, ElementViewBody, ElementViewRef, ExcludePredicate, ExpandElementExpression, ExpressionV2, ExtendElement, ExtendElementBody, FqnElementRef, FqnExpr, FqnExpressions, FqnRef, FqnRefExpr, FqnReferenceable, GlobalDynamicPredicateGroup, GlobalPredicateGroup, GlobalStyle, GlobalStyleGroup, GlobalStyleId, Globals, IconProperty, InOutRelationExpr, InOutRelationExpression, IncludePredicate, IncomingRelationExpr, IncomingRelationExpression, LibIcon, LikeC4Grammar, LikeC4Lib, LikeC4View, LineProperty, LinkProperty, MetadataAttribute, MetadataBody, MetadataProperty, Model, ModelDeployments, ModelViews, NavigateToProperty, NotationProperty, NotesProperty, OpacityProperty, OutgoingRelationExpr, OutgoingRelationExpression, Predicate, Predicates, Referenceable, Relation, RelationBody, RelationExpr, RelationExpression, RelationNavigateToProperty, RelationPredicate, RelationPredicateOrWhere, RelationPredicateOrWhereV2, RelationPredicateWhere, RelationPredicateWhereV2, RelationPredicateWith, RelationProperty, RelationStringProperty, RelationStyleProperty, RelationshipKind, RelationshipStyleProperty, ShapeProperty, SpecificationColor, SpecificationDeploymentNodeKind, SpecificationElementKind, SpecificationElementStringProperty, SpecificationRelationshipKind, SpecificationRelationshipStringProperty, SpecificationRule, SpecificationTag, StringProperty, StyleProperty, Tag, Tags, ViewProperty, ViewRef, ViewRule, ViewRuleAutoLayout, ViewRuleGlobalPredicateRef, ViewRuleGlobalStyle, ViewRuleGroup, ViewRulePredicate, ViewRuleStyle, ViewRuleStyleOrGlobalRef, ViewStringProperty, WhereBinaryExpression, WhereElement, WhereElementExpression, WhereElementKind, WhereElementNegation, WhereElementTag, WhereExpression, WhereKindEqual, WhereRelation, WhereRelationExpression, WhereRelationKind, WhereRelationNegation, WhereRelationTag, WhereTagEqual, WildcardExpression];
|
|
675
|
+
return [ArrowProperty, BorderProperty, ColorProperty, CustomColor, CustomElementProperties, CustomRelationProperties, DeployedInstance, DeployedInstanceBody, DeploymentElement, DeploymentNode, DeploymentNodeBody, DeploymentNodeKind, DeploymentNodeOrElementKind, DeploymentRelation, DeploymentRelationBody, DeploymentView, DeploymentViewBody, DeploymentViewRule, DeploymentViewRulePredicate, DeploymentViewRulePredicateExpression, DeploymentViewRuleStyle, DirectedRelationExpr, DirectedRelationExpression, DynamicView, DynamicViewBody, DynamicViewGlobalPredicateRef, DynamicViewIncludePredicate, DynamicViewParallelSteps, DynamicViewPredicateIterator, DynamicViewRef, DynamicViewRule, DynamicViewStep, Element, ElementBody, ElementDescedantsExpression, ElementExpression, ElementExpressionsIterator, ElementKind, ElementKindExpression, ElementPredicate, ElementPredicateOrWhere, ElementPredicateWhere, ElementPredicateWith, ElementProperty, ElementRef, ElementStringProperty, ElementStyleProperty, ElementTagExpression, ElementView, ElementViewBody, ElementViewRef, ExcludePredicate, ExpandElementExpression, ExpressionV2, ExtendElement, ExtendElementBody, FqnElementRef, FqnExpr, FqnExpressions, FqnRef, FqnRefExpr, FqnReferenceable, GlobalDynamicPredicateGroup, GlobalPredicateGroup, GlobalStyle, GlobalStyleGroup, GlobalStyleId, Globals, IconProperty, InOutRelationExpr, InOutRelationExpression, IncludePredicate, IncomingRelationExpr, IncomingRelationExpression, LibIcon, LikeC4Grammar, LikeC4Lib, LikeC4View, LineProperty, LinkProperty, MetadataAttribute, MetadataBody, MetadataProperty, Model, ModelDeployments, ModelViews, NavigateToProperty, NotationProperty, NotesProperty, OpacityProperty, OutgoingRelationExpr, OutgoingRelationExpression, Predicate, Predicates, Referenceable, Relation, RelationBody, RelationExpr, RelationExpression, RelationNavigateToProperty, RelationPredicate, RelationPredicateOrWhere, RelationPredicateOrWhereV2, RelationPredicateWhere, RelationPredicateWhereV2, RelationPredicateWith, RelationProperty, RelationStringProperty, RelationStyleProperty, RelationshipKind, RelationshipStyleProperty, ShapeProperty, SpecificationColor, SpecificationDeploymentNodeKind, SpecificationElementKind, SpecificationElementStringProperty, SpecificationRelationshipKind, SpecificationRelationshipStringProperty, SpecificationRule, SpecificationTag, StringProperty, StyleProperty, Tag, Tags, ViewProperty, ViewRef, ViewRule, ViewRuleAutoLayout, ViewRuleGlobalPredicateRef, ViewRuleGlobalStyle, ViewRuleGroup, ViewRulePredicate, ViewRuleStyle, ViewRuleStyleOrGlobalRef, ViewStringProperty, WhereBinaryExpression, WhereElement, WhereElementExpression, WhereElementKind, WhereElementNegation, WhereElementTag, WhereExpression, WhereKindEqual, WhereRelation, WhereRelationExpression, WhereRelationKind, WhereRelationNegation, WhereRelationParticipantKind, WhereRelationParticipantTag, WhereRelationTag, WhereTagEqual, WildcardExpression];
|
|
661
676
|
}
|
|
662
677
|
computeIsSubtype(subtype, supertype) {
|
|
663
678
|
switch (subtype) {
|
|
@@ -677,6 +692,10 @@ export class LikeC4AstReflection extends AbstractAstReflection {
|
|
|
677
692
|
case DeploymentNode: {
|
|
678
693
|
return this.isSubtype(DeploymentElement, supertype) || this.isSubtype(Referenceable, supertype);
|
|
679
694
|
}
|
|
695
|
+
case DeploymentNodeKind:
|
|
696
|
+
case ElementKind: {
|
|
697
|
+
return this.isSubtype(DeploymentNodeOrElementKind, supertype);
|
|
698
|
+
}
|
|
680
699
|
case DeploymentView:
|
|
681
700
|
case DynamicView:
|
|
682
701
|
case ElementView: {
|
|
@@ -822,9 +841,11 @@ export class LikeC4AstReflection extends AbstractAstReflection {
|
|
|
822
841
|
case WhereRelationNegation: {
|
|
823
842
|
return this.isSubtype(WhereRelationExpression, supertype);
|
|
824
843
|
}
|
|
825
|
-
case WhereRelationKind:
|
|
844
|
+
case WhereRelationKind:
|
|
845
|
+
case WhereRelationParticipantKind: {
|
|
826
846
|
return this.isSubtype(WhereKindEqual, supertype) || this.isSubtype(WhereRelation, supertype);
|
|
827
847
|
}
|
|
848
|
+
case WhereRelationParticipantTag:
|
|
828
849
|
case WhereRelationTag: {
|
|
829
850
|
return this.isSubtype(WhereRelation, supertype) || this.isSubtype(WhereTagEqual, supertype);
|
|
830
851
|
}
|
|
@@ -871,6 +892,7 @@ export class LikeC4AstReflection extends AbstractAstReflection {
|
|
|
871
892
|
case "ElementTagExpression:tag":
|
|
872
893
|
case "Tags:values":
|
|
873
894
|
case "WhereElementTag:value":
|
|
895
|
+
case "WhereRelationParticipantTag:value":
|
|
874
896
|
case "WhereRelationTag:value": {
|
|
875
897
|
return Tag;
|
|
876
898
|
}
|
|
@@ -892,6 +914,9 @@ export class LikeC4AstReflection extends AbstractAstReflection {
|
|
|
892
914
|
case "ViewRuleGlobalStyle:style": {
|
|
893
915
|
return GlobalStyleId;
|
|
894
916
|
}
|
|
917
|
+
case "WhereRelationParticipantKind:value": {
|
|
918
|
+
return DeploymentNodeOrElementKind;
|
|
919
|
+
}
|
|
895
920
|
default: {
|
|
896
921
|
throw new Error(`${referenceId} is not a valid reference id.`);
|
|
897
922
|
}
|
|
@@ -1936,6 +1961,28 @@ export class LikeC4AstReflection extends AbstractAstReflection {
|
|
|
1936
1961
|
]
|
|
1937
1962
|
};
|
|
1938
1963
|
}
|
|
1964
|
+
case WhereRelationParticipantKind: {
|
|
1965
|
+
return {
|
|
1966
|
+
name: WhereRelationParticipantKind,
|
|
1967
|
+
properties: [
|
|
1968
|
+
{ name: "not", defaultValue: false },
|
|
1969
|
+
{ name: "operator" },
|
|
1970
|
+
{ name: "participant" },
|
|
1971
|
+
{ name: "value" }
|
|
1972
|
+
]
|
|
1973
|
+
};
|
|
1974
|
+
}
|
|
1975
|
+
case WhereRelationParticipantTag: {
|
|
1976
|
+
return {
|
|
1977
|
+
name: WhereRelationParticipantTag,
|
|
1978
|
+
properties: [
|
|
1979
|
+
{ name: "not", defaultValue: false },
|
|
1980
|
+
{ name: "operator" },
|
|
1981
|
+
{ name: "participant" },
|
|
1982
|
+
{ name: "value" }
|
|
1983
|
+
]
|
|
1984
|
+
};
|
|
1985
|
+
}
|
|
1939
1986
|
case WhereRelationTag: {
|
|
1940
1987
|
return {
|
|
1941
1988
|
name: WhereRelationTag,
|