@abaplint/transpiler 2.13.68 → 2.13.70
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.
|
@@ -85,11 +85,8 @@ class NewObjectTranspiler {
|
|
|
85
85
|
}
|
|
86
86
|
else {
|
|
87
87
|
const source = node.findFirstExpression(abaplint.Expressions.Source);
|
|
88
|
-
if (source === undefined) {
|
|
89
|
-
throw new Error("NewObjectTranspiler: DataReference source not found");
|
|
90
|
-
}
|
|
91
88
|
const typeCode = transpile_types_1.TranspileTypes.toType(type);
|
|
92
|
-
const sourceCode = traversal.traverse(source).getCode();
|
|
89
|
+
const sourceCode = source === undefined ? typeCode : traversal.traverse(source).getCode();
|
|
93
90
|
ret.appendString("((() => {const r = new abap.types.DataReference(" + typeCode + "); r.assign(" + sourceCode + "); return r; })())");
|
|
94
91
|
}
|
|
95
92
|
return ret;
|
|
@@ -151,6 +151,7 @@ export * from "./split";
|
|
|
151
151
|
export * from "./start_of_selection";
|
|
152
152
|
export * from "./load_of_program";
|
|
153
153
|
export * from "./stop";
|
|
154
|
+
export * from "./sum";
|
|
154
155
|
export * from "./submit";
|
|
155
156
|
export * from "./subtract";
|
|
156
157
|
export * from "./at_line_selection";
|
|
@@ -167,6 +167,7 @@ __exportStar(require("./split"), exports);
|
|
|
167
167
|
__exportStar(require("./start_of_selection"), exports);
|
|
168
168
|
__exportStar(require("./load_of_program"), exports);
|
|
169
169
|
__exportStar(require("./stop"), exports);
|
|
170
|
+
__exportStar(require("./sum"), exports);
|
|
170
171
|
__exportStar(require("./submit"), exports);
|
|
171
172
|
__exportStar(require("./subtract"), exports);
|
|
172
173
|
__exportStar(require("./at_line_selection"), 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 SumTranspiler implements IStatementTranspiler {
|
|
6
|
+
transpile(_node: abaplint.Nodes.StatementNode, _traversal: Traversal): Chunk;
|
|
7
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SumTranspiler = void 0;
|
|
4
|
+
const chunk_1 = require("../chunk");
|
|
5
|
+
class SumTranspiler {
|
|
6
|
+
transpile(_node, _traversal) {
|
|
7
|
+
return new chunk_1.Chunk(`throw new Error("SUM, not supported, transpiler");`);
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
exports.SumTranspiler = SumTranspiler;
|
|
11
|
+
//# sourceMappingURL=sum.js.map
|