@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.
- package/dist/ast-Clidp86c.cjs +1465 -0
- package/dist/ast-Clidp86c.cjs.map +1 -0
- package/dist/ast-DEfhnj8j.mjs +765 -0
- package/dist/ast-DEfhnj8j.mjs.map +1 -0
- package/dist/ast-DQDdBZQ3.d.mts +525 -0
- package/dist/ast-W2h6Qtfk.d.cts +525 -0
- package/dist/ast.cjs +130 -1432
- package/dist/ast.cjs.map +1 -1
- package/dist/ast.d.cts +2 -541
- package/dist/ast.d.mts +2 -0
- package/dist/ast.mjs +20 -0
- package/dist/ast.mjs.map +1 -0
- package/dist/factory.cjs +754 -2030
- package/dist/factory.cjs.map +1 -1
- package/dist/factory.d.cts +220 -215
- package/dist/factory.d.mts +289 -0
- package/dist/factory.mjs +778 -0
- package/dist/factory.mjs.map +1 -0
- package/dist/index.cjs +2691 -5454
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +104 -103
- package/dist/index.d.mts +170 -0
- package/dist/index.mjs +6925 -0
- package/dist/index.mjs.map +1 -0
- package/dist/utils-BB6L7ug2.mjs +529 -0
- package/dist/utils-BB6L7ug2.mjs.map +1 -0
- package/dist/utils-CfXGZkv7.cjs +842 -0
- package/dist/utils-CfXGZkv7.cjs.map +1 -0
- package/dist/utils.cjs +47 -1650
- package/dist/utils.d.cts +101 -10
- package/dist/{utils.d.ts → utils.d.mts} +101 -10
- package/dist/utils.mjs +2 -0
- package/package.json +16 -15
- package/dist/ast.d.ts +0 -541
- package/dist/ast.js +0 -1288
- package/dist/ast.js.map +0 -1
- package/dist/factory.d.ts +0 -284
- package/dist/factory.js +0 -2020
- package/dist/factory.js.map +0 -1
- package/dist/index.d.ts +0 -169
- package/dist/index.js +0 -9656
- package/dist/index.js.map +0 -1
- package/dist/utils.cjs.map +0 -1
- package/dist/utils.js +0 -1572
- package/dist/utils.js.map +0 -1
|
@@ -0,0 +1,765 @@
|
|
|
1
|
+
import * as langium from "langium";
|
|
2
|
+
//#region src/generated/ast.ts
|
|
3
|
+
/******************************************************************************
|
|
4
|
+
* This file was generated by langium-cli 3.5.0.
|
|
5
|
+
* DO NOT EDIT MANUALLY!
|
|
6
|
+
******************************************************************************/
|
|
7
|
+
const ZModelTerminals = {
|
|
8
|
+
WS: /\s+/,
|
|
9
|
+
INTERNAL_ATTRIBUTE_NAME: /@@@([_a-zA-Z][\w_]*\.)*[_a-zA-Z][\w_]*/,
|
|
10
|
+
MODEL_ATTRIBUTE_NAME: /@@([_a-zA-Z][\w_]*\.)*[_a-zA-Z][\w_]*/,
|
|
11
|
+
FIELD_ATTRIBUTE_NAME: /@([_a-zA-Z][\w_]*\.)*[_a-zA-Z][\w_]*/,
|
|
12
|
+
ID: /[_a-zA-Z][\w_]*/,
|
|
13
|
+
STRING: /"(\\.|[^"\\])*"|'(\\.|[^'\\])*'/,
|
|
14
|
+
NUMBER: /[+-]?[0-9]+(\.[0-9]+)?/,
|
|
15
|
+
TRIPLE_SLASH_COMMENT: /\/\/\/[^\n\r]*/,
|
|
16
|
+
ML_COMMENT: /\/\*[\s\S]*?\*\//,
|
|
17
|
+
SL_COMMENT: /\/\/[^\n\r]*/
|
|
18
|
+
};
|
|
19
|
+
const AbstractDeclaration = "AbstractDeclaration";
|
|
20
|
+
function isAbstractDeclaration(item) {
|
|
21
|
+
return reflection.isInstance(item, AbstractDeclaration);
|
|
22
|
+
}
|
|
23
|
+
function isBoolean(item) {
|
|
24
|
+
return typeof item === "boolean";
|
|
25
|
+
}
|
|
26
|
+
function isBuiltinType(item) {
|
|
27
|
+
return item === "String" || item === "Boolean" || item === "Int" || item === "BigInt" || item === "Float" || item === "Decimal" || item === "DateTime" || item === "Json" || item === "Bytes";
|
|
28
|
+
}
|
|
29
|
+
const ConfigExpr = "ConfigExpr";
|
|
30
|
+
function isConfigExpr(item) {
|
|
31
|
+
return reflection.isInstance(item, ConfigExpr);
|
|
32
|
+
}
|
|
33
|
+
const Expression = "Expression";
|
|
34
|
+
function isExpression(item) {
|
|
35
|
+
return reflection.isInstance(item, Expression);
|
|
36
|
+
}
|
|
37
|
+
function isExpressionType(item) {
|
|
38
|
+
return item === "String" || item === "Int" || item === "Float" || item === "Boolean" || item === "BigInt" || item === "Decimal" || item === "DateTime" || item === "Json" || item === "Bytes" || item === "Null" || item === "Object" || item === "Any" || item === "Void" || item === "Undefined" || item === "Unsupported";
|
|
39
|
+
}
|
|
40
|
+
const LiteralExpr = "LiteralExpr";
|
|
41
|
+
function isLiteralExpr(item) {
|
|
42
|
+
return reflection.isInstance(item, LiteralExpr);
|
|
43
|
+
}
|
|
44
|
+
const MemberAccessTarget = "MemberAccessTarget";
|
|
45
|
+
function isMemberAccessTarget(item) {
|
|
46
|
+
return reflection.isInstance(item, MemberAccessTarget);
|
|
47
|
+
}
|
|
48
|
+
const ReferenceTarget = "ReferenceTarget";
|
|
49
|
+
function isReferenceTarget(item) {
|
|
50
|
+
return reflection.isInstance(item, ReferenceTarget);
|
|
51
|
+
}
|
|
52
|
+
function isRegularID(item) {
|
|
53
|
+
return item === "model" || item === "enum" || item === "attribute" || item === "datasource" || item === "plugin" || item === "abstract" || item === "in" || item === "view" || item === "import" || item === "type" || typeof item === "string" && /[_a-zA-Z][\w_]*/.test(item);
|
|
54
|
+
}
|
|
55
|
+
function isRegularIDWithTypeNames(item) {
|
|
56
|
+
return isRegularID(item) || item === "String" || item === "Boolean" || item === "Int" || item === "BigInt" || item === "Float" || item === "Decimal" || item === "DateTime" || item === "Json" || item === "Bytes" || item === "Null" || item === "Object" || item === "Any" || item === "Void" || item === "Unsupported";
|
|
57
|
+
}
|
|
58
|
+
const TypeDeclaration = "TypeDeclaration";
|
|
59
|
+
function isTypeDeclaration(item) {
|
|
60
|
+
return reflection.isInstance(item, TypeDeclaration);
|
|
61
|
+
}
|
|
62
|
+
const Argument = "Argument";
|
|
63
|
+
function isArgument(item) {
|
|
64
|
+
return reflection.isInstance(item, Argument);
|
|
65
|
+
}
|
|
66
|
+
const ArrayExpr = "ArrayExpr";
|
|
67
|
+
function isArrayExpr(item) {
|
|
68
|
+
return reflection.isInstance(item, ArrayExpr);
|
|
69
|
+
}
|
|
70
|
+
const Attribute = "Attribute";
|
|
71
|
+
function isAttribute(item) {
|
|
72
|
+
return reflection.isInstance(item, Attribute);
|
|
73
|
+
}
|
|
74
|
+
const AttributeArg = "AttributeArg";
|
|
75
|
+
function isAttributeArg(item) {
|
|
76
|
+
return reflection.isInstance(item, AttributeArg);
|
|
77
|
+
}
|
|
78
|
+
const AttributeParam = "AttributeParam";
|
|
79
|
+
function isAttributeParam(item) {
|
|
80
|
+
return reflection.isInstance(item, AttributeParam);
|
|
81
|
+
}
|
|
82
|
+
const AttributeParamType = "AttributeParamType";
|
|
83
|
+
function isAttributeParamType(item) {
|
|
84
|
+
return reflection.isInstance(item, AttributeParamType);
|
|
85
|
+
}
|
|
86
|
+
const BinaryExpr = "BinaryExpr";
|
|
87
|
+
function isBinaryExpr(item) {
|
|
88
|
+
return reflection.isInstance(item, BinaryExpr);
|
|
89
|
+
}
|
|
90
|
+
const BooleanLiteral = "BooleanLiteral";
|
|
91
|
+
function isBooleanLiteral(item) {
|
|
92
|
+
return reflection.isInstance(item, BooleanLiteral);
|
|
93
|
+
}
|
|
94
|
+
const CollectionPredicateBinding = "CollectionPredicateBinding";
|
|
95
|
+
function isCollectionPredicateBinding(item) {
|
|
96
|
+
return reflection.isInstance(item, CollectionPredicateBinding);
|
|
97
|
+
}
|
|
98
|
+
const ConfigArrayExpr = "ConfigArrayExpr";
|
|
99
|
+
function isConfigArrayExpr(item) {
|
|
100
|
+
return reflection.isInstance(item, ConfigArrayExpr);
|
|
101
|
+
}
|
|
102
|
+
const ConfigField = "ConfigField";
|
|
103
|
+
function isConfigField(item) {
|
|
104
|
+
return reflection.isInstance(item, ConfigField);
|
|
105
|
+
}
|
|
106
|
+
const ConfigInvocationArg = "ConfigInvocationArg";
|
|
107
|
+
function isConfigInvocationArg(item) {
|
|
108
|
+
return reflection.isInstance(item, ConfigInvocationArg);
|
|
109
|
+
}
|
|
110
|
+
const ConfigInvocationExpr = "ConfigInvocationExpr";
|
|
111
|
+
function isConfigInvocationExpr(item) {
|
|
112
|
+
return reflection.isInstance(item, ConfigInvocationExpr);
|
|
113
|
+
}
|
|
114
|
+
const DataField = "DataField";
|
|
115
|
+
function isDataField(item) {
|
|
116
|
+
return reflection.isInstance(item, DataField);
|
|
117
|
+
}
|
|
118
|
+
const DataFieldAttribute = "DataFieldAttribute";
|
|
119
|
+
function isDataFieldAttribute(item) {
|
|
120
|
+
return reflection.isInstance(item, DataFieldAttribute);
|
|
121
|
+
}
|
|
122
|
+
const DataFieldType = "DataFieldType";
|
|
123
|
+
function isDataFieldType(item) {
|
|
124
|
+
return reflection.isInstance(item, DataFieldType);
|
|
125
|
+
}
|
|
126
|
+
const DataModel = "DataModel";
|
|
127
|
+
function isDataModel(item) {
|
|
128
|
+
return reflection.isInstance(item, DataModel);
|
|
129
|
+
}
|
|
130
|
+
const DataModelAttribute = "DataModelAttribute";
|
|
131
|
+
function isDataModelAttribute(item) {
|
|
132
|
+
return reflection.isInstance(item, DataModelAttribute);
|
|
133
|
+
}
|
|
134
|
+
const DataSource = "DataSource";
|
|
135
|
+
function isDataSource(item) {
|
|
136
|
+
return reflection.isInstance(item, DataSource);
|
|
137
|
+
}
|
|
138
|
+
const Enum = "Enum";
|
|
139
|
+
function isEnum(item) {
|
|
140
|
+
return reflection.isInstance(item, Enum);
|
|
141
|
+
}
|
|
142
|
+
const EnumField = "EnumField";
|
|
143
|
+
function isEnumField(item) {
|
|
144
|
+
return reflection.isInstance(item, EnumField);
|
|
145
|
+
}
|
|
146
|
+
const FieldInitializer = "FieldInitializer";
|
|
147
|
+
function isFieldInitializer(item) {
|
|
148
|
+
return reflection.isInstance(item, FieldInitializer);
|
|
149
|
+
}
|
|
150
|
+
const FunctionDecl = "FunctionDecl";
|
|
151
|
+
function isFunctionDecl(item) {
|
|
152
|
+
return reflection.isInstance(item, FunctionDecl);
|
|
153
|
+
}
|
|
154
|
+
const FunctionParam = "FunctionParam";
|
|
155
|
+
function isFunctionParam(item) {
|
|
156
|
+
return reflection.isInstance(item, FunctionParam);
|
|
157
|
+
}
|
|
158
|
+
const FunctionParamType = "FunctionParamType";
|
|
159
|
+
function isFunctionParamType(item) {
|
|
160
|
+
return reflection.isInstance(item, FunctionParamType);
|
|
161
|
+
}
|
|
162
|
+
const GeneratorDecl = "GeneratorDecl";
|
|
163
|
+
function isGeneratorDecl(item) {
|
|
164
|
+
return reflection.isInstance(item, GeneratorDecl);
|
|
165
|
+
}
|
|
166
|
+
const InternalAttribute = "InternalAttribute";
|
|
167
|
+
function isInternalAttribute(item) {
|
|
168
|
+
return reflection.isInstance(item, InternalAttribute);
|
|
169
|
+
}
|
|
170
|
+
const InvocationExpr = "InvocationExpr";
|
|
171
|
+
function isInvocationExpr(item) {
|
|
172
|
+
return reflection.isInstance(item, InvocationExpr);
|
|
173
|
+
}
|
|
174
|
+
const MemberAccessExpr = "MemberAccessExpr";
|
|
175
|
+
function isMemberAccessExpr(item) {
|
|
176
|
+
return reflection.isInstance(item, MemberAccessExpr);
|
|
177
|
+
}
|
|
178
|
+
const Model = "Model";
|
|
179
|
+
function isModel(item) {
|
|
180
|
+
return reflection.isInstance(item, Model);
|
|
181
|
+
}
|
|
182
|
+
const ModelImport = "ModelImport";
|
|
183
|
+
function isModelImport(item) {
|
|
184
|
+
return reflection.isInstance(item, ModelImport);
|
|
185
|
+
}
|
|
186
|
+
const NullExpr = "NullExpr";
|
|
187
|
+
function isNullExpr(item) {
|
|
188
|
+
return reflection.isInstance(item, NullExpr);
|
|
189
|
+
}
|
|
190
|
+
const NumberLiteral = "NumberLiteral";
|
|
191
|
+
function isNumberLiteral(item) {
|
|
192
|
+
return reflection.isInstance(item, NumberLiteral);
|
|
193
|
+
}
|
|
194
|
+
const ObjectExpr = "ObjectExpr";
|
|
195
|
+
function isObjectExpr(item) {
|
|
196
|
+
return reflection.isInstance(item, ObjectExpr);
|
|
197
|
+
}
|
|
198
|
+
const Plugin = "Plugin";
|
|
199
|
+
function isPlugin(item) {
|
|
200
|
+
return reflection.isInstance(item, Plugin);
|
|
201
|
+
}
|
|
202
|
+
const PluginField = "PluginField";
|
|
203
|
+
function isPluginField(item) {
|
|
204
|
+
return reflection.isInstance(item, PluginField);
|
|
205
|
+
}
|
|
206
|
+
const Procedure = "Procedure";
|
|
207
|
+
function isProcedure(item) {
|
|
208
|
+
return reflection.isInstance(item, Procedure);
|
|
209
|
+
}
|
|
210
|
+
const ProcedureParam = "ProcedureParam";
|
|
211
|
+
function isProcedureParam(item) {
|
|
212
|
+
return reflection.isInstance(item, ProcedureParam);
|
|
213
|
+
}
|
|
214
|
+
const ReferenceArg = "ReferenceArg";
|
|
215
|
+
function isReferenceArg(item) {
|
|
216
|
+
return reflection.isInstance(item, ReferenceArg);
|
|
217
|
+
}
|
|
218
|
+
const ReferenceExpr = "ReferenceExpr";
|
|
219
|
+
function isReferenceExpr(item) {
|
|
220
|
+
return reflection.isInstance(item, ReferenceExpr);
|
|
221
|
+
}
|
|
222
|
+
const StringLiteral = "StringLiteral";
|
|
223
|
+
function isStringLiteral(item) {
|
|
224
|
+
return reflection.isInstance(item, StringLiteral);
|
|
225
|
+
}
|
|
226
|
+
const ThisExpr = "ThisExpr";
|
|
227
|
+
function isThisExpr(item) {
|
|
228
|
+
return reflection.isInstance(item, ThisExpr);
|
|
229
|
+
}
|
|
230
|
+
const TypeDef = "TypeDef";
|
|
231
|
+
function isTypeDef(item) {
|
|
232
|
+
return reflection.isInstance(item, TypeDef);
|
|
233
|
+
}
|
|
234
|
+
const UnaryExpr = "UnaryExpr";
|
|
235
|
+
function isUnaryExpr(item) {
|
|
236
|
+
return reflection.isInstance(item, UnaryExpr);
|
|
237
|
+
}
|
|
238
|
+
const UnsupportedFieldType = "UnsupportedFieldType";
|
|
239
|
+
function isUnsupportedFieldType(item) {
|
|
240
|
+
return reflection.isInstance(item, UnsupportedFieldType);
|
|
241
|
+
}
|
|
242
|
+
var ZModelAstReflection = class extends langium.AbstractAstReflection {
|
|
243
|
+
getAllTypes() {
|
|
244
|
+
return [
|
|
245
|
+
AbstractDeclaration,
|
|
246
|
+
Argument,
|
|
247
|
+
ArrayExpr,
|
|
248
|
+
Attribute,
|
|
249
|
+
AttributeArg,
|
|
250
|
+
AttributeParam,
|
|
251
|
+
AttributeParamType,
|
|
252
|
+
BinaryExpr,
|
|
253
|
+
BooleanLiteral,
|
|
254
|
+
CollectionPredicateBinding,
|
|
255
|
+
ConfigArrayExpr,
|
|
256
|
+
ConfigExpr,
|
|
257
|
+
ConfigField,
|
|
258
|
+
ConfigInvocationArg,
|
|
259
|
+
ConfigInvocationExpr,
|
|
260
|
+
DataField,
|
|
261
|
+
DataFieldAttribute,
|
|
262
|
+
DataFieldType,
|
|
263
|
+
DataModel,
|
|
264
|
+
DataModelAttribute,
|
|
265
|
+
DataSource,
|
|
266
|
+
Enum,
|
|
267
|
+
EnumField,
|
|
268
|
+
Expression,
|
|
269
|
+
FieldInitializer,
|
|
270
|
+
FunctionDecl,
|
|
271
|
+
FunctionParam,
|
|
272
|
+
FunctionParamType,
|
|
273
|
+
GeneratorDecl,
|
|
274
|
+
InternalAttribute,
|
|
275
|
+
InvocationExpr,
|
|
276
|
+
LiteralExpr,
|
|
277
|
+
MemberAccessExpr,
|
|
278
|
+
MemberAccessTarget,
|
|
279
|
+
Model,
|
|
280
|
+
ModelImport,
|
|
281
|
+
NullExpr,
|
|
282
|
+
NumberLiteral,
|
|
283
|
+
ObjectExpr,
|
|
284
|
+
Plugin,
|
|
285
|
+
PluginField,
|
|
286
|
+
Procedure,
|
|
287
|
+
ProcedureParam,
|
|
288
|
+
ReferenceArg,
|
|
289
|
+
ReferenceExpr,
|
|
290
|
+
ReferenceTarget,
|
|
291
|
+
StringLiteral,
|
|
292
|
+
ThisExpr,
|
|
293
|
+
TypeDeclaration,
|
|
294
|
+
TypeDef,
|
|
295
|
+
UnaryExpr,
|
|
296
|
+
UnsupportedFieldType
|
|
297
|
+
];
|
|
298
|
+
}
|
|
299
|
+
computeIsSubtype(subtype, supertype) {
|
|
300
|
+
switch (subtype) {
|
|
301
|
+
case ArrayExpr:
|
|
302
|
+
case BinaryExpr:
|
|
303
|
+
case MemberAccessExpr:
|
|
304
|
+
case NullExpr:
|
|
305
|
+
case ObjectExpr:
|
|
306
|
+
case ReferenceExpr:
|
|
307
|
+
case ThisExpr:
|
|
308
|
+
case UnaryExpr: return this.isSubtype(Expression, supertype);
|
|
309
|
+
case Attribute:
|
|
310
|
+
case DataSource:
|
|
311
|
+
case FunctionDecl:
|
|
312
|
+
case GeneratorDecl:
|
|
313
|
+
case Plugin:
|
|
314
|
+
case Procedure: return this.isSubtype(AbstractDeclaration, supertype);
|
|
315
|
+
case BooleanLiteral:
|
|
316
|
+
case NumberLiteral:
|
|
317
|
+
case StringLiteral: return this.isSubtype(LiteralExpr, supertype);
|
|
318
|
+
case CollectionPredicateBinding:
|
|
319
|
+
case EnumField:
|
|
320
|
+
case FunctionParam: return this.isSubtype(ReferenceTarget, supertype);
|
|
321
|
+
case ConfigArrayExpr: return this.isSubtype(ConfigExpr, supertype);
|
|
322
|
+
case DataField: return this.isSubtype("MemberAccessTarget", supertype) || this.isSubtype("ReferenceTarget", supertype);
|
|
323
|
+
case DataModel:
|
|
324
|
+
case Enum:
|
|
325
|
+
case TypeDef: return this.isSubtype("AbstractDeclaration", supertype) || this.isSubtype("TypeDeclaration", supertype);
|
|
326
|
+
case InvocationExpr:
|
|
327
|
+
case LiteralExpr: return this.isSubtype("ConfigExpr", supertype) || this.isSubtype("Expression", supertype);
|
|
328
|
+
default: return false;
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
getReferenceType(refInfo) {
|
|
332
|
+
const referenceId = `${refInfo.container.$type}:${refInfo.property}`;
|
|
333
|
+
switch (referenceId) {
|
|
334
|
+
case "AttributeParamType:reference":
|
|
335
|
+
case "DataFieldType:reference":
|
|
336
|
+
case "FunctionParamType:reference": return TypeDeclaration;
|
|
337
|
+
case "DataFieldAttribute:decl":
|
|
338
|
+
case "DataModelAttribute:decl":
|
|
339
|
+
case "InternalAttribute:decl": return Attribute;
|
|
340
|
+
case "DataModel:baseModel": return DataModel;
|
|
341
|
+
case "DataModel:mixins":
|
|
342
|
+
case "TypeDef:mixins": return TypeDef;
|
|
343
|
+
case "InvocationExpr:function": return FunctionDecl;
|
|
344
|
+
case "MemberAccessExpr:member": return MemberAccessTarget;
|
|
345
|
+
case "ReferenceExpr:target": return ReferenceTarget;
|
|
346
|
+
default: throw new Error(`${referenceId} is not a valid reference id.`);
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
getTypeMetaData(type) {
|
|
350
|
+
switch (type) {
|
|
351
|
+
case Argument: return {
|
|
352
|
+
name: Argument,
|
|
353
|
+
properties: [{ name: "value" }]
|
|
354
|
+
};
|
|
355
|
+
case ArrayExpr: return {
|
|
356
|
+
name: ArrayExpr,
|
|
357
|
+
properties: [{
|
|
358
|
+
name: "items",
|
|
359
|
+
defaultValue: []
|
|
360
|
+
}]
|
|
361
|
+
};
|
|
362
|
+
case Attribute: return {
|
|
363
|
+
name: Attribute,
|
|
364
|
+
properties: [
|
|
365
|
+
{
|
|
366
|
+
name: "attributes",
|
|
367
|
+
defaultValue: []
|
|
368
|
+
},
|
|
369
|
+
{
|
|
370
|
+
name: "comments",
|
|
371
|
+
defaultValue: []
|
|
372
|
+
},
|
|
373
|
+
{ name: "name" },
|
|
374
|
+
{
|
|
375
|
+
name: "params",
|
|
376
|
+
defaultValue: []
|
|
377
|
+
}
|
|
378
|
+
]
|
|
379
|
+
};
|
|
380
|
+
case AttributeArg: return {
|
|
381
|
+
name: AttributeArg,
|
|
382
|
+
properties: [{ name: "name" }, { name: "value" }]
|
|
383
|
+
};
|
|
384
|
+
case AttributeParam: return {
|
|
385
|
+
name: AttributeParam,
|
|
386
|
+
properties: [
|
|
387
|
+
{
|
|
388
|
+
name: "attributes",
|
|
389
|
+
defaultValue: []
|
|
390
|
+
},
|
|
391
|
+
{
|
|
392
|
+
name: "comments",
|
|
393
|
+
defaultValue: []
|
|
394
|
+
},
|
|
395
|
+
{
|
|
396
|
+
name: "default",
|
|
397
|
+
defaultValue: false
|
|
398
|
+
},
|
|
399
|
+
{ name: "name" },
|
|
400
|
+
{ name: "type" }
|
|
401
|
+
]
|
|
402
|
+
};
|
|
403
|
+
case AttributeParamType: return {
|
|
404
|
+
name: AttributeParamType,
|
|
405
|
+
properties: [
|
|
406
|
+
{
|
|
407
|
+
name: "array",
|
|
408
|
+
defaultValue: false
|
|
409
|
+
},
|
|
410
|
+
{
|
|
411
|
+
name: "optional",
|
|
412
|
+
defaultValue: false
|
|
413
|
+
},
|
|
414
|
+
{ name: "reference" },
|
|
415
|
+
{ name: "type" }
|
|
416
|
+
]
|
|
417
|
+
};
|
|
418
|
+
case BinaryExpr: return {
|
|
419
|
+
name: BinaryExpr,
|
|
420
|
+
properties: [
|
|
421
|
+
{ name: "binding" },
|
|
422
|
+
{ name: "left" },
|
|
423
|
+
{ name: "operator" },
|
|
424
|
+
{ name: "right" }
|
|
425
|
+
]
|
|
426
|
+
};
|
|
427
|
+
case BooleanLiteral: return {
|
|
428
|
+
name: BooleanLiteral,
|
|
429
|
+
properties: [{ name: "value" }]
|
|
430
|
+
};
|
|
431
|
+
case CollectionPredicateBinding: return {
|
|
432
|
+
name: CollectionPredicateBinding,
|
|
433
|
+
properties: [{ name: "name" }]
|
|
434
|
+
};
|
|
435
|
+
case ConfigArrayExpr: return {
|
|
436
|
+
name: ConfigArrayExpr,
|
|
437
|
+
properties: [{
|
|
438
|
+
name: "items",
|
|
439
|
+
defaultValue: []
|
|
440
|
+
}]
|
|
441
|
+
};
|
|
442
|
+
case ConfigField: return {
|
|
443
|
+
name: ConfigField,
|
|
444
|
+
properties: [{ name: "name" }, { name: "value" }]
|
|
445
|
+
};
|
|
446
|
+
case ConfigInvocationArg: return {
|
|
447
|
+
name: ConfigInvocationArg,
|
|
448
|
+
properties: [{ name: "name" }, { name: "value" }]
|
|
449
|
+
};
|
|
450
|
+
case ConfigInvocationExpr: return {
|
|
451
|
+
name: ConfigInvocationExpr,
|
|
452
|
+
properties: [{
|
|
453
|
+
name: "args",
|
|
454
|
+
defaultValue: []
|
|
455
|
+
}, { name: "name" }]
|
|
456
|
+
};
|
|
457
|
+
case DataField: return {
|
|
458
|
+
name: DataField,
|
|
459
|
+
properties: [
|
|
460
|
+
{
|
|
461
|
+
name: "attributes",
|
|
462
|
+
defaultValue: []
|
|
463
|
+
},
|
|
464
|
+
{
|
|
465
|
+
name: "comments",
|
|
466
|
+
defaultValue: []
|
|
467
|
+
},
|
|
468
|
+
{ name: "name" },
|
|
469
|
+
{ name: "type" }
|
|
470
|
+
]
|
|
471
|
+
};
|
|
472
|
+
case DataFieldAttribute: return {
|
|
473
|
+
name: DataFieldAttribute,
|
|
474
|
+
properties: [{
|
|
475
|
+
name: "args",
|
|
476
|
+
defaultValue: []
|
|
477
|
+
}, { name: "decl" }]
|
|
478
|
+
};
|
|
479
|
+
case DataFieldType: return {
|
|
480
|
+
name: DataFieldType,
|
|
481
|
+
properties: [
|
|
482
|
+
{
|
|
483
|
+
name: "array",
|
|
484
|
+
defaultValue: false
|
|
485
|
+
},
|
|
486
|
+
{
|
|
487
|
+
name: "optional",
|
|
488
|
+
defaultValue: false
|
|
489
|
+
},
|
|
490
|
+
{ name: "reference" },
|
|
491
|
+
{ name: "type" },
|
|
492
|
+
{ name: "unsupported" }
|
|
493
|
+
]
|
|
494
|
+
};
|
|
495
|
+
case DataModel: return {
|
|
496
|
+
name: DataModel,
|
|
497
|
+
properties: [
|
|
498
|
+
{
|
|
499
|
+
name: "attributes",
|
|
500
|
+
defaultValue: []
|
|
501
|
+
},
|
|
502
|
+
{ name: "baseModel" },
|
|
503
|
+
{
|
|
504
|
+
name: "comments",
|
|
505
|
+
defaultValue: []
|
|
506
|
+
},
|
|
507
|
+
{
|
|
508
|
+
name: "fields",
|
|
509
|
+
defaultValue: []
|
|
510
|
+
},
|
|
511
|
+
{
|
|
512
|
+
name: "isView",
|
|
513
|
+
defaultValue: false
|
|
514
|
+
},
|
|
515
|
+
{
|
|
516
|
+
name: "mixins",
|
|
517
|
+
defaultValue: []
|
|
518
|
+
},
|
|
519
|
+
{ name: "name" }
|
|
520
|
+
]
|
|
521
|
+
};
|
|
522
|
+
case DataModelAttribute: return {
|
|
523
|
+
name: DataModelAttribute,
|
|
524
|
+
properties: [{
|
|
525
|
+
name: "args",
|
|
526
|
+
defaultValue: []
|
|
527
|
+
}, { name: "decl" }]
|
|
528
|
+
};
|
|
529
|
+
case DataSource: return {
|
|
530
|
+
name: DataSource,
|
|
531
|
+
properties: [{
|
|
532
|
+
name: "fields",
|
|
533
|
+
defaultValue: []
|
|
534
|
+
}, { name: "name" }]
|
|
535
|
+
};
|
|
536
|
+
case Enum: return {
|
|
537
|
+
name: Enum,
|
|
538
|
+
properties: [
|
|
539
|
+
{
|
|
540
|
+
name: "attributes",
|
|
541
|
+
defaultValue: []
|
|
542
|
+
},
|
|
543
|
+
{
|
|
544
|
+
name: "comments",
|
|
545
|
+
defaultValue: []
|
|
546
|
+
},
|
|
547
|
+
{
|
|
548
|
+
name: "fields",
|
|
549
|
+
defaultValue: []
|
|
550
|
+
},
|
|
551
|
+
{ name: "name" }
|
|
552
|
+
]
|
|
553
|
+
};
|
|
554
|
+
case EnumField: return {
|
|
555
|
+
name: EnumField,
|
|
556
|
+
properties: [
|
|
557
|
+
{
|
|
558
|
+
name: "attributes",
|
|
559
|
+
defaultValue: []
|
|
560
|
+
},
|
|
561
|
+
{
|
|
562
|
+
name: "comments",
|
|
563
|
+
defaultValue: []
|
|
564
|
+
},
|
|
565
|
+
{ name: "name" }
|
|
566
|
+
]
|
|
567
|
+
};
|
|
568
|
+
case FieldInitializer: return {
|
|
569
|
+
name: FieldInitializer,
|
|
570
|
+
properties: [{ name: "name" }, { name: "value" }]
|
|
571
|
+
};
|
|
572
|
+
case FunctionDecl: return {
|
|
573
|
+
name: FunctionDecl,
|
|
574
|
+
properties: [
|
|
575
|
+
{
|
|
576
|
+
name: "attributes",
|
|
577
|
+
defaultValue: []
|
|
578
|
+
},
|
|
579
|
+
{ name: "expression" },
|
|
580
|
+
{ name: "name" },
|
|
581
|
+
{
|
|
582
|
+
name: "params",
|
|
583
|
+
defaultValue: []
|
|
584
|
+
},
|
|
585
|
+
{ name: "returnType" }
|
|
586
|
+
]
|
|
587
|
+
};
|
|
588
|
+
case FunctionParam: return {
|
|
589
|
+
name: FunctionParam,
|
|
590
|
+
properties: [
|
|
591
|
+
{ name: "name" },
|
|
592
|
+
{
|
|
593
|
+
name: "optional",
|
|
594
|
+
defaultValue: false
|
|
595
|
+
},
|
|
596
|
+
{ name: "type" }
|
|
597
|
+
]
|
|
598
|
+
};
|
|
599
|
+
case FunctionParamType: return {
|
|
600
|
+
name: FunctionParamType,
|
|
601
|
+
properties: [
|
|
602
|
+
{
|
|
603
|
+
name: "array",
|
|
604
|
+
defaultValue: false
|
|
605
|
+
},
|
|
606
|
+
{ name: "reference" },
|
|
607
|
+
{ name: "type" }
|
|
608
|
+
]
|
|
609
|
+
};
|
|
610
|
+
case GeneratorDecl: return {
|
|
611
|
+
name: GeneratorDecl,
|
|
612
|
+
properties: [{
|
|
613
|
+
name: "fields",
|
|
614
|
+
defaultValue: []
|
|
615
|
+
}, { name: "name" }]
|
|
616
|
+
};
|
|
617
|
+
case InternalAttribute: return {
|
|
618
|
+
name: InternalAttribute,
|
|
619
|
+
properties: [{
|
|
620
|
+
name: "args",
|
|
621
|
+
defaultValue: []
|
|
622
|
+
}, { name: "decl" }]
|
|
623
|
+
};
|
|
624
|
+
case InvocationExpr: return {
|
|
625
|
+
name: InvocationExpr,
|
|
626
|
+
properties: [{
|
|
627
|
+
name: "args",
|
|
628
|
+
defaultValue: []
|
|
629
|
+
}, { name: "function" }]
|
|
630
|
+
};
|
|
631
|
+
case MemberAccessExpr: return {
|
|
632
|
+
name: MemberAccessExpr,
|
|
633
|
+
properties: [{ name: "member" }, { name: "operand" }]
|
|
634
|
+
};
|
|
635
|
+
case Model: return {
|
|
636
|
+
name: Model,
|
|
637
|
+
properties: [{
|
|
638
|
+
name: "declarations",
|
|
639
|
+
defaultValue: []
|
|
640
|
+
}, {
|
|
641
|
+
name: "imports",
|
|
642
|
+
defaultValue: []
|
|
643
|
+
}]
|
|
644
|
+
};
|
|
645
|
+
case ModelImport: return {
|
|
646
|
+
name: ModelImport,
|
|
647
|
+
properties: [{ name: "path" }]
|
|
648
|
+
};
|
|
649
|
+
case NullExpr: return {
|
|
650
|
+
name: NullExpr,
|
|
651
|
+
properties: [{ name: "value" }]
|
|
652
|
+
};
|
|
653
|
+
case NumberLiteral: return {
|
|
654
|
+
name: NumberLiteral,
|
|
655
|
+
properties: [{ name: "value" }]
|
|
656
|
+
};
|
|
657
|
+
case ObjectExpr: return {
|
|
658
|
+
name: ObjectExpr,
|
|
659
|
+
properties: [{
|
|
660
|
+
name: "fields",
|
|
661
|
+
defaultValue: []
|
|
662
|
+
}]
|
|
663
|
+
};
|
|
664
|
+
case Plugin: return {
|
|
665
|
+
name: Plugin,
|
|
666
|
+
properties: [{
|
|
667
|
+
name: "fields",
|
|
668
|
+
defaultValue: []
|
|
669
|
+
}, { name: "name" }]
|
|
670
|
+
};
|
|
671
|
+
case PluginField: return {
|
|
672
|
+
name: PluginField,
|
|
673
|
+
properties: [{ name: "name" }, { name: "value" }]
|
|
674
|
+
};
|
|
675
|
+
case Procedure: return {
|
|
676
|
+
name: Procedure,
|
|
677
|
+
properties: [
|
|
678
|
+
{
|
|
679
|
+
name: "attributes",
|
|
680
|
+
defaultValue: []
|
|
681
|
+
},
|
|
682
|
+
{
|
|
683
|
+
name: "mutation",
|
|
684
|
+
defaultValue: false
|
|
685
|
+
},
|
|
686
|
+
{ name: "name" },
|
|
687
|
+
{
|
|
688
|
+
name: "params",
|
|
689
|
+
defaultValue: []
|
|
690
|
+
},
|
|
691
|
+
{ name: "returnType" }
|
|
692
|
+
]
|
|
693
|
+
};
|
|
694
|
+
case ProcedureParam: return {
|
|
695
|
+
name: ProcedureParam,
|
|
696
|
+
properties: [
|
|
697
|
+
{ name: "name" },
|
|
698
|
+
{
|
|
699
|
+
name: "optional",
|
|
700
|
+
defaultValue: false
|
|
701
|
+
},
|
|
702
|
+
{ name: "type" }
|
|
703
|
+
]
|
|
704
|
+
};
|
|
705
|
+
case ReferenceArg: return {
|
|
706
|
+
name: ReferenceArg,
|
|
707
|
+
properties: [{ name: "name" }, { name: "value" }]
|
|
708
|
+
};
|
|
709
|
+
case ReferenceExpr: return {
|
|
710
|
+
name: ReferenceExpr,
|
|
711
|
+
properties: [{
|
|
712
|
+
name: "args",
|
|
713
|
+
defaultValue: []
|
|
714
|
+
}, { name: "target" }]
|
|
715
|
+
};
|
|
716
|
+
case StringLiteral: return {
|
|
717
|
+
name: StringLiteral,
|
|
718
|
+
properties: [{ name: "value" }]
|
|
719
|
+
};
|
|
720
|
+
case ThisExpr: return {
|
|
721
|
+
name: ThisExpr,
|
|
722
|
+
properties: [{ name: "value" }]
|
|
723
|
+
};
|
|
724
|
+
case TypeDef: return {
|
|
725
|
+
name: TypeDef,
|
|
726
|
+
properties: [
|
|
727
|
+
{
|
|
728
|
+
name: "attributes",
|
|
729
|
+
defaultValue: []
|
|
730
|
+
},
|
|
731
|
+
{
|
|
732
|
+
name: "comments",
|
|
733
|
+
defaultValue: []
|
|
734
|
+
},
|
|
735
|
+
{
|
|
736
|
+
name: "fields",
|
|
737
|
+
defaultValue: []
|
|
738
|
+
},
|
|
739
|
+
{
|
|
740
|
+
name: "mixins",
|
|
741
|
+
defaultValue: []
|
|
742
|
+
},
|
|
743
|
+
{ name: "name" }
|
|
744
|
+
]
|
|
745
|
+
};
|
|
746
|
+
case UnaryExpr: return {
|
|
747
|
+
name: UnaryExpr,
|
|
748
|
+
properties: [{ name: "operand" }, { name: "operator" }]
|
|
749
|
+
};
|
|
750
|
+
case UnsupportedFieldType: return {
|
|
751
|
+
name: UnsupportedFieldType,
|
|
752
|
+
properties: [{ name: "value" }]
|
|
753
|
+
};
|
|
754
|
+
default: return {
|
|
755
|
+
name: type,
|
|
756
|
+
properties: []
|
|
757
|
+
};
|
|
758
|
+
}
|
|
759
|
+
}
|
|
760
|
+
};
|
|
761
|
+
const reflection = new ZModelAstReflection();
|
|
762
|
+
//#endregion
|
|
763
|
+
export { ZModelAstReflection as $, isThisExpr as $t, InternalAttribute as A, isFunctionParam as At, Plugin as B, isNullExpr as Bt, EnumField as C, isDataSource as Ct, FunctionParam as D, isExpressionType as Dt, FunctionDecl as E, isExpression as Et, Model as F, isLiteralExpr as Ft, ReferenceExpr as G, isProcedure as Gt, Procedure as H, isObjectExpr as Ht, ModelImport as I, isMemberAccessExpr as It, ThisExpr as J, isReferenceExpr as Jt, ReferenceTarget as K, isProcedureParam as Kt, NullExpr as L, isMemberAccessTarget as Lt, LiteralExpr as M, isGeneratorDecl as Mt, MemberAccessExpr as N, isInternalAttribute as Nt, FunctionParamType as O, isFieldInitializer as Ot, MemberAccessTarget as P, isInvocationExpr as Pt, UnsupportedFieldType as Q, isStringLiteral as Qt, NumberLiteral as R, isModel as Rt, Enum as S, isDataModelAttribute as St, FieldInitializer as T, isEnumField as Tt, ProcedureParam as U, isPlugin as Ut, PluginField as V, isNumberLiteral as Vt, ReferenceArg as W, isPluginField as Wt, TypeDef as X, isRegularID as Xt, TypeDeclaration as Y, isReferenceTarget as Yt, UnaryExpr as Z, isRegularIDWithTypeNames as Zt, DataFieldAttribute as _, isConfigInvocationExpr as _t, AttributeArg as a, isAttributeArg as at, DataModelAttribute as b, isDataFieldType as bt, BinaryExpr as c, isBinaryExpr as ct, ConfigArrayExpr as d, isBuiltinType as dt, isTypeDeclaration as en, ZModelTerminals as et, ConfigExpr as f, isCollectionPredicateBinding as ft, DataField as g, isConfigInvocationArg as gt, ConfigInvocationExpr as h, isConfigField as ht, Attribute as i, reflection as in, isAttribute as it, InvocationExpr as j, isFunctionParamType as jt, GeneratorDecl as k, isFunctionDecl as kt, BooleanLiteral as l, isBoolean as lt, ConfigInvocationArg as m, isConfigExpr as mt, Argument as n, isUnaryExpr as nn, isArgument as nt, AttributeParam as o, isAttributeParam as ot, ConfigField as p, isConfigArrayExpr as pt, StringLiteral as q, isReferenceArg as qt, ArrayExpr as r, isUnsupportedFieldType as rn, isArrayExpr as rt, AttributeParamType as s, isAttributeParamType as st, AbstractDeclaration as t, isTypeDef as tn, isAbstractDeclaration as tt, CollectionPredicateBinding as u, isBooleanLiteral as ut, DataFieldType as v, isDataField as vt, Expression as w, isEnum as wt, DataSource as x, isDataModel as xt, DataModel as y, isDataFieldAttribute as yt, ObjectExpr as z, isModelImport as zt };
|
|
764
|
+
|
|
765
|
+
//# sourceMappingURL=ast-DEfhnj8j.mjs.map
|