@abaplint/core 2.93.78 → 2.93.79

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.
@@ -63,7 +63,7 @@ class Registry {
63
63
  }
64
64
  static abaplintVersion() {
65
65
  // magic, see build script "version.sh"
66
- return "2.93.78";
66
+ return "2.93.79";
67
67
  }
68
68
  getDDICReferences() {
69
69
  return this.references;
@@ -2215,13 +2215,25 @@ ${indentation} output = ${topTarget}.`;
2215
2215
  }
2216
2216
  while (true) {
2217
2217
  const name = "temp" + this.counter;
2218
- const found = spag.findVariable(name);
2218
+ const exists = this.existsRecursive(spag, name);
2219
2219
  this.counter++;
2220
- if (found === undefined) {
2220
+ if (exists === false) {
2221
2221
  return name;
2222
2222
  }
2223
2223
  }
2224
2224
  }
2225
+ existsRecursive(spag, name) {
2226
+ const existsDirect = spag.findVariable(name);
2227
+ if (existsDirect) {
2228
+ return true;
2229
+ }
2230
+ for (const child of spag.getChildren()) {
2231
+ if (child.findVariable(name) || this.existsRecursive(child, name)) {
2232
+ return true;
2233
+ }
2234
+ }
2235
+ return false;
2236
+ }
2225
2237
  replaceXsdBool(node, lowFile, highSyntax) {
2226
2238
  const spag = highSyntax.spaghetti.lookupPosition(node.getFirstToken().getStart(), lowFile.getFilename());
2227
2239
  for (const r of (spag === null || spag === void 0 ? void 0 : spag.getData().references) || []) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/core",
3
- "version": "2.93.78",
3
+ "version": "2.93.79",
4
4
  "description": "abaplint - Core API",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/abaplint.d.ts",