@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.
- package/build/src/registry.js +1 -1
- package/build/src/rules/downport.js +14 -2
- package/package.json +1 -1
package/build/src/registry.js
CHANGED
|
@@ -2215,13 +2215,25 @@ ${indentation} output = ${topTarget}.`;
|
|
|
2215
2215
|
}
|
|
2216
2216
|
while (true) {
|
|
2217
2217
|
const name = "temp" + this.counter;
|
|
2218
|
-
const
|
|
2218
|
+
const exists = this.existsRecursive(spag, name);
|
|
2219
2219
|
this.counter++;
|
|
2220
|
-
if (
|
|
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) || []) {
|