@likec4/language-server 0.6.0 → 0.6.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.
Files changed (67) hide show
  1. package/package.json +19 -18
  2. package/dist/ast.d.ts +0 -72
  3. package/dist/ast.js +0 -133
  4. package/dist/builtin.d.ts +0 -4
  5. package/dist/builtin.js +0 -8
  6. package/dist/elementRef.d.ts +0 -6
  7. package/dist/elementRef.js +0 -39
  8. package/dist/generated/ast.d.ts +0 -359
  9. package/dist/generated/ast.js +0 -376
  10. package/dist/generated/grammar.d.ts +0 -6
  11. package/dist/generated/grammar.js +0 -2542
  12. package/dist/generated/module.d.ts +0 -9
  13. package/dist/generated/module.js +0 -26
  14. package/dist/index.d.ts +0 -4
  15. package/dist/index.js +0 -15
  16. package/dist/logger.d.ts +0 -8
  17. package/dist/logger.js +0 -20
  18. package/dist/lsp/DocumentSymbolProvider.d.ts +0 -20
  19. package/dist/lsp/DocumentSymbolProvider.js +0 -149
  20. package/dist/lsp/HoverProvider.d.ts +0 -8
  21. package/dist/lsp/HoverProvider.js +0 -54
  22. package/dist/lsp/SemanticTokenProvider.d.ts +0 -6
  23. package/dist/lsp/SemanticTokenProvider.js +0 -221
  24. package/dist/lsp/index.d.ts +0 -3
  25. package/dist/lsp/index.js +0 -3
  26. package/dist/model/fqn-index.d.ts +0 -17
  27. package/dist/model/fqn-index.js +0 -138
  28. package/dist/model/index.d.ts +0 -3
  29. package/dist/model/index.js +0 -3
  30. package/dist/model/model-builder.d.ts +0 -26
  31. package/dist/model/model-builder.js +0 -332
  32. package/dist/model/model-locator.d.ts +0 -16
  33. package/dist/model/model-locator.js +0 -108
  34. package/dist/module.d.ts +0 -18
  35. package/dist/module.js +0 -61
  36. package/dist/protocol.d.ts +0 -35
  37. package/dist/protocol.js +0 -19
  38. package/dist/references/index.d.ts +0 -2
  39. package/dist/references/index.js +0 -2
  40. package/dist/references/scope-computation.d.ts +0 -10
  41. package/dist/references/scope-computation.js +0 -76
  42. package/dist/references/scope-provider.d.ts +0 -15
  43. package/dist/references/scope-provider.js +0 -110
  44. package/dist/registerProtocolHandlers.d.ts +0 -2
  45. package/dist/registerProtocolHandlers.js +0 -49
  46. package/dist/shared/CodeLensProvider.d.ts +0 -8
  47. package/dist/shared/CodeLensProvider.js +0 -35
  48. package/dist/shared/WorkspaceManager.d.ts +0 -13
  49. package/dist/shared/WorkspaceManager.js +0 -19
  50. package/dist/shared/index.d.ts +0 -2
  51. package/dist/shared/index.js +0 -2
  52. package/dist/test/index.d.ts +0 -1
  53. package/dist/test/index.js +0 -1
  54. package/dist/test/testServices.d.ts +0 -15
  55. package/dist/test/testServices.js +0 -57
  56. package/dist/utils.d.ts +0 -2
  57. package/dist/utils.js +0 -7
  58. package/dist/validation/element.d.ts +0 -4
  59. package/dist/validation/element.js +0 -20
  60. package/dist/validation/index.d.ts +0 -2
  61. package/dist/validation/index.js +0 -22
  62. package/dist/validation/relation.d.ts +0 -4
  63. package/dist/validation/relation.js +0 -53
  64. package/dist/validation/specification.d.ts +0 -5
  65. package/dist/validation/specification.js +0 -33
  66. package/dist/validation/view.d.ts +0 -4
  67. package/dist/validation/view.js +0 -20
@@ -1,376 +0,0 @@
1
- /******************************************************************************
2
- * This file was generated by langium-cli 1.1.0.
3
- * DO NOT EDIT MANUALLY!
4
- ******************************************************************************/
5
- /* eslint-disable */
6
- import { AbstractAstReflection } from 'langium';
7
- export const AnyStringProperty = 'AnyStringProperty';
8
- export function isAnyStringProperty(item) {
9
- return reflection.isInstance(item, AnyStringProperty);
10
- }
11
- export const AStyleProperty = 'AStyleProperty';
12
- export function isAStyleProperty(item) {
13
- return reflection.isInstance(item, AStyleProperty);
14
- }
15
- export const ElementExpression = 'ElementExpression';
16
- export function isElementExpression(item) {
17
- return reflection.isInstance(item, ElementExpression);
18
- }
19
- export const ElementProperty = 'ElementProperty';
20
- export function isElementProperty(item) {
21
- return reflection.isInstance(item, ElementProperty);
22
- }
23
- export const Expression = 'Expression';
24
- export function isExpression(item) {
25
- return reflection.isInstance(item, Expression);
26
- }
27
- export const View = 'View';
28
- export function isView(item) {
29
- return reflection.isInstance(item, View);
30
- }
31
- export const ViewRule = 'ViewRule';
32
- export function isViewRule(item) {
33
- return reflection.isInstance(item, ViewRule);
34
- }
35
- export const ColorProperty = 'ColorProperty';
36
- export function isColorProperty(item) {
37
- return reflection.isInstance(item, ColorProperty);
38
- }
39
- export const Element = 'Element';
40
- export function isElement(item) {
41
- return reflection.isInstance(item, Element);
42
- }
43
- export const ElementBody = 'ElementBody';
44
- export function isElementBody(item) {
45
- return reflection.isInstance(item, ElementBody);
46
- }
47
- export const ElementKind = 'ElementKind';
48
- export function isElementKind(item) {
49
- return reflection.isInstance(item, ElementKind);
50
- }
51
- export const ElementRef = 'ElementRef';
52
- export function isElementRef(item) {
53
- return reflection.isInstance(item, ElementRef);
54
- }
55
- export const ElementRefExpression = 'ElementRefExpression';
56
- export function isElementRefExpression(item) {
57
- return reflection.isInstance(item, ElementRefExpression);
58
- }
59
- export const ElementStringProperty = 'ElementStringProperty';
60
- export function isElementStringProperty(item) {
61
- return reflection.isInstance(item, ElementStringProperty);
62
- }
63
- export const ElementStyleProperty = 'ElementStyleProperty';
64
- export function isElementStyleProperty(item) {
65
- return reflection.isInstance(item, ElementStyleProperty);
66
- }
67
- export const ElementView = 'ElementView';
68
- export function isElementView(item) {
69
- return reflection.isInstance(item, ElementView);
70
- }
71
- export const ExtendElement = 'ExtendElement';
72
- export function isExtendElement(item) {
73
- return reflection.isInstance(item, ExtendElement);
74
- }
75
- export const ExtendElementBody = 'ExtendElementBody';
76
- export function isExtendElementBody(item) {
77
- return reflection.isInstance(item, ExtendElementBody);
78
- }
79
- export const IncomingExpression = 'IncomingExpression';
80
- export function isIncomingExpression(item) {
81
- return reflection.isInstance(item, IncomingExpression);
82
- }
83
- export const InOutExpression = 'InOutExpression';
84
- export function isInOutExpression(item) {
85
- return reflection.isInstance(item, InOutExpression);
86
- }
87
- export const LikeC4Document = 'LikeC4Document';
88
- export function isLikeC4Document(item) {
89
- return reflection.isInstance(item, LikeC4Document);
90
- }
91
- export const Model = 'Model';
92
- export function isModel(item) {
93
- return reflection.isInstance(item, Model);
94
- }
95
- export const ModelViews = 'ModelViews';
96
- export function isModelViews(item) {
97
- return reflection.isInstance(item, ModelViews);
98
- }
99
- export const OutgoingExpression = 'OutgoingExpression';
100
- export function isOutgoingExpression(item) {
101
- return reflection.isInstance(item, OutgoingExpression);
102
- }
103
- export const Relation = 'Relation';
104
- export function isRelation(item) {
105
- return reflection.isInstance(item, Relation);
106
- }
107
- export const RelationBody = 'RelationBody';
108
- export function isRelationBody(item) {
109
- return reflection.isInstance(item, RelationBody);
110
- }
111
- export const RelationExpression = 'RelationExpression';
112
- export function isRelationExpression(item) {
113
- return reflection.isInstance(item, RelationExpression);
114
- }
115
- export const RelationStringProperty = 'RelationStringProperty';
116
- export function isRelationStringProperty(item) {
117
- return reflection.isInstance(item, RelationStringProperty);
118
- }
119
- export const ShapeProperty = 'ShapeProperty';
120
- export function isShapeProperty(item) {
121
- return reflection.isInstance(item, ShapeProperty);
122
- }
123
- export const SpecificationElementKind = 'SpecificationElementKind';
124
- export function isSpecificationElementKind(item) {
125
- return reflection.isInstance(item, SpecificationElementKind);
126
- }
127
- export const SpecificationElementKindStyle = 'SpecificationElementKindStyle';
128
- export function isSpecificationElementKindStyle(item) {
129
- return reflection.isInstance(item, SpecificationElementKindStyle);
130
- }
131
- export const SpecificationRule = 'SpecificationRule';
132
- export function isSpecificationRule(item) {
133
- return reflection.isInstance(item, SpecificationRule);
134
- }
135
- export const SpecificationTag = 'SpecificationTag';
136
- export function isSpecificationTag(item) {
137
- return reflection.isInstance(item, SpecificationTag);
138
- }
139
- export const StrictElementRef = 'StrictElementRef';
140
- export function isStrictElementRef(item) {
141
- return reflection.isInstance(item, StrictElementRef);
142
- }
143
- export const Tag = 'Tag';
144
- export function isTag(item) {
145
- return reflection.isInstance(item, Tag);
146
- }
147
- export const Tags = 'Tags';
148
- export function isTags(item) {
149
- return reflection.isInstance(item, Tags);
150
- }
151
- export const ViewProperty = 'ViewProperty';
152
- export function isViewProperty(item) {
153
- return reflection.isInstance(item, ViewProperty);
154
- }
155
- export const ViewRuleAutoLayout = 'ViewRuleAutoLayout';
156
- export function isViewRuleAutoLayout(item) {
157
- return reflection.isInstance(item, ViewRuleAutoLayout);
158
- }
159
- export const ViewRuleExpression = 'ViewRuleExpression';
160
- export function isViewRuleExpression(item) {
161
- return reflection.isInstance(item, ViewRuleExpression);
162
- }
163
- export const ViewRuleStyle = 'ViewRuleStyle';
164
- export function isViewRuleStyle(item) {
165
- return reflection.isInstance(item, ViewRuleStyle);
166
- }
167
- export const WildcardExpression = 'WildcardExpression';
168
- export function isWildcardExpression(item) {
169
- return reflection.isInstance(item, WildcardExpression);
170
- }
171
- export const RelationWithSource = 'RelationWithSource';
172
- export function isRelationWithSource(item) {
173
- return reflection.isInstance(item, RelationWithSource);
174
- }
175
- export class LikeC4AstReflection extends AbstractAstReflection {
176
- getAllTypes() {
177
- return ['AStyleProperty', 'AnyStringProperty', 'ColorProperty', 'Element', 'ElementBody', 'ElementExpression', 'ElementKind', 'ElementProperty', 'ElementRef', 'ElementRefExpression', 'ElementStringProperty', 'ElementStyleProperty', 'ElementView', 'Expression', 'ExtendElement', 'ExtendElementBody', 'InOutExpression', 'IncomingExpression', 'LikeC4Document', 'Model', 'ModelViews', 'OutgoingExpression', 'Relation', 'RelationBody', 'RelationExpression', 'RelationStringProperty', 'RelationWithSource', 'ShapeProperty', 'SpecificationElementKind', 'SpecificationElementKindStyle', 'SpecificationRule', 'SpecificationTag', 'StrictElementRef', 'Tag', 'Tags', 'View', 'ViewProperty', 'ViewRule', 'ViewRuleAutoLayout', 'ViewRuleExpression', 'ViewRuleStyle', 'WildcardExpression'];
178
- }
179
- computeIsSubtype(subtype, supertype) {
180
- switch (subtype) {
181
- case ColorProperty:
182
- case ShapeProperty: {
183
- return this.isSubtype(AStyleProperty, supertype);
184
- }
185
- case ElementExpression:
186
- case IncomingExpression:
187
- case InOutExpression:
188
- case OutgoingExpression:
189
- case RelationExpression: {
190
- return this.isSubtype(Expression, supertype);
191
- }
192
- case ElementRefExpression:
193
- case WildcardExpression: {
194
- return this.isSubtype(ElementExpression, supertype);
195
- }
196
- case ElementStringProperty: {
197
- return this.isSubtype(AnyStringProperty, supertype) || this.isSubtype(ElementProperty, supertype);
198
- }
199
- case ElementStyleProperty: {
200
- return this.isSubtype(ElementProperty, supertype);
201
- }
202
- case ElementView: {
203
- return this.isSubtype(View, supertype);
204
- }
205
- case RelationStringProperty:
206
- case ViewProperty: {
207
- return this.isSubtype(AnyStringProperty, supertype);
208
- }
209
- case RelationWithSource: {
210
- return this.isSubtype(Relation, supertype);
211
- }
212
- case ViewRuleAutoLayout:
213
- case ViewRuleExpression:
214
- case ViewRuleStyle: {
215
- return this.isSubtype(ViewRule, supertype);
216
- }
217
- default: {
218
- return false;
219
- }
220
- }
221
- }
222
- getReferenceType(refInfo) {
223
- const referenceId = `${refInfo.container.$type}:${refInfo.property}`;
224
- switch (referenceId) {
225
- case 'Element:kind': {
226
- return ElementKind;
227
- }
228
- case 'ElementRef:el':
229
- case 'StrictElementRef:el': {
230
- return Element;
231
- }
232
- case 'Tags:value': {
233
- return Tag;
234
- }
235
- default: {
236
- throw new Error(`${referenceId} is not a valid reference id.`);
237
- }
238
- }
239
- }
240
- getTypeMetaData(type) {
241
- switch (type) {
242
- case 'Element': {
243
- return {
244
- name: 'Element',
245
- mandatory: [
246
- { name: 'props', type: 'array' }
247
- ]
248
- };
249
- }
250
- case 'ElementBody': {
251
- return {
252
- name: 'ElementBody',
253
- mandatory: [
254
- { name: 'elements', type: 'array' },
255
- { name: 'props', type: 'array' }
256
- ]
257
- };
258
- }
259
- case 'ElementRefExpression': {
260
- return {
261
- name: 'ElementRefExpression',
262
- mandatory: [
263
- { name: 'isDescedants', type: 'boolean' }
264
- ]
265
- };
266
- }
267
- case 'ElementStyleProperty': {
268
- return {
269
- name: 'ElementStyleProperty',
270
- mandatory: [
271
- { name: 'props', type: 'array' }
272
- ]
273
- };
274
- }
275
- case 'ElementView': {
276
- return {
277
- name: 'ElementView',
278
- mandatory: [
279
- { name: 'properties', type: 'array' },
280
- { name: 'rules', type: 'array' }
281
- ]
282
- };
283
- }
284
- case 'ExtendElementBody': {
285
- return {
286
- name: 'ExtendElementBody',
287
- mandatory: [
288
- { name: 'elements', type: 'array' }
289
- ]
290
- };
291
- }
292
- case 'Model': {
293
- return {
294
- name: 'Model',
295
- mandatory: [
296
- { name: 'elements', type: 'array' }
297
- ]
298
- };
299
- }
300
- case 'ModelViews': {
301
- return {
302
- name: 'ModelViews',
303
- mandatory: [
304
- { name: 'views', type: 'array' }
305
- ]
306
- };
307
- }
308
- case 'RelationBody': {
309
- return {
310
- name: 'RelationBody',
311
- mandatory: [
312
- { name: 'props', type: 'array' }
313
- ]
314
- };
315
- }
316
- case 'SpecificationElementKindStyle': {
317
- return {
318
- name: 'SpecificationElementKindStyle',
319
- mandatory: [
320
- { name: 'props', type: 'array' }
321
- ]
322
- };
323
- }
324
- case 'SpecificationRule': {
325
- return {
326
- name: 'SpecificationRule',
327
- mandatory: [
328
- { name: 'elementKinds', type: 'array' },
329
- { name: 'tags', type: 'array' }
330
- ]
331
- };
332
- }
333
- case 'Tags': {
334
- return {
335
- name: 'Tags',
336
- mandatory: [
337
- { name: 'value', type: 'array' }
338
- ]
339
- };
340
- }
341
- case 'ViewRuleExpression': {
342
- return {
343
- name: 'ViewRuleExpression',
344
- mandatory: [
345
- { name: 'expressions', type: 'array' },
346
- { name: 'isInclude', type: 'boolean' }
347
- ]
348
- };
349
- }
350
- case 'ViewRuleStyle': {
351
- return {
352
- name: 'ViewRuleStyle',
353
- mandatory: [
354
- { name: 'props', type: 'array' },
355
- { name: 'targets', type: 'array' }
356
- ]
357
- };
358
- }
359
- case 'WildcardExpression': {
360
- return {
361
- name: 'WildcardExpression',
362
- mandatory: [
363
- { name: 'isWildcard', type: 'boolean' }
364
- ]
365
- };
366
- }
367
- default: {
368
- return {
369
- name: type,
370
- mandatory: []
371
- };
372
- }
373
- }
374
- }
375
- }
376
- export const reflection = new LikeC4AstReflection();
@@ -1,6 +0,0 @@
1
- /******************************************************************************
2
- * This file was generated by langium-cli 1.1.0.
3
- * DO NOT EDIT MANUALLY!
4
- ******************************************************************************/
5
- import { Grammar } from 'langium';
6
- export declare const LikeC4Grammar: () => Grammar;