@abaplint/cli 2.102.11 → 2.102.12
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/cli.js +8 -7
- package/package.json +2 -2
package/build/cli.js
CHANGED
|
@@ -48557,7 +48557,7 @@ class Registry {
|
|
|
48557
48557
|
}
|
|
48558
48558
|
static abaplintVersion() {
|
|
48559
48559
|
// magic, see build script "version.sh"
|
|
48560
|
-
return "2.102.
|
|
48560
|
+
return "2.102.12";
|
|
48561
48561
|
}
|
|
48562
48562
|
getDDICReferences() {
|
|
48563
48563
|
return this.ddicReferences;
|
|
@@ -53960,7 +53960,7 @@ ${indentation}`);
|
|
|
53960
53960
|
if (tt === undefined) {
|
|
53961
53961
|
return undefined;
|
|
53962
53962
|
}
|
|
53963
|
-
const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax
|
|
53963
|
+
const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
|
|
53964
53964
|
const code = `TYPES ${uniqueName} ${tt.concatTokens()}.\n`;
|
|
53965
53965
|
const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), code);
|
|
53966
53966
|
const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, tt.getFirstToken().getStart(), tt.getLastToken().getEnd(), "TYPE " + uniqueName);
|
|
@@ -55705,15 +55705,15 @@ ${indentation} output = ${uniqueName}.\n`;
|
|
|
55705
55705
|
}
|
|
55706
55706
|
return undefined;
|
|
55707
55707
|
}
|
|
55708
|
-
uniqueName(position, filename, highSyntax
|
|
55708
|
+
uniqueName(position, filename, highSyntax) {
|
|
55709
55709
|
const spag = highSyntax.spaghetti.lookupPosition(position, filename);
|
|
55710
55710
|
if (spag === undefined) {
|
|
55711
|
-
const name =
|
|
55711
|
+
const name = "temprr" + this.counter;
|
|
55712
55712
|
this.counter++;
|
|
55713
55713
|
return name;
|
|
55714
55714
|
}
|
|
55715
55715
|
while (true) {
|
|
55716
|
-
const name =
|
|
55716
|
+
const name = "temp" + this.counter;
|
|
55717
55717
|
const exists = this.existsRecursive(spag, name);
|
|
55718
55718
|
this.counter++;
|
|
55719
55719
|
if (exists === false) {
|
|
@@ -55721,13 +55721,14 @@ ${indentation} output = ${uniqueName}.\n`;
|
|
|
55721
55721
|
}
|
|
55722
55722
|
}
|
|
55723
55723
|
}
|
|
55724
|
+
// todo, optimize, the findVariable() and findType() does a lot of redundant checks
|
|
55724
55725
|
existsRecursive(spag, name) {
|
|
55725
|
-
const existsDirect = spag.findVariable(name);
|
|
55726
|
+
const existsDirect = spag.findVariable(name) || spag.findType(name);
|
|
55726
55727
|
if (existsDirect) {
|
|
55727
55728
|
return true;
|
|
55728
55729
|
}
|
|
55729
55730
|
for (const child of spag.getChildren()) {
|
|
55730
|
-
if (child.findVariable(name) || this.existsRecursive(child, name)) {
|
|
55731
|
+
if (child.findVariable(name) || child.findType(name) || this.existsRecursive(child, name)) {
|
|
55731
55732
|
return true;
|
|
55732
55733
|
}
|
|
55733
55734
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/cli",
|
|
3
|
-
"version": "2.102.
|
|
3
|
+
"version": "2.102.12",
|
|
4
4
|
"description": "abaplint - Command Line Interface",
|
|
5
5
|
"funding": "https://github.com/sponsors/larshp",
|
|
6
6
|
"bin": {
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
},
|
|
39
39
|
"homepage": "https://abaplint.org",
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@abaplint/core": "^2.102.
|
|
41
|
+
"@abaplint/core": "^2.102.12",
|
|
42
42
|
"@types/chai": "^4.3.5",
|
|
43
43
|
"@types/glob": "^7.2.0",
|
|
44
44
|
"@types/minimist": "^1.2.2",
|