@atscript/core 0.2.5 → 0.2.7
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 +8 -1
- package/dist/index.d.ts +6 -0
- package/dist/index.mjs +8 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -9482,7 +9482,8 @@ var AtscriptDoc = class AtscriptDoc {
|
|
|
9482
9482
|
return `${out}\n`;
|
|
9483
9483
|
}
|
|
9484
9484
|
getDiagMessages() {
|
|
9485
|
-
if (!this._allMessages) {
|
|
9485
|
+
if (!this._allMessages || this._messagesAt !== epoch) {
|
|
9486
|
+
this._messagesAt = epoch;
|
|
9486
9487
|
this._allMessages = [
|
|
9487
9488
|
...this.registry.getErrors(),
|
|
9488
9489
|
...this.semanticMessages,
|
|
@@ -10378,6 +10379,11 @@ var AtscriptDoc = class AtscriptDoc {
|
|
|
10378
10379
|
_define_property$3(this, "annotations", void 0);
|
|
10379
10380
|
_define_property$3(this, "_nextTypeId", void 0);
|
|
10380
10381
|
_define_property$3(this, "_allMessages", void 0);
|
|
10382
|
+
/**
|
|
10383
|
+
* The documents' epoch {@link _allMessages} were computed at: they derive from other documents
|
|
10384
|
+
* (its imports, its import component), possibly read before their imports were wired, so they
|
|
10385
|
+
* hold only until any document changes.
|
|
10386
|
+
*/ _define_property$3(this, "_messagesAt", void 0);
|
|
10381
10387
|
_define_property$3(this, "_structure", void 0);
|
|
10382
10388
|
this.id = id;
|
|
10383
10389
|
this.config = config;
|
|
@@ -10407,6 +10413,7 @@ var AtscriptDoc = class AtscriptDoc {
|
|
|
10407
10413
|
this.annotations = [];
|
|
10408
10414
|
this._nextTypeId = 0;
|
|
10409
10415
|
this._allMessages = void 0;
|
|
10416
|
+
this._messagesAt = -1;
|
|
10410
10417
|
this.registry = new IdRegistry(Array.from(config.primitives?.keys() || []));
|
|
10411
10418
|
}
|
|
10412
10419
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -2107,6 +2107,12 @@ declare class AtscriptDoc {
|
|
|
2107
2107
|
registerMessage(token: Token, message: string, severity?: TSeverity, tag?: 'dim' | 'crossed'): void;
|
|
2108
2108
|
registerMessages(messages?: TMessages): void;
|
|
2109
2109
|
private _allMessages;
|
|
2110
|
+
/**
|
|
2111
|
+
* The documents' epoch {@link _allMessages} were computed at: they derive from other documents
|
|
2112
|
+
* (its imports, its import component), possibly read before their imports were wired, so they
|
|
2113
|
+
* hold only until any document changes.
|
|
2114
|
+
*/
|
|
2115
|
+
private _messagesAt;
|
|
2110
2116
|
clearMessages(): void;
|
|
2111
2117
|
getUnusedTokens(): Token[];
|
|
2112
2118
|
renderDiagMessage(m: TMessages[number], addSourceLinses?: boolean, colors?: boolean): string;
|
package/dist/index.mjs
CHANGED
|
@@ -9451,7 +9451,8 @@ var AtscriptDoc = class AtscriptDoc {
|
|
|
9451
9451
|
return `${out}\n`;
|
|
9452
9452
|
}
|
|
9453
9453
|
getDiagMessages() {
|
|
9454
|
-
if (!this._allMessages) {
|
|
9454
|
+
if (!this._allMessages || this._messagesAt !== epoch) {
|
|
9455
|
+
this._messagesAt = epoch;
|
|
9455
9456
|
this._allMessages = [
|
|
9456
9457
|
...this.registry.getErrors(),
|
|
9457
9458
|
...this.semanticMessages,
|
|
@@ -10347,6 +10348,11 @@ var AtscriptDoc = class AtscriptDoc {
|
|
|
10347
10348
|
_define_property$3(this, "annotations", void 0);
|
|
10348
10349
|
_define_property$3(this, "_nextTypeId", void 0);
|
|
10349
10350
|
_define_property$3(this, "_allMessages", void 0);
|
|
10351
|
+
/**
|
|
10352
|
+
* The documents' epoch {@link _allMessages} were computed at: they derive from other documents
|
|
10353
|
+
* (its imports, its import component), possibly read before their imports were wired, so they
|
|
10354
|
+
* hold only until any document changes.
|
|
10355
|
+
*/ _define_property$3(this, "_messagesAt", void 0);
|
|
10350
10356
|
_define_property$3(this, "_structure", void 0);
|
|
10351
10357
|
this.id = id;
|
|
10352
10358
|
this.config = config;
|
|
@@ -10376,6 +10382,7 @@ var AtscriptDoc = class AtscriptDoc {
|
|
|
10376
10382
|
this.annotations = [];
|
|
10377
10383
|
this._nextTypeId = 0;
|
|
10378
10384
|
this._allMessages = void 0;
|
|
10385
|
+
this._messagesAt = -1;
|
|
10379
10386
|
this.registry = new IdRegistry(Array.from(config.primitives?.keys() || []));
|
|
10380
10387
|
}
|
|
10381
10388
|
};
|