@zenstackhq/language 3.5.6 → 3.6.0

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 (45) hide show
  1. package/dist/ast-Clidp86c.cjs +1465 -0
  2. package/dist/ast-Clidp86c.cjs.map +1 -0
  3. package/dist/ast-DEfhnj8j.mjs +765 -0
  4. package/dist/ast-DEfhnj8j.mjs.map +1 -0
  5. package/dist/ast-DQDdBZQ3.d.mts +525 -0
  6. package/dist/ast-W2h6Qtfk.d.cts +525 -0
  7. package/dist/ast.cjs +130 -1432
  8. package/dist/ast.cjs.map +1 -1
  9. package/dist/ast.d.cts +2 -541
  10. package/dist/ast.d.mts +2 -0
  11. package/dist/ast.mjs +20 -0
  12. package/dist/ast.mjs.map +1 -0
  13. package/dist/factory.cjs +754 -2030
  14. package/dist/factory.cjs.map +1 -1
  15. package/dist/factory.d.cts +220 -215
  16. package/dist/factory.d.mts +289 -0
  17. package/dist/factory.mjs +778 -0
  18. package/dist/factory.mjs.map +1 -0
  19. package/dist/index.cjs +2691 -5454
  20. package/dist/index.cjs.map +1 -1
  21. package/dist/index.d.cts +104 -103
  22. package/dist/index.d.mts +170 -0
  23. package/dist/index.mjs +6925 -0
  24. package/dist/index.mjs.map +1 -0
  25. package/dist/utils-BB6L7ug2.mjs +529 -0
  26. package/dist/utils-BB6L7ug2.mjs.map +1 -0
  27. package/dist/utils-CfXGZkv7.cjs +842 -0
  28. package/dist/utils-CfXGZkv7.cjs.map +1 -0
  29. package/dist/utils.cjs +47 -1650
  30. package/dist/utils.d.cts +101 -10
  31. package/dist/{utils.d.ts → utils.d.mts} +101 -10
  32. package/dist/utils.mjs +2 -0
  33. package/package.json +16 -15
  34. package/dist/ast.d.ts +0 -541
  35. package/dist/ast.js +0 -1288
  36. package/dist/ast.js.map +0 -1
  37. package/dist/factory.d.ts +0 -284
  38. package/dist/factory.js +0 -2020
  39. package/dist/factory.js.map +0 -1
  40. package/dist/index.d.ts +0 -169
  41. package/dist/index.js +0 -9656
  42. package/dist/index.js.map +0 -1
  43. package/dist/utils.cjs.map +0 -1
  44. package/dist/utils.js +0 -1572
  45. package/dist/utils.js.map +0 -1
@@ -0,0 +1,525 @@
1
+ import * as langium from "langium";
2
+ import { AstNode, AstNode as AstNode$1, Reference as Reference$1 } from "langium";
3
+
4
+ //#region src/generated/ast.d.ts
5
+ declare const ZModelTerminals: {
6
+ WS: RegExp;
7
+ INTERNAL_ATTRIBUTE_NAME: RegExp;
8
+ MODEL_ATTRIBUTE_NAME: RegExp;
9
+ FIELD_ATTRIBUTE_NAME: RegExp;
10
+ ID: RegExp;
11
+ STRING: RegExp;
12
+ NUMBER: RegExp;
13
+ TRIPLE_SLASH_COMMENT: RegExp;
14
+ ML_COMMENT: RegExp;
15
+ SL_COMMENT: RegExp;
16
+ };
17
+ type ZModelTerminalNames = keyof typeof ZModelTerminals;
18
+ type ZModelKeywordNames = "!" | "!=" | "&&" | "(" | ")" | "," | "." | ":" | ";" | "<" | "<=" | "=" | "==" | ">" | ">=" | "?" | "Any" | "BigInt" | "Boolean" | "Bytes" | "ContextType" | "DateTime" | "Decimal" | "FieldReference" | "Float" | "Int" | "Json" | "Null" | "Object" | "String" | "TransitiveFieldReference" | "Undefined" | "Unsupported" | "Void" | "[" | "]" | "^" | "_" | "abstract" | "attribute" | "datasource" | "enum" | "extends" | "false" | "function" | "generator" | "import" | "in" | "model" | "mutation" | "null" | "plugin" | "procedure" | "this" | "true" | "type" | "view" | "with" | "{" | "||" | "}";
19
+ type ZModelTokenNames = ZModelTerminalNames | ZModelKeywordNames;
20
+ type AbstractDeclaration = Attribute | DataModel | DataSource | Enum | FunctionDecl | GeneratorDecl | Plugin | Procedure | TypeDef;
21
+ declare const AbstractDeclaration = "AbstractDeclaration";
22
+ declare function isAbstractDeclaration(item: unknown): item is AbstractDeclaration;
23
+ type Boolean = boolean;
24
+ declare function isBoolean(item: unknown): item is Boolean;
25
+ type BuiltinType = 'BigInt' | 'Boolean' | 'Bytes' | 'DateTime' | 'Decimal' | 'Float' | 'Int' | 'Json' | 'String';
26
+ declare function isBuiltinType(item: unknown): item is BuiltinType;
27
+ type ConfigExpr = ConfigArrayExpr | InvocationExpr | LiteralExpr;
28
+ declare const ConfigExpr = "ConfigExpr";
29
+ declare function isConfigExpr(item: unknown): item is ConfigExpr;
30
+ type Expression = ArrayExpr | BinaryExpr | InvocationExpr | LiteralExpr | MemberAccessExpr | NullExpr | ObjectExpr | ReferenceExpr | ThisExpr | UnaryExpr;
31
+ declare const Expression = "Expression";
32
+ declare function isExpression(item: unknown): item is Expression;
33
+ type ExpressionType = 'Any' | 'BigInt' | 'Boolean' | 'Bytes' | 'DateTime' | 'Decimal' | 'Float' | 'Int' | 'Json' | 'Null' | 'Object' | 'String' | 'Undefined' | 'Unsupported' | 'Void';
34
+ declare function isExpressionType(item: unknown): item is ExpressionType;
35
+ type LiteralExpr = BooleanLiteral | NumberLiteral | StringLiteral;
36
+ declare const LiteralExpr = "LiteralExpr";
37
+ declare function isLiteralExpr(item: unknown): item is LiteralExpr;
38
+ type MemberAccessTarget = DataField;
39
+ declare const MemberAccessTarget = "MemberAccessTarget";
40
+ declare function isMemberAccessTarget(item: unknown): item is MemberAccessTarget;
41
+ type ReferenceTarget = CollectionPredicateBinding | DataField | EnumField | FunctionParam;
42
+ declare const ReferenceTarget = "ReferenceTarget";
43
+ declare function isReferenceTarget(item: unknown): item is ReferenceTarget;
44
+ type RegularID = 'abstract' | 'attribute' | 'datasource' | 'enum' | 'import' | 'in' | 'model' | 'plugin' | 'type' | 'view' | string;
45
+ declare function isRegularID(item: unknown): item is RegularID;
46
+ type RegularIDWithTypeNames = 'Any' | 'BigInt' | 'Boolean' | 'Bytes' | 'DateTime' | 'Decimal' | 'Float' | 'Int' | 'Json' | 'Null' | 'Object' | 'String' | 'Unsupported' | 'Void' | RegularID;
47
+ declare function isRegularIDWithTypeNames(item: unknown): item is RegularIDWithTypeNames;
48
+ type TypeDeclaration = DataModel | Enum | TypeDef;
49
+ declare const TypeDeclaration = "TypeDeclaration";
50
+ declare function isTypeDeclaration(item: unknown): item is TypeDeclaration;
51
+ interface Argument extends langium.AstNode {
52
+ readonly $container: InvocationExpr;
53
+ readonly $type: 'Argument';
54
+ value: Expression;
55
+ }
56
+ declare const Argument = "Argument";
57
+ declare function isArgument(item: unknown): item is Argument;
58
+ interface ArrayExpr extends langium.AstNode {
59
+ readonly $container: Argument | ArrayExpr | AttributeArg | BinaryExpr | FieldInitializer | FunctionDecl | MemberAccessExpr | PluginField | ReferenceArg | UnaryExpr;
60
+ readonly $type: 'ArrayExpr';
61
+ items: Array<Expression>;
62
+ }
63
+ declare const ArrayExpr = "ArrayExpr";
64
+ declare function isArrayExpr(item: unknown): item is ArrayExpr;
65
+ interface Attribute extends langium.AstNode {
66
+ readonly $container: Model;
67
+ readonly $type: 'Attribute';
68
+ attributes: Array<InternalAttribute>;
69
+ comments: Array<string>;
70
+ name: string;
71
+ params: Array<AttributeParam>;
72
+ }
73
+ declare const Attribute = "Attribute";
74
+ declare function isAttribute(item: unknown): item is Attribute;
75
+ interface AttributeArg extends langium.AstNode {
76
+ readonly $container: DataFieldAttribute | DataModelAttribute | InternalAttribute;
77
+ readonly $type: 'AttributeArg';
78
+ name?: RegularID;
79
+ value: Expression;
80
+ /** Resolved attribute param declaration */
81
+ $resolvedParam?: AttributeParam;
82
+ }
83
+ declare const AttributeArg = "AttributeArg";
84
+ declare function isAttributeArg(item: unknown): item is AttributeArg;
85
+ interface AttributeParam extends langium.AstNode {
86
+ readonly $container: Attribute;
87
+ readonly $type: 'AttributeParam';
88
+ attributes: Array<InternalAttribute>;
89
+ comments: Array<string>;
90
+ default: boolean;
91
+ name: RegularID;
92
+ type: AttributeParamType;
93
+ }
94
+ declare const AttributeParam = "AttributeParam";
95
+ declare function isAttributeParam(item: unknown): item is AttributeParam;
96
+ interface AttributeParamType extends langium.AstNode {
97
+ readonly $container: AttributeParam;
98
+ readonly $type: 'AttributeParamType';
99
+ array: boolean;
100
+ optional: boolean;
101
+ reference?: langium.Reference<TypeDeclaration>;
102
+ type?: 'ContextType' | 'FieldReference' | 'TransitiveFieldReference' | ExpressionType;
103
+ }
104
+ declare const AttributeParamType = "AttributeParamType";
105
+ declare function isAttributeParamType(item: unknown): item is AttributeParamType;
106
+ interface BinaryExpr extends langium.AstNode {
107
+ readonly $container: Argument | ArrayExpr | AttributeArg | BinaryExpr | FieldInitializer | FunctionDecl | MemberAccessExpr | ReferenceArg | UnaryExpr;
108
+ readonly $type: 'BinaryExpr';
109
+ binding?: CollectionPredicateBinding;
110
+ left: Expression;
111
+ operator: '!' | '!=' | '&&' | '<' | '<=' | '==' | '>' | '>=' | '?' | '^' | 'in' | '||';
112
+ right: Expression;
113
+ }
114
+ declare const BinaryExpr = "BinaryExpr";
115
+ declare function isBinaryExpr(item: unknown): item is BinaryExpr;
116
+ interface BooleanLiteral extends langium.AstNode {
117
+ readonly $container: Argument | ArrayExpr | AttributeArg | BinaryExpr | ConfigArrayExpr | ConfigField | ConfigInvocationArg | FieldInitializer | FunctionDecl | MemberAccessExpr | PluginField | ReferenceArg | UnaryExpr | UnsupportedFieldType;
118
+ readonly $type: 'BooleanLiteral';
119
+ value: Boolean;
120
+ }
121
+ declare const BooleanLiteral = "BooleanLiteral";
122
+ declare function isBooleanLiteral(item: unknown): item is BooleanLiteral;
123
+ interface CollectionPredicateBinding extends langium.AstNode {
124
+ readonly $container: BinaryExpr;
125
+ readonly $type: 'CollectionPredicateBinding';
126
+ name: RegularID;
127
+ }
128
+ declare const CollectionPredicateBinding = "CollectionPredicateBinding";
129
+ declare function isCollectionPredicateBinding(item: unknown): item is CollectionPredicateBinding;
130
+ interface ConfigArrayExpr extends langium.AstNode {
131
+ readonly $container: ConfigField;
132
+ readonly $type: 'ConfigArrayExpr';
133
+ items: Array<ConfigInvocationExpr | LiteralExpr>;
134
+ }
135
+ declare const ConfigArrayExpr = "ConfigArrayExpr";
136
+ declare function isConfigArrayExpr(item: unknown): item is ConfigArrayExpr;
137
+ interface ConfigField extends langium.AstNode {
138
+ readonly $container: DataSource | GeneratorDecl;
139
+ readonly $type: 'ConfigField';
140
+ name: RegularID;
141
+ value: ConfigExpr;
142
+ }
143
+ declare const ConfigField = "ConfigField";
144
+ declare function isConfigField(item: unknown): item is ConfigField;
145
+ interface ConfigInvocationArg extends langium.AstNode {
146
+ readonly $container: ConfigInvocationExpr;
147
+ readonly $type: 'ConfigInvocationArg';
148
+ name: string;
149
+ value: LiteralExpr;
150
+ }
151
+ declare const ConfigInvocationArg = "ConfigInvocationArg";
152
+ declare function isConfigInvocationArg(item: unknown): item is ConfigInvocationArg;
153
+ interface ConfigInvocationExpr extends langium.AstNode {
154
+ readonly $container: ConfigArrayExpr;
155
+ readonly $type: 'ConfigInvocationExpr';
156
+ args: Array<ConfigInvocationArg>;
157
+ name: string;
158
+ }
159
+ declare const ConfigInvocationExpr = "ConfigInvocationExpr";
160
+ declare function isConfigInvocationExpr(item: unknown): item is ConfigInvocationExpr;
161
+ interface DataField extends langium.AstNode {
162
+ readonly $container: DataModel | TypeDef;
163
+ readonly $type: 'DataField';
164
+ attributes: Array<DataFieldAttribute>;
165
+ comments: Array<string>;
166
+ name: RegularIDWithTypeNames;
167
+ type: DataFieldType;
168
+ }
169
+ declare const DataField = "DataField";
170
+ declare function isDataField(item: unknown): item is DataField;
171
+ interface DataFieldAttribute extends langium.AstNode {
172
+ readonly $container: DataField | EnumField;
173
+ readonly $type: 'DataFieldAttribute';
174
+ args: Array<AttributeArg>;
175
+ decl: langium.Reference<Attribute>;
176
+ }
177
+ declare const DataFieldAttribute = "DataFieldAttribute";
178
+ declare function isDataFieldAttribute(item: unknown): item is DataFieldAttribute;
179
+ interface DataFieldType extends langium.AstNode {
180
+ readonly $container: DataField;
181
+ readonly $type: 'DataFieldType';
182
+ array: boolean;
183
+ optional: boolean;
184
+ reference?: langium.Reference<TypeDeclaration>;
185
+ type?: BuiltinType;
186
+ unsupported?: UnsupportedFieldType;
187
+ }
188
+ declare const DataFieldType = "DataFieldType";
189
+ declare function isDataFieldType(item: unknown): item is DataFieldType;
190
+ interface DataModel extends langium.AstNode {
191
+ readonly $container: Model;
192
+ readonly $type: 'DataModel';
193
+ attributes: Array<DataModelAttribute>;
194
+ baseModel?: langium.Reference<DataModel>;
195
+ comments: Array<string>;
196
+ fields: Array<DataField>;
197
+ isView: boolean;
198
+ mixins: Array<langium.Reference<TypeDef>>;
199
+ name: RegularID;
200
+ /** All fields including those marked with `@ignore` */
201
+ $allFields?: DataField[];
202
+ }
203
+ declare const DataModel = "DataModel";
204
+ declare function isDataModel(item: unknown): item is DataModel;
205
+ interface DataModelAttribute extends langium.AstNode {
206
+ readonly $container: DataModel | Enum | TypeDef;
207
+ readonly $type: 'DataModelAttribute';
208
+ args: Array<AttributeArg>;
209
+ decl: langium.Reference<Attribute>;
210
+ }
211
+ declare const DataModelAttribute = "DataModelAttribute";
212
+ declare function isDataModelAttribute(item: unknown): item is DataModelAttribute;
213
+ interface DataSource extends langium.AstNode {
214
+ readonly $container: Model;
215
+ readonly $type: 'DataSource';
216
+ fields: Array<ConfigField>;
217
+ name: RegularID;
218
+ }
219
+ declare const DataSource = "DataSource";
220
+ declare function isDataSource(item: unknown): item is DataSource;
221
+ interface Enum extends langium.AstNode {
222
+ readonly $container: Model;
223
+ readonly $type: 'Enum';
224
+ attributes: Array<DataModelAttribute>;
225
+ comments: Array<string>;
226
+ fields: Array<EnumField>;
227
+ name: RegularID;
228
+ }
229
+ declare const Enum = "Enum";
230
+ declare function isEnum(item: unknown): item is Enum;
231
+ interface EnumField extends langium.AstNode {
232
+ readonly $container: Enum;
233
+ readonly $type: 'EnumField';
234
+ attributes: Array<DataFieldAttribute>;
235
+ comments: Array<string>;
236
+ name: RegularIDWithTypeNames;
237
+ }
238
+ declare const EnumField = "EnumField";
239
+ declare function isEnumField(item: unknown): item is EnumField;
240
+ interface FieldInitializer extends langium.AstNode {
241
+ readonly $container: ObjectExpr;
242
+ readonly $type: 'FieldInitializer';
243
+ name: RegularID | string;
244
+ value: Expression;
245
+ }
246
+ declare const FieldInitializer = "FieldInitializer";
247
+ declare function isFieldInitializer(item: unknown): item is FieldInitializer;
248
+ interface FunctionDecl extends langium.AstNode {
249
+ readonly $container: Model;
250
+ readonly $type: 'FunctionDecl';
251
+ attributes: Array<InternalAttribute>;
252
+ expression?: Expression;
253
+ name: RegularID;
254
+ params: Array<FunctionParam>;
255
+ returnType: FunctionParamType;
256
+ }
257
+ declare const FunctionDecl = "FunctionDecl";
258
+ declare function isFunctionDecl(item: unknown): item is FunctionDecl;
259
+ interface FunctionParam extends langium.AstNode {
260
+ readonly $container: FunctionDecl;
261
+ readonly $type: 'FunctionParam';
262
+ name: RegularID;
263
+ optional: boolean;
264
+ type: FunctionParamType;
265
+ }
266
+ declare const FunctionParam = "FunctionParam";
267
+ declare function isFunctionParam(item: unknown): item is FunctionParam;
268
+ interface FunctionParamType extends langium.AstNode {
269
+ readonly $container: FunctionDecl | FunctionParam | Procedure | ProcedureParam;
270
+ readonly $type: 'FunctionParamType';
271
+ array: boolean;
272
+ reference?: langium.Reference<TypeDeclaration>;
273
+ type?: ExpressionType;
274
+ }
275
+ declare const FunctionParamType = "FunctionParamType";
276
+ declare function isFunctionParamType(item: unknown): item is FunctionParamType;
277
+ interface GeneratorDecl extends langium.AstNode {
278
+ readonly $container: Model;
279
+ readonly $type: 'GeneratorDecl';
280
+ fields: Array<ConfigField>;
281
+ name: RegularID;
282
+ }
283
+ declare const GeneratorDecl = "GeneratorDecl";
284
+ declare function isGeneratorDecl(item: unknown): item is GeneratorDecl;
285
+ interface InternalAttribute extends langium.AstNode {
286
+ readonly $container: Attribute | AttributeParam | FunctionDecl | Procedure;
287
+ readonly $type: 'InternalAttribute';
288
+ args: Array<AttributeArg>;
289
+ decl: langium.Reference<Attribute>;
290
+ }
291
+ declare const InternalAttribute = "InternalAttribute";
292
+ declare function isInternalAttribute(item: unknown): item is InternalAttribute;
293
+ interface InvocationExpr extends langium.AstNode {
294
+ readonly $container: Argument | ArrayExpr | AttributeArg | BinaryExpr | ConfigField | FieldInitializer | FunctionDecl | MemberAccessExpr | ReferenceArg | UnaryExpr;
295
+ readonly $type: 'InvocationExpr';
296
+ args: Array<Argument>;
297
+ function: langium.Reference<FunctionDecl>;
298
+ }
299
+ declare const InvocationExpr = "InvocationExpr";
300
+ declare function isInvocationExpr(item: unknown): item is InvocationExpr;
301
+ interface MemberAccessExpr extends langium.AstNode {
302
+ readonly $container: Argument | ArrayExpr | AttributeArg | BinaryExpr | FieldInitializer | FunctionDecl | MemberAccessExpr | ReferenceArg | UnaryExpr;
303
+ readonly $type: 'MemberAccessExpr';
304
+ member: langium.Reference<MemberAccessTarget>;
305
+ operand: Expression;
306
+ }
307
+ declare const MemberAccessExpr = "MemberAccessExpr";
308
+ declare function isMemberAccessExpr(item: unknown): item is MemberAccessExpr;
309
+ interface Model extends langium.AstNode {
310
+ readonly $type: 'Model';
311
+ declarations: Array<AbstractDeclaration>;
312
+ imports: Array<ModelImport>;
313
+ }
314
+ declare const Model = "Model";
315
+ declare function isModel(item: unknown): item is Model;
316
+ interface ModelImport extends langium.AstNode {
317
+ readonly $container: Model;
318
+ readonly $type: 'ModelImport';
319
+ path: string;
320
+ }
321
+ declare const ModelImport = "ModelImport";
322
+ declare function isModelImport(item: unknown): item is ModelImport;
323
+ interface NullExpr extends langium.AstNode {
324
+ readonly $container: Argument | ArrayExpr | AttributeArg | BinaryExpr | FieldInitializer | FunctionDecl | MemberAccessExpr | ReferenceArg | UnaryExpr;
325
+ readonly $type: 'NullExpr';
326
+ value: 'null';
327
+ }
328
+ declare const NullExpr = "NullExpr";
329
+ declare function isNullExpr(item: unknown): item is NullExpr;
330
+ interface NumberLiteral extends langium.AstNode {
331
+ readonly $container: Argument | ArrayExpr | AttributeArg | BinaryExpr | ConfigArrayExpr | ConfigField | ConfigInvocationArg | FieldInitializer | FunctionDecl | MemberAccessExpr | PluginField | ReferenceArg | UnaryExpr | UnsupportedFieldType;
332
+ readonly $type: 'NumberLiteral';
333
+ value: string;
334
+ }
335
+ declare const NumberLiteral = "NumberLiteral";
336
+ declare function isNumberLiteral(item: unknown): item is NumberLiteral;
337
+ interface ObjectExpr extends langium.AstNode {
338
+ readonly $container: Argument | ArrayExpr | AttributeArg | BinaryExpr | FieldInitializer | FunctionDecl | MemberAccessExpr | PluginField | ReferenceArg | UnaryExpr;
339
+ readonly $type: 'ObjectExpr';
340
+ fields: Array<FieldInitializer>;
341
+ }
342
+ declare const ObjectExpr = "ObjectExpr";
343
+ declare function isObjectExpr(item: unknown): item is ObjectExpr;
344
+ interface Plugin extends langium.AstNode {
345
+ readonly $container: Model;
346
+ readonly $type: 'Plugin';
347
+ fields: Array<PluginField>;
348
+ name: RegularID;
349
+ }
350
+ declare const Plugin = "Plugin";
351
+ declare function isPlugin(item: unknown): item is Plugin;
352
+ interface PluginField extends langium.AstNode {
353
+ readonly $container: Plugin;
354
+ readonly $type: 'PluginField';
355
+ name: RegularID;
356
+ value: ArrayExpr | LiteralExpr | ObjectExpr;
357
+ }
358
+ declare const PluginField = "PluginField";
359
+ declare function isPluginField(item: unknown): item is PluginField;
360
+ interface Procedure extends langium.AstNode {
361
+ readonly $container: Model;
362
+ readonly $type: 'Procedure';
363
+ attributes: Array<InternalAttribute>;
364
+ mutation: boolean;
365
+ name: RegularID;
366
+ params: Array<ProcedureParam>;
367
+ returnType: FunctionParamType;
368
+ }
369
+ declare const Procedure = "Procedure";
370
+ declare function isProcedure(item: unknown): item is Procedure;
371
+ interface ProcedureParam extends langium.AstNode {
372
+ readonly $container: Procedure;
373
+ readonly $type: 'ProcedureParam';
374
+ name: RegularID;
375
+ optional: boolean;
376
+ type: FunctionParamType;
377
+ }
378
+ declare const ProcedureParam = "ProcedureParam";
379
+ declare function isProcedureParam(item: unknown): item is ProcedureParam;
380
+ interface ReferenceArg extends langium.AstNode {
381
+ readonly $container: ReferenceExpr;
382
+ readonly $type: 'ReferenceArg';
383
+ name: string;
384
+ value: Expression;
385
+ }
386
+ declare const ReferenceArg = "ReferenceArg";
387
+ declare function isReferenceArg(item: unknown): item is ReferenceArg;
388
+ interface ReferenceExpr extends langium.AstNode {
389
+ readonly $container: Argument | ArrayExpr | AttributeArg | BinaryExpr | FieldInitializer | FunctionDecl | MemberAccessExpr | ReferenceArg | UnaryExpr;
390
+ readonly $type: 'ReferenceExpr';
391
+ args: Array<ReferenceArg>;
392
+ target: langium.Reference<ReferenceTarget>;
393
+ }
394
+ declare const ReferenceExpr = "ReferenceExpr";
395
+ declare function isReferenceExpr(item: unknown): item is ReferenceExpr;
396
+ interface StringLiteral extends langium.AstNode {
397
+ readonly $container: Argument | ArrayExpr | AttributeArg | BinaryExpr | ConfigArrayExpr | ConfigField | ConfigInvocationArg | FieldInitializer | FunctionDecl | MemberAccessExpr | PluginField | ReferenceArg | UnaryExpr | UnsupportedFieldType;
398
+ readonly $type: 'StringLiteral';
399
+ value: string;
400
+ }
401
+ declare const StringLiteral = "StringLiteral";
402
+ declare function isStringLiteral(item: unknown): item is StringLiteral;
403
+ interface ThisExpr extends langium.AstNode {
404
+ readonly $container: Argument | ArrayExpr | AttributeArg | BinaryExpr | FieldInitializer | FunctionDecl | MemberAccessExpr | ReferenceArg | UnaryExpr;
405
+ readonly $type: 'ThisExpr';
406
+ value: 'this';
407
+ }
408
+ declare const ThisExpr = "ThisExpr";
409
+ declare function isThisExpr(item: unknown): item is ThisExpr;
410
+ interface TypeDef extends langium.AstNode {
411
+ readonly $container: Model;
412
+ readonly $type: 'TypeDef';
413
+ attributes: Array<DataModelAttribute>;
414
+ comments: Array<string>;
415
+ fields: Array<DataField>;
416
+ mixins: Array<langium.Reference<TypeDef>>;
417
+ name: RegularID;
418
+ }
419
+ declare const TypeDef = "TypeDef";
420
+ declare function isTypeDef(item: unknown): item is TypeDef;
421
+ interface UnaryExpr extends langium.AstNode {
422
+ readonly $container: Argument | ArrayExpr | AttributeArg | BinaryExpr | FieldInitializer | FunctionDecl | MemberAccessExpr | ReferenceArg | UnaryExpr;
423
+ readonly $type: 'UnaryExpr';
424
+ operand: Expression;
425
+ operator: '!';
426
+ }
427
+ declare const UnaryExpr = "UnaryExpr";
428
+ declare function isUnaryExpr(item: unknown): item is UnaryExpr;
429
+ interface UnsupportedFieldType extends langium.AstNode {
430
+ readonly $container: DataFieldType;
431
+ readonly $type: 'UnsupportedFieldType';
432
+ value: LiteralExpr;
433
+ }
434
+ declare const UnsupportedFieldType = "UnsupportedFieldType";
435
+ declare function isUnsupportedFieldType(item: unknown): item is UnsupportedFieldType;
436
+ type ZModelAstType = {
437
+ AbstractDeclaration: AbstractDeclaration;
438
+ Argument: Argument;
439
+ ArrayExpr: ArrayExpr;
440
+ Attribute: Attribute;
441
+ AttributeArg: AttributeArg;
442
+ AttributeParam: AttributeParam;
443
+ AttributeParamType: AttributeParamType;
444
+ BinaryExpr: BinaryExpr;
445
+ BooleanLiteral: BooleanLiteral;
446
+ CollectionPredicateBinding: CollectionPredicateBinding;
447
+ ConfigArrayExpr: ConfigArrayExpr;
448
+ ConfigExpr: ConfigExpr;
449
+ ConfigField: ConfigField;
450
+ ConfigInvocationArg: ConfigInvocationArg;
451
+ ConfigInvocationExpr: ConfigInvocationExpr;
452
+ DataField: DataField;
453
+ DataFieldAttribute: DataFieldAttribute;
454
+ DataFieldType: DataFieldType;
455
+ DataModel: DataModel;
456
+ DataModelAttribute: DataModelAttribute;
457
+ DataSource: DataSource;
458
+ Enum: Enum;
459
+ EnumField: EnumField;
460
+ Expression: Expression;
461
+ FieldInitializer: FieldInitializer;
462
+ FunctionDecl: FunctionDecl;
463
+ FunctionParam: FunctionParam;
464
+ FunctionParamType: FunctionParamType;
465
+ GeneratorDecl: GeneratorDecl;
466
+ InternalAttribute: InternalAttribute;
467
+ InvocationExpr: InvocationExpr;
468
+ LiteralExpr: LiteralExpr;
469
+ MemberAccessExpr: MemberAccessExpr;
470
+ MemberAccessTarget: MemberAccessTarget;
471
+ Model: Model;
472
+ ModelImport: ModelImport;
473
+ NullExpr: NullExpr;
474
+ NumberLiteral: NumberLiteral;
475
+ ObjectExpr: ObjectExpr;
476
+ Plugin: Plugin;
477
+ PluginField: PluginField;
478
+ Procedure: Procedure;
479
+ ProcedureParam: ProcedureParam;
480
+ ReferenceArg: ReferenceArg;
481
+ ReferenceExpr: ReferenceExpr;
482
+ ReferenceTarget: ReferenceTarget;
483
+ StringLiteral: StringLiteral;
484
+ ThisExpr: ThisExpr;
485
+ TypeDeclaration: TypeDeclaration;
486
+ TypeDef: TypeDef;
487
+ UnaryExpr: UnaryExpr;
488
+ UnsupportedFieldType: UnsupportedFieldType;
489
+ };
490
+ declare class ZModelAstReflection extends langium.AbstractAstReflection {
491
+ getAllTypes(): string[];
492
+ protected computeIsSubtype(subtype: string, supertype: string): boolean;
493
+ getReferenceType(refInfo: langium.ReferenceInfo): string;
494
+ getTypeMetaData(type: string): langium.TypeMetaData;
495
+ }
496
+ declare const reflection: ZModelAstReflection;
497
+ //#endregion
498
+ //#region src/ast.d.ts
499
+ /**
500
+ * Shape of type resolution result: an expression type or reference to a declaration
501
+ */
502
+ type ResolvedShape = ExpressionType | AbstractDeclaration;
503
+ /**
504
+ * Resolved type information (attached to expressions by linker)
505
+ */
506
+ type ResolvedType = {
507
+ decl?: ResolvedShape;
508
+ array?: boolean;
509
+ nullable?: boolean;
510
+ };
511
+ declare const BinaryExprOperatorPriority: Record<BinaryExpr['operator'], number>;
512
+ interface InheritableNode extends AstNode {
513
+ $inheritedFrom?: DataModel;
514
+ }
515
+ declare module 'langium' {
516
+ interface AstNode {
517
+ /**
518
+ * Resolved type information attached to expressions
519
+ */
520
+ $resolvedType?: ResolvedType;
521
+ }
522
+ }
523
+ //#endregion
524
+ export { ReferenceArg as $, isModel as $t, Enum as A, isConfigField as At, InvocationExpr as B, isEnumField as Bt, ConfigInvocationExpr as C, isBinaryExpr as Ct, DataModel as D, isCollectionPredicateBinding as Dt, DataFieldType as E, isBuiltinType as Et, FunctionDecl as F, isDataFieldType as Ft, ModelImport as G, isFunctionParam as Gt, MemberAccessExpr as H, isExpressionType as Ht, FunctionParam as I, isDataModel as It, ObjectExpr as J, isInternalAttribute as Jt, NullExpr as K, isFunctionParamType as Kt, FunctionParamType as L, isDataModelAttribute as Lt, Expression as M, isConfigInvocationExpr as Mt, ExpressionType as N, isDataField as Nt, DataModelAttribute as O, isConfigArrayExpr as Ot, FieldInitializer as P, isDataFieldAttribute as Pt, ProcedureParam as Q, isMemberAccessTarget as Qt, GeneratorDecl as R, isDataSource as Rt, ConfigInvocationArg as S, isAttributeParamType as St, DataFieldAttribute as T, isBooleanLiteral as Tt, MemberAccessTarget as U, isFieldInitializer as Ut, LiteralExpr as V, isExpression as Vt, Model as W, isFunctionDecl as Wt, PluginField as X, isLiteralExpr as Xt, Plugin as Y, isInvocationExpr as Yt, Procedure as Z, isMemberAccessExpr as Zt, BuiltinType as _, isUnaryExpr as _n, isArgument as _t, ResolvedShape as a, isPluginField as an, ThisExpr as at, ConfigExpr as b, isAttributeArg as bt, Argument as c, isReferenceArg as cn, UnaryExpr as ct, AttributeArg as d, isRegularID as dn, ZModelAstType as dt, isModelImport as en, ReferenceExpr as et, AttributeParam as f, isRegularIDWithTypeNames as fn, ZModelKeywordNames as ft, BooleanLiteral as g, isTypeDef as gn, isAbstractDeclaration as gt, Boolean as h, isTypeDeclaration as hn, ZModelTokenNames as ht, Reference$1 as i, isPlugin as in, StringLiteral as it, EnumField as j, isConfigInvocationArg as jt, DataSource as k, isConfigExpr as kt, ArrayExpr as l, isReferenceExpr as ln, UnsupportedFieldType as lt, BinaryExpr as m, isThisExpr as mn, ZModelTerminals as mt, BinaryExprOperatorPriority as n, isNumberLiteral as nn, RegularID as nt, ResolvedType as o, isProcedure as on, TypeDeclaration as ot, AttributeParamType as p, isStringLiteral as pn, ZModelTerminalNames as pt, NumberLiteral as q, isGeneratorDecl as qt, InheritableNode as r, isObjectExpr as rn, RegularIDWithTypeNames as rt, AbstractDeclaration as s, isProcedureParam as sn, TypeDef as st, AstNode$1 as t, isNullExpr as tn, ReferenceTarget as tt, Attribute as u, isReferenceTarget as un, ZModelAstReflection as ut, CollectionPredicateBinding as v, isUnsupportedFieldType as vn, isArrayExpr as vt, DataField as w, isBoolean as wt, ConfigField as x, isAttributeParam as xt, ConfigArrayExpr as y, reflection as yn, isAttribute as yt, InternalAttribute as z, isEnum as zt };
525
+ //# sourceMappingURL=ast-W2h6Qtfk.d.cts.map