@zenstackhq/language 3.0.0-alpha.9 → 3.0.0-beta.10

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/ast.d.ts CHANGED
@@ -20,7 +20,7 @@ declare const ZModelTerminals: {
20
20
  SL_COMMENT: RegExp;
21
21
  };
22
22
  type ZModelTerminalNames = keyof typeof ZModelTerminals;
23
- type ZModelKeywordNames = "!" | "!=" | "&&" | "(" | ")" | "," | "." | ":" | ";" | "<" | "<=" | "=" | "==" | ">" | ">=" | "?" | "Any" | "BigInt" | "Boolean" | "Bytes" | "ContextType" | "DateTime" | "Decimal" | "FieldReference" | "Float" | "Int" | "Json" | "Null" | "Object" | "String" | "TransitiveFieldReference" | "Unsupported" | "[" | "]" | "^" | "_" | "abstract" | "attribute" | "datasource" | "enum" | "extends" | "false" | "function" | "generator" | "import" | "in" | "model" | "mutation" | "null" | "plugin" | "procedure" | "this" | "true" | "type" | "view" | "{" | "||" | "}";
23
+ type ZModelKeywordNames = "!" | "!=" | "&&" | "(" | ")" | "," | "." | ":" | ";" | "<" | "<=" | "=" | "==" | ">" | ">=" | "?" | "Any" | "BigInt" | "Boolean" | "Bytes" | "ContextType" | "DateTime" | "Decimal" | "FieldReference" | "Float" | "Int" | "Json" | "Null" | "Object" | "String" | "TransitiveFieldReference" | "Unsupported" | "[" | "]" | "^" | "_" | "abstract" | "attribute" | "datasource" | "enum" | "extends" | "false" | "function" | "generator" | "import" | "in" | "model" | "mutation" | "null" | "plugin" | "procedure" | "this" | "true" | "type" | "view" | "with" | "{" | "||" | "}";
24
24
  type ZModelTokenNames = ZModelTerminalNames | ZModelKeywordNames;
25
25
  type AbstractDeclaration = Attribute | DataModel | DataSource | Enum | FunctionDecl | GeneratorDecl | Plugin | Procedure | TypeDef;
26
26
  declare const AbstractDeclaration = "AbstractDeclaration";
@@ -40,10 +40,10 @@ declare function isExpressionType(item: unknown): item is ExpressionType;
40
40
  type LiteralExpr = BooleanLiteral | NumberLiteral | StringLiteral;
41
41
  declare const LiteralExpr = "LiteralExpr";
42
42
  declare function isLiteralExpr(item: unknown): item is LiteralExpr;
43
- type MemberAccessTarget = DataModelField | TypeDefField;
43
+ type MemberAccessTarget = DataField;
44
44
  declare const MemberAccessTarget = "MemberAccessTarget";
45
45
  declare function isMemberAccessTarget(item: unknown): item is MemberAccessTarget;
46
- type ReferenceTarget = DataModelField | EnumField | FunctionParam | TypeDefField;
46
+ type ReferenceTarget = DataField | EnumField | FunctionParam;
47
47
  declare const ReferenceTarget = "ReferenceTarget";
48
48
  declare function isReferenceTarget(item: unknown): item is ReferenceTarget;
49
49
  type RegularID = 'abstract' | 'attribute' | 'datasource' | 'enum' | 'import' | 'in' | 'model' | 'plugin' | 'type' | 'view' | string;
@@ -53,9 +53,6 @@ declare function isRegularIDWithTypeNames(item: unknown): item is RegularIDWithT
53
53
  type TypeDeclaration = DataModel | Enum | TypeDef;
54
54
  declare const TypeDeclaration = "TypeDeclaration";
55
55
  declare function isTypeDeclaration(item: unknown): item is TypeDeclaration;
56
- type TypeDefFieldTypes = Enum | TypeDef;
57
- declare const TypeDefFieldTypes = "TypeDefFieldTypes";
58
- declare function isTypeDefFieldTypes(item: unknown): item is TypeDefFieldTypes;
59
56
  interface Argument extends langium.AstNode {
60
57
  readonly $container: InvocationExpr;
61
58
  readonly $type: 'Argument';
@@ -81,7 +78,7 @@ interface Attribute extends langium.AstNode {
81
78
  declare const Attribute = "Attribute";
82
79
  declare function isAttribute(item: unknown): item is Attribute;
83
80
  interface AttributeArg extends langium.AstNode {
84
- readonly $container: DataModelAttribute | DataModelFieldAttribute | InternalAttribute;
81
+ readonly $container: DataFieldAttribute | DataModelAttribute | InternalAttribute;
85
82
  readonly $type: 'AttributeArg';
86
83
  name?: RegularID;
87
84
  value: Expression;
@@ -156,16 +153,45 @@ interface ConfigInvocationExpr extends langium.AstNode {
156
153
  }
157
154
  declare const ConfigInvocationExpr = "ConfigInvocationExpr";
158
155
  declare function isConfigInvocationExpr(item: unknown): item is ConfigInvocationExpr;
156
+ interface DataField extends langium.AstNode {
157
+ readonly $container: DataModel | TypeDef;
158
+ readonly $type: 'DataField';
159
+ attributes: Array<DataFieldAttribute>;
160
+ comments: Array<string>;
161
+ name: RegularIDWithTypeNames;
162
+ type: DataFieldType;
163
+ }
164
+ declare const DataField = "DataField";
165
+ declare function isDataField(item: unknown): item is DataField;
166
+ interface DataFieldAttribute extends langium.AstNode {
167
+ readonly $container: DataField | EnumField;
168
+ readonly $type: 'DataFieldAttribute';
169
+ args: Array<AttributeArg>;
170
+ decl: langium.Reference<Attribute>;
171
+ }
172
+ declare const DataFieldAttribute = "DataFieldAttribute";
173
+ declare function isDataFieldAttribute(item: unknown): item is DataFieldAttribute;
174
+ interface DataFieldType extends langium.AstNode {
175
+ readonly $container: DataField;
176
+ readonly $type: 'DataFieldType';
177
+ array: boolean;
178
+ optional: boolean;
179
+ reference?: langium.Reference<TypeDeclaration>;
180
+ type?: BuiltinType;
181
+ unsupported?: UnsupportedFieldType;
182
+ }
183
+ declare const DataFieldType = "DataFieldType";
184
+ declare function isDataFieldType(item: unknown): item is DataFieldType;
159
185
  interface DataModel extends langium.AstNode {
160
186
  readonly $container: Model;
161
187
  readonly $type: 'DataModel';
162
188
  attributes: Array<DataModelAttribute>;
189
+ baseModel?: langium.Reference<DataModel>;
163
190
  comments: Array<string>;
164
- fields: Array<DataModelField>;
165
- isAbstract: boolean;
191
+ fields: Array<DataField>;
166
192
  isView: boolean;
193
+ mixins: Array<langium.Reference<TypeDef>>;
167
194
  name: RegularID;
168
- superTypes: Array<langium.Reference<DataModel>>;
169
195
  }
170
196
  declare const DataModel = "DataModel";
171
197
  declare function isDataModel(item: unknown): item is DataModel;
@@ -177,35 +203,6 @@ interface DataModelAttribute extends langium.AstNode {
177
203
  }
178
204
  declare const DataModelAttribute = "DataModelAttribute";
179
205
  declare function isDataModelAttribute(item: unknown): item is DataModelAttribute;
180
- interface DataModelField extends langium.AstNode {
181
- readonly $container: DataModel;
182
- readonly $type: 'DataModelField';
183
- attributes: Array<DataModelFieldAttribute>;
184
- comments: Array<string>;
185
- name: RegularIDWithTypeNames;
186
- type: DataModelFieldType;
187
- }
188
- declare const DataModelField = "DataModelField";
189
- declare function isDataModelField(item: unknown): item is DataModelField;
190
- interface DataModelFieldAttribute extends langium.AstNode {
191
- readonly $container: DataModelField | EnumField | TypeDefField;
192
- readonly $type: 'DataModelFieldAttribute';
193
- args: Array<AttributeArg>;
194
- decl: langium.Reference<Attribute>;
195
- }
196
- declare const DataModelFieldAttribute = "DataModelFieldAttribute";
197
- declare function isDataModelFieldAttribute(item: unknown): item is DataModelFieldAttribute;
198
- interface DataModelFieldType extends langium.AstNode {
199
- readonly $container: DataModelField;
200
- readonly $type: 'DataModelFieldType';
201
- array: boolean;
202
- optional: boolean;
203
- reference?: langium.Reference<TypeDeclaration>;
204
- type?: BuiltinType;
205
- unsupported?: UnsupportedFieldType;
206
- }
207
- declare const DataModelFieldType = "DataModelFieldType";
208
- declare function isDataModelFieldType(item: unknown): item is DataModelFieldType;
209
206
  interface DataSource extends langium.AstNode {
210
207
  readonly $container: Model;
211
208
  readonly $type: 'DataSource';
@@ -227,7 +224,7 @@ declare function isEnum(item: unknown): item is Enum;
227
224
  interface EnumField extends langium.AstNode {
228
225
  readonly $container: Enum;
229
226
  readonly $type: 'EnumField';
230
- attributes: Array<DataModelFieldAttribute>;
227
+ attributes: Array<DataFieldAttribute>;
231
228
  comments: Array<string>;
232
229
  name: RegularIDWithTypeNames;
233
230
  }
@@ -408,31 +405,12 @@ interface TypeDef extends langium.AstNode {
408
405
  readonly $type: 'TypeDef';
409
406
  attributes: Array<DataModelAttribute>;
410
407
  comments: Array<string>;
411
- fields: Array<TypeDefField>;
408
+ fields: Array<DataField>;
409
+ mixins: Array<langium.Reference<TypeDef>>;
412
410
  name: RegularID;
413
411
  }
414
412
  declare const TypeDef = "TypeDef";
415
413
  declare function isTypeDef(item: unknown): item is TypeDef;
416
- interface TypeDefField extends langium.AstNode {
417
- readonly $container: TypeDef;
418
- readonly $type: 'TypeDefField';
419
- attributes: Array<DataModelFieldAttribute>;
420
- comments: Array<string>;
421
- name: RegularIDWithTypeNames;
422
- type: TypeDefFieldType;
423
- }
424
- declare const TypeDefField = "TypeDefField";
425
- declare function isTypeDefField(item: unknown): item is TypeDefField;
426
- interface TypeDefFieldType extends langium.AstNode {
427
- readonly $container: TypeDefField;
428
- readonly $type: 'TypeDefFieldType';
429
- array: boolean;
430
- optional: boolean;
431
- reference?: langium.Reference<TypeDefFieldTypes>;
432
- type?: BuiltinType;
433
- }
434
- declare const TypeDefFieldType = "TypeDefFieldType";
435
- declare function isTypeDefFieldType(item: unknown): item is TypeDefFieldType;
436
414
  interface UnaryExpr extends langium.AstNode {
437
415
  readonly $container: Argument | ArrayExpr | AttributeArg | BinaryExpr | FieldInitializer | FunctionDecl | MemberAccessExpr | ReferenceArg | UnaryExpr;
438
416
  readonly $type: 'UnaryExpr';
@@ -442,7 +420,7 @@ interface UnaryExpr extends langium.AstNode {
442
420
  declare const UnaryExpr = "UnaryExpr";
443
421
  declare function isUnaryExpr(item: unknown): item is UnaryExpr;
444
422
  interface UnsupportedFieldType extends langium.AstNode {
445
- readonly $container: DataModelFieldType;
423
+ readonly $container: DataFieldType;
446
424
  readonly $type: 'UnsupportedFieldType';
447
425
  value: LiteralExpr;
448
426
  }
@@ -463,11 +441,11 @@ type ZModelAstType = {
463
441
  ConfigField: ConfigField;
464
442
  ConfigInvocationArg: ConfigInvocationArg;
465
443
  ConfigInvocationExpr: ConfigInvocationExpr;
444
+ DataField: DataField;
445
+ DataFieldAttribute: DataFieldAttribute;
446
+ DataFieldType: DataFieldType;
466
447
  DataModel: DataModel;
467
448
  DataModelAttribute: DataModelAttribute;
468
- DataModelField: DataModelField;
469
- DataModelFieldAttribute: DataModelFieldAttribute;
470
- DataModelFieldType: DataModelFieldType;
471
449
  DataSource: DataSource;
472
450
  Enum: Enum;
473
451
  EnumField: EnumField;
@@ -498,9 +476,6 @@ type ZModelAstType = {
498
476
  ThisExpr: ThisExpr;
499
477
  TypeDeclaration: TypeDeclaration;
500
478
  TypeDef: TypeDef;
501
- TypeDefField: TypeDefField;
502
- TypeDefFieldType: TypeDefFieldType;
503
- TypeDefFieldTypes: TypeDefFieldTypes;
504
479
  UnaryExpr: UnaryExpr;
505
480
  UnsupportedFieldType: UnsupportedFieldType;
506
481
  };
@@ -532,21 +507,11 @@ declare module './ast' {
532
507
  */
533
508
  $resolvedParam?: AttributeParam;
534
509
  }
535
- interface DataModelField {
536
- $inheritedFrom?: DataModel;
537
- }
538
- interface DataModelAttribute {
539
- $inheritedFrom?: DataModel;
540
- }
541
510
  interface DataModel {
542
- /**
543
- * Indicates whether the model is already merged with the base types
544
- */
545
- $baseMerged?: boolean;
546
511
  /**
547
512
  * All fields including those marked with `@ignore`
548
513
  */
549
- $allFields?: DataModelField[];
514
+ $allFields?: DataField[];
550
515
  }
551
516
  }
552
517
  interface InheritableNode extends AstNode {
@@ -564,4 +529,4 @@ declare module 'langium' {
564
529
  }
565
530
  }
566
531
 
567
- export { AbstractDeclaration, Argument, ArrayExpr, Attribute, AttributeArg, AttributeParam$1 as AttributeParam, AttributeParamType, BinaryExpr, BinaryExprOperatorPriority, type Boolean, BooleanLiteral, type BuiltinType, ConfigArrayExpr, ConfigExpr, ConfigField, ConfigInvocationArg, ConfigInvocationExpr, DataModel, DataModelAttribute, DataModelField, DataModelFieldAttribute, DataModelFieldType, DataSource, Enum, EnumField, Expression, type ExpressionType, FieldInitializer, FunctionDecl, FunctionParam, FunctionParamType, GeneratorDecl, type InheritableNode, InternalAttribute, InvocationExpr, LiteralExpr, MemberAccessExpr, MemberAccessTarget, Model, ModelImport, NullExpr, NumberLiteral, ObjectExpr, Plugin, PluginField, Procedure, ProcedureParam, ReferenceArg, ReferenceExpr, ReferenceTarget, type RegularID, type RegularIDWithTypeNames, type ResolvedShape, type ResolvedType, StringLiteral, ThisExpr, TypeDeclaration, TypeDef, TypeDefField, TypeDefFieldType, TypeDefFieldTypes, UnaryExpr, UnsupportedFieldType, ZModelAstReflection, type ZModelAstType, type ZModelKeywordNames, type ZModelTerminalNames, ZModelTerminals, type ZModelTokenNames, isAbstractDeclaration, isArgument, isArrayExpr, isAttribute, isAttributeArg, isAttributeParam, isAttributeParamType, isBinaryExpr, isBoolean, isBooleanLiteral, isBuiltinType, isConfigArrayExpr, isConfigExpr, isConfigField, isConfigInvocationArg, isConfigInvocationExpr, isDataModel, isDataModelAttribute, isDataModelField, isDataModelFieldAttribute, isDataModelFieldType, isDataSource, isEnum, isEnumField, isExpression, isExpressionType, isFieldInitializer, isFunctionDecl, isFunctionParam, isFunctionParamType, isGeneratorDecl, isInternalAttribute, isInvocationExpr, isLiteralExpr, isMemberAccessExpr, isMemberAccessTarget, isModel, isModelImport, isNullExpr, isNumberLiteral, isObjectExpr, isPlugin, isPluginField, isProcedure, isProcedureParam, isReferenceArg, isReferenceExpr, isReferenceTarget, isRegularID, isRegularIDWithTypeNames, isStringLiteral, isThisExpr, isTypeDeclaration, isTypeDef, isTypeDefField, isTypeDefFieldType, isTypeDefFieldTypes, isUnaryExpr, isUnsupportedFieldType, reflection };
532
+ export { AbstractDeclaration, Argument, ArrayExpr, Attribute, AttributeArg, AttributeParam$1 as AttributeParam, AttributeParamType, BinaryExpr, BinaryExprOperatorPriority, type Boolean, BooleanLiteral, type BuiltinType, ConfigArrayExpr, ConfigExpr, ConfigField, ConfigInvocationArg, ConfigInvocationExpr, DataField, DataFieldAttribute, DataFieldType, DataModel, DataModelAttribute, DataSource, Enum, EnumField, Expression, type ExpressionType, FieldInitializer, FunctionDecl, FunctionParam, FunctionParamType, GeneratorDecl, type InheritableNode, InternalAttribute, InvocationExpr, LiteralExpr, MemberAccessExpr, MemberAccessTarget, Model, ModelImport, NullExpr, NumberLiteral, ObjectExpr, Plugin, PluginField, Procedure, ProcedureParam, ReferenceArg, ReferenceExpr, ReferenceTarget, type RegularID, type RegularIDWithTypeNames, type ResolvedShape, type ResolvedType, StringLiteral, ThisExpr, TypeDeclaration, TypeDef, UnaryExpr, UnsupportedFieldType, ZModelAstReflection, type ZModelAstType, type ZModelKeywordNames, type ZModelTerminalNames, ZModelTerminals, type ZModelTokenNames, isAbstractDeclaration, isArgument, isArrayExpr, isAttribute, isAttributeArg, isAttributeParam, isAttributeParamType, isBinaryExpr, isBoolean, isBooleanLiteral, isBuiltinType, isConfigArrayExpr, isConfigExpr, isConfigField, isConfigInvocationArg, isConfigInvocationExpr, isDataField, isDataFieldAttribute, isDataFieldType, isDataModel, isDataModelAttribute, isDataSource, isEnum, isEnumField, isExpression, isExpressionType, isFieldInitializer, isFunctionDecl, isFunctionParam, isFunctionParamType, isGeneratorDecl, isInternalAttribute, isInvocationExpr, isLiteralExpr, isMemberAccessExpr, isMemberAccessTarget, isModel, isModelImport, isNullExpr, isNumberLiteral, isObjectExpr, isPlugin, isPluginField, isProcedure, isProcedureParam, isReferenceArg, isReferenceExpr, isReferenceTarget, isRegularID, isRegularIDWithTypeNames, isStringLiteral, isThisExpr, isTypeDeclaration, isTypeDef, isUnaryExpr, isUnsupportedFieldType, reflection };
package/dist/ast.js CHANGED
@@ -70,11 +70,6 @@ function isTypeDeclaration(item) {
70
70
  return reflection.isInstance(item, TypeDeclaration);
71
71
  }
72
72
  __name(isTypeDeclaration, "isTypeDeclaration");
73
- var TypeDefFieldTypes = "TypeDefFieldTypes";
74
- function isTypeDefFieldTypes(item) {
75
- return reflection.isInstance(item, TypeDefFieldTypes);
76
- }
77
- __name(isTypeDefFieldTypes, "isTypeDefFieldTypes");
78
73
  var Argument = "Argument";
79
74
  function isArgument(item) {
80
75
  return reflection.isInstance(item, Argument);
@@ -135,6 +130,21 @@ function isConfigInvocationExpr(item) {
135
130
  return reflection.isInstance(item, ConfigInvocationExpr);
136
131
  }
137
132
  __name(isConfigInvocationExpr, "isConfigInvocationExpr");
133
+ var DataField = "DataField";
134
+ function isDataField(item) {
135
+ return reflection.isInstance(item, DataField);
136
+ }
137
+ __name(isDataField, "isDataField");
138
+ var DataFieldAttribute = "DataFieldAttribute";
139
+ function isDataFieldAttribute(item) {
140
+ return reflection.isInstance(item, DataFieldAttribute);
141
+ }
142
+ __name(isDataFieldAttribute, "isDataFieldAttribute");
143
+ var DataFieldType = "DataFieldType";
144
+ function isDataFieldType(item) {
145
+ return reflection.isInstance(item, DataFieldType);
146
+ }
147
+ __name(isDataFieldType, "isDataFieldType");
138
148
  var DataModel = "DataModel";
139
149
  function isDataModel(item) {
140
150
  return reflection.isInstance(item, DataModel);
@@ -145,21 +155,6 @@ function isDataModelAttribute(item) {
145
155
  return reflection.isInstance(item, DataModelAttribute);
146
156
  }
147
157
  __name(isDataModelAttribute, "isDataModelAttribute");
148
- var DataModelField = "DataModelField";
149
- function isDataModelField(item) {
150
- return reflection.isInstance(item, DataModelField);
151
- }
152
- __name(isDataModelField, "isDataModelField");
153
- var DataModelFieldAttribute = "DataModelFieldAttribute";
154
- function isDataModelFieldAttribute(item) {
155
- return reflection.isInstance(item, DataModelFieldAttribute);
156
- }
157
- __name(isDataModelFieldAttribute, "isDataModelFieldAttribute");
158
- var DataModelFieldType = "DataModelFieldType";
159
- function isDataModelFieldType(item) {
160
- return reflection.isInstance(item, DataModelFieldType);
161
- }
162
- __name(isDataModelFieldType, "isDataModelFieldType");
163
158
  var DataSource = "DataSource";
164
159
  function isDataSource(item) {
165
160
  return reflection.isInstance(item, DataSource);
@@ -285,16 +280,6 @@ function isTypeDef(item) {
285
280
  return reflection.isInstance(item, TypeDef);
286
281
  }
287
282
  __name(isTypeDef, "isTypeDef");
288
- var TypeDefField = "TypeDefField";
289
- function isTypeDefField(item) {
290
- return reflection.isInstance(item, TypeDefField);
291
- }
292
- __name(isTypeDefField, "isTypeDefField");
293
- var TypeDefFieldType = "TypeDefFieldType";
294
- function isTypeDefFieldType(item) {
295
- return reflection.isInstance(item, TypeDefFieldType);
296
- }
297
- __name(isTypeDefFieldType, "isTypeDefFieldType");
298
283
  var UnaryExpr = "UnaryExpr";
299
284
  function isUnaryExpr(item) {
300
285
  return reflection.isInstance(item, UnaryExpr);
@@ -325,11 +310,11 @@ var ZModelAstReflection = class extends langium.AbstractAstReflection {
325
310
  ConfigField,
326
311
  ConfigInvocationArg,
327
312
  ConfigInvocationExpr,
313
+ DataField,
314
+ DataFieldAttribute,
315
+ DataFieldType,
328
316
  DataModel,
329
317
  DataModelAttribute,
330
- DataModelField,
331
- DataModelFieldAttribute,
332
- DataModelFieldType,
333
318
  DataSource,
334
319
  Enum,
335
320
  EnumField,
@@ -360,9 +345,6 @@ var ZModelAstReflection = class extends langium.AbstractAstReflection {
360
345
  ThisExpr,
361
346
  TypeDeclaration,
362
347
  TypeDef,
363
- TypeDefField,
364
- TypeDefFieldType,
365
- TypeDefFieldTypes,
366
348
  UnaryExpr,
367
349
  UnsupportedFieldType
368
350
  ];
@@ -395,16 +377,13 @@ var ZModelAstReflection = class extends langium.AbstractAstReflection {
395
377
  case ConfigArrayExpr: {
396
378
  return this.isSubtype(ConfigExpr, supertype);
397
379
  }
398
- case DataModel: {
399
- return this.isSubtype(AbstractDeclaration, supertype) || this.isSubtype(TypeDeclaration, supertype);
400
- }
401
- case DataModelField:
402
- case TypeDefField: {
380
+ case DataField: {
403
381
  return this.isSubtype(MemberAccessTarget, supertype) || this.isSubtype(ReferenceTarget, supertype);
404
382
  }
383
+ case DataModel:
405
384
  case Enum:
406
385
  case TypeDef: {
407
- return this.isSubtype(AbstractDeclaration, supertype) || this.isSubtype(TypeDeclaration, supertype) || this.isSubtype(TypeDefFieldTypes, supertype);
386
+ return this.isSubtype(AbstractDeclaration, supertype) || this.isSubtype(TypeDeclaration, supertype);
408
387
  }
409
388
  case EnumField:
410
389
  case FunctionParam: {
@@ -423,18 +402,22 @@ var ZModelAstReflection = class extends langium.AbstractAstReflection {
423
402
  const referenceId = `${refInfo.container.$type}:${refInfo.property}`;
424
403
  switch (referenceId) {
425
404
  case "AttributeParamType:reference":
426
- case "DataModelFieldType:reference":
405
+ case "DataFieldType:reference":
427
406
  case "FunctionParamType:reference": {
428
407
  return TypeDeclaration;
429
408
  }
430
- case "DataModel:superTypes": {
431
- return DataModel;
432
- }
409
+ case "DataFieldAttribute:decl":
433
410
  case "DataModelAttribute:decl":
434
- case "DataModelFieldAttribute:decl":
435
411
  case "InternalAttribute:decl": {
436
412
  return Attribute;
437
413
  }
414
+ case "DataModel:baseModel": {
415
+ return DataModel;
416
+ }
417
+ case "DataModel:mixins":
418
+ case "TypeDef:mixins": {
419
+ return TypeDef;
420
+ }
438
421
  case "InvocationExpr:function": {
439
422
  return FunctionDecl;
440
423
  }
@@ -444,9 +427,6 @@ var ZModelAstReflection = class extends langium.AbstractAstReflection {
444
427
  case "ReferenceExpr:target": {
445
428
  return ReferenceTarget;
446
429
  }
447
- case "TypeDefFieldType:reference": {
448
- return TypeDefFieldTypes;
449
- }
450
430
  default: {
451
431
  throw new Error(`${referenceId} is not a valid reference id.`);
452
432
  }
@@ -633,9 +613,9 @@ var ZModelAstReflection = class extends langium.AbstractAstReflection {
633
613
  ]
634
614
  };
635
615
  }
636
- case DataModel: {
616
+ case DataField: {
637
617
  return {
638
- name: DataModel,
618
+ name: DataField,
639
619
  properties: [
640
620
  {
641
621
  name: "attributes",
@@ -645,31 +625,18 @@ var ZModelAstReflection = class extends langium.AbstractAstReflection {
645
625
  name: "comments",
646
626
  defaultValue: []
647
627
  },
648
- {
649
- name: "fields",
650
- defaultValue: []
651
- },
652
- {
653
- name: "isAbstract",
654
- defaultValue: false
655
- },
656
- {
657
- name: "isView",
658
- defaultValue: false
659
- },
660
628
  {
661
629
  name: "name"
662
630
  },
663
631
  {
664
- name: "superTypes",
665
- defaultValue: []
632
+ name: "type"
666
633
  }
667
634
  ]
668
635
  };
669
636
  }
670
- case DataModelAttribute: {
637
+ case DataFieldAttribute: {
671
638
  return {
672
- name: DataModelAttribute,
639
+ name: DataFieldAttribute,
673
640
  properties: [
674
641
  {
675
642
  name: "args",
@@ -681,61 +648,73 @@ var ZModelAstReflection = class extends langium.AbstractAstReflection {
681
648
  ]
682
649
  };
683
650
  }
684
- case DataModelField: {
651
+ case DataFieldType: {
685
652
  return {
686
- name: DataModelField,
653
+ name: DataFieldType,
687
654
  properties: [
688
655
  {
689
- name: "attributes",
690
- defaultValue: []
656
+ name: "array",
657
+ defaultValue: false
691
658
  },
692
659
  {
693
- name: "comments",
694
- defaultValue: []
660
+ name: "optional",
661
+ defaultValue: false
695
662
  },
696
663
  {
697
- name: "name"
664
+ name: "reference"
698
665
  },
699
666
  {
700
667
  name: "type"
668
+ },
669
+ {
670
+ name: "unsupported"
701
671
  }
702
672
  ]
703
673
  };
704
674
  }
705
- case DataModelFieldAttribute: {
675
+ case DataModel: {
706
676
  return {
707
- name: DataModelFieldAttribute,
677
+ name: DataModel,
708
678
  properties: [
709
679
  {
710
- name: "args",
680
+ name: "attributes",
711
681
  defaultValue: []
712
682
  },
713
683
  {
714
- name: "decl"
715
- }
716
- ]
717
- };
718
- }
719
- case DataModelFieldType: {
720
- return {
721
- name: DataModelFieldType,
722
- properties: [
684
+ name: "baseModel"
685
+ },
723
686
  {
724
- name: "array",
725
- defaultValue: false
687
+ name: "comments",
688
+ defaultValue: []
726
689
  },
727
690
  {
728
- name: "optional",
691
+ name: "fields",
692
+ defaultValue: []
693
+ },
694
+ {
695
+ name: "isView",
729
696
  defaultValue: false
730
697
  },
731
698
  {
732
- name: "reference"
699
+ name: "mixins",
700
+ defaultValue: []
733
701
  },
734
702
  {
735
- name: "type"
703
+ name: "name"
704
+ }
705
+ ]
706
+ };
707
+ }
708
+ case DataModelAttribute: {
709
+ return {
710
+ name: DataModelAttribute,
711
+ properties: [
712
+ {
713
+ name: "args",
714
+ defaultValue: []
736
715
  },
737
716
  {
738
- name: "unsupported"
717
+ name: "decl"
739
718
  }
740
719
  ]
741
720
  };
@@ -1109,49 +1088,11 @@ var ZModelAstReflection = class extends langium.AbstractAstReflection {
1109
1088
  defaultValue: []
1110
1089
  },
1111
1090
  {
1112
- name: "name"
1113
- }
1114
- ]
1115
- };
1116
- }
1117
- case TypeDefField: {
1118
- return {
1119
- name: TypeDefField,
1120
- properties: [
1121
- {
1122
- name: "attributes",
1123
- defaultValue: []
1124
- },
1125
- {
1126
- name: "comments",
1091
+ name: "mixins",
1127
1092
  defaultValue: []
1128
1093
  },
1129
1094
  {
1130
1095
  name: "name"
1131
- },
1132
- {
1133
- name: "type"
1134
- }
1135
- ]
1136
- };
1137
- }
1138
- case TypeDefFieldType: {
1139
- return {
1140
- name: TypeDefFieldType,
1141
- properties: [
1142
- {
1143
- name: "array",
1144
- defaultValue: false
1145
- },
1146
- {
1147
- name: "optional",
1148
- defaultValue: false
1149
- },
1150
- {
1151
- name: "reference"
1152
- },
1153
- {
1154
- name: "type"
1155
1096
  }
1156
1097
  ]
1157
1098
  };
@@ -1225,11 +1166,11 @@ export {
1225
1166
  ConfigField,
1226
1167
  ConfigInvocationArg,
1227
1168
  ConfigInvocationExpr,
1169
+ DataField,
1170
+ DataFieldAttribute,
1171
+ DataFieldType,
1228
1172
  DataModel,
1229
1173
  DataModelAttribute,
1230
- DataModelField,
1231
- DataModelFieldAttribute,
1232
- DataModelFieldType,
1233
1174
  DataSource,
1234
1175
  Enum,
1235
1176
  EnumField,
@@ -1260,9 +1201,6 @@ export {
1260
1201
  ThisExpr,
1261
1202
  TypeDeclaration,
1262
1203
  TypeDef,
1263
- TypeDefField,
1264
- TypeDefFieldType,
1265
- TypeDefFieldTypes,
1266
1204
  UnaryExpr,
1267
1205
  UnsupportedFieldType,
1268
1206
  ZModelAstReflection,
@@ -1283,11 +1221,11 @@ export {
1283
1221
  isConfigField,
1284
1222
  isConfigInvocationArg,
1285
1223
  isConfigInvocationExpr,
1224
+ isDataField,
1225
+ isDataFieldAttribute,
1226
+ isDataFieldType,
1286
1227
  isDataModel,
1287
1228
  isDataModelAttribute,
1288
- isDataModelField,
1289
- isDataModelFieldAttribute,
1290
- isDataModelFieldType,
1291
1229
  isDataSource,
1292
1230
  isEnum,
1293
1231
  isEnumField,
@@ -1321,9 +1259,6 @@ export {
1321
1259
  isThisExpr,
1322
1260
  isTypeDeclaration,
1323
1261
  isTypeDef,
1324
- isTypeDefField,
1325
- isTypeDefFieldType,
1326
- isTypeDefFieldTypes,
1327
1262
  isUnaryExpr,
1328
1263
  isUnsupportedFieldType,
1329
1264
  reflection