@abaplint/transpiler 2.11.32 → 2.11.34

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.
@@ -3,5 +3,6 @@ import { IOutputFile, ITranspilerOptions } from "../types";
3
3
  export declare class HandleFUGR {
4
4
  private readonly options;
5
5
  constructor(options?: ITranspilerOptions);
6
+ static shouldSkip(obj: abaplint.ABAPObject, reg: abaplint.IRegistry): any;
6
7
  runObject(obj: abaplint.ABAPObject, reg: abaplint.IRegistry): IOutputFile[];
7
8
  }
@@ -10,10 +10,17 @@ class HandleFUGR {
10
10
  constructor(options) {
11
11
  this.options = options;
12
12
  }
13
+ static shouldSkip(obj, reg) {
14
+ // @ts-ignore todo
15
+ return new abaplint.SkipLogic(reg).isGeneratedFunctionGroup(obj);
16
+ }
13
17
  // function groups are compiled into a single file, with one closure for the function groups top variables
14
18
  runObject(obj, reg) {
15
19
  const spaghetti = new abaplint.SyntaxLogic(reg, obj).run().spaghetti;
16
20
  const chunk = new chunk_1.Chunk().appendString("{\n");
21
+ if (HandleFUGR.shouldSkip(obj, reg)) {
22
+ return [];
23
+ }
17
24
  for (const file of obj.getSequencedFiles()) {
18
25
  if (this.options?.addFilenames === true) {
19
26
  chunk.appendString("// " + file.getFilename() + "\n");
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Initialization = void 0;
4
4
  exports.escapeNamespaceFilename = escapeNamespaceFilename;
5
5
  const abaplint = require("@abaplint/core");
6
+ const handle_fugr_1 = require("./handlers/handle_fugr");
6
7
  function escapeNamespaceFilename(filename) {
7
8
  // ES modules are resolved and cached as URLs. This means that special characters must be
8
9
  // percent-encoded, such as # with %23 and ? with %3F.
@@ -90,6 +91,9 @@ export async function initializeABAP() {\n`;
90
91
  else if (obj instanceof abaplint.Objects.Program && obj.isInclude() === true) {
91
92
  continue;
92
93
  }
94
+ else if (obj instanceof abaplint.Objects.FunctionGroup && handle_fugr_1.HandleFUGR.shouldSkip(obj, reg) === true) {
95
+ continue;
96
+ }
93
97
  else if (obj instanceof abaplint.Objects.Interface
94
98
  || obj instanceof abaplint.Objects.FunctionGroup
95
99
  || (options?.importProg === true && obj instanceof abaplint.Objects.Program)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/transpiler",
3
- "version": "2.11.32",
3
+ "version": "2.11.34",
4
4
  "description": "Transpiler",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/src/index.d.ts",
@@ -29,7 +29,7 @@
29
29
  "author": "abaplint",
30
30
  "license": "MIT",
31
31
  "dependencies": {
32
- "@abaplint/core": "^2.113.174",
32
+ "@abaplint/core": "^2.113.176",
33
33
  "source-map": "^0.7.6"
34
34
  },
35
35
  "devDependencies": {