@zenstackhq/language 3.0.0-alpha.3 → 3.0.0-alpha.31

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.cts CHANGED
@@ -1,8 +1,9 @@
1
- import { AstNode, Reference, AbstractAstReflection, ReferenceInfo, TypeMetaData } from 'langium';
1
+ import * as langium from 'langium';
2
+ import { AstNode } from 'langium';
2
3
  export { AstNode, Reference } from 'langium';
3
4
 
4
5
  /******************************************************************************
5
- * This file was generated by langium-cli 3.3.0.
6
+ * This file was generated by langium-cli 3.5.0.
6
7
  * DO NOT EDIT MANUALLY!
7
8
  ******************************************************************************/
8
9
 
@@ -19,7 +20,7 @@ declare const ZModelTerminals: {
19
20
  SL_COMMENT: RegExp;
20
21
  };
21
22
  type ZModelTerminalNames = keyof typeof ZModelTerminals;
22
- 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" | "{" | "||" | "}";
23
24
  type ZModelTokenNames = ZModelTerminalNames | ZModelKeywordNames;
24
25
  type AbstractDeclaration = Attribute | DataModel | DataSource | Enum | FunctionDecl | GeneratorDecl | Plugin | Procedure | TypeDef;
25
26
  declare const AbstractDeclaration = "AbstractDeclaration";
@@ -39,10 +40,10 @@ declare function isExpressionType(item: unknown): item is ExpressionType;
39
40
  type LiteralExpr = BooleanLiteral | NumberLiteral | StringLiteral;
40
41
  declare const LiteralExpr = "LiteralExpr";
41
42
  declare function isLiteralExpr(item: unknown): item is LiteralExpr;
42
- type MemberAccessTarget = DataModelField | TypeDefField;
43
+ type MemberAccessTarget = DataField;
43
44
  declare const MemberAccessTarget = "MemberAccessTarget";
44
45
  declare function isMemberAccessTarget(item: unknown): item is MemberAccessTarget;
45
- type ReferenceTarget = DataModelField | EnumField | FunctionParam | TypeDefField;
46
+ type ReferenceTarget = DataField | EnumField | FunctionParam;
46
47
  declare const ReferenceTarget = "ReferenceTarget";
47
48
  declare function isReferenceTarget(item: unknown): item is ReferenceTarget;
48
49
  type RegularID = 'abstract' | 'attribute' | 'datasource' | 'enum' | 'import' | 'in' | 'model' | 'plugin' | 'type' | 'view' | string;
@@ -52,24 +53,21 @@ declare function isRegularIDWithTypeNames(item: unknown): item is RegularIDWithT
52
53
  type TypeDeclaration = DataModel | Enum | TypeDef;
53
54
  declare const TypeDeclaration = "TypeDeclaration";
54
55
  declare function isTypeDeclaration(item: unknown): item is TypeDeclaration;
55
- type TypeDefFieldTypes = Enum | TypeDef;
56
- declare const TypeDefFieldTypes = "TypeDefFieldTypes";
57
- declare function isTypeDefFieldTypes(item: unknown): item is TypeDefFieldTypes;
58
- interface Argument extends AstNode {
56
+ interface Argument extends langium.AstNode {
59
57
  readonly $container: InvocationExpr;
60
58
  readonly $type: 'Argument';
61
59
  value: Expression;
62
60
  }
63
61
  declare const Argument = "Argument";
64
62
  declare function isArgument(item: unknown): item is Argument;
65
- interface ArrayExpr extends AstNode {
63
+ interface ArrayExpr extends langium.AstNode {
66
64
  readonly $container: Argument | ArrayExpr | AttributeArg | BinaryExpr | FieldInitializer | FunctionDecl | MemberAccessExpr | PluginField | ReferenceArg | UnaryExpr;
67
65
  readonly $type: 'ArrayExpr';
68
66
  items: Array<Expression>;
69
67
  }
70
68
  declare const ArrayExpr = "ArrayExpr";
71
69
  declare function isArrayExpr(item: unknown): item is ArrayExpr;
72
- interface Attribute extends AstNode {
70
+ interface Attribute extends langium.AstNode {
73
71
  readonly $container: Model;
74
72
  readonly $type: 'Attribute';
75
73
  attributes: Array<InternalAttribute>;
@@ -79,15 +77,15 @@ interface Attribute extends AstNode {
79
77
  }
80
78
  declare const Attribute = "Attribute";
81
79
  declare function isAttribute(item: unknown): item is Attribute;
82
- interface AttributeArg extends AstNode {
83
- readonly $container: DataModelAttribute | DataModelFieldAttribute | InternalAttribute;
80
+ interface AttributeArg extends langium.AstNode {
81
+ readonly $container: DataFieldAttribute | DataModelAttribute | InternalAttribute;
84
82
  readonly $type: 'AttributeArg';
85
83
  name?: RegularID;
86
84
  value: Expression;
87
85
  }
88
86
  declare const AttributeArg = "AttributeArg";
89
87
  declare function isAttributeArg(item: unknown): item is AttributeArg;
90
- interface AttributeParam$1 extends AstNode {
88
+ interface AttributeParam$1 extends langium.AstNode {
91
89
  readonly $container: Attribute;
92
90
  readonly $type: 'AttributeParam';
93
91
  attributes: Array<InternalAttribute>;
@@ -98,17 +96,17 @@ interface AttributeParam$1 extends AstNode {
98
96
  }
99
97
  declare const AttributeParam$1 = "AttributeParam";
100
98
  declare function isAttributeParam(item: unknown): item is AttributeParam$1;
101
- interface AttributeParamType extends AstNode {
99
+ interface AttributeParamType extends langium.AstNode {
102
100
  readonly $container: AttributeParam$1;
103
101
  readonly $type: 'AttributeParamType';
104
102
  array: boolean;
105
103
  optional: boolean;
106
- reference?: Reference<TypeDeclaration>;
104
+ reference?: langium.Reference<TypeDeclaration>;
107
105
  type?: 'ContextType' | 'FieldReference' | 'TransitiveFieldReference' | ExpressionType;
108
106
  }
109
107
  declare const AttributeParamType = "AttributeParamType";
110
108
  declare function isAttributeParamType(item: unknown): item is AttributeParamType;
111
- interface BinaryExpr extends AstNode {
109
+ interface BinaryExpr extends langium.AstNode {
112
110
  readonly $container: Argument | ArrayExpr | AttributeArg | BinaryExpr | FieldInitializer | FunctionDecl | MemberAccessExpr | ReferenceArg | UnaryExpr;
113
111
  readonly $type: 'BinaryExpr';
114
112
  left: Expression;
@@ -117,21 +115,21 @@ interface BinaryExpr extends AstNode {
117
115
  }
118
116
  declare const BinaryExpr = "BinaryExpr";
119
117
  declare function isBinaryExpr(item: unknown): item is BinaryExpr;
120
- interface BooleanLiteral extends AstNode {
118
+ interface BooleanLiteral extends langium.AstNode {
121
119
  readonly $container: Argument | ArrayExpr | AttributeArg | BinaryExpr | ConfigArrayExpr | ConfigField | ConfigInvocationArg | FieldInitializer | FunctionDecl | MemberAccessExpr | PluginField | ReferenceArg | UnaryExpr | UnsupportedFieldType;
122
120
  readonly $type: 'BooleanLiteral';
123
121
  value: Boolean;
124
122
  }
125
123
  declare const BooleanLiteral = "BooleanLiteral";
126
124
  declare function isBooleanLiteral(item: unknown): item is BooleanLiteral;
127
- interface ConfigArrayExpr extends AstNode {
125
+ interface ConfigArrayExpr extends langium.AstNode {
128
126
  readonly $container: ConfigField;
129
127
  readonly $type: 'ConfigArrayExpr';
130
128
  items: Array<ConfigInvocationExpr | LiteralExpr>;
131
129
  }
132
130
  declare const ConfigArrayExpr = "ConfigArrayExpr";
133
131
  declare function isConfigArrayExpr(item: unknown): item is ConfigArrayExpr;
134
- interface ConfigField extends AstNode {
132
+ interface ConfigField extends langium.AstNode {
135
133
  readonly $container: DataSource | GeneratorDecl;
136
134
  readonly $type: 'ConfigField';
137
135
  name: RegularID;
@@ -139,7 +137,7 @@ interface ConfigField extends AstNode {
139
137
  }
140
138
  declare const ConfigField = "ConfigField";
141
139
  declare function isConfigField(item: unknown): item is ConfigField;
142
- interface ConfigInvocationArg extends AstNode {
140
+ interface ConfigInvocationArg extends langium.AstNode {
143
141
  readonly $container: ConfigInvocationExpr;
144
142
  readonly $type: 'ConfigInvocationArg';
145
143
  name: string;
@@ -147,7 +145,7 @@ interface ConfigInvocationArg extends AstNode {
147
145
  }
148
146
  declare const ConfigInvocationArg = "ConfigInvocationArg";
149
147
  declare function isConfigInvocationArg(item: unknown): item is ConfigInvocationArg;
150
- interface ConfigInvocationExpr extends AstNode {
148
+ interface ConfigInvocationExpr extends langium.AstNode {
151
149
  readonly $container: ConfigArrayExpr;
152
150
  readonly $type: 'ConfigInvocationExpr';
153
151
  args: Array<ConfigInvocationArg>;
@@ -155,57 +153,57 @@ interface ConfigInvocationExpr extends AstNode {
155
153
  }
156
154
  declare const ConfigInvocationExpr = "ConfigInvocationExpr";
157
155
  declare function isConfigInvocationExpr(item: unknown): item is ConfigInvocationExpr;
158
- interface DataModel extends AstNode {
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;
185
+ interface DataModel extends langium.AstNode {
159
186
  readonly $container: Model;
160
187
  readonly $type: 'DataModel';
161
188
  attributes: Array<DataModelAttribute>;
189
+ baseModel?: langium.Reference<DataModel>;
162
190
  comments: Array<string>;
163
- fields: Array<DataModelField>;
164
- isAbstract: boolean;
191
+ fields: Array<DataField>;
165
192
  isView: boolean;
193
+ mixins: Array<langium.Reference<TypeDef>>;
166
194
  name: RegularID;
167
- superTypes: Array<Reference<DataModel>>;
168
195
  }
169
196
  declare const DataModel = "DataModel";
170
197
  declare function isDataModel(item: unknown): item is DataModel;
171
- interface DataModelAttribute extends AstNode {
198
+ interface DataModelAttribute extends langium.AstNode {
172
199
  readonly $container: DataModel | Enum | TypeDef;
173
200
  readonly $type: 'DataModelAttribute';
174
201
  args: Array<AttributeArg>;
175
- decl: Reference<Attribute>;
202
+ decl: langium.Reference<Attribute>;
176
203
  }
177
204
  declare const DataModelAttribute = "DataModelAttribute";
178
205
  declare function isDataModelAttribute(item: unknown): item is DataModelAttribute;
179
- interface DataModelField extends AstNode {
180
- readonly $container: DataModel;
181
- readonly $type: 'DataModelField';
182
- attributes: Array<DataModelFieldAttribute>;
183
- comments: Array<string>;
184
- name: RegularIDWithTypeNames;
185
- type: DataModelFieldType;
186
- }
187
- declare const DataModelField = "DataModelField";
188
- declare function isDataModelField(item: unknown): item is DataModelField;
189
- interface DataModelFieldAttribute extends AstNode {
190
- readonly $container: DataModelField | EnumField | TypeDefField;
191
- readonly $type: 'DataModelFieldAttribute';
192
- args: Array<AttributeArg>;
193
- decl: Reference<Attribute>;
194
- }
195
- declare const DataModelFieldAttribute = "DataModelFieldAttribute";
196
- declare function isDataModelFieldAttribute(item: unknown): item is DataModelFieldAttribute;
197
- interface DataModelFieldType extends AstNode {
198
- readonly $container: DataModelField;
199
- readonly $type: 'DataModelFieldType';
200
- array: boolean;
201
- optional: boolean;
202
- reference?: Reference<TypeDeclaration>;
203
- type?: BuiltinType;
204
- unsupported?: UnsupportedFieldType;
205
- }
206
- declare const DataModelFieldType = "DataModelFieldType";
207
- declare function isDataModelFieldType(item: unknown): item is DataModelFieldType;
208
- interface DataSource extends AstNode {
206
+ interface DataSource extends langium.AstNode {
209
207
  readonly $container: Model;
210
208
  readonly $type: 'DataSource';
211
209
  fields: Array<ConfigField>;
@@ -213,7 +211,7 @@ interface DataSource extends AstNode {
213
211
  }
214
212
  declare const DataSource = "DataSource";
215
213
  declare function isDataSource(item: unknown): item is DataSource;
216
- interface Enum extends AstNode {
214
+ interface Enum extends langium.AstNode {
217
215
  readonly $container: Model;
218
216
  readonly $type: 'Enum';
219
217
  attributes: Array<DataModelAttribute>;
@@ -223,16 +221,16 @@ interface Enum extends AstNode {
223
221
  }
224
222
  declare const Enum = "Enum";
225
223
  declare function isEnum(item: unknown): item is Enum;
226
- interface EnumField extends AstNode {
224
+ interface EnumField extends langium.AstNode {
227
225
  readonly $container: Enum;
228
226
  readonly $type: 'EnumField';
229
- attributes: Array<DataModelFieldAttribute>;
227
+ attributes: Array<DataFieldAttribute>;
230
228
  comments: Array<string>;
231
229
  name: RegularIDWithTypeNames;
232
230
  }
233
231
  declare const EnumField = "EnumField";
234
232
  declare function isEnumField(item: unknown): item is EnumField;
235
- interface FieldInitializer extends AstNode {
233
+ interface FieldInitializer extends langium.AstNode {
236
234
  readonly $container: ObjectExpr;
237
235
  readonly $type: 'FieldInitializer';
238
236
  name: RegularID | string;
@@ -240,7 +238,7 @@ interface FieldInitializer extends AstNode {
240
238
  }
241
239
  declare const FieldInitializer = "FieldInitializer";
242
240
  declare function isFieldInitializer(item: unknown): item is FieldInitializer;
243
- interface FunctionDecl extends AstNode {
241
+ interface FunctionDecl extends langium.AstNode {
244
242
  readonly $container: Model;
245
243
  readonly $type: 'FunctionDecl';
246
244
  attributes: Array<InternalAttribute>;
@@ -251,7 +249,7 @@ interface FunctionDecl extends AstNode {
251
249
  }
252
250
  declare const FunctionDecl = "FunctionDecl";
253
251
  declare function isFunctionDecl(item: unknown): item is FunctionDecl;
254
- interface FunctionParam extends AstNode {
252
+ interface FunctionParam extends langium.AstNode {
255
253
  readonly $container: FunctionDecl | Procedure;
256
254
  readonly $type: 'FunctionParam';
257
255
  name: RegularID;
@@ -260,16 +258,16 @@ interface FunctionParam extends AstNode {
260
258
  }
261
259
  declare const FunctionParam = "FunctionParam";
262
260
  declare function isFunctionParam(item: unknown): item is FunctionParam;
263
- interface FunctionParamType extends AstNode {
261
+ interface FunctionParamType extends langium.AstNode {
264
262
  readonly $container: FunctionDecl | FunctionParam | Procedure | ProcedureParam;
265
263
  readonly $type: 'FunctionParamType';
266
264
  array: boolean;
267
- reference?: Reference<TypeDeclaration>;
265
+ reference?: langium.Reference<TypeDeclaration>;
268
266
  type?: ExpressionType;
269
267
  }
270
268
  declare const FunctionParamType = "FunctionParamType";
271
269
  declare function isFunctionParamType(item: unknown): item is FunctionParamType;
272
- interface GeneratorDecl extends AstNode {
270
+ interface GeneratorDecl extends langium.AstNode {
273
271
  readonly $container: Model;
274
272
  readonly $type: 'GeneratorDecl';
275
273
  fields: Array<ConfigField>;
@@ -277,66 +275,66 @@ interface GeneratorDecl extends AstNode {
277
275
  }
278
276
  declare const GeneratorDecl = "GeneratorDecl";
279
277
  declare function isGeneratorDecl(item: unknown): item is GeneratorDecl;
280
- interface InternalAttribute extends AstNode {
278
+ interface InternalAttribute extends langium.AstNode {
281
279
  readonly $container: Attribute | AttributeParam$1 | FunctionDecl | Procedure;
282
280
  readonly $type: 'InternalAttribute';
283
281
  args: Array<AttributeArg>;
284
- decl: Reference<Attribute>;
282
+ decl: langium.Reference<Attribute>;
285
283
  }
286
284
  declare const InternalAttribute = "InternalAttribute";
287
285
  declare function isInternalAttribute(item: unknown): item is InternalAttribute;
288
- interface InvocationExpr extends AstNode {
286
+ interface InvocationExpr extends langium.AstNode {
289
287
  readonly $container: Argument | ArrayExpr | AttributeArg | BinaryExpr | ConfigField | FieldInitializer | FunctionDecl | MemberAccessExpr | ReferenceArg | UnaryExpr;
290
288
  readonly $type: 'InvocationExpr';
291
289
  args: Array<Argument>;
292
- function: Reference<FunctionDecl>;
290
+ function: langium.Reference<FunctionDecl>;
293
291
  }
294
292
  declare const InvocationExpr = "InvocationExpr";
295
293
  declare function isInvocationExpr(item: unknown): item is InvocationExpr;
296
- interface MemberAccessExpr extends AstNode {
294
+ interface MemberAccessExpr extends langium.AstNode {
297
295
  readonly $container: Argument | ArrayExpr | AttributeArg | BinaryExpr | FieldInitializer | FunctionDecl | MemberAccessExpr | ReferenceArg | UnaryExpr;
298
296
  readonly $type: 'MemberAccessExpr';
299
- member: Reference<MemberAccessTarget>;
297
+ member: langium.Reference<MemberAccessTarget>;
300
298
  operand: Expression;
301
299
  }
302
300
  declare const MemberAccessExpr = "MemberAccessExpr";
303
301
  declare function isMemberAccessExpr(item: unknown): item is MemberAccessExpr;
304
- interface Model extends AstNode {
302
+ interface Model extends langium.AstNode {
305
303
  readonly $type: 'Model';
306
304
  declarations: Array<AbstractDeclaration>;
307
305
  imports: Array<ModelImport>;
308
306
  }
309
307
  declare const Model = "Model";
310
308
  declare function isModel(item: unknown): item is Model;
311
- interface ModelImport extends AstNode {
309
+ interface ModelImport extends langium.AstNode {
312
310
  readonly $container: Model;
313
311
  readonly $type: 'ModelImport';
314
312
  path: string;
315
313
  }
316
314
  declare const ModelImport = "ModelImport";
317
315
  declare function isModelImport(item: unknown): item is ModelImport;
318
- interface NullExpr extends AstNode {
316
+ interface NullExpr extends langium.AstNode {
319
317
  readonly $container: Argument | ArrayExpr | AttributeArg | BinaryExpr | FieldInitializer | FunctionDecl | MemberAccessExpr | ReferenceArg | UnaryExpr;
320
318
  readonly $type: 'NullExpr';
321
319
  value: 'null';
322
320
  }
323
321
  declare const NullExpr = "NullExpr";
324
322
  declare function isNullExpr(item: unknown): item is NullExpr;
325
- interface NumberLiteral extends AstNode {
323
+ interface NumberLiteral extends langium.AstNode {
326
324
  readonly $container: Argument | ArrayExpr | AttributeArg | BinaryExpr | ConfigArrayExpr | ConfigField | ConfigInvocationArg | FieldInitializer | FunctionDecl | MemberAccessExpr | PluginField | ReferenceArg | UnaryExpr | UnsupportedFieldType;
327
325
  readonly $type: 'NumberLiteral';
328
326
  value: string;
329
327
  }
330
328
  declare const NumberLiteral = "NumberLiteral";
331
329
  declare function isNumberLiteral(item: unknown): item is NumberLiteral;
332
- interface ObjectExpr extends AstNode {
330
+ interface ObjectExpr extends langium.AstNode {
333
331
  readonly $container: Argument | ArrayExpr | AttributeArg | BinaryExpr | FieldInitializer | FunctionDecl | MemberAccessExpr | PluginField | ReferenceArg | UnaryExpr;
334
332
  readonly $type: 'ObjectExpr';
335
333
  fields: Array<FieldInitializer>;
336
334
  }
337
335
  declare const ObjectExpr = "ObjectExpr";
338
336
  declare function isObjectExpr(item: unknown): item is ObjectExpr;
339
- interface Plugin extends AstNode {
337
+ interface Plugin extends langium.AstNode {
340
338
  readonly $container: Model;
341
339
  readonly $type: 'Plugin';
342
340
  fields: Array<PluginField>;
@@ -344,7 +342,7 @@ interface Plugin extends AstNode {
344
342
  }
345
343
  declare const Plugin = "Plugin";
346
344
  declare function isPlugin(item: unknown): item is Plugin;
347
- interface PluginField extends AstNode {
345
+ interface PluginField extends langium.AstNode {
348
346
  readonly $container: Plugin;
349
347
  readonly $type: 'PluginField';
350
348
  name: RegularID;
@@ -352,7 +350,7 @@ interface PluginField extends AstNode {
352
350
  }
353
351
  declare const PluginField = "PluginField";
354
352
  declare function isPluginField(item: unknown): item is PluginField;
355
- interface Procedure extends AstNode {
353
+ interface Procedure extends langium.AstNode {
356
354
  readonly $container: Model;
357
355
  readonly $type: 'Procedure';
358
356
  attributes: Array<InternalAttribute>;
@@ -363,7 +361,7 @@ interface Procedure extends AstNode {
363
361
  }
364
362
  declare const Procedure = "Procedure";
365
363
  declare function isProcedure(item: unknown): item is Procedure;
366
- interface ProcedureParam extends AstNode {
364
+ interface ProcedureParam extends langium.AstNode {
367
365
  readonly $container: Procedure;
368
366
  readonly $type: 'ProcedureParam';
369
367
  name: RegularID;
@@ -372,7 +370,7 @@ interface ProcedureParam extends AstNode {
372
370
  }
373
371
  declare const ProcedureParam = "ProcedureParam";
374
372
  declare function isProcedureParam(item: unknown): item is ProcedureParam;
375
- interface ReferenceArg extends AstNode {
373
+ interface ReferenceArg extends langium.AstNode {
376
374
  readonly $container: ReferenceExpr;
377
375
  readonly $type: 'ReferenceArg';
378
376
  name: string;
@@ -380,59 +378,40 @@ interface ReferenceArg extends AstNode {
380
378
  }
381
379
  declare const ReferenceArg = "ReferenceArg";
382
380
  declare function isReferenceArg(item: unknown): item is ReferenceArg;
383
- interface ReferenceExpr extends AstNode {
381
+ interface ReferenceExpr extends langium.AstNode {
384
382
  readonly $container: Argument | ArrayExpr | AttributeArg | BinaryExpr | FieldInitializer | FunctionDecl | MemberAccessExpr | ReferenceArg | UnaryExpr;
385
383
  readonly $type: 'ReferenceExpr';
386
384
  args: Array<ReferenceArg>;
387
- target: Reference<ReferenceTarget>;
385
+ target: langium.Reference<ReferenceTarget>;
388
386
  }
389
387
  declare const ReferenceExpr = "ReferenceExpr";
390
388
  declare function isReferenceExpr(item: unknown): item is ReferenceExpr;
391
- interface StringLiteral extends AstNode {
389
+ interface StringLiteral extends langium.AstNode {
392
390
  readonly $container: Argument | ArrayExpr | AttributeArg | BinaryExpr | ConfigArrayExpr | ConfigField | ConfigInvocationArg | FieldInitializer | FunctionDecl | MemberAccessExpr | PluginField | ReferenceArg | UnaryExpr | UnsupportedFieldType;
393
391
  readonly $type: 'StringLiteral';
394
392
  value: string;
395
393
  }
396
394
  declare const StringLiteral = "StringLiteral";
397
395
  declare function isStringLiteral(item: unknown): item is StringLiteral;
398
- interface ThisExpr extends AstNode {
396
+ interface ThisExpr extends langium.AstNode {
399
397
  readonly $container: Argument | ArrayExpr | AttributeArg | BinaryExpr | FieldInitializer | FunctionDecl | MemberAccessExpr | ReferenceArg | UnaryExpr;
400
398
  readonly $type: 'ThisExpr';
401
399
  value: 'this';
402
400
  }
403
401
  declare const ThisExpr = "ThisExpr";
404
402
  declare function isThisExpr(item: unknown): item is ThisExpr;
405
- interface TypeDef extends AstNode {
403
+ interface TypeDef extends langium.AstNode {
406
404
  readonly $container: Model;
407
405
  readonly $type: 'TypeDef';
408
406
  attributes: Array<DataModelAttribute>;
409
407
  comments: Array<string>;
410
- fields: Array<TypeDefField>;
408
+ fields: Array<DataField>;
409
+ mixins: Array<langium.Reference<TypeDef>>;
411
410
  name: RegularID;
412
411
  }
413
412
  declare const TypeDef = "TypeDef";
414
413
  declare function isTypeDef(item: unknown): item is TypeDef;
415
- interface TypeDefField extends AstNode {
416
- readonly $container: TypeDef;
417
- readonly $type: 'TypeDefField';
418
- attributes: Array<DataModelFieldAttribute>;
419
- comments: Array<string>;
420
- name: RegularIDWithTypeNames;
421
- type: TypeDefFieldType;
422
- }
423
- declare const TypeDefField = "TypeDefField";
424
- declare function isTypeDefField(item: unknown): item is TypeDefField;
425
- interface TypeDefFieldType extends AstNode {
426
- readonly $container: TypeDefField;
427
- readonly $type: 'TypeDefFieldType';
428
- array: boolean;
429
- optional: boolean;
430
- reference?: Reference<TypeDefFieldTypes>;
431
- type?: BuiltinType;
432
- }
433
- declare const TypeDefFieldType = "TypeDefFieldType";
434
- declare function isTypeDefFieldType(item: unknown): item is TypeDefFieldType;
435
- interface UnaryExpr extends AstNode {
414
+ interface UnaryExpr extends langium.AstNode {
436
415
  readonly $container: Argument | ArrayExpr | AttributeArg | BinaryExpr | FieldInitializer | FunctionDecl | MemberAccessExpr | ReferenceArg | UnaryExpr;
437
416
  readonly $type: 'UnaryExpr';
438
417
  operand: Expression;
@@ -440,8 +419,8 @@ interface UnaryExpr extends AstNode {
440
419
  }
441
420
  declare const UnaryExpr = "UnaryExpr";
442
421
  declare function isUnaryExpr(item: unknown): item is UnaryExpr;
443
- interface UnsupportedFieldType extends AstNode {
444
- readonly $container: DataModelFieldType;
422
+ interface UnsupportedFieldType extends langium.AstNode {
423
+ readonly $container: DataFieldType;
445
424
  readonly $type: 'UnsupportedFieldType';
446
425
  value: LiteralExpr;
447
426
  }
@@ -462,11 +441,11 @@ type ZModelAstType = {
462
441
  ConfigField: ConfigField;
463
442
  ConfigInvocationArg: ConfigInvocationArg;
464
443
  ConfigInvocationExpr: ConfigInvocationExpr;
444
+ DataField: DataField;
445
+ DataFieldAttribute: DataFieldAttribute;
446
+ DataFieldType: DataFieldType;
465
447
  DataModel: DataModel;
466
448
  DataModelAttribute: DataModelAttribute;
467
- DataModelField: DataModelField;
468
- DataModelFieldAttribute: DataModelFieldAttribute;
469
- DataModelFieldType: DataModelFieldType;
470
449
  DataSource: DataSource;
471
450
  Enum: Enum;
472
451
  EnumField: EnumField;
@@ -497,17 +476,14 @@ type ZModelAstType = {
497
476
  ThisExpr: ThisExpr;
498
477
  TypeDeclaration: TypeDeclaration;
499
478
  TypeDef: TypeDef;
500
- TypeDefField: TypeDefField;
501
- TypeDefFieldType: TypeDefFieldType;
502
- TypeDefFieldTypes: TypeDefFieldTypes;
503
479
  UnaryExpr: UnaryExpr;
504
480
  UnsupportedFieldType: UnsupportedFieldType;
505
481
  };
506
- declare class ZModelAstReflection extends AbstractAstReflection {
482
+ declare class ZModelAstReflection extends langium.AbstractAstReflection {
507
483
  getAllTypes(): string[];
508
484
  protected computeIsSubtype(subtype: string, supertype: string): boolean;
509
- getReferenceType(refInfo: ReferenceInfo): string;
510
- getTypeMetaData(type: string): TypeMetaData;
485
+ getReferenceType(refInfo: langium.ReferenceInfo): string;
486
+ getTypeMetaData(type: string): langium.TypeMetaData;
511
487
  }
512
488
  declare const reflection: ZModelAstReflection;
513
489
 
@@ -531,21 +507,11 @@ declare module './ast' {
531
507
  */
532
508
  $resolvedParam?: AttributeParam;
533
509
  }
534
- interface DataModelField {
535
- $inheritedFrom?: DataModel;
536
- }
537
- interface DataModelAttribute {
538
- $inheritedFrom?: DataModel;
539
- }
540
510
  interface DataModel {
541
- /**
542
- * Indicates whether the model is already merged with the base types
543
- */
544
- $baseMerged?: boolean;
545
511
  /**
546
512
  * All fields including those marked with `@ignore`
547
513
  */
548
- $allFields?: DataModelField[];
514
+ $allFields?: DataField[];
549
515
  }
550
516
  }
551
517
  interface InheritableNode extends AstNode {
@@ -563,4 +529,4 @@ declare module 'langium' {
563
529
  }
564
530
  }
565
531
 
566
- 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 };