@abaplint/transpiler 2.7.99 → 2.7.101

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.
@@ -49,6 +49,7 @@ export * from "./sql_field";
49
49
  export * from "./sql_from_source";
50
50
  export * from "./sql_from";
51
51
  export * from "./sql_into_structure";
52
+ export * from "./sql_into_list";
52
53
  export * from "./sql_join";
53
54
  export * from "./sql_order_by";
54
55
  export * from "./sql_source_simple";
@@ -65,6 +65,7 @@ __exportStar(require("./sql_field"), exports);
65
65
  __exportStar(require("./sql_from_source"), exports);
66
66
  __exportStar(require("./sql_from"), exports);
67
67
  __exportStar(require("./sql_into_structure"), exports);
68
+ __exportStar(require("./sql_into_list"), exports);
68
69
  __exportStar(require("./sql_join"), exports);
69
70
  __exportStar(require("./sql_order_by"), exports);
70
71
  __exportStar(require("./sql_source_simple"), exports);
@@ -0,0 +1,7 @@
1
+ import { Nodes } from "@abaplint/core";
2
+ import { IExpressionTranspiler } from "./_expression_transpiler";
3
+ import { Traversal } from "../traversal";
4
+ import { Chunk } from "../chunk";
5
+ export declare class SQLIntoListTranspiler implements IExpressionTranspiler {
6
+ transpile(node: Nodes.ExpressionNode, traversal: Traversal): Chunk;
7
+ }
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SQLIntoListTranspiler = void 0;
4
+ const abaplint = require("@abaplint/core");
5
+ const chunk_1 = require("../chunk");
6
+ class SQLIntoListTranspiler {
7
+ transpile(node, traversal) {
8
+ const targets = node.findDirectExpressions(abaplint.Expressions.SQLTarget);
9
+ const transpiled = targets.map(t => traversal.traverse(t));
10
+ const chunk = new chunk_1.Chunk();
11
+ chunk.appendString("[");
12
+ chunk.appendString(transpiled.map(t => t.getCode()).join(","));
13
+ chunk.appendString("]");
14
+ return chunk;
15
+ }
16
+ }
17
+ exports.SQLIntoListTranspiler = SQLIntoListTranspiler;
18
+ //# sourceMappingURL=sql_into_list.js.map
@@ -2,21 +2,10 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SQLIntoStructureTranspiler = void 0;
4
4
  const abaplint = require("@abaplint/core");
5
- const chunk_1 = require("../chunk");
6
5
  class SQLIntoStructureTranspiler {
7
6
  transpile(node, traversal) {
8
- const targets = node.findDirectExpressions(abaplint.Expressions.SQLTarget);
9
- const transpiled = targets.map(t => traversal.traverse(t));
10
- if (targets.length === 1) {
11
- return transpiled[0];
12
- }
13
- else {
14
- const chunk = new chunk_1.Chunk();
15
- chunk.appendString("[");
16
- chunk.appendString(transpiled.map(t => t.getCode()).join(","));
17
- chunk.appendString("]");
18
- return chunk;
19
- }
7
+ const transpiled = traversal.traverse(node.findDirectExpression(abaplint.Expressions.SQLTarget));
8
+ return transpiled;
20
9
  }
21
10
  }
22
11
  exports.SQLIntoStructureTranspiler = SQLIntoStructureTranspiler;
@@ -21,6 +21,9 @@ class SelectTranspiler {
21
21
  else if (node.findFirstExpression(abaplint.Expressions.SQLIntoTable)) {
22
22
  target = traversal.traverse(node.findFirstExpression(abaplint.Expressions.Target)).getCode();
23
23
  }
24
+ else if (node.findFirstExpression(abaplint.Expressions.SQLIntoList)) {
25
+ target = traversal.traverse(node.findFirstExpression(abaplint.Expressions.SQLIntoList)).getCode();
26
+ }
24
27
  else if (node.findFirstExpression(abaplint.Expressions.SQLIntoStructure)) {
25
28
  target = traversal.traverse(node.findFirstExpression(abaplint.Expressions.SQLIntoStructure)).getCode();
26
29
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/transpiler",
3
- "version": "2.7.99",
3
+ "version": "2.7.101",
4
4
  "description": "Transpiler",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/src/index.d.ts",
@@ -29,13 +29,13 @@
29
29
  "author": "abaplint",
30
30
  "license": "MIT",
31
31
  "dependencies": {
32
- "@abaplint/core": "^2.102.44",
32
+ "@abaplint/core": "^2.102.51",
33
33
  "source-map": "^0.7.4"
34
34
  },
35
35
  "devDependencies": {
36
36
  "@types/chai": "^4.3.6",
37
- "@types/mocha": "^10.0.1",
38
- "chai": "^4.3.8",
37
+ "@types/mocha": "^10.0.2",
38
+ "chai": "^4.3.10",
39
39
  "mocha": "^10.2.0",
40
40
  "source-map-support": "^0.5.21",
41
41
  "typescript": "^5.2.2"