@atscript/core 0.1.64 → 0.1.65

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
@@ -3498,23 +3498,13 @@ else if (isStructure(def) || isInterface(def) || isPrimitive(def)) def = def.pro
3498
3498
  } else if (isInterface(parentDef)) parentDef = parentDef.getDefinition() || parentDef;
3499
3499
  parentDef = this.mergeIntersection(parentDef);
3500
3500
  const annotateNodes = [];
3501
- const seenAnnotates = new Set();
3502
3501
  const collect = (doc, name) => {
3503
3502
  if (!name) return;
3504
- for (const n of doc.getAnnotateNodesFor(name)) if (n.isMutating && !seenAnnotates.has(n)) {
3505
- seenAnnotates.add(n);
3506
- annotateNodes.push(n);
3507
- }
3503
+ for (const n of doc.getAnnotateNodesFor(name)) if (n.isMutating) annotateNodes.push(n);
3508
3504
  };
3509
3505
  collect(unwound.doc, parentDeclName);
3510
3506
  if (this !== unwound.doc) collect(this, extendsToken.text);
3511
- if (originDoc !== this && originDoc !== unwound.doc) {
3512
- collect(originDoc, parentDeclName);
3513
- if (parentDeclName) {
3514
- const originAlias = originDoc.getLocalAliasForExternal(parentDeclName, unwound.doc);
3515
- if (originAlias && originAlias !== parentDeclName) collect(originDoc, originAlias);
3516
- }
3517
- }
3507
+ if (originDoc !== this && originDoc !== unwound.doc) collect(originDoc, parentDeclName);
3518
3508
  if (annotateNodes.length > 0) parentDef = this.applyAnnotateBlocksToStructure(parentDef, annotateNodes);
3519
3509
  if (!mergedStruct) mergedStruct = parentDef;
3520
3510
  else {
@@ -3530,18 +3520,6 @@ else {
3530
3520
  return mergedStruct || ownDef;
3531
3521
  }
3532
3522
  /**
3533
- * Returns the local identifier under which `externalName` (declared in `externalDoc`)
3534
- * is imported into this document. Walks the import statements and matches by the
3535
- * declaration owner of each imported token. Returns `undefined` when this document
3536
- * doesn't import the symbol, or when the import name matches the declaration name.
3537
- */ getLocalAliasForExternal(externalName, externalDoc) {
3538
- for (const [, entry] of this.imports) for (const t of entry.imports) {
3539
- const decl = this.getDeclarationOwnerNode(t.text);
3540
- if (decl?.doc === externalDoc && decl.token?.text === externalName) return t.text;
3541
- }
3542
- return undefined;
3543
- }
3544
- /**
3545
3523
  * Returns a structure equivalent to `struct` with annotate-block contributions
3546
3524
  * folded into matching props' annotation arrays. Skips chained entries
3547
3525
  * (e.g. `annotate Parent { user.address.city }`) — only root-level entries apply.
package/dist/index.d.ts CHANGED
@@ -544,13 +544,6 @@ declare class AtscriptDoc {
544
544
  * package boundaries (child → mid → grandparent, all in different .as files).
545
545
  */
546
546
  resolveInterfaceExtends(node: SemanticInterfaceNode, _visited?: Set<string>, _originDoc?: AtscriptDoc): SemanticNode | undefined;
547
- /**
548
- * Returns the local identifier under which `externalName` (declared in `externalDoc`)
549
- * is imported into this document. Walks the import statements and matches by the
550
- * declaration owner of each imported token. Returns `undefined` when this document
551
- * doesn't import the symbol, or when the import name matches the declaration name.
552
- */
553
- private getLocalAliasForExternal;
554
547
  /**
555
548
  * Returns a structure equivalent to `struct` with annotate-block contributions
556
549
  * folded into matching props' annotation arrays. Skips chained entries
package/dist/index.mjs CHANGED
@@ -3474,23 +3474,13 @@ else if (isStructure(def) || isInterface(def) || isPrimitive(def)) def = def.pro
3474
3474
  } else if (isInterface(parentDef)) parentDef = parentDef.getDefinition() || parentDef;
3475
3475
  parentDef = this.mergeIntersection(parentDef);
3476
3476
  const annotateNodes = [];
3477
- const seenAnnotates = new Set();
3478
3477
  const collect = (doc, name) => {
3479
3478
  if (!name) return;
3480
- for (const n of doc.getAnnotateNodesFor(name)) if (n.isMutating && !seenAnnotates.has(n)) {
3481
- seenAnnotates.add(n);
3482
- annotateNodes.push(n);
3483
- }
3479
+ for (const n of doc.getAnnotateNodesFor(name)) if (n.isMutating) annotateNodes.push(n);
3484
3480
  };
3485
3481
  collect(unwound.doc, parentDeclName);
3486
3482
  if (this !== unwound.doc) collect(this, extendsToken.text);
3487
- if (originDoc !== this && originDoc !== unwound.doc) {
3488
- collect(originDoc, parentDeclName);
3489
- if (parentDeclName) {
3490
- const originAlias = originDoc.getLocalAliasForExternal(parentDeclName, unwound.doc);
3491
- if (originAlias && originAlias !== parentDeclName) collect(originDoc, originAlias);
3492
- }
3493
- }
3483
+ if (originDoc !== this && originDoc !== unwound.doc) collect(originDoc, parentDeclName);
3494
3484
  if (annotateNodes.length > 0) parentDef = this.applyAnnotateBlocksToStructure(parentDef, annotateNodes);
3495
3485
  if (!mergedStruct) mergedStruct = parentDef;
3496
3486
  else {
@@ -3506,18 +3496,6 @@ else {
3506
3496
  return mergedStruct || ownDef;
3507
3497
  }
3508
3498
  /**
3509
- * Returns the local identifier under which `externalName` (declared in `externalDoc`)
3510
- * is imported into this document. Walks the import statements and matches by the
3511
- * declaration owner of each imported token. Returns `undefined` when this document
3512
- * doesn't import the symbol, or when the import name matches the declaration name.
3513
- */ getLocalAliasForExternal(externalName, externalDoc) {
3514
- for (const [, entry] of this.imports) for (const t of entry.imports) {
3515
- const decl = this.getDeclarationOwnerNode(t.text);
3516
- if (decl?.doc === externalDoc && decl.token?.text === externalName) return t.text;
3517
- }
3518
- return undefined;
3519
- }
3520
- /**
3521
3499
  * Returns a structure equivalent to `struct` with annotate-block contributions
3522
3500
  * folded into matching props' annotation arrays. Skips chained entries
3523
3501
  * (e.g. `annotate Parent { user.address.city }`) — only root-level entries apply.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atscript/core",
3
- "version": "0.1.64",
3
+ "version": "0.1.65",
4
4
  "description": "Core library for Atscript parsing and file generation.",
5
5
  "keywords": [
6
6
  "annotations",