@abaplint/transpiler 2.0.37 → 2.0.40

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.
@@ -9,10 +9,21 @@ class WriteTranspiler {
9
9
  const extra = [];
10
10
  let source;
11
11
  const newLine = ((_a = node.findFirstExpression(abaplint.Expressions.WriteOffsetLength)) === null || _a === void 0 ? void 0 : _a.findDirectTokenByText("/")) !== undefined;
12
+ const concat = node.concatTokens().toUpperCase();
12
13
  const target = node.findDirectExpression(abaplint.Expressions.Target);
13
14
  if (target) {
14
15
  extra.push("target: " + traversal.traverse(target).getCode());
15
16
  }
17
+ const exponent = node.findExpressionAfterToken("EXPONENT");
18
+ if (exponent) {
19
+ extra.push("exponent: " + traversal.traverse(exponent).getCode());
20
+ }
21
+ if (concat.includes("NO-GROUPING")) {
22
+ extra.push("noGrouping: true");
23
+ }
24
+ if (concat.includes("NO-SIGN")) {
25
+ extra.push("noSign: true");
26
+ }
16
27
  const expr = node.findDirectExpression(abaplint.Expressions.Source);
17
28
  if (expr === undefined) {
18
29
  source = new chunk_1.Chunk().append("''", node, traversal);
@@ -8,7 +8,7 @@ class UnitTest {
8
8
  initializationScript(reg, dbSetup, extraSetup) {
9
9
  let ret = `/* eslint-disable import/newline-after-import */
10
10
  import runtime from "@abaplint/runtime";
11
- global.abap = new runtime.ABAP();
11
+ globalThis.abap = new runtime.ABAP();
12
12
  ${this.buildImports(reg)}
13
13
 
14
14
  export async function initializeABAP() {\n`;
@@ -22,7 +22,7 @@ export async function initializeABAP() {\n`;
22
22
  }
23
23
  else {
24
24
  ret += ` const {setup} = await import("${extraSetup}");\n` +
25
- ` await setup(global.abap, schemas, insert);\n`;
25
+ ` await setup(globalThis.abap, schemas, insert);\n`;
26
26
  }
27
27
  ret += `}`;
28
28
  return ret;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/transpiler",
3
- "version": "2.0.37",
3
+ "version": "2.0.40",
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.91.2",
31
+ "@abaplint/core": "^2.91.3",
32
32
  "source-map": "^0.7.4"
33
33
  },
34
34
  "devDependencies": {