@abaplint/transpiler 2.8.26 → 2.8.28
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/keywords.d.ts
CHANGED
package/build/src/keywords.js
CHANGED
|
@@ -43,7 +43,12 @@ class Keywords {
|
|
|
43
43
|
for (const f of o.getABAPFiles()) {
|
|
44
44
|
const tokens = [];
|
|
45
45
|
for (const s of f.getStatements()) {
|
|
46
|
-
|
|
46
|
+
if (s.get() instanceof abaplint.MacroCall) {
|
|
47
|
+
tokens.push(...this.handleMacro(s));
|
|
48
|
+
}
|
|
49
|
+
else {
|
|
50
|
+
tokens.push(...this.traverse(s, f));
|
|
51
|
+
}
|
|
47
52
|
}
|
|
48
53
|
if (tokens.length === 0) {
|
|
49
54
|
continue;
|
|
@@ -59,6 +64,20 @@ class Keywords {
|
|
|
59
64
|
}
|
|
60
65
|
reg.parse();
|
|
61
66
|
}
|
|
67
|
+
handleMacro(node) {
|
|
68
|
+
const tokens = [];
|
|
69
|
+
for (const token of node.getTokens()) {
|
|
70
|
+
for (const k of this.keywords) {
|
|
71
|
+
const lower = token.getStr().toLowerCase();
|
|
72
|
+
if (k === lower
|
|
73
|
+
|| "!" + k === lower
|
|
74
|
+
|| lower.endsWith("~" + k)) {
|
|
75
|
+
tokens.push(token);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
return tokens;
|
|
80
|
+
}
|
|
62
81
|
traverse(node, file) {
|
|
63
82
|
const ret = [];
|
|
64
83
|
for (const c of node.getChildren()) {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.InsertDatabaseTranspiler = void 0;
|
|
4
|
+
exports.findConnection = findConnection;
|
|
4
5
|
const abaplint = require("@abaplint/core");
|
|
5
6
|
const chunk_1 = require("../chunk");
|
|
6
7
|
const expressions_1 = require("../expressions");
|
|
@@ -44,5 +45,4 @@ function findConnection(connection) {
|
|
|
44
45
|
}
|
|
45
46
|
return con;
|
|
46
47
|
}
|
|
47
|
-
exports.findConnection = findConnection;
|
|
48
48
|
//# sourceMappingURL=insert_database.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/transpiler",
|
|
3
|
-
"version": "2.8.
|
|
3
|
+
"version": "2.8.28",
|
|
4
4
|
"description": "Transpiler",
|
|
5
5
|
"main": "build/src/index.js",
|
|
6
6
|
"typings": "build/src/index.d.ts",
|
|
@@ -29,15 +29,15 @@
|
|
|
29
29
|
"author": "abaplint",
|
|
30
30
|
"license": "MIT",
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@abaplint/core": "^2.
|
|
32
|
+
"@abaplint/core": "^2.110.4",
|
|
33
33
|
"source-map": "^0.7.4"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@types/chai": "^4.3.16",
|
|
37
|
-
"@types/mocha": "^10.0.
|
|
37
|
+
"@types/mocha": "^10.0.7",
|
|
38
38
|
"chai": "^4.4.1",
|
|
39
|
-
"mocha": "^10.
|
|
39
|
+
"mocha": "^10.6.0",
|
|
40
40
|
"source-map-support": "^0.5.21",
|
|
41
|
-
"typescript": "^5.
|
|
41
|
+
"typescript": "^5.5.3"
|
|
42
42
|
}
|
|
43
43
|
}
|