@likec4/language-server 1.19.1 → 1.19.2
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/dist/generated/ast.d.ts +22 -9
- package/dist/generated/ast.js +23 -2
- package/dist/generated/grammar.js +1 -1
- package/dist/like-c4.langium +4 -1
- package/dist/model/model-parser.d.ts +5 -0
- package/dist/model/parser/DeploymentModelParser.d.ts +1 -0
- package/dist/model/parser/DeploymentViewParser.d.ts +2 -1
- package/dist/model/parser/DeploymentViewParser.js +3 -0
- package/dist/model/parser/FqnRefParser.d.ts +1 -0
- package/dist/model/parser/FqnRefParser.js +13 -0
- package/dist/model/parser/GlobalsParser.d.ts +1 -0
- package/dist/model/parser/ViewsParser.d.ts +1 -0
- package/dist/validation/index.d.ts +1 -1
- package/package.json +7 -7
- package/src/generated/ast.ts +47 -11
- package/src/generated/grammar.ts +1 -1
- package/src/like-c4.langium +4 -1
- package/src/model/parser/DeploymentViewParser.ts +10 -7
- package/src/model/parser/FqnRefParser.ts +14 -0
package/dist/generated/ast.d.ts
CHANGED
|
@@ -61,7 +61,7 @@ export declare const ElementProperty = "ElementProperty";
|
|
|
61
61
|
export declare function isElementProperty(item: unknown): item is ElementProperty;
|
|
62
62
|
export type ElementShape = 'browser' | 'cylinder' | 'mobile' | 'person' | 'queue' | 'rectangle' | 'storage';
|
|
63
63
|
export declare function isElementShape(item: unknown): item is ElementShape;
|
|
64
|
-
export type ExpressionV2 = FqnExpr |
|
|
64
|
+
export type ExpressionV2 = FqnExpr | RelationPredicateOrWhereV2;
|
|
65
65
|
export declare const ExpressionV2 = "ExpressionV2";
|
|
66
66
|
export declare function isExpressionV2(item: unknown): item is ExpressionV2;
|
|
67
67
|
export type FqnExpr = FqnRefExpr | WildcardExpression;
|
|
@@ -100,6 +100,9 @@ export declare function isRelationPredicate(item: unknown): item is RelationPred
|
|
|
100
100
|
export type RelationPredicateOrWhere = RelationExpression | RelationPredicateWhere;
|
|
101
101
|
export declare const RelationPredicateOrWhere = "RelationPredicateOrWhere";
|
|
102
102
|
export declare function isRelationPredicateOrWhere(item: unknown): item is RelationPredicateOrWhere;
|
|
103
|
+
export type RelationPredicateOrWhereV2 = RelationExpr | RelationPredicateWhereV2;
|
|
104
|
+
export declare const RelationPredicateOrWhereV2 = "RelationPredicateOrWhereV2";
|
|
105
|
+
export declare function isRelationPredicateOrWhereV2(item: unknown): item is RelationPredicateOrWhereV2;
|
|
103
106
|
export type RelationProperty = LinkProperty | MetadataProperty | RelationNavigateToProperty | RelationStringProperty | RelationStyleProperty;
|
|
104
107
|
export declare const RelationProperty = "RelationProperty";
|
|
105
108
|
export declare function isRelationProperty(item: unknown): item is RelationProperty;
|
|
@@ -306,7 +309,7 @@ export interface DeploymentViewRuleStyle extends AstNode {
|
|
|
306
309
|
export declare const DeploymentViewRuleStyle = "DeploymentViewRuleStyle";
|
|
307
310
|
export declare function isDeploymentViewRuleStyle(item: unknown): item is DeploymentViewRuleStyle;
|
|
308
311
|
export interface DirectedRelationExpr extends AstNode {
|
|
309
|
-
readonly $container: DeploymentViewRulePredicateExpression;
|
|
312
|
+
readonly $container: DeploymentViewRulePredicateExpression | RelationPredicateWhereV2;
|
|
310
313
|
readonly $type: 'DirectedRelationExpr';
|
|
311
314
|
source: OutgoingRelationExpr;
|
|
312
315
|
target: FqnExpr;
|
|
@@ -638,7 +641,7 @@ export interface IncludePredicate extends AstNode {
|
|
|
638
641
|
export declare const IncludePredicate = "IncludePredicate";
|
|
639
642
|
export declare function isIncludePredicate(item: unknown): item is IncludePredicate;
|
|
640
643
|
export interface IncomingRelationExpr extends AstNode {
|
|
641
|
-
readonly $container: DeploymentViewRulePredicateExpression | InOutRelationExpr;
|
|
644
|
+
readonly $container: DeploymentViewRulePredicateExpression | InOutRelationExpr | RelationPredicateWhereV2;
|
|
642
645
|
readonly $type: 'IncomingRelationExpr';
|
|
643
646
|
to: FqnExpr;
|
|
644
647
|
}
|
|
@@ -652,7 +655,7 @@ export interface IncomingRelationExpression extends AstNode {
|
|
|
652
655
|
export declare const IncomingRelationExpression = "IncomingRelationExpression";
|
|
653
656
|
export declare function isIncomingRelationExpression(item: unknown): item is IncomingRelationExpression;
|
|
654
657
|
export interface InOutRelationExpr extends AstNode {
|
|
655
|
-
readonly $container: DeploymentViewRulePredicateExpression;
|
|
658
|
+
readonly $container: DeploymentViewRulePredicateExpression | RelationPredicateWhereV2;
|
|
656
659
|
readonly $type: 'InOutRelationExpr';
|
|
657
660
|
inout: IncomingRelationExpr;
|
|
658
661
|
}
|
|
@@ -780,7 +783,7 @@ export interface OpacityProperty extends AstNode {
|
|
|
780
783
|
export declare const OpacityProperty = "OpacityProperty";
|
|
781
784
|
export declare function isOpacityProperty(item: unknown): item is OpacityProperty;
|
|
782
785
|
export interface OutgoingRelationExpr extends AstNode {
|
|
783
|
-
readonly $container: DeploymentViewRulePredicateExpression | DirectedRelationExpr;
|
|
786
|
+
readonly $container: DeploymentViewRulePredicateExpression | DirectedRelationExpr | RelationPredicateWhereV2;
|
|
784
787
|
readonly $type: 'OutgoingRelationExpr';
|
|
785
788
|
from: FqnExpr;
|
|
786
789
|
isBidirectional: boolean;
|
|
@@ -842,6 +845,14 @@ export interface RelationPredicateWhere extends AstNode {
|
|
|
842
845
|
}
|
|
843
846
|
export declare const RelationPredicateWhere = "RelationPredicateWhere";
|
|
844
847
|
export declare function isRelationPredicateWhere(item: unknown): item is RelationPredicateWhere;
|
|
848
|
+
export interface RelationPredicateWhereV2 extends AstNode {
|
|
849
|
+
readonly $container: DeploymentViewRulePredicateExpression;
|
|
850
|
+
readonly $type: 'RelationPredicateWhereV2';
|
|
851
|
+
subject: RelationExpr;
|
|
852
|
+
where?: WhereRelationExpression;
|
|
853
|
+
}
|
|
854
|
+
export declare const RelationPredicateWhereV2 = "RelationPredicateWhereV2";
|
|
855
|
+
export declare function isRelationPredicateWhereV2(item: unknown): item is RelationPredicateWhereV2;
|
|
845
856
|
export interface RelationPredicateWith extends AstNode {
|
|
846
857
|
readonly $container: Predicates;
|
|
847
858
|
readonly $type: 'RelationPredicateWith';
|
|
@@ -1019,7 +1030,7 @@ export interface ViewStringProperty extends AstNode {
|
|
|
1019
1030
|
export declare const ViewStringProperty = "ViewStringProperty";
|
|
1020
1031
|
export declare function isViewStringProperty(item: unknown): item is ViewStringProperty;
|
|
1021
1032
|
export interface WhereBinaryExpression extends AstNode {
|
|
1022
|
-
readonly $container: ElementPredicateWhere | RelationPredicateWhere | WhereBinaryExpression | WhereElementNegation | WhereRelationNegation;
|
|
1033
|
+
readonly $container: ElementPredicateWhere | RelationPredicateWhere | RelationPredicateWhereV2 | WhereBinaryExpression | WhereElementNegation | WhereRelationNegation;
|
|
1023
1034
|
readonly $type: 'WhereBinaryExpression';
|
|
1024
1035
|
left: WhereElementExpression | WhereRelationExpression;
|
|
1025
1036
|
operator: 'and' | 'or';
|
|
@@ -1053,7 +1064,7 @@ export interface WhereElementTag extends AstNode {
|
|
|
1053
1064
|
export declare const WhereElementTag = "WhereElementTag";
|
|
1054
1065
|
export declare function isWhereElementTag(item: unknown): item is WhereElementTag;
|
|
1055
1066
|
export interface WhereRelationKind extends AstNode {
|
|
1056
|
-
readonly $container: RelationPredicateWhere | WhereBinaryExpression | WhereRelationNegation;
|
|
1067
|
+
readonly $container: RelationPredicateWhere | RelationPredicateWhereV2 | WhereBinaryExpression | WhereRelationNegation;
|
|
1057
1068
|
readonly $type: 'WhereRelationKind';
|
|
1058
1069
|
not: boolean;
|
|
1059
1070
|
operator: 'is' | string;
|
|
@@ -1062,14 +1073,14 @@ export interface WhereRelationKind extends AstNode {
|
|
|
1062
1073
|
export declare const WhereRelationKind = "WhereRelationKind";
|
|
1063
1074
|
export declare function isWhereRelationKind(item: unknown): item is WhereRelationKind;
|
|
1064
1075
|
export interface WhereRelationNegation extends AstNode {
|
|
1065
|
-
readonly $container: RelationPredicateWhere | WhereBinaryExpression | WhereRelationNegation;
|
|
1076
|
+
readonly $container: RelationPredicateWhere | RelationPredicateWhereV2 | WhereBinaryExpression | WhereRelationNegation;
|
|
1066
1077
|
readonly $type: 'WhereRelationNegation';
|
|
1067
1078
|
value: WhereRelationExpression;
|
|
1068
1079
|
}
|
|
1069
1080
|
export declare const WhereRelationNegation = "WhereRelationNegation";
|
|
1070
1081
|
export declare function isWhereRelationNegation(item: unknown): item is WhereRelationNegation;
|
|
1071
1082
|
export interface WhereRelationTag extends AstNode {
|
|
1072
|
-
readonly $container: RelationPredicateWhere | WhereBinaryExpression | WhereRelationNegation;
|
|
1083
|
+
readonly $container: RelationPredicateWhere | RelationPredicateWhereV2 | WhereBinaryExpression | WhereRelationNegation;
|
|
1073
1084
|
readonly $type: 'WhereRelationTag';
|
|
1074
1085
|
not: boolean;
|
|
1075
1086
|
operator: 'is' | string;
|
|
@@ -1186,7 +1197,9 @@ export type LikeC4AstType = {
|
|
|
1186
1197
|
RelationNavigateToProperty: RelationNavigateToProperty;
|
|
1187
1198
|
RelationPredicate: RelationPredicate;
|
|
1188
1199
|
RelationPredicateOrWhere: RelationPredicateOrWhere;
|
|
1200
|
+
RelationPredicateOrWhereV2: RelationPredicateOrWhereV2;
|
|
1189
1201
|
RelationPredicateWhere: RelationPredicateWhere;
|
|
1202
|
+
RelationPredicateWhereV2: RelationPredicateWhereV2;
|
|
1190
1203
|
RelationPredicateWith: RelationPredicateWith;
|
|
1191
1204
|
RelationProperty: RelationProperty;
|
|
1192
1205
|
RelationStringProperty: RelationStringProperty;
|
package/dist/generated/ast.js
CHANGED
|
@@ -119,6 +119,10 @@ export const RelationPredicateOrWhere = "RelationPredicateOrWhere";
|
|
|
119
119
|
export function isRelationPredicateOrWhere(item) {
|
|
120
120
|
return reflection.isInstance(item, RelationPredicateOrWhere);
|
|
121
121
|
}
|
|
122
|
+
export const RelationPredicateOrWhereV2 = "RelationPredicateOrWhereV2";
|
|
123
|
+
export function isRelationPredicateOrWhereV2(item) {
|
|
124
|
+
return reflection.isInstance(item, RelationPredicateOrWhereV2);
|
|
125
|
+
}
|
|
122
126
|
export const RelationProperty = "RelationProperty";
|
|
123
127
|
export function isRelationProperty(item) {
|
|
124
128
|
return reflection.isInstance(item, RelationProperty);
|
|
@@ -527,6 +531,10 @@ export const RelationPredicateWhere = "RelationPredicateWhere";
|
|
|
527
531
|
export function isRelationPredicateWhere(item) {
|
|
528
532
|
return reflection.isInstance(item, RelationPredicateWhere);
|
|
529
533
|
}
|
|
534
|
+
export const RelationPredicateWhereV2 = "RelationPredicateWhereV2";
|
|
535
|
+
export function isRelationPredicateWhereV2(item) {
|
|
536
|
+
return reflection.isInstance(item, RelationPredicateWhereV2);
|
|
537
|
+
}
|
|
530
538
|
export const RelationPredicateWith = "RelationPredicateWith";
|
|
531
539
|
export function isRelationPredicateWith(item) {
|
|
532
540
|
return reflection.isInstance(item, RelationPredicateWith);
|
|
@@ -649,7 +657,7 @@ export function isWildcardExpression(item) {
|
|
|
649
657
|
}
|
|
650
658
|
export class LikeC4AstReflection extends AbstractAstReflection {
|
|
651
659
|
getAllTypes() {
|
|
652
|
-
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, RelationPredicateWhere, 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];
|
|
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];
|
|
653
661
|
}
|
|
654
662
|
computeIsSubtype(subtype, supertype) {
|
|
655
663
|
switch (subtype) {
|
|
@@ -731,7 +739,7 @@ export class LikeC4AstReflection extends AbstractAstReflection {
|
|
|
731
739
|
return this.isSubtype(FqnReferenceable, supertype);
|
|
732
740
|
}
|
|
733
741
|
case FqnExpr:
|
|
734
|
-
case
|
|
742
|
+
case RelationPredicateOrWhereV2: {
|
|
735
743
|
return this.isSubtype(ExpressionV2, supertype);
|
|
736
744
|
}
|
|
737
745
|
case FqnRefExpr: {
|
|
@@ -756,6 +764,10 @@ export class LikeC4AstReflection extends AbstractAstReflection {
|
|
|
756
764
|
case MetadataProperty: {
|
|
757
765
|
return this.isSubtype(ElementProperty, supertype) || this.isSubtype(RelationProperty, supertype);
|
|
758
766
|
}
|
|
767
|
+
case RelationExpr:
|
|
768
|
+
case RelationPredicateWhereV2: {
|
|
769
|
+
return this.isSubtype(RelationPredicateOrWhereV2, supertype);
|
|
770
|
+
}
|
|
759
771
|
case RelationExpression:
|
|
760
772
|
case RelationPredicateWhere: {
|
|
761
773
|
return this.isSubtype(RelationPredicateOrWhere, supertype);
|
|
@@ -1661,6 +1673,15 @@ export class LikeC4AstReflection extends AbstractAstReflection {
|
|
|
1661
1673
|
]
|
|
1662
1674
|
};
|
|
1663
1675
|
}
|
|
1676
|
+
case RelationPredicateWhereV2: {
|
|
1677
|
+
return {
|
|
1678
|
+
name: RelationPredicateWhereV2,
|
|
1679
|
+
properties: [
|
|
1680
|
+
{ name: "subject" },
|
|
1681
|
+
{ name: "where" }
|
|
1682
|
+
]
|
|
1683
|
+
};
|
|
1684
|
+
}
|
|
1664
1685
|
case RelationPredicateWith: {
|
|
1665
1686
|
return {
|
|
1666
1687
|
name: RelationPredicateWith,
|