intelligent-system-design-language 0.3.15 → 0.3.16
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/out/extension/main.cjs +108 -53
- package/out/extension/main.cjs.map +3 -3
- package/out/extension/package.json +1 -1
- package/out/language/generated/grammar.js +70 -52
- package/out/language/generated/grammar.js.map +1 -1
- package/out/language/intelligent-system-design-language-module.js +7 -1
- package/out/language/intelligent-system-design-language-module.js.map +1 -1
- package/out/language/isdl-document-validator.js +29 -0
- package/out/language/isdl-document-validator.js.map +1 -0
- package/out/language/isdl-parser-error-message-provider.js +31 -0
- package/out/language/isdl-parser-error-message-provider.js.map +1 -0
- package/out/language/main.cjs +108 -53
- package/out/language/main.cjs.map +3 -3
- package/out/package.json +1 -1
- package/out/test/validating/diagnostics.test.js +43 -0
- package/out/test/validating/diagnostics.test.js.map +1 -0
- package/package.json +1 -1
package/out/extension/main.cjs
CHANGED
|
@@ -60285,25 +60285,9 @@ var IntelligentSystemDesignLanguageGrammar = () => loadedIntelligentSystemDesign
|
|
|
60285
60285
|
"$type": "Keyword",
|
|
60286
60286
|
"value": "("
|
|
60287
60287
|
},
|
|
60288
|
-
{
|
|
60289
|
-
"$type": "Assignment",
|
|
60290
|
-
"feature": "params",
|
|
60291
|
-
"operator": "+=",
|
|
60292
|
-
"terminal": {
|
|
60293
|
-
"$type": "RuleCall",
|
|
60294
|
-
"rule": {
|
|
60295
|
-
"$ref": "#/rules@227"
|
|
60296
|
-
},
|
|
60297
|
-
"arguments": []
|
|
60298
|
-
}
|
|
60299
|
-
},
|
|
60300
60288
|
{
|
|
60301
60289
|
"$type": "Group",
|
|
60302
60290
|
"elements": [
|
|
60303
|
-
{
|
|
60304
|
-
"$type": "Keyword",
|
|
60305
|
-
"value": ","
|
|
60306
|
-
},
|
|
60307
60291
|
{
|
|
60308
60292
|
"$type": "Assignment",
|
|
60309
60293
|
"feature": "params",
|
|
@@ -60315,9 +60299,31 @@ var IntelligentSystemDesignLanguageGrammar = () => loadedIntelligentSystemDesign
|
|
|
60315
60299
|
},
|
|
60316
60300
|
"arguments": []
|
|
60317
60301
|
}
|
|
60302
|
+
},
|
|
60303
|
+
{
|
|
60304
|
+
"$type": "Group",
|
|
60305
|
+
"elements": [
|
|
60306
|
+
{
|
|
60307
|
+
"$type": "Keyword",
|
|
60308
|
+
"value": ","
|
|
60309
|
+
},
|
|
60310
|
+
{
|
|
60311
|
+
"$type": "Assignment",
|
|
60312
|
+
"feature": "params",
|
|
60313
|
+
"operator": "+=",
|
|
60314
|
+
"terminal": {
|
|
60315
|
+
"$type": "RuleCall",
|
|
60316
|
+
"rule": {
|
|
60317
|
+
"$ref": "#/rules@227"
|
|
60318
|
+
},
|
|
60319
|
+
"arguments": []
|
|
60320
|
+
}
|
|
60321
|
+
}
|
|
60322
|
+
],
|
|
60323
|
+
"cardinality": "*"
|
|
60318
60324
|
}
|
|
60319
60325
|
],
|
|
60320
|
-
"cardinality": "
|
|
60326
|
+
"cardinality": "?"
|
|
60321
60327
|
},
|
|
60322
60328
|
{
|
|
60323
60329
|
"$type": "Keyword",
|
|
@@ -60364,25 +60370,9 @@ var IntelligentSystemDesignLanguageGrammar = () => loadedIntelligentSystemDesign
|
|
|
60364
60370
|
"$type": "Keyword",
|
|
60365
60371
|
"value": "("
|
|
60366
60372
|
},
|
|
60367
|
-
{
|
|
60368
|
-
"$type": "Assignment",
|
|
60369
|
-
"feature": "params",
|
|
60370
|
-
"operator": "+=",
|
|
60371
|
-
"terminal": {
|
|
60372
|
-
"$type": "RuleCall",
|
|
60373
|
-
"rule": {
|
|
60374
|
-
"$ref": "#/rules@157"
|
|
60375
|
-
},
|
|
60376
|
-
"arguments": []
|
|
60377
|
-
}
|
|
60378
|
-
},
|
|
60379
60373
|
{
|
|
60380
60374
|
"$type": "Group",
|
|
60381
60375
|
"elements": [
|
|
60382
|
-
{
|
|
60383
|
-
"$type": "Keyword",
|
|
60384
|
-
"value": ","
|
|
60385
|
-
},
|
|
60386
60376
|
{
|
|
60387
60377
|
"$type": "Assignment",
|
|
60388
60378
|
"feature": "params",
|
|
@@ -60394,9 +60384,31 @@ var IntelligentSystemDesignLanguageGrammar = () => loadedIntelligentSystemDesign
|
|
|
60394
60384
|
},
|
|
60395
60385
|
"arguments": []
|
|
60396
60386
|
}
|
|
60387
|
+
},
|
|
60388
|
+
{
|
|
60389
|
+
"$type": "Group",
|
|
60390
|
+
"elements": [
|
|
60391
|
+
{
|
|
60392
|
+
"$type": "Keyword",
|
|
60393
|
+
"value": ","
|
|
60394
|
+
},
|
|
60395
|
+
{
|
|
60396
|
+
"$type": "Assignment",
|
|
60397
|
+
"feature": "params",
|
|
60398
|
+
"operator": "+=",
|
|
60399
|
+
"terminal": {
|
|
60400
|
+
"$type": "RuleCall",
|
|
60401
|
+
"rule": {
|
|
60402
|
+
"$ref": "#/rules@157"
|
|
60403
|
+
},
|
|
60404
|
+
"arguments": []
|
|
60405
|
+
}
|
|
60406
|
+
}
|
|
60407
|
+
],
|
|
60408
|
+
"cardinality": "*"
|
|
60397
60409
|
}
|
|
60398
60410
|
],
|
|
60399
|
-
"cardinality": "
|
|
60411
|
+
"cardinality": "?"
|
|
60400
60412
|
},
|
|
60401
60413
|
{
|
|
60402
60414
|
"$type": "Keyword",
|
|
@@ -64821,25 +64833,9 @@ var IntelligentSystemDesignLanguageGrammar = () => loadedIntelligentSystemDesign
|
|
|
64821
64833
|
"$type": "Keyword",
|
|
64822
64834
|
"value": "["
|
|
64823
64835
|
},
|
|
64824
|
-
{
|
|
64825
|
-
"$type": "Assignment",
|
|
64826
|
-
"feature": "items",
|
|
64827
|
-
"operator": "+=",
|
|
64828
|
-
"terminal": {
|
|
64829
|
-
"$type": "RuleCall",
|
|
64830
|
-
"rule": {
|
|
64831
|
-
"$ref": "#/rules@242"
|
|
64832
|
-
},
|
|
64833
|
-
"arguments": []
|
|
64834
|
-
}
|
|
64835
|
-
},
|
|
64836
64836
|
{
|
|
64837
64837
|
"$type": "Group",
|
|
64838
64838
|
"elements": [
|
|
64839
|
-
{
|
|
64840
|
-
"$type": "Keyword",
|
|
64841
|
-
"value": ","
|
|
64842
|
-
},
|
|
64843
64839
|
{
|
|
64844
64840
|
"$type": "Assignment",
|
|
64845
64841
|
"feature": "items",
|
|
@@ -64847,13 +64843,35 @@ var IntelligentSystemDesignLanguageGrammar = () => loadedIntelligentSystemDesign
|
|
|
64847
64843
|
"terminal": {
|
|
64848
64844
|
"$type": "RuleCall",
|
|
64849
64845
|
"rule": {
|
|
64850
|
-
"$ref": "#/rules@
|
|
64846
|
+
"$ref": "#/rules@227"
|
|
64851
64847
|
},
|
|
64852
64848
|
"arguments": []
|
|
64853
64849
|
}
|
|
64850
|
+
},
|
|
64851
|
+
{
|
|
64852
|
+
"$type": "Group",
|
|
64853
|
+
"elements": [
|
|
64854
|
+
{
|
|
64855
|
+
"$type": "Keyword",
|
|
64856
|
+
"value": ","
|
|
64857
|
+
},
|
|
64858
|
+
{
|
|
64859
|
+
"$type": "Assignment",
|
|
64860
|
+
"feature": "items",
|
|
64861
|
+
"operator": "+=",
|
|
64862
|
+
"terminal": {
|
|
64863
|
+
"$type": "RuleCall",
|
|
64864
|
+
"rule": {
|
|
64865
|
+
"$ref": "#/rules@227"
|
|
64866
|
+
},
|
|
64867
|
+
"arguments": []
|
|
64868
|
+
}
|
|
64869
|
+
}
|
|
64870
|
+
],
|
|
64871
|
+
"cardinality": "*"
|
|
64854
64872
|
}
|
|
64855
64873
|
],
|
|
64856
|
-
"cardinality": "
|
|
64874
|
+
"cardinality": "?"
|
|
64857
64875
|
},
|
|
64858
64876
|
{
|
|
64859
64877
|
"$type": "Keyword",
|
|
@@ -66506,10 +66524,47 @@ var IsdlHoverProvider = class {
|
|
|
66506
66524
|
}
|
|
66507
66525
|
};
|
|
66508
66526
|
|
|
66527
|
+
// src/language/isdl-parser-error-message-provider.ts
|
|
66528
|
+
var IsdlParserErrorMessageProvider = class extends LangiumParserErrorMessageProvider {
|
|
66529
|
+
buildMismatchTokenMessage(options) {
|
|
66530
|
+
const friendly = this.friendlyMessage(options == null ? void 0 : options.actual, options == null ? void 0 : options.previous, options == null ? void 0 : options.ruleName);
|
|
66531
|
+
return friendly != null ? friendly : super.buildMismatchTokenMessage(options);
|
|
66532
|
+
}
|
|
66533
|
+
buildNoViableAltMessage(options) {
|
|
66534
|
+
const actual = Array.isArray(options == null ? void 0 : options.actual) ? options.actual[0] : options == null ? void 0 : options.actual;
|
|
66535
|
+
const friendly = this.friendlyMessage(actual, options == null ? void 0 : options.previous, options == null ? void 0 : options.ruleName);
|
|
66536
|
+
return friendly != null ? friendly : super.buildNoViableAltMessage(options);
|
|
66537
|
+
}
|
|
66538
|
+
friendlyMessage(_actual, _previous, _rawRuleName) {
|
|
66539
|
+
return void 0;
|
|
66540
|
+
}
|
|
66541
|
+
};
|
|
66542
|
+
|
|
66543
|
+
// src/language/isdl-document-validator.ts
|
|
66544
|
+
var MAX_SYNTAX_ERRORS = 1;
|
|
66545
|
+
var IsdlDocumentValidator = class extends DefaultDocumentValidator {
|
|
66546
|
+
async validateDocument(document, options = {}, cancelToken) {
|
|
66547
|
+
const diagnostics = await super.validateDocument(document, options, cancelToken);
|
|
66548
|
+
const syntaxErrors = diagnostics.filter((d) => {
|
|
66549
|
+
var _a;
|
|
66550
|
+
const code = (_a = d.data) == null ? void 0 : _a.code;
|
|
66551
|
+
return code === DocumentValidator.ParsingError || code === DocumentValidator.LexingError;
|
|
66552
|
+
});
|
|
66553
|
+
if (syntaxErrors.length === 0) {
|
|
66554
|
+
return diagnostics;
|
|
66555
|
+
}
|
|
66556
|
+
return syntaxErrors.slice(0, MAX_SYNTAX_ERRORS);
|
|
66557
|
+
}
|
|
66558
|
+
};
|
|
66559
|
+
|
|
66509
66560
|
// src/language/intelligent-system-design-language-module.ts
|
|
66510
66561
|
var IntelligentSystemDesignLanguageModule = {
|
|
66511
66562
|
validation: {
|
|
66512
|
-
IntelligentSystemDesignLanguageValidator: () => new IntelligentSystemDesignLanguageValidator()
|
|
66563
|
+
IntelligentSystemDesignLanguageValidator: () => new IntelligentSystemDesignLanguageValidator(),
|
|
66564
|
+
DocumentValidator: (services) => new IsdlDocumentValidator(services)
|
|
66565
|
+
},
|
|
66566
|
+
parser: {
|
|
66567
|
+
ParserErrorMessageProvider: () => new IsdlParserErrorMessageProvider()
|
|
66513
66568
|
},
|
|
66514
66569
|
references: {
|
|
66515
66570
|
ScopeProvider: (services) => new IsdlScopeProvider(services)
|