@zenstackhq/language 3.8.0-beta.2 → 3.8.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/index.cjs CHANGED
@@ -1,7 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_ast = require("./ast-Clidp86c.cjs");
2
+ const require_ast = require("./ast-DHvua30v.cjs");
3
3
  const require_ast$1 = require("./ast.cjs");
4
- const require_utils = require("./utils-b3dJKmYr.cjs");
4
+ const require_utils = require("./utils-C731YIwp.cjs");
5
5
  let _zenstackhq_common_helpers = require("@zenstackhq/common-helpers");
6
6
  let langium = require("langium");
7
7
  let node_fs = require("node:fs");
@@ -57,11 +57,8 @@ const ZModelGrammar = () => loadedZModelGrammar ?? (loadedZModelGrammar = (0, la
57
57
  }
58
58
  ]
59
59
  },
60
- "definesHiddenTokens": false,
61
60
  "fragment": false,
62
- "hiddenTokens": [],
63
- "parameters": [],
64
- "wildcard": false
61
+ "parameters": []
65
62
  },
66
63
  {
67
64
  "$type": "ParserRule",
@@ -92,12 +89,9 @@ const ZModelGrammar = () => loadedZModelGrammar ?? (loadedZModelGrammar = (0, la
92
89
  }
93
90
  ]
94
91
  },
95
- "definesHiddenTokens": false,
96
92
  "entry": false,
97
93
  "fragment": false,
98
- "hiddenTokens": [],
99
- "parameters": [],
100
- "wildcard": false
94
+ "parameters": []
101
95
  },
102
96
  {
103
97
  "$type": "ParserRule",
@@ -170,12 +164,9 @@ const ZModelGrammar = () => loadedZModelGrammar ?? (loadedZModelGrammar = (0, la
170
164
  }
171
165
  ]
172
166
  },
173
- "definesHiddenTokens": false,
174
167
  "entry": false,
175
168
  "fragment": false,
176
- "hiddenTokens": [],
177
- "parameters": [],
178
- "wildcard": false
169
+ "parameters": []
179
170
  },
180
171
  {
181
172
  "$type": "ParserRule",
@@ -230,12 +221,9 @@ const ZModelGrammar = () => loadedZModelGrammar ?? (loadedZModelGrammar = (0, la
230
221
  }
231
222
  ]
232
223
  },
233
- "definesHiddenTokens": false,
234
224
  "entry": false,
235
225
  "fragment": false,
236
- "hiddenTokens": [],
237
- "parameters": [],
238
- "wildcard": false
226
+ "parameters": []
239
227
  },
240
228
  {
241
229
  "$type": "ParserRule",
@@ -290,12 +278,9 @@ const ZModelGrammar = () => loadedZModelGrammar ?? (loadedZModelGrammar = (0, la
290
278
  }
291
279
  ]
292
280
  },
293
- "definesHiddenTokens": false,
294
281
  "entry": false,
295
282
  "fragment": false,
296
- "hiddenTokens": [],
297
- "parameters": [],
298
- "wildcard": false
283
+ "parameters": []
299
284
  },
300
285
  {
301
286
  "$type": "ParserRule",
@@ -341,12 +326,9 @@ const ZModelGrammar = () => loadedZModelGrammar ?? (loadedZModelGrammar = (0, la
341
326
  }
342
327
  ]
343
328
  },
344
- "definesHiddenTokens": false,
345
329
  "entry": false,
346
330
  "fragment": false,
347
- "hiddenTokens": [],
348
- "parameters": [],
349
- "wildcard": false
331
+ "parameters": []
350
332
  },
351
333
  {
352
334
  "$type": "ParserRule",
@@ -401,12 +383,9 @@ const ZModelGrammar = () => loadedZModelGrammar ?? (loadedZModelGrammar = (0, la
401
383
  }
402
384
  ]
403
385
  },
404
- "definesHiddenTokens": false,
405
386
  "entry": false,
406
387
  "fragment": false,
407
- "hiddenTokens": [],
408
- "parameters": [],
409
- "wildcard": false
388
+ "parameters": []
410
389
  },
411
390
  {
412
391
  "$type": "ParserRule",
@@ -471,12 +450,9 @@ const ZModelGrammar = () => loadedZModelGrammar ?? (loadedZModelGrammar = (0, la
471
450
  }
472
451
  ]
473
452
  },
474
- "definesHiddenTokens": false,
475
453
  "entry": false,
476
454
  "fragment": false,
477
- "hiddenTokens": [],
478
- "parameters": [],
479
- "wildcard": false
455
+ "parameters": []
480
456
  },
481
457
  {
482
458
  "$type": "ParserRule",
@@ -488,12 +464,9 @@ const ZModelGrammar = () => loadedZModelGrammar ?? (loadedZModelGrammar = (0, la
488
464
  },
489
465
  "arguments": []
490
466
  },
491
- "definesHiddenTokens": false,
492
467
  "entry": false,
493
468
  "fragment": false,
494
- "hiddenTokens": [],
495
- "parameters": [],
496
- "wildcard": false
469
+ "parameters": []
497
470
  },
498
471
  {
499
472
  "$type": "ParserRule",
@@ -510,12 +483,9 @@ const ZModelGrammar = () => loadedZModelGrammar ?? (loadedZModelGrammar = (0, la
510
483
  "arguments": []
511
484
  }
512
485
  },
513
- "definesHiddenTokens": false,
514
486
  "entry": false,
515
487
  "fragment": false,
516
- "hiddenTokens": [],
517
- "parameters": [],
518
- "wildcard": false
488
+ "parameters": []
519
489
  },
520
490
  {
521
491
  "$type": "ParserRule",
@@ -532,12 +502,9 @@ const ZModelGrammar = () => loadedZModelGrammar ?? (loadedZModelGrammar = (0, la
532
502
  "arguments": []
533
503
  }
534
504
  },
535
- "definesHiddenTokens": false,
536
505
  "entry": false,
537
506
  "fragment": false,
538
- "hiddenTokens": [],
539
- "parameters": [],
540
- "wildcard": false
507
+ "parameters": []
541
508
  },
542
509
  {
543
510
  "$type": "ParserRule",
@@ -554,12 +521,9 @@ const ZModelGrammar = () => loadedZModelGrammar ?? (loadedZModelGrammar = (0, la
554
521
  "arguments": []
555
522
  }
556
523
  },
557
- "definesHiddenTokens": false,
558
524
  "entry": false,
559
525
  "fragment": false,
560
- "hiddenTokens": [],
561
- "parameters": [],
562
- "wildcard": false
526
+ "parameters": []
563
527
  },
564
528
  {
565
529
  "$type": "ParserRule",
@@ -590,12 +554,9 @@ const ZModelGrammar = () => loadedZModelGrammar ?? (loadedZModelGrammar = (0, la
590
554
  }
591
555
  ]
592
556
  },
593
- "definesHiddenTokens": false,
594
557
  "entry": false,
595
558
  "fragment": false,
596
- "hiddenTokens": [],
597
- "parameters": [],
598
- "wildcard": false
559
+ "parameters": []
599
560
  },
600
561
  {
601
562
  "$type": "ParserRule",
@@ -653,12 +614,9 @@ const ZModelGrammar = () => loadedZModelGrammar ?? (loadedZModelGrammar = (0, la
653
614
  }
654
615
  ]
655
616
  },
656
- "definesHiddenTokens": false,
657
617
  "entry": false,
658
618
  "fragment": false,
659
- "hiddenTokens": [],
660
- "parameters": [],
661
- "wildcard": false
619
+ "parameters": []
662
620
  },
663
621
  {
664
622
  "$type": "ParserRule",
@@ -702,12 +660,9 @@ const ZModelGrammar = () => loadedZModelGrammar ?? (loadedZModelGrammar = (0, la
702
660
  }
703
661
  ]
704
662
  },
705
- "definesHiddenTokens": false,
706
663
  "entry": false,
707
664
  "fragment": false,
708
- "hiddenTokens": [],
709
- "parameters": [],
710
- "wildcard": false
665
+ "parameters": []
711
666
  },
712
667
  {
713
668
  "$type": "ParserRule",
@@ -752,11 +707,8 @@ const ZModelGrammar = () => loadedZModelGrammar ?? (loadedZModelGrammar = (0, la
752
707
  }
753
708
  ]
754
709
  },
755
- "definesHiddenTokens": false,
756
710
  "entry": false,
757
- "hiddenTokens": [],
758
- "parameters": [],
759
- "wildcard": false
711
+ "parameters": []
760
712
  },
761
713
  {
762
714
  "$type": "ParserRule",
@@ -794,12 +746,9 @@ const ZModelGrammar = () => loadedZModelGrammar ?? (loadedZModelGrammar = (0, la
794
746
  }
795
747
  ]
796
748
  },
797
- "definesHiddenTokens": false,
798
749
  "entry": false,
799
750
  "fragment": false,
800
- "hiddenTokens": [],
801
- "parameters": [],
802
- "wildcard": false
751
+ "parameters": []
803
752
  },
804
753
  {
805
754
  "$type": "ParserRule",
@@ -881,12 +830,9 @@ const ZModelGrammar = () => loadedZModelGrammar ?? (loadedZModelGrammar = (0, la
881
830
  }
882
831
  ]
883
832
  },
884
- "definesHiddenTokens": false,
885
833
  "entry": false,
886
834
  "fragment": false,
887
- "hiddenTokens": [],
888
- "parameters": [],
889
- "wildcard": false
835
+ "parameters": []
890
836
  },
891
837
  {
892
838
  "$type": "ParserRule",
@@ -917,12 +863,9 @@ const ZModelGrammar = () => loadedZModelGrammar ?? (loadedZModelGrammar = (0, la
917
863
  }
918
864
  ]
919
865
  },
920
- "definesHiddenTokens": false,
921
866
  "entry": false,
922
867
  "fragment": false,
923
- "hiddenTokens": [],
924
- "parameters": [],
925
- "wildcard": false
868
+ "parameters": []
926
869
  },
927
870
  {
928
871
  "$type": "ParserRule",
@@ -936,12 +879,9 @@ const ZModelGrammar = () => loadedZModelGrammar ?? (loadedZModelGrammar = (0, la
936
879
  "value": "this"
937
880
  }
938
881
  },
939
- "definesHiddenTokens": false,
940
882
  "entry": false,
941
883
  "fragment": false,
942
- "hiddenTokens": [],
943
- "parameters": [],
944
- "wildcard": false
884
+ "parameters": []
945
885
  },
946
886
  {
947
887
  "$type": "ParserRule",
@@ -955,12 +895,9 @@ const ZModelGrammar = () => loadedZModelGrammar ?? (loadedZModelGrammar = (0, la
955
895
  "value": "null"
956
896
  }
957
897
  },
958
- "definesHiddenTokens": false,
959
898
  "entry": false,
960
899
  "fragment": false,
961
- "hiddenTokens": [],
962
- "parameters": [],
963
- "wildcard": false
900
+ "parameters": []
964
901
  },
965
902
  {
966
903
  "$type": "ParserRule",
@@ -984,7 +921,8 @@ const ZModelGrammar = () => loadedZModelGrammar ?? (loadedZModelGrammar = (0, la
984
921
  },
985
922
  "arguments": []
986
923
  },
987
- "deprecatedSyntax": false
924
+ "deprecatedSyntax": false,
925
+ "isMulti": false
988
926
  }
989
927
  },
990
928
  {
@@ -1010,12 +948,9 @@ const ZModelGrammar = () => loadedZModelGrammar ?? (loadedZModelGrammar = (0, la
1010
948
  }
1011
949
  ]
1012
950
  },
1013
- "definesHiddenTokens": false,
1014
951
  "entry": false,
1015
952
  "fragment": false,
1016
- "hiddenTokens": [],
1017
- "parameters": [],
1018
- "wildcard": false
953
+ "parameters": []
1019
954
  },
1020
955
  {
1021
956
  "$type": "ParserRule",
@@ -1060,11 +995,8 @@ const ZModelGrammar = () => loadedZModelGrammar ?? (loadedZModelGrammar = (0, la
1060
995
  }
1061
996
  ]
1062
997
  },
1063
- "definesHiddenTokens": false,
1064
998
  "entry": false,
1065
- "hiddenTokens": [],
1066
- "parameters": [],
1067
- "wildcard": false
999
+ "parameters": []
1068
1000
  },
1069
1001
  {
1070
1002
  "$type": "ParserRule",
@@ -1102,12 +1034,9 @@ const ZModelGrammar = () => loadedZModelGrammar ?? (loadedZModelGrammar = (0, la
1102
1034
  }
1103
1035
  ]
1104
1036
  },
1105
- "definesHiddenTokens": false,
1106
1037
  "entry": false,
1107
1038
  "fragment": false,
1108
- "hiddenTokens": [],
1109
- "parameters": [],
1110
- "wildcard": false
1039
+ "parameters": []
1111
1040
  },
1112
1041
  {
1113
1042
  "$type": "ParserRule",
@@ -1170,12 +1099,9 @@ const ZModelGrammar = () => loadedZModelGrammar ?? (loadedZModelGrammar = (0, la
1170
1099
  }
1171
1100
  ]
1172
1101
  },
1173
- "definesHiddenTokens": false,
1174
1102
  "entry": false,
1175
1103
  "fragment": false,
1176
- "hiddenTokens": [],
1177
- "parameters": [],
1178
- "wildcard": false
1104
+ "parameters": []
1179
1105
  },
1180
1106
  {
1181
1107
  "$type": "ParserRule",
@@ -1225,12 +1151,9 @@ const ZModelGrammar = () => loadedZModelGrammar ?? (loadedZModelGrammar = (0, la
1225
1151
  }
1226
1152
  ]
1227
1153
  },
1228
- "definesHiddenTokens": false,
1229
1154
  "entry": false,
1230
1155
  "fragment": false,
1231
- "hiddenTokens": [],
1232
- "parameters": [],
1233
- "wildcard": false
1156
+ "parameters": []
1234
1157
  },
1235
1158
  {
1236
1159
  "$type": "ParserRule",
@@ -1247,7 +1170,8 @@ const ZModelGrammar = () => loadedZModelGrammar ?? (loadedZModelGrammar = (0, la
1247
1170
  "type": {
1248
1171
  "$ref": "#/rules@47"
1249
1172
  },
1250
- "deprecatedSyntax": false
1173
+ "deprecatedSyntax": false,
1174
+ "isMulti": false
1251
1175
  }
1252
1176
  },
1253
1177
  {
@@ -1268,12 +1192,9 @@ const ZModelGrammar = () => loadedZModelGrammar ?? (loadedZModelGrammar = (0, la
1268
1192
  }
1269
1193
  ]
1270
1194
  },
1271
- "definesHiddenTokens": false,
1272
1195
  "entry": false,
1273
1196
  "fragment": false,
1274
- "hiddenTokens": [],
1275
- "parameters": [],
1276
- "wildcard": false
1197
+ "parameters": []
1277
1198
  },
1278
1199
  {
1279
1200
  "$type": "ParserRule",
@@ -1320,7 +1241,8 @@ const ZModelGrammar = () => loadedZModelGrammar ?? (loadedZModelGrammar = (0, la
1320
1241
  "type": {
1321
1242
  "$ref": "#/types@1"
1322
1243
  },
1323
- "deprecatedSyntax": false
1244
+ "deprecatedSyntax": false,
1245
+ "isMulti": false
1324
1246
  }
1325
1247
  }
1326
1248
  ]
@@ -1330,12 +1252,9 @@ const ZModelGrammar = () => loadedZModelGrammar ?? (loadedZModelGrammar = (0, la
1330
1252
  }
1331
1253
  ]
1332
1254
  },
1333
- "definesHiddenTokens": false,
1334
1255
  "entry": false,
1335
1256
  "fragment": false,
1336
- "hiddenTokens": [],
1337
- "parameters": [],
1338
- "wildcard": false
1257
+ "parameters": []
1339
1258
  },
1340
1259
  {
1341
1260
  "$type": "ParserRule",
@@ -1366,12 +1285,9 @@ const ZModelGrammar = () => loadedZModelGrammar ?? (loadedZModelGrammar = (0, la
1366
1285
  }
1367
1286
  ]
1368
1287
  },
1369
- "definesHiddenTokens": false,
1370
1288
  "entry": false,
1371
1289
  "fragment": false,
1372
- "hiddenTokens": [],
1373
- "parameters": [],
1374
- "wildcard": false
1290
+ "parameters": []
1375
1291
  },
1376
1292
  {
1377
1293
  "$type": "ParserRule",
@@ -1471,12 +1387,9 @@ const ZModelGrammar = () => loadedZModelGrammar ?? (loadedZModelGrammar = (0, la
1471
1387
  }
1472
1388
  ]
1473
1389
  },
1474
- "definesHiddenTokens": false,
1475
1390
  "entry": false,
1476
1391
  "fragment": false,
1477
- "hiddenTokens": [],
1478
- "parameters": [],
1479
- "wildcard": false
1392
+ "parameters": []
1480
1393
  },
1481
1394
  {
1482
1395
  "$type": "ParserRule",
@@ -1493,12 +1406,9 @@ const ZModelGrammar = () => loadedZModelGrammar ?? (loadedZModelGrammar = (0, la
1493
1406
  "arguments": []
1494
1407
  }
1495
1408
  },
1496
- "definesHiddenTokens": false,
1497
1409
  "entry": false,
1498
1410
  "fragment": false,
1499
- "hiddenTokens": [],
1500
- "parameters": [],
1501
- "wildcard": false
1411
+ "parameters": []
1502
1412
  },
1503
1413
  {
1504
1414
  "$type": "ParserRule",
@@ -1555,12 +1465,9 @@ const ZModelGrammar = () => loadedZModelGrammar ?? (loadedZModelGrammar = (0, la
1555
1465
  }
1556
1466
  ]
1557
1467
  },
1558
- "definesHiddenTokens": false,
1559
1468
  "entry": false,
1560
1469
  "fragment": false,
1561
- "hiddenTokens": [],
1562
- "parameters": [],
1563
- "wildcard": false
1470
+ "parameters": []
1564
1471
  },
1565
1472
  {
1566
1473
  "$type": "ParserRule",
@@ -1634,12 +1541,9 @@ const ZModelGrammar = () => loadedZModelGrammar ?? (loadedZModelGrammar = (0, la
1634
1541
  }
1635
1542
  ]
1636
1543
  },
1637
- "definesHiddenTokens": false,
1638
1544
  "entry": false,
1639
1545
  "fragment": false,
1640
- "hiddenTokens": [],
1641
- "parameters": [],
1642
- "wildcard": false
1546
+ "parameters": []
1643
1547
  },
1644
1548
  {
1645
1549
  "$type": "ParserRule",
@@ -1705,12 +1609,9 @@ const ZModelGrammar = () => loadedZModelGrammar ?? (loadedZModelGrammar = (0, la
1705
1609
  }
1706
1610
  ]
1707
1611
  },
1708
- "definesHiddenTokens": false,
1709
1612
  "entry": false,
1710
1613
  "fragment": false,
1711
- "hiddenTokens": [],
1712
- "parameters": [],
1713
- "wildcard": false
1614
+ "parameters": []
1714
1615
  },
1715
1616
  {
1716
1617
  "$type": "ParserRule",
@@ -1776,12 +1677,9 @@ const ZModelGrammar = () => loadedZModelGrammar ?? (loadedZModelGrammar = (0, la
1776
1677
  }
1777
1678
  ]
1778
1679
  },
1779
- "definesHiddenTokens": false,
1780
1680
  "entry": false,
1781
1681
  "fragment": false,
1782
- "hiddenTokens": [],
1783
- "parameters": [],
1784
- "wildcard": false
1682
+ "parameters": []
1785
1683
  },
1786
1684
  {
1787
1685
  "$type": "ParserRule",
@@ -1871,12 +1769,9 @@ const ZModelGrammar = () => loadedZModelGrammar ?? (loadedZModelGrammar = (0, la
1871
1769
  }
1872
1770
  ]
1873
1771
  },
1874
- "definesHiddenTokens": false,
1875
1772
  "entry": false,
1876
1773
  "fragment": false,
1877
- "hiddenTokens": [],
1878
- "parameters": [],
1879
- "wildcard": false
1774
+ "parameters": []
1880
1775
  },
1881
1776
  {
1882
1777
  "$type": "ParserRule",
@@ -1921,11 +1816,8 @@ const ZModelGrammar = () => loadedZModelGrammar ?? (loadedZModelGrammar = (0, la
1921
1816
  }
1922
1817
  ]
1923
1818
  },
1924
- "definesHiddenTokens": false,
1925
1819
  "entry": false,
1926
- "hiddenTokens": [],
1927
- "parameters": [],
1928
- "wildcard": false
1820
+ "parameters": []
1929
1821
  },
1930
1822
  {
1931
1823
  "$type": "ParserRule",
@@ -1942,12 +1834,9 @@ const ZModelGrammar = () => loadedZModelGrammar ?? (loadedZModelGrammar = (0, la
1942
1834
  "arguments": []
1943
1835
  }
1944
1836
  },
1945
- "definesHiddenTokens": false,
1946
1837
  "entry": false,
1947
1838
  "fragment": false,
1948
- "hiddenTokens": [],
1949
- "parameters": [],
1950
- "wildcard": false
1839
+ "parameters": []
1951
1840
  },
1952
1841
  {
1953
1842
  "$type": "ParserRule",
@@ -2118,12 +2007,9 @@ const ZModelGrammar = () => loadedZModelGrammar ?? (loadedZModelGrammar = (0, la
2118
2007
  }
2119
2008
  ]
2120
2009
  },
2121
- "definesHiddenTokens": false,
2122
2010
  "entry": false,
2123
2011
  "fragment": false,
2124
- "hiddenTokens": [],
2125
- "parameters": [],
2126
- "wildcard": false
2012
+ "parameters": []
2127
2013
  },
2128
2014
  {
2129
2015
  "$type": "ParserRule",
@@ -2145,7 +2031,8 @@ const ZModelGrammar = () => loadedZModelGrammar ?? (loadedZModelGrammar = (0, la
2145
2031
  "type": {
2146
2032
  "$ref": "#/rules@43"
2147
2033
  },
2148
- "deprecatedSyntax": false
2034
+ "deprecatedSyntax": false,
2035
+ "isMulti": false
2149
2036
  }
2150
2037
  },
2151
2038
  {
@@ -2165,7 +2052,8 @@ const ZModelGrammar = () => loadedZModelGrammar ?? (loadedZModelGrammar = (0, la
2165
2052
  "type": {
2166
2053
  "$ref": "#/rules@43"
2167
2054
  },
2168
- "deprecatedSyntax": false
2055
+ "deprecatedSyntax": false,
2056
+ "isMulti": false
2169
2057
  }
2170
2058
  }
2171
2059
  ],
@@ -2173,11 +2061,8 @@ const ZModelGrammar = () => loadedZModelGrammar ?? (loadedZModelGrammar = (0, la
2173
2061
  }
2174
2062
  ]
2175
2063
  },
2176
- "definesHiddenTokens": false,
2177
2064
  "entry": false,
2178
- "hiddenTokens": [],
2179
- "parameters": [],
2180
- "wildcard": false
2065
+ "parameters": []
2181
2066
  },
2182
2067
  {
2183
2068
  "$type": "ParserRule",
@@ -2199,16 +2084,14 @@ const ZModelGrammar = () => loadedZModelGrammar ?? (loadedZModelGrammar = (0, la
2199
2084
  "type": {
2200
2085
  "$ref": "#/rules@38"
2201
2086
  },
2202
- "deprecatedSyntax": false
2087
+ "deprecatedSyntax": false,
2088
+ "isMulti": false
2203
2089
  }
2204
2090
  }
2205
2091
  ]
2206
2092
  },
2207
- "definesHiddenTokens": false,
2208
2093
  "entry": false,
2209
- "hiddenTokens": [],
2210
- "parameters": [],
2211
- "wildcard": false
2094
+ "parameters": []
2212
2095
  },
2213
2096
  {
2214
2097
  "$type": "ParserRule",
@@ -2268,12 +2151,9 @@ const ZModelGrammar = () => loadedZModelGrammar ?? (loadedZModelGrammar = (0, la
2268
2151
  }
2269
2152
  ]
2270
2153
  },
2271
- "definesHiddenTokens": false,
2272
2154
  "entry": false,
2273
2155
  "fragment": false,
2274
- "hiddenTokens": [],
2275
- "parameters": [],
2276
- "wildcard": false
2156
+ "parameters": []
2277
2157
  },
2278
2158
  {
2279
2159
  "$type": "ParserRule",
@@ -2324,7 +2204,8 @@ const ZModelGrammar = () => loadedZModelGrammar ?? (loadedZModelGrammar = (0, la
2324
2204
  },
2325
2205
  "arguments": []
2326
2206
  },
2327
- "deprecatedSyntax": false
2207
+ "deprecatedSyntax": false,
2208
+ "isMulti": false
2328
2209
  }
2329
2210
  }
2330
2211
  ]
@@ -2360,12 +2241,9 @@ const ZModelGrammar = () => loadedZModelGrammar ?? (loadedZModelGrammar = (0, la
2360
2241
  }
2361
2242
  ]
2362
2243
  },
2363
- "definesHiddenTokens": false,
2364
2244
  "entry": false,
2365
2245
  "fragment": false,
2366
- "hiddenTokens": [],
2367
- "parameters": [],
2368
- "wildcard": false
2246
+ "parameters": []
2369
2247
  },
2370
2248
  {
2371
2249
  "$type": "ParserRule",
@@ -2450,12 +2328,9 @@ const ZModelGrammar = () => loadedZModelGrammar ?? (loadedZModelGrammar = (0, la
2450
2328
  }
2451
2329
  ]
2452
2330
  },
2453
- "definesHiddenTokens": false,
2454
2331
  "entry": false,
2455
2332
  "fragment": false,
2456
- "hiddenTokens": [],
2457
- "parameters": [],
2458
- "wildcard": false
2333
+ "parameters": []
2459
2334
  },
2460
2335
  {
2461
2336
  "$type": "ParserRule",
@@ -2489,12 +2364,9 @@ const ZModelGrammar = () => loadedZModelGrammar ?? (loadedZModelGrammar = (0, la
2489
2364
  }
2490
2365
  ]
2491
2366
  },
2492
- "definesHiddenTokens": false,
2493
2367
  "entry": false,
2494
2368
  "fragment": false,
2495
- "hiddenTokens": [],
2496
- "parameters": [],
2497
- "wildcard": false
2369
+ "parameters": []
2498
2370
  },
2499
2371
  {
2500
2372
  "$type": "ParserRule",
@@ -2571,12 +2443,9 @@ const ZModelGrammar = () => loadedZModelGrammar ?? (loadedZModelGrammar = (0, la
2571
2443
  }
2572
2444
  ]
2573
2445
  },
2574
- "definesHiddenTokens": false,
2575
2446
  "entry": false,
2576
2447
  "fragment": false,
2577
- "hiddenTokens": [],
2578
- "parameters": [],
2579
- "wildcard": false
2448
+ "parameters": []
2580
2449
  },
2581
2450
  {
2582
2451
  "$type": "ParserRule",
@@ -2624,12 +2493,9 @@ const ZModelGrammar = () => loadedZModelGrammar ?? (loadedZModelGrammar = (0, la
2624
2493
  }
2625
2494
  ]
2626
2495
  },
2627
- "definesHiddenTokens": false,
2628
2496
  "entry": false,
2629
2497
  "fragment": false,
2630
- "hiddenTokens": [],
2631
- "parameters": [],
2632
- "wildcard": false
2498
+ "parameters": []
2633
2499
  },
2634
2500
  {
2635
2501
  "$type": "ParserRule",
@@ -2761,12 +2627,9 @@ const ZModelGrammar = () => loadedZModelGrammar ?? (loadedZModelGrammar = (0, la
2761
2627
  }
2762
2628
  ]
2763
2629
  },
2764
- "definesHiddenTokens": false,
2765
2630
  "entry": false,
2766
2631
  "fragment": false,
2767
- "hiddenTokens": [],
2768
- "parameters": [],
2769
- "wildcard": false
2632
+ "parameters": []
2770
2633
  },
2771
2634
  {
2772
2635
  "$type": "ParserRule",
@@ -2822,12 +2685,9 @@ const ZModelGrammar = () => loadedZModelGrammar ?? (loadedZModelGrammar = (0, la
2822
2685
  }
2823
2686
  ]
2824
2687
  },
2825
- "definesHiddenTokens": false,
2826
2688
  "entry": false,
2827
2689
  "fragment": false,
2828
- "hiddenTokens": [],
2829
- "parameters": [],
2830
- "wildcard": false
2690
+ "parameters": []
2831
2691
  },
2832
2692
  {
2833
2693
  "$type": "ParserRule",
@@ -2866,7 +2726,8 @@ const ZModelGrammar = () => loadedZModelGrammar ?? (loadedZModelGrammar = (0, la
2866
2726
  },
2867
2727
  "arguments": []
2868
2728
  },
2869
- "deprecatedSyntax": false
2729
+ "deprecatedSyntax": false,
2730
+ "isMulti": false
2870
2731
  }
2871
2732
  }
2872
2733
  ]
@@ -2892,12 +2753,9 @@ const ZModelGrammar = () => loadedZModelGrammar ?? (loadedZModelGrammar = (0, la
2892
2753
  }
2893
2754
  ]
2894
2755
  },
2895
- "definesHiddenTokens": false,
2896
2756
  "entry": false,
2897
2757
  "fragment": false,
2898
- "hiddenTokens": [],
2899
- "parameters": [],
2900
- "wildcard": false
2758
+ "parameters": []
2901
2759
  },
2902
2760
  {
2903
2761
  "$type": "ParserRule",
@@ -2953,12 +2811,9 @@ const ZModelGrammar = () => loadedZModelGrammar ?? (loadedZModelGrammar = (0, la
2953
2811
  }
2954
2812
  ]
2955
2813
  },
2956
- "definesHiddenTokens": false,
2957
2814
  "entry": false,
2958
2815
  "fragment": false,
2959
- "hiddenTokens": [],
2960
- "parameters": [],
2961
- "wildcard": false
2816
+ "parameters": []
2962
2817
  },
2963
2818
  {
2964
2819
  "$type": "ParserRule",
@@ -3079,12 +2934,9 @@ const ZModelGrammar = () => loadedZModelGrammar ?? (loadedZModelGrammar = (0, la
3079
2934
  }
3080
2935
  ]
3081
2936
  },
3082
- "definesHiddenTokens": false,
3083
2937
  "entry": false,
3084
2938
  "fragment": false,
3085
- "hiddenTokens": [],
3086
- "parameters": [],
3087
- "wildcard": false
2939
+ "parameters": []
3088
2940
  },
3089
2941
  {
3090
2942
  "$type": "ParserRule",
@@ -3142,12 +2994,9 @@ const ZModelGrammar = () => loadedZModelGrammar ?? (loadedZModelGrammar = (0, la
3142
2994
  }
3143
2995
  ]
3144
2996
  },
3145
- "definesHiddenTokens": false,
3146
2997
  "entry": false,
3147
2998
  "fragment": false,
3148
- "hiddenTokens": [],
3149
- "parameters": [],
3150
- "wildcard": false
2999
+ "parameters": []
3151
3000
  },
3152
3001
  {
3153
3002
  "$type": "ParserRule",
@@ -3221,12 +3070,9 @@ const ZModelGrammar = () => loadedZModelGrammar ?? (loadedZModelGrammar = (0, la
3221
3070
  }
3222
3071
  ]
3223
3072
  },
3224
- "definesHiddenTokens": false,
3225
3073
  "entry": false,
3226
3074
  "fragment": false,
3227
- "hiddenTokens": [],
3228
- "parameters": [],
3229
- "wildcard": false
3075
+ "parameters": []
3230
3076
  },
3231
3077
  {
3232
3078
  "$type": "ParserRule",
@@ -3345,12 +3191,9 @@ const ZModelGrammar = () => loadedZModelGrammar ?? (loadedZModelGrammar = (0, la
3345
3191
  }
3346
3192
  ]
3347
3193
  },
3348
- "definesHiddenTokens": false,
3349
3194
  "entry": false,
3350
3195
  "fragment": false,
3351
- "hiddenTokens": [],
3352
- "parameters": [],
3353
- "wildcard": false
3196
+ "parameters": []
3354
3197
  },
3355
3198
  {
3356
3199
  "$type": "ParserRule",
@@ -3424,12 +3267,9 @@ const ZModelGrammar = () => loadedZModelGrammar ?? (loadedZModelGrammar = (0, la
3424
3267
  }
3425
3268
  ]
3426
3269
  },
3427
- "definesHiddenTokens": false,
3428
3270
  "entry": false,
3429
3271
  "fragment": false,
3430
- "hiddenTokens": [],
3431
- "parameters": [],
3432
- "wildcard": false
3272
+ "parameters": []
3433
3273
  },
3434
3274
  {
3435
3275
  "$type": "ParserRule",
@@ -3485,7 +3325,8 @@ const ZModelGrammar = () => loadedZModelGrammar ?? (loadedZModelGrammar = (0, la
3485
3325
  },
3486
3326
  "arguments": []
3487
3327
  },
3488
- "deprecatedSyntax": false
3328
+ "deprecatedSyntax": false,
3329
+ "isMulti": false
3489
3330
  }
3490
3331
  }
3491
3332
  ]
@@ -3521,12 +3362,9 @@ const ZModelGrammar = () => loadedZModelGrammar ?? (loadedZModelGrammar = (0, la
3521
3362
  }
3522
3363
  ]
3523
3364
  },
3524
- "definesHiddenTokens": false,
3525
3365
  "entry": false,
3526
3366
  "fragment": false,
3527
- "hiddenTokens": [],
3528
- "parameters": [],
3529
- "wildcard": false
3367
+ "parameters": []
3530
3368
  },
3531
3369
  {
3532
3370
  "$type": "ParserRule",
@@ -3550,7 +3388,8 @@ const ZModelGrammar = () => loadedZModelGrammar ?? (loadedZModelGrammar = (0, la
3550
3388
  },
3551
3389
  "arguments": []
3552
3390
  },
3553
- "deprecatedSyntax": false
3391
+ "deprecatedSyntax": false,
3392
+ "isMulti": false
3554
3393
  }
3555
3394
  },
3556
3395
  {
@@ -3577,12 +3416,9 @@ const ZModelGrammar = () => loadedZModelGrammar ?? (loadedZModelGrammar = (0, la
3577
3416
  }
3578
3417
  ]
3579
3418
  },
3580
- "definesHiddenTokens": false,
3581
3419
  "entry": false,
3582
3420
  "fragment": false,
3583
- "hiddenTokens": [],
3584
- "parameters": [],
3585
- "wildcard": false
3421
+ "parameters": []
3586
3422
  },
3587
3423
  {
3588
3424
  "$type": "ParserRule",
@@ -3614,7 +3450,8 @@ const ZModelGrammar = () => loadedZModelGrammar ?? (loadedZModelGrammar = (0, la
3614
3450
  },
3615
3451
  "arguments": []
3616
3452
  },
3617
- "deprecatedSyntax": false
3453
+ "deprecatedSyntax": false,
3454
+ "isMulti": false
3618
3455
  }
3619
3456
  },
3620
3457
  {
@@ -3641,12 +3478,9 @@ const ZModelGrammar = () => loadedZModelGrammar ?? (loadedZModelGrammar = (0, la
3641
3478
  }
3642
3479
  ]
3643
3480
  },
3644
- "definesHiddenTokens": false,
3645
3481
  "entry": false,
3646
3482
  "fragment": false,
3647
- "hiddenTokens": [],
3648
- "parameters": [],
3649
- "wildcard": false
3483
+ "parameters": []
3650
3484
  },
3651
3485
  {
3652
3486
  "$type": "ParserRule",
@@ -3670,7 +3504,8 @@ const ZModelGrammar = () => loadedZModelGrammar ?? (loadedZModelGrammar = (0, la
3670
3504
  },
3671
3505
  "arguments": []
3672
3506
  },
3673
- "deprecatedSyntax": false
3507
+ "deprecatedSyntax": false,
3508
+ "isMulti": false
3674
3509
  }
3675
3510
  },
3676
3511
  {
@@ -3697,12 +3532,9 @@ const ZModelGrammar = () => loadedZModelGrammar ?? (loadedZModelGrammar = (0, la
3697
3532
  }
3698
3533
  ]
3699
3534
  },
3700
- "definesHiddenTokens": false,
3701
3535
  "entry": false,
3702
3536
  "fragment": false,
3703
- "hiddenTokens": [],
3704
- "parameters": [],
3705
- "wildcard": false
3537
+ "parameters": []
3706
3538
  },
3707
3539
  {
3708
3540
  "$type": "ParserRule",
@@ -3747,11 +3579,8 @@ const ZModelGrammar = () => loadedZModelGrammar ?? (loadedZModelGrammar = (0, la
3747
3579
  }
3748
3580
  ]
3749
3581
  },
3750
- "definesHiddenTokens": false,
3751
3582
  "entry": false,
3752
- "hiddenTokens": [],
3753
- "parameters": [],
3754
- "wildcard": false
3583
+ "parameters": []
3755
3584
  },
3756
3585
  {
3757
3586
  "$type": "ParserRule",
@@ -3795,12 +3624,9 @@ const ZModelGrammar = () => loadedZModelGrammar ?? (loadedZModelGrammar = (0, la
3795
3624
  }
3796
3625
  ]
3797
3626
  },
3798
- "definesHiddenTokens": false,
3799
3627
  "entry": false,
3800
3628
  "fragment": false,
3801
- "hiddenTokens": [],
3802
- "parameters": [],
3803
- "wildcard": false
3629
+ "parameters": []
3804
3630
  },
3805
3631
  {
3806
3632
  "$type": "ParserRule",
@@ -3871,12 +3697,9 @@ const ZModelGrammar = () => loadedZModelGrammar ?? (loadedZModelGrammar = (0, la
3871
3697
  }
3872
3698
  ]
3873
3699
  },
3874
- "definesHiddenTokens": false,
3875
3700
  "entry": false,
3876
3701
  "fragment": false,
3877
- "hiddenTokens": [],
3878
- "parameters": [],
3879
- "wildcard": false
3702
+ "parameters": []
3880
3703
  },
3881
3704
  {
3882
3705
  "$type": "ParserRule",
@@ -3923,12 +3746,9 @@ const ZModelGrammar = () => loadedZModelGrammar ?? (loadedZModelGrammar = (0, la
3923
3746
  }
3924
3747
  ]
3925
3748
  },
3926
- "definesHiddenTokens": false,
3927
3749
  "entry": false,
3928
3750
  "fragment": false,
3929
- "hiddenTokens": [],
3930
- "parameters": [],
3931
- "wildcard": false
3751
+ "parameters": []
3932
3752
  },
3933
3753
  {
3934
3754
  "$type": "ParserRule",
@@ -3947,12 +3767,9 @@ const ZModelGrammar = () => loadedZModelGrammar ?? (loadedZModelGrammar = (0, la
3947
3767
  }
3948
3768
  ]
3949
3769
  },
3950
- "definesHiddenTokens": false,
3951
3770
  "entry": false,
3952
3771
  "fragment": false,
3953
- "hiddenTokens": [],
3954
- "parameters": [],
3955
- "wildcard": false
3772
+ "parameters": []
3956
3773
  },
3957
3774
  {
3958
3775
  "$type": "TerminalRule",
@@ -3960,7 +3777,8 @@ const ZModelGrammar = () => loadedZModelGrammar ?? (loadedZModelGrammar = (0, la
3960
3777
  "name": "WS",
3961
3778
  "definition": {
3962
3779
  "$type": "RegexToken",
3963
- "regex": "/\\\\s+/"
3780
+ "regex": "/\\\\s+/",
3781
+ "parenthesized": false
3964
3782
  },
3965
3783
  "fragment": false
3966
3784
  },
@@ -3969,7 +3787,8 @@ const ZModelGrammar = () => loadedZModelGrammar ?? (loadedZModelGrammar = (0, la
3969
3787
  "name": "INTERNAL_ATTRIBUTE_NAME",
3970
3788
  "definition": {
3971
3789
  "$type": "RegexToken",
3972
- "regex": "/@@@([_a-zA-Z][\\\\w_]*\\\\.)*[_a-zA-Z][\\\\w_]*/"
3790
+ "regex": "/@@@([_a-zA-Z][\\\\w_]*\\\\.)*[_a-zA-Z][\\\\w_]*/",
3791
+ "parenthesized": false
3973
3792
  },
3974
3793
  "fragment": false,
3975
3794
  "hidden": false
@@ -3979,7 +3798,8 @@ const ZModelGrammar = () => loadedZModelGrammar ?? (loadedZModelGrammar = (0, la
3979
3798
  "name": "MODEL_ATTRIBUTE_NAME",
3980
3799
  "definition": {
3981
3800
  "$type": "RegexToken",
3982
- "regex": "/@@([_a-zA-Z][\\\\w_]*\\\\.)*[_a-zA-Z][\\\\w_]*/"
3801
+ "regex": "/@@([_a-zA-Z][\\\\w_]*\\\\.)*[_a-zA-Z][\\\\w_]*/",
3802
+ "parenthesized": false
3983
3803
  },
3984
3804
  "fragment": false,
3985
3805
  "hidden": false
@@ -3989,7 +3809,8 @@ const ZModelGrammar = () => loadedZModelGrammar ?? (loadedZModelGrammar = (0, la
3989
3809
  "name": "FIELD_ATTRIBUTE_NAME",
3990
3810
  "definition": {
3991
3811
  "$type": "RegexToken",
3992
- "regex": "/@([_a-zA-Z][\\\\w_]*\\\\.)*[_a-zA-Z][\\\\w_]*/"
3812
+ "regex": "/@([_a-zA-Z][\\\\w_]*\\\\.)*[_a-zA-Z][\\\\w_]*/",
3813
+ "parenthesized": false
3993
3814
  },
3994
3815
  "fragment": false,
3995
3816
  "hidden": false
@@ -3999,7 +3820,8 @@ const ZModelGrammar = () => loadedZModelGrammar ?? (loadedZModelGrammar = (0, la
3999
3820
  "name": "ID",
4000
3821
  "definition": {
4001
3822
  "$type": "RegexToken",
4002
- "regex": "/[_a-zA-Z][\\\\w_]*/"
3823
+ "regex": "/[_a-zA-Z][\\\\w_]*/",
3824
+ "parenthesized": false
4003
3825
  },
4004
3826
  "fragment": false,
4005
3827
  "hidden": false
@@ -4009,7 +3831,8 @@ const ZModelGrammar = () => loadedZModelGrammar ?? (loadedZModelGrammar = (0, la
4009
3831
  "name": "STRING",
4010
3832
  "definition": {
4011
3833
  "$type": "RegexToken",
4012
- "regex": "/\\"(\\\\\\\\.|[^\\"\\\\\\\\])*\\"|'(\\\\\\\\.|[^'\\\\\\\\])*'/"
3834
+ "regex": "/\\"(\\\\\\\\.|[^\\"\\\\\\\\])*\\"|'(\\\\\\\\.|[^'\\\\\\\\])*'/",
3835
+ "parenthesized": false
4013
3836
  },
4014
3837
  "fragment": false,
4015
3838
  "hidden": false
@@ -4019,7 +3842,8 @@ const ZModelGrammar = () => loadedZModelGrammar ?? (loadedZModelGrammar = (0, la
4019
3842
  "name": "NUMBER",
4020
3843
  "definition": {
4021
3844
  "$type": "RegexToken",
4022
- "regex": "/[+-]?[0-9]+(\\\\.[0-9]+)?/"
3845
+ "regex": "/[+-]?[0-9]+(\\\\.[0-9]+)?/",
3846
+ "parenthesized": false
4023
3847
  },
4024
3848
  "fragment": false,
4025
3849
  "hidden": false
@@ -4029,7 +3853,8 @@ const ZModelGrammar = () => loadedZModelGrammar ?? (loadedZModelGrammar = (0, la
4029
3853
  "name": "TRIPLE_SLASH_COMMENT",
4030
3854
  "definition": {
4031
3855
  "$type": "RegexToken",
4032
- "regex": "/\\\\/\\\\/\\\\/[^\\\\n\\\\r]*/"
3856
+ "regex": "/\\\\/\\\\/\\\\/[^\\\\n\\\\r]*/",
3857
+ "parenthesized": false
4033
3858
  },
4034
3859
  "fragment": false,
4035
3860
  "hidden": false
@@ -4040,7 +3865,8 @@ const ZModelGrammar = () => loadedZModelGrammar ?? (loadedZModelGrammar = (0, la
4040
3865
  "name": "ML_COMMENT",
4041
3866
  "definition": {
4042
3867
  "$type": "RegexToken",
4043
- "regex": "/\\\\/\\\\*[\\\\s\\\\S]*?\\\\*\\\\//"
3868
+ "regex": "/\\\\/\\\\*[\\\\s\\\\S]*?\\\\*\\\\//",
3869
+ "parenthesized": false
4044
3870
  },
4045
3871
  "fragment": false
4046
3872
  },
@@ -4050,7 +3876,8 @@ const ZModelGrammar = () => loadedZModelGrammar ?? (loadedZModelGrammar = (0, la
4050
3876
  "name": "SL_COMMENT",
4051
3877
  "definition": {
4052
3878
  "$type": "RegexToken",
4053
- "regex": "/\\\\/\\\\/[^\\\\n\\\\r]*/"
3879
+ "regex": "/\\\\/\\\\/[^\\\\n\\\\r]*/",
3880
+ "parenthesized": false
4054
3881
  },
4055
3882
  "fragment": false
4056
3883
  }
@@ -4127,11 +3954,8 @@ const ZModelGrammar = () => loadedZModelGrammar ?? (loadedZModelGrammar = (0, la
4127
3954
  }
4128
3955
  }
4129
3956
  ],
4130
- "definesHiddenTokens": false,
4131
- "hiddenTokens": [],
4132
3957
  "imports": [],
4133
- "interfaces": [],
4134
- "usedGrammars": []
3958
+ "interfaces": []
4135
3959
  }`));
4136
3960
  //#endregion
4137
3961
  //#region src/generated/module.ts
@@ -4184,7 +4008,6 @@ var AttributeApplicationValidator = class {
4184
4008
  if (require_ast.isDataField(targetDecl) && !isValidAttributeTarget(decl, targetDecl)) accept("error", `attribute "${decl.name}" cannot be used on this type of field`, { node: attr });
4185
4009
  this.checkDeprecation(attr, accept);
4186
4010
  this.checkDuplicatedAttributes(attr, accept, contextDataModel);
4187
- this.checkOnceInModel(attr, accept);
4188
4011
  const filledParams = /* @__PURE__ */ new Set();
4189
4012
  for (const arg of attr.args) {
4190
4013
  let paramDecl;
@@ -4230,15 +4053,6 @@ var AttributeApplicationValidator = class {
4230
4053
  if (!attrDecl?.attributes.some((a) => a.decl.ref?.name === "@@@once")) return;
4231
4054
  if ((contextDataModel ? require_utils.getAllAttributes(contextDataModel) : attr.$container.attributes).filter((a) => a.decl.ref === attrDecl && a !== attr).length > 0) accept("error", `Attribute "${attrDecl.name}" can only be applied once`, { node: attr });
4232
4055
  }
4233
- checkOnceInModel(attr, accept) {
4234
- const attrDecl = attr.decl.ref;
4235
- if (!attrDecl?.attributes.some((a) => a.decl.ref?.name === "@@@onceInModel")) return;
4236
- const field = attr.$container;
4237
- if (!require_ast.isDataField(field)) return;
4238
- const dataModel = require_utils.getContainingDataModel(attr);
4239
- if (!dataModel) return;
4240
- if (require_utils.getAllFields(dataModel).filter((f) => f.attributes.some((a) => a.decl.ref === attrDecl)).length > 1) accept("error", `Attribute "${attrDecl.name}" can only be applied to one field per model`, { node: attr });
4241
- }
4242
4056
  _checkModelLevelPolicy(attr, accept) {
4243
4057
  const kind = require_utils.getStringLiteral(attr.args[0]?.value);
4244
4058
  if (!kind) {
@@ -4585,6 +4399,7 @@ var DataModelValidator = class {
4585
4399
  validateDuplicatedDeclarations(dm, require_utils.getAllFields(dm), accept);
4586
4400
  this.validateAttributes(dm, accept);
4587
4401
  this.validateFields(dm, accept);
4402
+ this.validateOnceInModelAttributes(dm, accept);
4588
4403
  if (dm.mixins.length > 0) this.validateMixins(dm, accept);
4589
4404
  this.validateInherits(dm, accept);
4590
4405
  this.validateDelegateMap(dm, accept);
@@ -4633,6 +4448,24 @@ var DataModelValidator = class {
4633
4448
  validateAttributes(dm, accept) {
4634
4449
  require_utils.getAllAttributes(dm).forEach((attr) => validateAttributeApplication(attr, accept, dm));
4635
4450
  }
4451
+ validateOnceInModelAttributes(dm, accept) {
4452
+ const occurrences = /* @__PURE__ */ new Map();
4453
+ for (const field of require_utils.getAllFields(dm)) for (const attr of field.attributes) {
4454
+ const decl = attr.decl.ref;
4455
+ if (decl && require_utils.hasAttribute(decl, "@@@onceInModel")) {
4456
+ const list = occurrences.get(decl) ?? [];
4457
+ list.push(attr);
4458
+ occurrences.set(decl, list);
4459
+ }
4460
+ }
4461
+ for (const [decl, attrs] of occurrences) {
4462
+ if (attrs.length <= 1) continue;
4463
+ const message = `Attribute "${decl.name}" can only be applied to one field per model`;
4464
+ const local = attrs.filter((attr) => dm.fields.includes(attr.$container));
4465
+ if (local.length > 0) local.forEach((attr) => accept("error", message, { node: attr }));
4466
+ else accept("error", message, { node: dm });
4467
+ }
4468
+ }
4636
4469
  parseRelation(field, accept) {
4637
4470
  const relAttr = field.attributes.find((attr) => attr.decl.ref?.name === "@relation");
4638
4471
  let name;
@@ -5282,43 +5115,43 @@ var FunctionInvocationValidator = class {
5282
5115
  __decorate([
5283
5116
  func("uuid"),
5284
5117
  __decorateMetadata("design:type", Function),
5285
- __decorateMetadata("design:paramtypes", [typeof (_ref$1 = "InvocationExpr") === "function" ? _ref$1 : Object, Object]),
5118
+ __decorateMetadata("design:paramtypes", [typeof (_ref$1 = typeof require_ast.InvocationExpr !== "undefined" && require_ast.InvocationExpr) === "function" ? _ref$1 : Object, Object]),
5286
5119
  __decorateMetadata("design:returntype", void 0)
5287
5120
  ], FunctionInvocationValidator.prototype, "_checkUuid", null);
5288
5121
  __decorate([
5289
5122
  func("cuid"),
5290
5123
  __decorateMetadata("design:type", Function),
5291
- __decorateMetadata("design:paramtypes", [typeof (_ref2$1 = "InvocationExpr") === "function" ? _ref2$1 : Object, Object]),
5124
+ __decorateMetadata("design:paramtypes", [typeof (_ref2$1 = typeof require_ast.InvocationExpr !== "undefined" && require_ast.InvocationExpr) === "function" ? _ref2$1 : Object, Object]),
5292
5125
  __decorateMetadata("design:returntype", void 0)
5293
5126
  ], FunctionInvocationValidator.prototype, "_checkCuid", null);
5294
5127
  __decorate([
5295
5128
  func("nanoid"),
5296
5129
  __decorateMetadata("design:type", Function),
5297
- __decorateMetadata("design:paramtypes", [typeof (_ref3$1 = "InvocationExpr") === "function" ? _ref3$1 : Object, Object]),
5130
+ __decorateMetadata("design:paramtypes", [typeof (_ref3$1 = typeof require_ast.InvocationExpr !== "undefined" && require_ast.InvocationExpr) === "function" ? _ref3$1 : Object, Object]),
5298
5131
  __decorateMetadata("design:returntype", void 0)
5299
5132
  ], FunctionInvocationValidator.prototype, "_checkNanoid", null);
5300
5133
  __decorate([
5301
5134
  func("auth"),
5302
5135
  __decorateMetadata("design:type", Function),
5303
- __decorateMetadata("design:paramtypes", [typeof (_ref4$1 = "InvocationExpr") === "function" ? _ref4$1 : Object, Object]),
5136
+ __decorateMetadata("design:paramtypes", [typeof (_ref4$1 = typeof require_ast.InvocationExpr !== "undefined" && require_ast.InvocationExpr) === "function" ? _ref4$1 : Object, Object]),
5304
5137
  __decorateMetadata("design:returntype", void 0)
5305
5138
  ], FunctionInvocationValidator.prototype, "_checkAuth", null);
5306
5139
  __decorate([
5307
5140
  func("length"),
5308
5141
  __decorateMetadata("design:type", Function),
5309
- __decorateMetadata("design:paramtypes", [typeof (_ref5$1 = "InvocationExpr") === "function" ? _ref5$1 : Object, Object]),
5142
+ __decorateMetadata("design:paramtypes", [typeof (_ref5$1 = typeof require_ast.InvocationExpr !== "undefined" && require_ast.InvocationExpr) === "function" ? _ref5$1 : Object, Object]),
5310
5143
  __decorateMetadata("design:returntype", void 0)
5311
5144
  ], FunctionInvocationValidator.prototype, "_checkLength", null);
5312
5145
  __decorate([
5313
5146
  func("regex"),
5314
5147
  __decorateMetadata("design:type", Function),
5315
- __decorateMetadata("design:paramtypes", [typeof (_ref6$1 = "InvocationExpr") === "function" ? _ref6$1 : Object, Object]),
5148
+ __decorateMetadata("design:paramtypes", [typeof (_ref6$1 = typeof require_ast.InvocationExpr !== "undefined" && require_ast.InvocationExpr) === "function" ? _ref6$1 : Object, Object]),
5316
5149
  __decorateMetadata("design:returntype", void 0)
5317
5150
  ], FunctionInvocationValidator.prototype, "_checkRegex", null);
5318
5151
  __decorate([
5319
5152
  func("check"),
5320
5153
  __decorateMetadata("design:type", Function),
5321
- __decorateMetadata("design:paramtypes", [typeof (_ref7$1 = "InvocationExpr") === "function" ? _ref7$1 : Object, Object]),
5154
+ __decorateMetadata("design:paramtypes", [typeof (_ref7$1 = typeof require_ast.InvocationExpr !== "undefined" && require_ast.InvocationExpr) === "function" ? _ref7$1 : Object, Object]),
5322
5155
  __decorateMetadata("design:returntype", void 0)
5323
5156
  ], FunctionInvocationValidator.prototype, "_checkCheck", null);
5324
5157
  //#endregion
@@ -5471,9 +5304,9 @@ var ZModelCommentProvider = class extends langium.DefaultCommentProvider {
5471
5304
  //#region src/zmodel-code-generator.ts
5472
5305
  var _ref, _ref2, _ref3, _ref4, _ref5, _ref6, _ref7, _ref8, _ref9, _ref10, _ref11, _ref12, _ref13, _ref14, _ref15, _ref16, _ref17, _ref18, _ref19, _ref20, _ref21, _ref22, _ref23, _ref24, _ref25, _ref26, _ref27, _ref28, _ref29, _ref30, _ref31, _ref32, _ref33, _ref34;
5473
5306
  const generationHandlers = /* @__PURE__ */ new Map();
5474
- function gen(name) {
5307
+ function gen(type) {
5475
5308
  return function(_target, _propertyKey, descriptor) {
5476
- if (!generationHandlers.get(name)) generationHandlers.set(name, descriptor);
5309
+ if (!generationHandlers.get(type.$type)) generationHandlers.set(type.$type, descriptor);
5477
5310
  return descriptor;
5478
5311
  };
5479
5312
  }
@@ -5668,12 +5501,12 @@ ${ast.fields.map((x) => this.indent + this.generate(x)).join("\n")}${ast.attribu
5668
5501
  const operator = ast.operator;
5669
5502
  const isCollectionPredicate = this.isCollectionPredicateOperator(operator);
5670
5503
  const currentPriority = require_ast$1.BinaryExprOperatorPriority[operator];
5671
- if (ast.left.$type === "BinaryExpr" && require_ast$1.BinaryExprOperatorPriority[ast.left["operator"]] < currentPriority) result.left = true;
5504
+ if (ast.left.$type === require_ast.BinaryExpr.$type && require_ast$1.BinaryExprOperatorPriority[ast.left["operator"]] < currentPriority) result.left = true;
5672
5505
  /**
5673
5506
  * 1 collection predicate operator has [] around the right operand, no need to add parenthesis.
5674
5507
  * 2 grammar is left associative, so if the right operand has the same priority still need to add parenthesis.
5675
5508
  **/
5676
- if (!isCollectionPredicate && ast.right.$type === "BinaryExpr" && require_ast$1.BinaryExprOperatorPriority[ast.right["operator"]] <= currentPriority) result.right = true;
5509
+ if (!isCollectionPredicate && ast.right.$type === require_ast.BinaryExpr.$type && require_ast$1.BinaryExprOperatorPriority[ast.right["operator"]] <= currentPriority) result.right = true;
5677
5510
  return result;
5678
5511
  }
5679
5512
  isCollectionPredicateOperator(op) {
@@ -5687,163 +5520,163 @@ ${ast.fields.map((x) => this.indent + this.generate(x)).join("\n")}${ast.attribu
5687
5520
  __decorate([
5688
5521
  gen(require_ast.Model),
5689
5522
  __decorateMetadata("design:type", Function),
5690
- __decorateMetadata("design:paramtypes", [typeof (_ref = "Model") === "function" ? _ref : Object]),
5523
+ __decorateMetadata("design:paramtypes", [typeof (_ref = typeof require_ast.Model !== "undefined" && require_ast.Model) === "function" ? _ref : Object]),
5691
5524
  __decorateMetadata("design:returntype", void 0)
5692
5525
  ], ZModelCodeGenerator.prototype, "_generateModel", null);
5693
5526
  __decorate([
5694
5527
  gen(require_ast.DataSource),
5695
5528
  __decorateMetadata("design:type", Function),
5696
- __decorateMetadata("design:paramtypes", [typeof (_ref2 = "DataSource") === "function" ? _ref2 : Object]),
5529
+ __decorateMetadata("design:paramtypes", [typeof (_ref2 = typeof require_ast.DataSource !== "undefined" && require_ast.DataSource) === "function" ? _ref2 : Object]),
5697
5530
  __decorateMetadata("design:returntype", void 0)
5698
5531
  ], ZModelCodeGenerator.prototype, "_generateDataSource", null);
5699
5532
  __decorate([
5700
5533
  gen(require_ast.ModelImport),
5701
5534
  __decorateMetadata("design:type", Function),
5702
- __decorateMetadata("design:paramtypes", [typeof (_ref3 = "ModelImport") === "function" ? _ref3 : Object]),
5535
+ __decorateMetadata("design:paramtypes", [typeof (_ref3 = typeof require_ast.ModelImport !== "undefined" && require_ast.ModelImport) === "function" ? _ref3 : Object]),
5703
5536
  __decorateMetadata("design:returntype", void 0)
5704
5537
  ], ZModelCodeGenerator.prototype, "_generateModelImport", null);
5705
5538
  __decorate([
5706
5539
  gen(require_ast.Enum),
5707
5540
  __decorateMetadata("design:type", Function),
5708
- __decorateMetadata("design:paramtypes", [typeof (_ref4 = "Enum") === "function" ? _ref4 : Object]),
5541
+ __decorateMetadata("design:paramtypes", [typeof (_ref4 = typeof require_ast.Enum !== "undefined" && require_ast.Enum) === "function" ? _ref4 : Object]),
5709
5542
  __decorateMetadata("design:returntype", void 0)
5710
5543
  ], ZModelCodeGenerator.prototype, "_generateEnum", null);
5711
5544
  __decorate([
5712
5545
  gen(require_ast.EnumField),
5713
5546
  __decorateMetadata("design:type", Function),
5714
- __decorateMetadata("design:paramtypes", [typeof (_ref5 = "EnumField") === "function" ? _ref5 : Object]),
5547
+ __decorateMetadata("design:paramtypes", [typeof (_ref5 = typeof require_ast.EnumField !== "undefined" && require_ast.EnumField) === "function" ? _ref5 : Object]),
5715
5548
  __decorateMetadata("design:returntype", void 0)
5716
5549
  ], ZModelCodeGenerator.prototype, "_generateEnumField", null);
5717
5550
  __decorate([
5718
5551
  gen(require_ast.GeneratorDecl),
5719
5552
  __decorateMetadata("design:type", Function),
5720
- __decorateMetadata("design:paramtypes", [typeof (_ref6 = "GeneratorDecl") === "function" ? _ref6 : Object]),
5553
+ __decorateMetadata("design:paramtypes", [typeof (_ref6 = typeof require_ast.GeneratorDecl !== "undefined" && require_ast.GeneratorDecl) === "function" ? _ref6 : Object]),
5721
5554
  __decorateMetadata("design:returntype", void 0)
5722
5555
  ], ZModelCodeGenerator.prototype, "_generateGenerator", null);
5723
5556
  __decorate([
5724
5557
  gen(require_ast.ConfigField),
5725
5558
  __decorateMetadata("design:type", Function),
5726
- __decorateMetadata("design:paramtypes", [typeof (_ref7 = "ConfigField") === "function" ? _ref7 : Object]),
5559
+ __decorateMetadata("design:paramtypes", [typeof (_ref7 = typeof require_ast.ConfigField !== "undefined" && require_ast.ConfigField) === "function" ? _ref7 : Object]),
5727
5560
  __decorateMetadata("design:returntype", void 0)
5728
5561
  ], ZModelCodeGenerator.prototype, "_generateConfigField", null);
5729
5562
  __decorate([
5730
5563
  gen(require_ast.ConfigArrayExpr),
5731
5564
  __decorateMetadata("design:type", Function),
5732
- __decorateMetadata("design:paramtypes", [typeof (_ref8 = "ConfigArrayExpr") === "function" ? _ref8 : Object]),
5565
+ __decorateMetadata("design:paramtypes", [typeof (_ref8 = typeof require_ast.ConfigArrayExpr !== "undefined" && require_ast.ConfigArrayExpr) === "function" ? _ref8 : Object]),
5733
5566
  __decorateMetadata("design:returntype", void 0)
5734
5567
  ], ZModelCodeGenerator.prototype, "_generateConfigArrayExpr", null);
5735
5568
  __decorate([
5736
5569
  gen(require_ast.ConfigInvocationExpr),
5737
5570
  __decorateMetadata("design:type", Function),
5738
- __decorateMetadata("design:paramtypes", [typeof (_ref9 = "ConfigInvocationExpr") === "function" ? _ref9 : Object]),
5571
+ __decorateMetadata("design:paramtypes", [typeof (_ref9 = typeof require_ast.ConfigInvocationExpr !== "undefined" && require_ast.ConfigInvocationExpr) === "function" ? _ref9 : Object]),
5739
5572
  __decorateMetadata("design:returntype", void 0)
5740
5573
  ], ZModelCodeGenerator.prototype, "_generateConfigInvocationExpr", null);
5741
5574
  __decorate([
5742
5575
  gen(require_ast.Plugin),
5743
5576
  __decorateMetadata("design:type", Function),
5744
- __decorateMetadata("design:paramtypes", [typeof (_ref10 = "Plugin") === "function" ? _ref10 : Object]),
5577
+ __decorateMetadata("design:paramtypes", [typeof (_ref10 = typeof require_ast.Plugin !== "undefined" && require_ast.Plugin) === "function" ? _ref10 : Object]),
5745
5578
  __decorateMetadata("design:returntype", void 0)
5746
5579
  ], ZModelCodeGenerator.prototype, "_generatePlugin", null);
5747
5580
  __decorate([
5748
5581
  gen(require_ast.PluginField),
5749
5582
  __decorateMetadata("design:type", Function),
5750
- __decorateMetadata("design:paramtypes", [typeof (_ref11 = "PluginField") === "function" ? _ref11 : Object]),
5583
+ __decorateMetadata("design:paramtypes", [typeof (_ref11 = typeof require_ast.PluginField !== "undefined" && require_ast.PluginField) === "function" ? _ref11 : Object]),
5751
5584
  __decorateMetadata("design:returntype", void 0)
5752
5585
  ], ZModelCodeGenerator.prototype, "_generatePluginField", null);
5753
5586
  __decorate([
5754
5587
  gen(require_ast.DataModel),
5755
5588
  __decorateMetadata("design:type", Function),
5756
- __decorateMetadata("design:paramtypes", [typeof (_ref12 = "DataModel") === "function" ? _ref12 : Object]),
5589
+ __decorateMetadata("design:paramtypes", [typeof (_ref12 = typeof require_ast.DataModel !== "undefined" && require_ast.DataModel) === "function" ? _ref12 : Object]),
5757
5590
  __decorateMetadata("design:returntype", void 0)
5758
5591
  ], ZModelCodeGenerator.prototype, "_generateDataModel", null);
5759
5592
  __decorate([
5760
5593
  gen(require_ast.DataField),
5761
5594
  __decorateMetadata("design:type", Function),
5762
- __decorateMetadata("design:paramtypes", [typeof (_ref13 = "DataField") === "function" ? _ref13 : Object]),
5595
+ __decorateMetadata("design:paramtypes", [typeof (_ref13 = typeof require_ast.DataField !== "undefined" && require_ast.DataField) === "function" ? _ref13 : Object]),
5763
5596
  __decorateMetadata("design:returntype", void 0)
5764
5597
  ], ZModelCodeGenerator.prototype, "_generateDataField", null);
5765
5598
  __decorate([
5766
5599
  gen(require_ast.DataModelAttribute),
5767
5600
  __decorateMetadata("design:type", Function),
5768
- __decorateMetadata("design:paramtypes", [typeof (_ref14 = "DataModelAttribute") === "function" ? _ref14 : Object]),
5601
+ __decorateMetadata("design:paramtypes", [typeof (_ref14 = typeof require_ast.DataModelAttribute !== "undefined" && require_ast.DataModelAttribute) === "function" ? _ref14 : Object]),
5769
5602
  __decorateMetadata("design:returntype", void 0)
5770
5603
  ], ZModelCodeGenerator.prototype, "_generateDataModelAttribute", null);
5771
5604
  __decorate([
5772
5605
  gen(require_ast.DataFieldAttribute),
5773
5606
  __decorateMetadata("design:type", Function),
5774
- __decorateMetadata("design:paramtypes", [typeof (_ref15 = "DataFieldAttribute") === "function" ? _ref15 : Object]),
5607
+ __decorateMetadata("design:paramtypes", [typeof (_ref15 = typeof require_ast.DataFieldAttribute !== "undefined" && require_ast.DataFieldAttribute) === "function" ? _ref15 : Object]),
5775
5608
  __decorateMetadata("design:returntype", void 0)
5776
5609
  ], ZModelCodeGenerator.prototype, "_generateDataFieldAttribute", null);
5777
5610
  __decorate([
5778
5611
  gen(require_ast.AttributeArg),
5779
5612
  __decorateMetadata("design:type", Function),
5780
- __decorateMetadata("design:paramtypes", [typeof (_ref16 = "AttributeArg") === "function" ? _ref16 : Object]),
5613
+ __decorateMetadata("design:paramtypes", [typeof (_ref16 = typeof require_ast.AttributeArg !== "undefined" && require_ast.AttributeArg) === "function" ? _ref16 : Object]),
5781
5614
  __decorateMetadata("design:returntype", void 0)
5782
5615
  ], ZModelCodeGenerator.prototype, "_generateAttributeArg", null);
5783
5616
  __decorate([
5784
5617
  gen(require_ast.ObjectExpr),
5785
5618
  __decorateMetadata("design:type", Function),
5786
- __decorateMetadata("design:paramtypes", [typeof (_ref17 = "ObjectExpr") === "function" ? _ref17 : Object]),
5619
+ __decorateMetadata("design:paramtypes", [typeof (_ref17 = typeof require_ast.ObjectExpr !== "undefined" && require_ast.ObjectExpr) === "function" ? _ref17 : Object]),
5787
5620
  __decorateMetadata("design:returntype", void 0)
5788
5621
  ], ZModelCodeGenerator.prototype, "_generateObjectExpr", null);
5789
5622
  __decorate([
5790
5623
  gen(require_ast.ArrayExpr),
5791
5624
  __decorateMetadata("design:type", Function),
5792
- __decorateMetadata("design:paramtypes", [typeof (_ref18 = "ArrayExpr") === "function" ? _ref18 : Object]),
5625
+ __decorateMetadata("design:paramtypes", [typeof (_ref18 = typeof require_ast.ArrayExpr !== "undefined" && require_ast.ArrayExpr) === "function" ? _ref18 : Object]),
5793
5626
  __decorateMetadata("design:returntype", void 0)
5794
5627
  ], ZModelCodeGenerator.prototype, "_generateArrayExpr", null);
5795
5628
  __decorate([
5796
5629
  gen(require_ast.StringLiteral),
5797
5630
  __decorateMetadata("design:type", Function),
5798
- __decorateMetadata("design:paramtypes", [typeof (_ref19 = "LiteralExpr") === "function" ? _ref19 : Object]),
5631
+ __decorateMetadata("design:paramtypes", [typeof (_ref19 = typeof require_ast.LiteralExpr !== "undefined" && require_ast.LiteralExpr) === "function" ? _ref19 : Object]),
5799
5632
  __decorateMetadata("design:returntype", void 0)
5800
5633
  ], ZModelCodeGenerator.prototype, "_generateLiteralExpr", null);
5801
5634
  __decorate([
5802
5635
  gen(require_ast.NumberLiteral),
5803
5636
  __decorateMetadata("design:type", Function),
5804
- __decorateMetadata("design:paramtypes", [typeof (_ref20 = "NumberLiteral") === "function" ? _ref20 : Object]),
5637
+ __decorateMetadata("design:paramtypes", [typeof (_ref20 = typeof require_ast.NumberLiteral !== "undefined" && require_ast.NumberLiteral) === "function" ? _ref20 : Object]),
5805
5638
  __decorateMetadata("design:returntype", void 0)
5806
5639
  ], ZModelCodeGenerator.prototype, "_generateNumberLiteral", null);
5807
5640
  __decorate([
5808
5641
  gen(require_ast.BooleanLiteral),
5809
5642
  __decorateMetadata("design:type", Function),
5810
- __decorateMetadata("design:paramtypes", [typeof (_ref21 = "BooleanLiteral") === "function" ? _ref21 : Object]),
5643
+ __decorateMetadata("design:paramtypes", [typeof (_ref21 = typeof require_ast.BooleanLiteral !== "undefined" && require_ast.BooleanLiteral) === "function" ? _ref21 : Object]),
5811
5644
  __decorateMetadata("design:returntype", void 0)
5812
5645
  ], ZModelCodeGenerator.prototype, "_generateBooleanLiteral", null);
5813
5646
  __decorate([
5814
5647
  gen(require_ast.UnaryExpr),
5815
5648
  __decorateMetadata("design:type", Function),
5816
- __decorateMetadata("design:paramtypes", [typeof (_ref22 = "UnaryExpr") === "function" ? _ref22 : Object]),
5649
+ __decorateMetadata("design:paramtypes", [typeof (_ref22 = typeof require_ast.UnaryExpr !== "undefined" && require_ast.UnaryExpr) === "function" ? _ref22 : Object]),
5817
5650
  __decorateMetadata("design:returntype", void 0)
5818
5651
  ], ZModelCodeGenerator.prototype, "_generateUnaryExpr", null);
5819
5652
  __decorate([
5820
5653
  gen(require_ast.BinaryExpr),
5821
5654
  __decorateMetadata("design:type", Function),
5822
- __decorateMetadata("design:paramtypes", [typeof (_ref23 = "BinaryExpr") === "function" ? _ref23 : Object]),
5655
+ __decorateMetadata("design:paramtypes", [typeof (_ref23 = typeof require_ast.BinaryExpr !== "undefined" && require_ast.BinaryExpr) === "function" ? _ref23 : Object]),
5823
5656
  __decorateMetadata("design:returntype", void 0)
5824
5657
  ], ZModelCodeGenerator.prototype, "_generateBinaryExpr", null);
5825
5658
  __decorate([
5826
5659
  gen(require_ast.ReferenceExpr),
5827
5660
  __decorateMetadata("design:type", Function),
5828
- __decorateMetadata("design:paramtypes", [typeof (_ref24 = "ReferenceExpr") === "function" ? _ref24 : Object]),
5661
+ __decorateMetadata("design:paramtypes", [typeof (_ref24 = typeof require_ast.ReferenceExpr !== "undefined" && require_ast.ReferenceExpr) === "function" ? _ref24 : Object]),
5829
5662
  __decorateMetadata("design:returntype", void 0)
5830
5663
  ], ZModelCodeGenerator.prototype, "_generateReferenceExpr", null);
5831
5664
  __decorate([
5832
5665
  gen(require_ast.ReferenceArg),
5833
5666
  __decorateMetadata("design:type", Function),
5834
- __decorateMetadata("design:paramtypes", [typeof (_ref25 = "ReferenceArg") === "function" ? _ref25 : Object]),
5667
+ __decorateMetadata("design:paramtypes", [typeof (_ref25 = typeof require_ast.ReferenceArg !== "undefined" && require_ast.ReferenceArg) === "function" ? _ref25 : Object]),
5835
5668
  __decorateMetadata("design:returntype", void 0)
5836
5669
  ], ZModelCodeGenerator.prototype, "_generateReferenceArg", null);
5837
5670
  __decorate([
5838
5671
  gen(require_ast.MemberAccessExpr),
5839
5672
  __decorateMetadata("design:type", Function),
5840
- __decorateMetadata("design:paramtypes", [typeof (_ref26 = "MemberAccessExpr") === "function" ? _ref26 : Object]),
5673
+ __decorateMetadata("design:paramtypes", [typeof (_ref26 = typeof require_ast.MemberAccessExpr !== "undefined" && require_ast.MemberAccessExpr) === "function" ? _ref26 : Object]),
5841
5674
  __decorateMetadata("design:returntype", void 0)
5842
5675
  ], ZModelCodeGenerator.prototype, "_generateMemberExpr", null);
5843
5676
  __decorate([
5844
5677
  gen(require_ast.InvocationExpr),
5845
5678
  __decorateMetadata("design:type", Function),
5846
- __decorateMetadata("design:paramtypes", [typeof (_ref27 = "InvocationExpr") === "function" ? _ref27 : Object]),
5679
+ __decorateMetadata("design:paramtypes", [typeof (_ref27 = typeof require_ast.InvocationExpr !== "undefined" && require_ast.InvocationExpr) === "function" ? _ref27 : Object]),
5847
5680
  __decorateMetadata("design:returntype", void 0)
5848
5681
  ], ZModelCodeGenerator.prototype, "_generateInvocationExpr", null);
5849
5682
  __decorate([
@@ -5861,43 +5694,43 @@ __decorate([
5861
5694
  __decorate([
5862
5695
  gen(require_ast.Attribute),
5863
5696
  __decorateMetadata("design:type", Function),
5864
- __decorateMetadata("design:paramtypes", [typeof (_ref28 = "Attribute") === "function" ? _ref28 : Object]),
5697
+ __decorateMetadata("design:paramtypes", [typeof (_ref28 = typeof require_ast.Attribute !== "undefined" && require_ast.Attribute) === "function" ? _ref28 : Object]),
5865
5698
  __decorateMetadata("design:returntype", void 0)
5866
5699
  ], ZModelCodeGenerator.prototype, "_generateAttribute", null);
5867
5700
  __decorate([
5868
5701
  gen(require_ast.AttributeParam),
5869
5702
  __decorateMetadata("design:type", Function),
5870
- __decorateMetadata("design:paramtypes", [typeof (_ref29 = "AttributeParam") === "function" ? _ref29 : Object]),
5703
+ __decorateMetadata("design:paramtypes", [typeof (_ref29 = typeof require_ast.AttributeParam !== "undefined" && require_ast.AttributeParam) === "function" ? _ref29 : Object]),
5871
5704
  __decorateMetadata("design:returntype", void 0)
5872
5705
  ], ZModelCodeGenerator.prototype, "_generateAttributeParam", null);
5873
5706
  __decorate([
5874
5707
  gen(require_ast.AttributeParamType),
5875
5708
  __decorateMetadata("design:type", Function),
5876
- __decorateMetadata("design:paramtypes", [typeof (_ref30 = "AttributeParamType") === "function" ? _ref30 : Object]),
5709
+ __decorateMetadata("design:paramtypes", [typeof (_ref30 = typeof require_ast.AttributeParamType !== "undefined" && require_ast.AttributeParamType) === "function" ? _ref30 : Object]),
5877
5710
  __decorateMetadata("design:returntype", void 0)
5878
5711
  ], ZModelCodeGenerator.prototype, "_generateAttributeParamType", null);
5879
5712
  __decorate([
5880
5713
  gen(require_ast.FunctionDecl),
5881
5714
  __decorateMetadata("design:type", Function),
5882
- __decorateMetadata("design:paramtypes", [typeof (_ref31 = "FunctionDecl") === "function" ? _ref31 : Object]),
5715
+ __decorateMetadata("design:paramtypes", [typeof (_ref31 = typeof require_ast.FunctionDecl !== "undefined" && require_ast.FunctionDecl) === "function" ? _ref31 : Object]),
5883
5716
  __decorateMetadata("design:returntype", void 0)
5884
5717
  ], ZModelCodeGenerator.prototype, "_generateFunctionDecl", null);
5885
5718
  __decorate([
5886
5719
  gen(require_ast.FunctionParam),
5887
5720
  __decorateMetadata("design:type", Function),
5888
- __decorateMetadata("design:paramtypes", [typeof (_ref32 = "FunctionParam") === "function" ? _ref32 : Object]),
5721
+ __decorateMetadata("design:paramtypes", [typeof (_ref32 = typeof require_ast.FunctionParam !== "undefined" && require_ast.FunctionParam) === "function" ? _ref32 : Object]),
5889
5722
  __decorateMetadata("design:returntype", void 0)
5890
5723
  ], ZModelCodeGenerator.prototype, "_generateFunctionParam", null);
5891
5724
  __decorate([
5892
5725
  gen(require_ast.FunctionParamType),
5893
5726
  __decorateMetadata("design:type", Function),
5894
- __decorateMetadata("design:paramtypes", [typeof (_ref33 = "FunctionParamType") === "function" ? _ref33 : Object]),
5727
+ __decorateMetadata("design:paramtypes", [typeof (_ref33 = typeof require_ast.FunctionParamType !== "undefined" && require_ast.FunctionParamType) === "function" ? _ref33 : Object]),
5895
5728
  __decorateMetadata("design:returntype", void 0)
5896
5729
  ], ZModelCodeGenerator.prototype, "_generateFunctionParamType", null);
5897
5730
  __decorate([
5898
5731
  gen(require_ast.TypeDef),
5899
5732
  __decorateMetadata("design:type", Function),
5900
- __decorateMetadata("design:paramtypes", [typeof (_ref34 = "TypeDef") === "function" ? _ref34 : Object]),
5733
+ __decorateMetadata("design:paramtypes", [typeof (_ref34 = typeof require_ast.TypeDef !== "undefined" && require_ast.TypeDef) === "function" ? _ref34 : Object]),
5901
5734
  __decorateMetadata("design:returntype", void 0)
5902
5735
  ], ZModelCodeGenerator.prototype, "_generateTypeDef", null);
5903
5736
  //#endregion
@@ -6288,8 +6121,9 @@ var ZModelLinker = class extends langium.DefaultLinker {
6288
6121
  document.state = langium.DocumentState.Linked;
6289
6122
  }
6290
6123
  linkReference(refInfo, document, extraScopes) {
6291
- if (refInfo.reference._ref) return;
6292
- if (this.resolveFromScopeProviders(refInfo.reference, document, extraScopes)) return;
6124
+ const defaultRef = refInfo.reference;
6125
+ if (defaultRef._ref) return;
6126
+ if (this.resolveFromScopeProviders(defaultRef, document, extraScopes)) return;
6293
6127
  this.doLink(refInfo, document);
6294
6128
  }
6295
6129
  resolveFromScopeProviders(reference, document, providers) {
@@ -6306,45 +6140,45 @@ var ZModelLinker = class extends langium.DefaultLinker {
6306
6140
  }
6307
6141
  resolve(node, document, extraScopes = []) {
6308
6142
  switch (node.$type) {
6309
- case require_ast.StringLiteral:
6310
- case require_ast.NumberLiteral:
6311
- case require_ast.BooleanLiteral:
6143
+ case require_ast.StringLiteral.$type:
6144
+ case require_ast.NumberLiteral.$type:
6145
+ case require_ast.BooleanLiteral.$type:
6312
6146
  this.resolveLiteral(node);
6313
6147
  break;
6314
- case require_ast.InvocationExpr:
6148
+ case require_ast.InvocationExpr.$type:
6315
6149
  this.resolveInvocation(node, document, extraScopes);
6316
6150
  break;
6317
- case require_ast.ArrayExpr:
6151
+ case require_ast.ArrayExpr.$type:
6318
6152
  this.resolveArray(node, document, extraScopes);
6319
6153
  break;
6320
- case require_ast.ReferenceExpr:
6154
+ case require_ast.ReferenceExpr.$type:
6321
6155
  this.resolveReference(node, document, extraScopes);
6322
6156
  break;
6323
- case require_ast.MemberAccessExpr:
6157
+ case require_ast.MemberAccessExpr.$type:
6324
6158
  this.resolveMemberAccess(node, document, extraScopes);
6325
6159
  break;
6326
- case require_ast.UnaryExpr:
6160
+ case require_ast.UnaryExpr.$type:
6327
6161
  this.resolveUnary(node, document, extraScopes);
6328
6162
  break;
6329
- case require_ast.BinaryExpr:
6163
+ case require_ast.BinaryExpr.$type:
6330
6164
  this.resolveBinary(node, document, extraScopes);
6331
6165
  break;
6332
- case require_ast.ObjectExpr:
6166
+ case require_ast.ObjectExpr.$type:
6333
6167
  this.resolveObject(node, document, extraScopes);
6334
6168
  break;
6335
- case require_ast.ThisExpr:
6169
+ case require_ast.ThisExpr.$type:
6336
6170
  this.resolveThis(node, document, extraScopes);
6337
6171
  break;
6338
- case require_ast.NullExpr:
6172
+ case require_ast.NullExpr.$type:
6339
6173
  this.resolveNull(node, document, extraScopes);
6340
6174
  break;
6341
- case require_ast.AttributeArg:
6175
+ case require_ast.AttributeArg.$type:
6342
6176
  this.resolveAttributeArg(node, document, extraScopes);
6343
6177
  break;
6344
- case require_ast.DataModel:
6178
+ case require_ast.DataModel.$type:
6345
6179
  this.resolveDataModel(node, document, extraScopes);
6346
6180
  break;
6347
- case require_ast.DataField:
6181
+ case require_ast.DataField.$type:
6348
6182
  this.resolveDataField(node, document, extraScopes);
6349
6183
  break;
6350
6184
  default:
@@ -6566,8 +6400,8 @@ var ZModelScopeComputation = class extends langium.DefaultScopeComputation {
6566
6400
  super(services);
6567
6401
  this.services = services;
6568
6402
  }
6569
- async computeExports(document, cancelToken) {
6570
- const result = await super.computeExports(document, cancelToken);
6403
+ async collectExportedSymbols(document, cancelToken) {
6404
+ const result = await super.collectExportedSymbols(document, cancelToken);
6571
6405
  for (const node of langium.AstUtils.streamAllContents(document.parseResult.value)) {
6572
6406
  if (cancelToken) await (0, langium.interruptAndCheck)(cancelToken);
6573
6407
  if (require_ast.isEnumField(node)) {
@@ -6577,11 +6411,11 @@ var ZModelScopeComputation = class extends langium.DefaultScopeComputation {
6577
6411
  }
6578
6412
  return result;
6579
6413
  }
6580
- processNode(node, document, scopes) {
6581
- super.processNode(node, document, scopes);
6414
+ addLocalSymbol(node, document, symbols) {
6415
+ super.addLocalSymbol(node, document, symbols);
6582
6416
  if (require_ast.isDataModel(node) || require_ast.isTypeDef(node)) {
6583
6417
  const bases = require_utils.getRecursiveBases(node, true, this.services.shared.workspace.LangiumDocuments);
6584
- for (const base of bases) for (const field of base.fields) scopes.add(node, this.descriptions.createDescription(field, this.nameProvider.getName(field)));
6418
+ for (const base of bases) for (const field of base.fields) symbols.add(node, this.descriptions.createDescription(field, this.nameProvider.getName(field)));
6585
6419
  }
6586
6420
  }
6587
6421
  };
@@ -6985,7 +6819,7 @@ function validationAfterImportMerge(model) {
6985
6819
  */
6986
6820
  async function formatDocument(content) {
6987
6821
  const services = createZModelServices().ZModelLanguage;
6988
- const document = services.shared.workspace.LangiumDocuments.createDocument(langium.URI.parse("memory://schema.zmodel"), content);
6822
+ const document = services.shared.workspace.LangiumDocuments.createDocument(langium.URI.parse("memory:///schema.zmodel"), content);
6989
6823
  const formatter = services.lsp.Formatter;
6990
6824
  const identifier = { uri: document.uri.toString() };
6991
6825
  const options = formatter.getFormatOptions() ?? {