@abaplint/transpiler 2.6.15 → 2.6.16
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/chunk.d.ts +0 -1
- package/build/src/chunk.js +4 -2
- package/build/src/transpile_types.js +1 -0
- package/build/src/traversal.js +13 -6
- package/package.json +2 -2
package/build/src/chunk.d.ts
CHANGED
|
@@ -4,7 +4,6 @@ export declare class Chunk {
|
|
|
4
4
|
private raw;
|
|
5
5
|
mappings: sourceMap.Mapping[];
|
|
6
6
|
constructor(str?: string);
|
|
7
|
-
copy(): Chunk;
|
|
8
7
|
join(chunks: Chunk[], str?: string): Chunk;
|
|
9
8
|
appendChunk(append: Chunk): Chunk;
|
|
10
9
|
append(input: string, pos: abaplint.Position | abaplint.INode | abaplint.Token, traversal: {
|
package/build/src/chunk.js
CHANGED
|
@@ -22,12 +22,14 @@ class Chunk {
|
|
|
22
22
|
this.appendString(str);
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
|
-
|
|
25
|
+
/*
|
|
26
|
+
public copy(): Chunk {
|
|
26
27
|
const ret = new Chunk();
|
|
27
28
|
ret.raw = this.raw;
|
|
28
29
|
ret.mappings = [...this.mappings];
|
|
29
30
|
return ret;
|
|
30
|
-
|
|
31
|
+
}
|
|
32
|
+
*/
|
|
31
33
|
join(chunks, str = ", ") {
|
|
32
34
|
for (let i = 0; i < chunks.length; i++) {
|
|
33
35
|
this.appendChunk(chunks[i]);
|
|
@@ -88,6 +88,7 @@ class TranspileTypes {
|
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
90
|
else if (type instanceof abaplint.BasicTypes.CLikeType
|
|
91
|
+
|| type instanceof abaplint.BasicTypes.CGenericType
|
|
91
92
|
|| type instanceof abaplint.BasicTypes.CSequenceType) {
|
|
92
93
|
// if not supplied its a Character(1)
|
|
93
94
|
resolved = "Character";
|
package/build/src/traversal.js
CHANGED
|
@@ -257,21 +257,28 @@ class Traversal {
|
|
|
257
257
|
if (ref === undefined) {
|
|
258
258
|
return undefined;
|
|
259
259
|
}
|
|
260
|
-
// local
|
|
260
|
+
// local
|
|
261
261
|
if (ref.getFilename() === this.getFilename()) {
|
|
262
262
|
const scope = this.findCurrentScopeByToken(ref.getToken());
|
|
263
263
|
if ((scope === null || scope === void 0 ? void 0 : scope.getIdentifier().stype) === abaplint.ScopeType.Interface) {
|
|
264
264
|
return scope === null || scope === void 0 ? void 0 : scope.getIdentifier().sname;
|
|
265
265
|
}
|
|
266
266
|
}
|
|
267
|
-
// global
|
|
268
|
-
const
|
|
269
|
-
|
|
270
|
-
const obj = this.reg.findObjectForFile(file);
|
|
271
|
-
if ((obj === null || obj === void 0 ? void 0 : obj.getType()) === "INTF") {
|
|
267
|
+
// global
|
|
268
|
+
for (const obj of this.reg.getObjectsByType("INTF")) {
|
|
269
|
+
if (obj.getFiles().some(f => f.getFilename() === ref.getFilename())) {
|
|
272
270
|
return obj.getName().toLowerCase();
|
|
273
271
|
}
|
|
274
272
|
}
|
|
273
|
+
/*
|
|
274
|
+
const file = this.reg.getFileByName(ref.getFilename());
|
|
275
|
+
if (file) {
|
|
276
|
+
const obj = this.reg.findObjectForFile(file);
|
|
277
|
+
if (obj?.getType() === "INTF") {
|
|
278
|
+
return obj.getName().toLowerCase();
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
*/
|
|
275
282
|
return undefined;
|
|
276
283
|
}
|
|
277
284
|
findReadOrWriteReference(token) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/transpiler",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.16",
|
|
4
4
|
"description": "Transpiler",
|
|
5
5
|
"main": "build/src/index.js",
|
|
6
6
|
"typings": "build/src/index.d.ts",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"author": "abaplint",
|
|
29
29
|
"license": "MIT",
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@abaplint/core": "^2.97.
|
|
31
|
+
"@abaplint/core": "^2.97.10",
|
|
32
32
|
"source-map": "^0.7.4"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|