@abaplint/transpiler 2.10.49 → 2.10.50
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.
|
@@ -119,22 +119,25 @@ class HandleABAP {
|
|
|
119
119
|
return contents;
|
|
120
120
|
}
|
|
121
121
|
findExports(node) {
|
|
122
|
-
if (node === undefined) {
|
|
123
|
-
return [];
|
|
124
|
-
}
|
|
125
122
|
const res = [];
|
|
126
|
-
for (const c of node
|
|
123
|
+
for (const c of node?.findAllStatements(abaplint.Statements.ClassDefinition) || []) {
|
|
127
124
|
const e = c.findFirstExpression(abaplint.Expressions.ClassName)?.getFirstToken().getStr();
|
|
128
125
|
if (e) {
|
|
129
126
|
res.push(e.toLowerCase());
|
|
130
127
|
}
|
|
131
128
|
}
|
|
132
|
-
for (const c of node
|
|
129
|
+
for (const c of node?.findAllStatements(abaplint.Statements.Interface) || []) {
|
|
133
130
|
const e = c.findFirstExpression(abaplint.Expressions.InterfaceName)?.getFirstToken().getStr();
|
|
134
131
|
if (e) {
|
|
135
132
|
res.push(e.toLowerCase());
|
|
136
133
|
}
|
|
137
134
|
}
|
|
135
|
+
for (const c of node?.findAllStatements(abaplint.Statements.Form) || []) {
|
|
136
|
+
const e = c.findFirstExpression(abaplint.Expressions.FormName)?.getFirstToken().getStr();
|
|
137
|
+
if (e) {
|
|
138
|
+
res.push(e.toLowerCase());
|
|
139
|
+
}
|
|
140
|
+
}
|
|
138
141
|
return res;
|
|
139
142
|
}
|
|
140
143
|
}
|
|
@@ -41,6 +41,7 @@ __exportStar(require("./close_dataset"), exports);
|
|
|
41
41
|
__exportStar(require("./collect"), exports);
|
|
42
42
|
__exportStar(require("./commit"), exports);
|
|
43
43
|
__exportStar(require("./compute"), exports);
|
|
44
|
+
__exportStar(require("./program"), exports);
|
|
44
45
|
__exportStar(require("./concatenate"), exports);
|
|
45
46
|
__exportStar(require("./condense"), exports);
|
|
46
47
|
__exportStar(require("./constant"), exports);
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as abaplint from "@abaplint/core";
|
|
2
|
+
import { IStatementTranspiler } from "./_statement_transpiler";
|
|
3
|
+
import { Traversal } from "../traversal";
|
|
4
|
+
import { Chunk } from "../chunk";
|
|
5
|
+
export declare class ProgramTranspiler implements IStatementTranspiler {
|
|
6
|
+
transpile(_node: abaplint.Nodes.StatementNode, _traversal: Traversal): Chunk;
|
|
7
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ProgramTranspiler = void 0;
|
|
4
|
+
const chunk_1 = require("../chunk");
|
|
5
|
+
class ProgramTranspiler {
|
|
6
|
+
transpile(_node, _traversal) {
|
|
7
|
+
// for now, do nothing,
|
|
8
|
+
return new chunk_1.Chunk(``);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
exports.ProgramTranspiler = ProgramTranspiler;
|
|
12
|
+
//# sourceMappingURL=program.js.map
|
package/build/src/traversal.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import * as abaplint from "@abaplint/core";
|
|
2
|
-
import { ISpaghettiScopeNode } from "@abaplint/core";
|
|
3
2
|
import { Chunk } from "./chunk";
|
|
4
3
|
import { ITranspilerOptions } from "./types";
|
|
5
4
|
export declare class Traversal {
|
|
@@ -31,7 +30,7 @@ export declare class Traversal {
|
|
|
31
30
|
buildAttributes(def: abaplint.IClassDefinition | abaplint.IInterfaceDefinition | undefined, scope: abaplint.ISpaghettiScopeNode | undefined, prefix?: string): Set<string>;
|
|
32
31
|
isBuiltinMethod(token: abaplint.Token): boolean;
|
|
33
32
|
isSQLConversion(token: abaplint.Token): string | undefined;
|
|
34
|
-
findMethodReference(token: abaplint.Token, scope: ISpaghettiScopeNode | undefined): undefined | {
|
|
33
|
+
findMethodReference(token: abaplint.Token, scope: abaplint.ISpaghettiScopeNode | undefined): undefined | {
|
|
35
34
|
def: abaplint.Types.MethodDefinition;
|
|
36
35
|
name: string;
|
|
37
36
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/transpiler",
|
|
3
|
-
"version": "2.10.
|
|
3
|
+
"version": "2.10.50",
|
|
4
4
|
"description": "Transpiler",
|
|
5
5
|
"main": "build/src/index.js",
|
|
6
6
|
"typings": "build/src/index.d.ts",
|
|
@@ -29,14 +29,14 @@
|
|
|
29
29
|
"author": "abaplint",
|
|
30
30
|
"license": "MIT",
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@abaplint/core": "^2.113.
|
|
32
|
+
"@abaplint/core": "^2.113.114",
|
|
33
33
|
"source-map": "^0.7.4"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@types/chai": "^4.3.20",
|
|
37
37
|
"@types/mocha": "^10.0.10",
|
|
38
38
|
"chai": "^4.5.0",
|
|
39
|
-
"mocha": "^11.
|
|
39
|
+
"mocha": "^11.2.2",
|
|
40
40
|
"source-map-support": "^0.5.21",
|
|
41
41
|
"typescript": "^5.8.3"
|
|
42
42
|
}
|