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