@abaplint/transpiler-cli 2.3.63 → 2.3.65

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.
Files changed (2) hide show
  1. package/build/bundle.js +20 -9
  2. package/package.json +3 -3
package/build/bundle.js CHANGED
@@ -49,7 +49,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
49
49
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
50
50
 
51
51
  "use strict";
52
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.Lexer = void 0;\r\nconst position_1 = __webpack_require__(/*! ../../position */ \"./node_modules/@abaplint/core/build/src/position.js\");\r\nconst tokens_1 = __webpack_require__(/*! ./tokens */ \"./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js\");\r\nvar Mode;\r\n(function (Mode) {\r\n Mode[Mode[\"Normal\"] = 0] = \"Normal\";\r\n Mode[Mode[\"Ping\"] = 1] = \"Ping\";\r\n Mode[Mode[\"Str\"] = 2] = \"Str\";\r\n Mode[Mode[\"Template\"] = 3] = \"Template\";\r\n Mode[Mode[\"Comment\"] = 4] = \"Comment\";\r\n Mode[Mode[\"Pragma\"] = 5] = \"Pragma\";\r\n})(Mode || (Mode = {}));\r\nclass Buffer {\r\n constructor() {\r\n this.buf = \"\";\r\n }\r\n add(s) {\r\n this.buf = this.buf + s;\r\n }\r\n get() {\r\n return this.buf;\r\n }\r\n clear() {\r\n this.buf = \"\";\r\n }\r\n countIsEven(char) {\r\n let count = 0;\r\n for (let i = 0; i < this.buf.length; i += 1) {\r\n if (this.buf.charAt(i) === char) {\r\n count += 1;\r\n }\r\n }\r\n return count % 2 === 0;\r\n }\r\n}\r\nclass Stream {\r\n constructor(raw) {\r\n this.offset = -1;\r\n this.raw = raw;\r\n this.row = 0;\r\n this.col = 0;\r\n }\r\n advance() {\r\n if (this.currentChar() === \"\\n\") {\r\n this.col = 1;\r\n this.row = this.row + 1;\r\n }\r\n if (this.offset === this.raw.length) {\r\n return false;\r\n }\r\n this.col = this.col + 1;\r\n this.offset = this.offset + 1;\r\n return true;\r\n }\r\n getCol() {\r\n return this.col;\r\n }\r\n getRow() {\r\n return this.row;\r\n }\r\n prevChar() {\r\n if (this.offset - 1 < 0) {\r\n return \"\";\r\n }\r\n return this.raw.substr(this.offset - 1, 1);\r\n }\r\n prevPrevChar() {\r\n if (this.offset - 2 < 0) {\r\n return \"\";\r\n }\r\n return this.raw.substr(this.offset - 2, 2);\r\n }\r\n currentChar() {\r\n if (this.offset < 0) {\r\n return \"\\n\"; // simulate newline at start of file to handle star(*) comments\r\n }\r\n else if (this.offset >= this.raw.length) {\r\n return \"\";\r\n }\r\n return this.raw.substr(this.offset, 1);\r\n }\r\n nextChar() {\r\n if (this.offset + 2 > this.raw.length) {\r\n return \"\";\r\n }\r\n return this.raw.substr(this.offset + 1, 1);\r\n }\r\n nextNextChar() {\r\n if (this.offset + 3 > this.raw.length) {\r\n return this.nextChar();\r\n }\r\n return this.raw.substr(this.offset + 1, 2);\r\n }\r\n getRaw() {\r\n return this.raw;\r\n }\r\n getOffset() {\r\n return this.offset;\r\n }\r\n}\r\nclass Lexer {\r\n run(file, virtual) {\r\n this.virtual = virtual;\r\n this.tokens = [];\r\n this.m = Mode.Normal;\r\n this.process(file.getRaw());\r\n return { file, tokens: this.tokens };\r\n }\r\n add() {\r\n const s = this.buffer.get().trim();\r\n if (s.length > 0) {\r\n const col = this.stream.getCol();\r\n const row = this.stream.getRow();\r\n let whiteBefore = false;\r\n if (this.stream.getOffset() - s.length >= 0) {\r\n const prev = this.stream.getRaw().substr(this.stream.getOffset() - s.length, 1);\r\n if (prev === \" \" || prev === \"\\n\" || prev === \"\\t\" || prev === \":\") {\r\n whiteBefore = true;\r\n }\r\n }\r\n let whiteAfter = false;\r\n const next = this.stream.nextChar();\r\n if (next === \" \" || next === \"\\n\" || next === \"\\t\" || next === \":\" || next === \",\" || next === \".\" || next === \"\" || next === \"\\\"\") {\r\n whiteAfter = true;\r\n }\r\n let pos = new position_1.Position(row, col - s.length);\r\n if (this.virtual) {\r\n pos = new position_1.VirtualPosition(this.virtual, pos.getRow(), pos.getCol());\r\n }\r\n let tok = undefined;\r\n if (this.m === Mode.Comment) {\r\n tok = new tokens_1.Comment(pos, s);\r\n }\r\n else if (this.m === Mode.Ping || this.m === Mode.Str) {\r\n tok = new tokens_1.StringToken(pos, s);\r\n }\r\n else if (this.m === Mode.Template) {\r\n const first = s.charAt(0);\r\n const last = s.charAt(s.length - 1);\r\n if (first === \"|\" && last === \"|\") {\r\n tok = new tokens_1.StringTemplate(pos, s);\r\n }\r\n else if (first === \"|\" && last === \"{\" && whiteAfter === true) {\r\n tok = new tokens_1.StringTemplateBegin(pos, s);\r\n }\r\n else if (first === \"}\" && last === \"|\" && whiteBefore === true) {\r\n tok = new tokens_1.StringTemplateEnd(pos, s);\r\n }\r\n else if (first === \"}\" && last === \"{\" && whiteAfter === true && whiteBefore === true) {\r\n tok = new tokens_1.StringTemplateMiddle(pos, s);\r\n }\r\n else {\r\n tok = new tokens_1.Identifier(pos, s);\r\n }\r\n }\r\n else if (s.length > 2 && s.substr(0, 2) === \"##\") {\r\n tok = new tokens_1.Pragma(pos, s);\r\n }\r\n else if (s.length === 1) {\r\n if (s === \".\" || s === \",\") {\r\n tok = new tokens_1.Punctuation(pos, s);\r\n }\r\n else if (s === \"[\") {\r\n if (whiteBefore === true && whiteAfter === true) {\r\n tok = new tokens_1.WBracketLeftW(pos, s);\r\n }\r\n else if (whiteBefore === true) {\r\n tok = new tokens_1.WBracketLeft(pos, s);\r\n }\r\n else if (whiteAfter === true) {\r\n tok = new tokens_1.BracketLeftW(pos, s);\r\n }\r\n else {\r\n tok = new tokens_1.BracketLeft(pos, s);\r\n }\r\n }\r\n else if (s === \"(\") {\r\n if (whiteBefore === true && whiteAfter === true) {\r\n tok = new tokens_1.WParenLeftW(pos, s);\r\n }\r\n else if (whiteBefore === true) {\r\n tok = new tokens_1.WParenLeft(pos, s);\r\n }\r\n else if (whiteAfter === true) {\r\n tok = new tokens_1.ParenLeftW(pos, s);\r\n }\r\n else {\r\n tok = new tokens_1.ParenLeft(pos, s);\r\n }\r\n }\r\n else if (s === \"]\") {\r\n if (whiteBefore === true && whiteAfter === true) {\r\n tok = new tokens_1.WBracketRightW(pos, s);\r\n }\r\n else if (whiteBefore === true) {\r\n tok = new tokens_1.WBracketRight(pos, s);\r\n }\r\n else if (whiteAfter === true) {\r\n tok = new tokens_1.BracketRightW(pos, s);\r\n }\r\n else {\r\n tok = new tokens_1.BracketRight(pos, s);\r\n }\r\n }\r\n else if (s === \")\") {\r\n if (whiteBefore === true && whiteAfter === true) {\r\n tok = new tokens_1.WParenRightW(pos, s);\r\n }\r\n else if (whiteBefore === true) {\r\n tok = new tokens_1.WParenRight(pos, s);\r\n }\r\n else if (whiteAfter === true) {\r\n tok = new tokens_1.ParenRightW(pos, s);\r\n }\r\n else {\r\n tok = new tokens_1.ParenRight(pos, s);\r\n }\r\n }\r\n else if (s === \"-\") {\r\n if (whiteBefore === true && whiteAfter === true) {\r\n tok = new tokens_1.WDashW(pos, s);\r\n }\r\n else if (whiteBefore === true) {\r\n tok = new tokens_1.WDash(pos, s);\r\n }\r\n else if (whiteAfter === true) {\r\n tok = new tokens_1.DashW(pos, s);\r\n }\r\n else {\r\n tok = new tokens_1.Dash(pos, s);\r\n }\r\n }\r\n else if (s === \"+\") {\r\n if (whiteBefore === true && whiteAfter === true) {\r\n tok = new tokens_1.WPlusW(pos, s);\r\n }\r\n else if (whiteBefore === true) {\r\n tok = new tokens_1.WPlus(pos, s);\r\n }\r\n else if (whiteAfter === true) {\r\n tok = new tokens_1.PlusW(pos, s);\r\n }\r\n else {\r\n tok = new tokens_1.Plus(pos, s);\r\n }\r\n }\r\n else if (s === \"@\") {\r\n if (whiteBefore === true && whiteAfter === true) {\r\n tok = new tokens_1.WAtW(pos, s);\r\n }\r\n else if (whiteBefore === true) {\r\n tok = new tokens_1.WAt(pos, s);\r\n }\r\n else if (whiteAfter === true) {\r\n tok = new tokens_1.AtW(pos, s);\r\n }\r\n else {\r\n tok = new tokens_1.At(pos, s);\r\n }\r\n }\r\n }\r\n else if (s.length === 2) {\r\n if (s === \"->\") {\r\n if (whiteBefore === true && whiteAfter === true) {\r\n tok = new tokens_1.WInstanceArrowW(pos, s);\r\n }\r\n else if (whiteBefore === true) {\r\n tok = new tokens_1.WInstanceArrow(pos, s);\r\n }\r\n else if (whiteAfter === true) {\r\n tok = new tokens_1.InstanceArrowW(pos, s);\r\n }\r\n else {\r\n tok = new tokens_1.InstanceArrow(pos, s);\r\n }\r\n }\r\n else if (s === \"=>\") {\r\n if (whiteBefore === true && whiteAfter === true) {\r\n tok = new tokens_1.WStaticArrowW(pos, s);\r\n }\r\n else if (whiteBefore === true) {\r\n tok = new tokens_1.WStaticArrow(pos, s);\r\n }\r\n else if (whiteAfter === true) {\r\n tok = new tokens_1.StaticArrowW(pos, s);\r\n }\r\n else {\r\n tok = new tokens_1.StaticArrow(pos, s);\r\n }\r\n }\r\n }\r\n if (tok === undefined) {\r\n tok = new tokens_1.Identifier(pos, s);\r\n }\r\n this.tokens.push(tok);\r\n }\r\n this.buffer.clear();\r\n }\r\n process(raw) {\r\n this.stream = new Stream(raw.replace(/\\r/g, \"\"));\r\n this.buffer = new Buffer();\r\n for (;;) {\r\n const current = this.stream.currentChar();\r\n this.buffer.add(current);\r\n const buf = this.buffer.get();\r\n const ahead = this.stream.nextChar();\r\n const aahead = this.stream.nextNextChar();\r\n const prev = this.stream.prevChar();\r\n if (ahead === \"'\" && this.m === Mode.Normal) {\r\n // start string\r\n this.add();\r\n this.m = Mode.Str;\r\n }\r\n else if ((ahead === \"|\" || ahead === \"}\")\r\n && this.m === Mode.Normal) {\r\n // start template\r\n this.add();\r\n this.m = Mode.Template;\r\n }\r\n else if (ahead === \"`\" && this.m === Mode.Normal) {\r\n // start ping\r\n this.add();\r\n this.m = Mode.Ping;\r\n }\r\n else if (aahead === \"##\" && this.m === Mode.Normal) {\r\n // start pragma\r\n this.add();\r\n this.m = Mode.Pragma;\r\n }\r\n else if ((ahead === \"\\\"\" || (ahead === \"*\" && current === \"\\n\"))\r\n && this.m === Mode.Normal) {\r\n // start comment\r\n this.add();\r\n this.m = Mode.Comment;\r\n }\r\n else if (this.m === Mode.Pragma && (ahead === \",\" || ahead === \":\" || ahead === \".\" || ahead === \" \" || ahead === \"\\n\")) {\r\n // end of pragma\r\n this.add();\r\n this.m = Mode.Normal;\r\n }\r\n else if (this.m === Mode.Ping\r\n && buf.length > 1\r\n && current === \"`\"\r\n && aahead !== \"``\"\r\n && ahead !== \"`\"\r\n && this.buffer.countIsEven(\"`\")) {\r\n // end of ping\r\n this.add();\r\n if (ahead === `\"`) {\r\n this.m = Mode.Comment;\r\n }\r\n else {\r\n this.m = Mode.Normal;\r\n }\r\n }\r\n else if (this.m === Mode.Template\r\n && buf.length > 1\r\n && (current === \"|\" || current === \"{\")\r\n && (prev !== \"\\\\\" || this.stream.prevPrevChar() === \"\\\\\\\\\")) {\r\n // end of template\r\n this.add();\r\n this.m = Mode.Normal;\r\n }\r\n else if (this.m === Mode.Str\r\n && current === \"'\"\r\n && buf.length > 1\r\n && aahead !== \"''\"\r\n && ahead !== \"'\"\r\n && this.buffer.countIsEven(\"'\")) {\r\n // end of string\r\n this.add();\r\n if (ahead === \"\\\"\") {\r\n this.m = Mode.Comment;\r\n }\r\n else {\r\n this.m = Mode.Normal;\r\n }\r\n }\r\n else if (this.m === Mode.Normal\r\n && (ahead === \" \"\r\n || ahead === \":\"\r\n || ahead === \".\"\r\n || ahead === \",\"\r\n || ahead === \"-\"\r\n || ahead === \"+\"\r\n || ahead === \"(\"\r\n || ahead === \")\"\r\n || ahead === \"[\"\r\n || ahead === \"]\"\r\n || (ahead === \"@\" && buf.trim().length === 0)\r\n || aahead === \"->\"\r\n || aahead === \"=>\"\r\n || ahead === \"\\t\"\r\n || ahead === \"\\n\")) {\r\n this.add();\r\n }\r\n else if (ahead === \"\\n\" && this.m !== Mode.Template) {\r\n this.add();\r\n this.m = Mode.Normal;\r\n }\r\n else if (this.m === Mode.Template && current === \"\\n\") {\r\n this.add();\r\n }\r\n else if (current === \">\"\r\n && (prev === \"-\" || prev === \"=\")\r\n && ahead !== \" \"\r\n && this.m === Mode.Normal) {\r\n // arrows\r\n this.add();\r\n }\r\n else if (this.m === Mode.Normal\r\n && (buf === \".\"\r\n || buf === \",\"\r\n || buf === \":\"\r\n || buf === \"(\"\r\n || buf === \")\"\r\n || buf === \"[\"\r\n || buf === \"]\"\r\n || buf === \"+\"\r\n || buf === \"@\"\r\n || (buf === \"-\" && ahead !== \">\"))) {\r\n this.add();\r\n }\r\n if (!this.stream.advance()) {\r\n break;\r\n }\r\n }\r\n this.add();\r\n }\r\n}\r\nexports.Lexer = Lexer;\r\n//# sourceMappingURL=lexer.js.map\n\n//# sourceURL=webpack://@abaplint/transpiler-cli/./node_modules/@abaplint/core/build/src/abap/1_lexer/lexer.js?");
52
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.Lexer = void 0;\r\nconst position_1 = __webpack_require__(/*! ../../position */ \"./node_modules/@abaplint/core/build/src/position.js\");\r\nconst tokens_1 = __webpack_require__(/*! ./tokens */ \"./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js\");\r\nclass Buffer {\r\n constructor() {\r\n this.buf = \"\";\r\n }\r\n add(s) {\r\n this.buf = this.buf + s;\r\n }\r\n get() {\r\n return this.buf;\r\n }\r\n clear() {\r\n this.buf = \"\";\r\n }\r\n countIsEven(char) {\r\n let count = 0;\r\n for (let i = 0; i < this.buf.length; i += 1) {\r\n if (this.buf.charAt(i) === char) {\r\n count += 1;\r\n }\r\n }\r\n return count % 2 === 0;\r\n }\r\n}\r\nclass Stream {\r\n constructor(raw) {\r\n this.offset = -1;\r\n this.raw = raw;\r\n this.row = 0;\r\n this.col = 0;\r\n }\r\n advance() {\r\n if (this.currentChar() === \"\\n\") {\r\n this.col = 1;\r\n this.row = this.row + 1;\r\n }\r\n if (this.offset === this.raw.length) {\r\n return false;\r\n }\r\n this.col = this.col + 1;\r\n this.offset = this.offset + 1;\r\n return true;\r\n }\r\n getCol() {\r\n return this.col;\r\n }\r\n getRow() {\r\n return this.row;\r\n }\r\n prevChar() {\r\n if (this.offset - 1 < 0) {\r\n return \"\";\r\n }\r\n return this.raw.substr(this.offset - 1, 1);\r\n }\r\n prevPrevChar() {\r\n if (this.offset - 2 < 0) {\r\n return \"\";\r\n }\r\n return this.raw.substr(this.offset - 2, 2);\r\n }\r\n currentChar() {\r\n if (this.offset < 0) {\r\n return \"\\n\"; // simulate newline at start of file to handle star(*) comments\r\n }\r\n else if (this.offset >= this.raw.length) {\r\n return \"\";\r\n }\r\n return this.raw.substr(this.offset, 1);\r\n }\r\n nextChar() {\r\n if (this.offset + 2 > this.raw.length) {\r\n return \"\";\r\n }\r\n return this.raw.substr(this.offset + 1, 1);\r\n }\r\n nextNextChar() {\r\n if (this.offset + 3 > this.raw.length) {\r\n return this.nextChar();\r\n }\r\n return this.raw.substr(this.offset + 1, 2);\r\n }\r\n getRaw() {\r\n return this.raw;\r\n }\r\n getOffset() {\r\n return this.offset;\r\n }\r\n}\r\nclass Lexer {\r\n constructor() {\r\n this.ModeNormal = 1;\r\n this.ModePing = 2;\r\n this.ModeStr = 3;\r\n this.ModeTemplate = 4;\r\n this.ModeComment = 5;\r\n this.ModePragma = 6;\r\n }\r\n run(file, virtual) {\r\n this.virtual = virtual;\r\n this.tokens = [];\r\n this.m = this.ModeNormal;\r\n this.process(file.getRaw());\r\n return { file, tokens: this.tokens };\r\n }\r\n add() {\r\n const s = this.buffer.get().trim();\r\n if (s.length > 0) {\r\n const col = this.stream.getCol();\r\n const row = this.stream.getRow();\r\n let whiteBefore = false;\r\n if (this.stream.getOffset() - s.length >= 0) {\r\n const prev = this.stream.getRaw().substr(this.stream.getOffset() - s.length, 1);\r\n if (prev === \" \" || prev === \"\\n\" || prev === \"\\t\" || prev === \":\") {\r\n whiteBefore = true;\r\n }\r\n }\r\n let whiteAfter = false;\r\n const next = this.stream.nextChar();\r\n if (next === \" \" || next === \"\\n\" || next === \"\\t\" || next === \":\" || next === \",\" || next === \".\" || next === \"\" || next === \"\\\"\") {\r\n whiteAfter = true;\r\n }\r\n let pos = new position_1.Position(row, col - s.length);\r\n if (this.virtual) {\r\n pos = new position_1.VirtualPosition(this.virtual, pos.getRow(), pos.getCol());\r\n }\r\n let tok = undefined;\r\n if (this.m === this.ModeComment) {\r\n tok = new tokens_1.Comment(pos, s);\r\n }\r\n else if (this.m === this.ModePing || this.m === this.ModeStr) {\r\n tok = new tokens_1.StringToken(pos, s);\r\n }\r\n else if (this.m === this.ModeTemplate) {\r\n const first = s.charAt(0);\r\n const last = s.charAt(s.length - 1);\r\n if (first === \"|\" && last === \"|\") {\r\n tok = new tokens_1.StringTemplate(pos, s);\r\n }\r\n else if (first === \"|\" && last === \"{\" && whiteAfter === true) {\r\n tok = new tokens_1.StringTemplateBegin(pos, s);\r\n }\r\n else if (first === \"}\" && last === \"|\" && whiteBefore === true) {\r\n tok = new tokens_1.StringTemplateEnd(pos, s);\r\n }\r\n else if (first === \"}\" && last === \"{\" && whiteAfter === true && whiteBefore === true) {\r\n tok = new tokens_1.StringTemplateMiddle(pos, s);\r\n }\r\n else {\r\n tok = new tokens_1.Identifier(pos, s);\r\n }\r\n }\r\n else if (s.length > 2 && s.substr(0, 2) === \"##\") {\r\n tok = new tokens_1.Pragma(pos, s);\r\n }\r\n else if (s.length === 1) {\r\n if (s === \".\" || s === \",\") {\r\n tok = new tokens_1.Punctuation(pos, s);\r\n }\r\n else if (s === \"[\") {\r\n if (whiteBefore === true && whiteAfter === true) {\r\n tok = new tokens_1.WBracketLeftW(pos, s);\r\n }\r\n else if (whiteBefore === true) {\r\n tok = new tokens_1.WBracketLeft(pos, s);\r\n }\r\n else if (whiteAfter === true) {\r\n tok = new tokens_1.BracketLeftW(pos, s);\r\n }\r\n else {\r\n tok = new tokens_1.BracketLeft(pos, s);\r\n }\r\n }\r\n else if (s === \"(\") {\r\n if (whiteBefore === true && whiteAfter === true) {\r\n tok = new tokens_1.WParenLeftW(pos, s);\r\n }\r\n else if (whiteBefore === true) {\r\n tok = new tokens_1.WParenLeft(pos, s);\r\n }\r\n else if (whiteAfter === true) {\r\n tok = new tokens_1.ParenLeftW(pos, s);\r\n }\r\n else {\r\n tok = new tokens_1.ParenLeft(pos, s);\r\n }\r\n }\r\n else if (s === \"]\") {\r\n if (whiteBefore === true && whiteAfter === true) {\r\n tok = new tokens_1.WBracketRightW(pos, s);\r\n }\r\n else if (whiteBefore === true) {\r\n tok = new tokens_1.WBracketRight(pos, s);\r\n }\r\n else if (whiteAfter === true) {\r\n tok = new tokens_1.BracketRightW(pos, s);\r\n }\r\n else {\r\n tok = new tokens_1.BracketRight(pos, s);\r\n }\r\n }\r\n else if (s === \")\") {\r\n if (whiteBefore === true && whiteAfter === true) {\r\n tok = new tokens_1.WParenRightW(pos, s);\r\n }\r\n else if (whiteBefore === true) {\r\n tok = new tokens_1.WParenRight(pos, s);\r\n }\r\n else if (whiteAfter === true) {\r\n tok = new tokens_1.ParenRightW(pos, s);\r\n }\r\n else {\r\n tok = new tokens_1.ParenRight(pos, s);\r\n }\r\n }\r\n else if (s === \"-\") {\r\n if (whiteBefore === true && whiteAfter === true) {\r\n tok = new tokens_1.WDashW(pos, s);\r\n }\r\n else if (whiteBefore === true) {\r\n tok = new tokens_1.WDash(pos, s);\r\n }\r\n else if (whiteAfter === true) {\r\n tok = new tokens_1.DashW(pos, s);\r\n }\r\n else {\r\n tok = new tokens_1.Dash(pos, s);\r\n }\r\n }\r\n else if (s === \"+\") {\r\n if (whiteBefore === true && whiteAfter === true) {\r\n tok = new tokens_1.WPlusW(pos, s);\r\n }\r\n else if (whiteBefore === true) {\r\n tok = new tokens_1.WPlus(pos, s);\r\n }\r\n else if (whiteAfter === true) {\r\n tok = new tokens_1.PlusW(pos, s);\r\n }\r\n else {\r\n tok = new tokens_1.Plus(pos, s);\r\n }\r\n }\r\n else if (s === \"@\") {\r\n if (whiteBefore === true && whiteAfter === true) {\r\n tok = new tokens_1.WAtW(pos, s);\r\n }\r\n else if (whiteBefore === true) {\r\n tok = new tokens_1.WAt(pos, s);\r\n }\r\n else if (whiteAfter === true) {\r\n tok = new tokens_1.AtW(pos, s);\r\n }\r\n else {\r\n tok = new tokens_1.At(pos, s);\r\n }\r\n }\r\n }\r\n else if (s.length === 2) {\r\n if (s === \"->\") {\r\n if (whiteBefore === true && whiteAfter === true) {\r\n tok = new tokens_1.WInstanceArrowW(pos, s);\r\n }\r\n else if (whiteBefore === true) {\r\n tok = new tokens_1.WInstanceArrow(pos, s);\r\n }\r\n else if (whiteAfter === true) {\r\n tok = new tokens_1.InstanceArrowW(pos, s);\r\n }\r\n else {\r\n tok = new tokens_1.InstanceArrow(pos, s);\r\n }\r\n }\r\n else if (s === \"=>\") {\r\n if (whiteBefore === true && whiteAfter === true) {\r\n tok = new tokens_1.WStaticArrowW(pos, s);\r\n }\r\n else if (whiteBefore === true) {\r\n tok = new tokens_1.WStaticArrow(pos, s);\r\n }\r\n else if (whiteAfter === true) {\r\n tok = new tokens_1.StaticArrowW(pos, s);\r\n }\r\n else {\r\n tok = new tokens_1.StaticArrow(pos, s);\r\n }\r\n }\r\n }\r\n if (tok === undefined) {\r\n tok = new tokens_1.Identifier(pos, s);\r\n }\r\n this.tokens.push(tok);\r\n }\r\n this.buffer.clear();\r\n }\r\n process(raw) {\r\n this.stream = new Stream(raw.replace(/\\r/g, \"\"));\r\n this.buffer = new Buffer();\r\n for (;;) {\r\n const current = this.stream.currentChar();\r\n this.buffer.add(current);\r\n const buf = this.buffer.get();\r\n const ahead = this.stream.nextChar();\r\n const aahead = this.stream.nextNextChar();\r\n const prev = this.stream.prevChar();\r\n if (ahead === \"'\" && this.m === this.ModeNormal) {\r\n // start string\r\n this.add();\r\n this.m = this.ModeStr;\r\n }\r\n else if ((ahead === \"|\" || ahead === \"}\")\r\n && this.m === this.ModeNormal) {\r\n // start template\r\n this.add();\r\n this.m = this.ModeTemplate;\r\n }\r\n else if (ahead === \"`\" && this.m === this.ModeNormal) {\r\n // start ping\r\n this.add();\r\n this.m = this.ModePing;\r\n }\r\n else if (aahead === \"##\" && this.m === this.ModeNormal) {\r\n // start pragma\r\n this.add();\r\n this.m = this.ModePragma;\r\n }\r\n else if ((ahead === \"\\\"\" || (ahead === \"*\" && current === \"\\n\"))\r\n && this.m === this.ModeNormal) {\r\n // start comment\r\n this.add();\r\n this.m = this.ModeComment;\r\n }\r\n else if (this.m === this.ModePragma && (ahead === \",\" || ahead === \":\" || ahead === \".\" || ahead === \" \" || ahead === \"\\n\")) {\r\n // end of pragma\r\n this.add();\r\n this.m = this.ModeNormal;\r\n }\r\n else if (this.m === this.ModePing\r\n && buf.length > 1\r\n && current === \"`\"\r\n && aahead !== \"``\"\r\n && ahead !== \"`\"\r\n && this.buffer.countIsEven(\"`\")) {\r\n // end of ping\r\n this.add();\r\n if (ahead === `\"`) {\r\n this.m = this.ModeComment;\r\n }\r\n else {\r\n this.m = this.ModeNormal;\r\n }\r\n }\r\n else if (this.m === this.ModeTemplate\r\n && buf.length > 1\r\n && (current === \"|\" || current === \"{\")\r\n && (prev !== \"\\\\\" || this.stream.prevPrevChar() === \"\\\\\\\\\")) {\r\n // end of template\r\n this.add();\r\n this.m = this.ModeNormal;\r\n }\r\n else if (this.m === this.ModeStr\r\n && current === \"'\"\r\n && buf.length > 1\r\n && aahead !== \"''\"\r\n && ahead !== \"'\"\r\n && this.buffer.countIsEven(\"'\")) {\r\n // end of string\r\n this.add();\r\n if (ahead === \"\\\"\") {\r\n this.m = this.ModeComment;\r\n }\r\n else {\r\n this.m = this.ModeNormal;\r\n }\r\n }\r\n else if (this.m === this.ModeNormal\r\n && (ahead === \" \"\r\n || ahead === \":\"\r\n || ahead === \".\"\r\n || ahead === \",\"\r\n || ahead === \"-\"\r\n || ahead === \"+\"\r\n || ahead === \"(\"\r\n || ahead === \")\"\r\n || ahead === \"[\"\r\n || ahead === \"]\"\r\n || (ahead === \"@\" && buf.trim().length === 0)\r\n || aahead === \"->\"\r\n || aahead === \"=>\"\r\n || ahead === \"\\t\"\r\n || ahead === \"\\n\")) {\r\n this.add();\r\n }\r\n else if (ahead === \"\\n\" && this.m !== this.ModeTemplate) {\r\n this.add();\r\n this.m = this.ModeNormal;\r\n }\r\n else if (this.m === this.ModeTemplate && current === \"\\n\") {\r\n this.add();\r\n }\r\n else if (current === \">\"\r\n && (prev === \"-\" || prev === \"=\")\r\n && ahead !== \" \"\r\n && this.m === this.ModeNormal) {\r\n // arrows\r\n this.add();\r\n }\r\n else if (this.m === this.ModeNormal\r\n && (buf === \".\"\r\n || buf === \",\"\r\n || buf === \":\"\r\n || buf === \"(\"\r\n || buf === \")\"\r\n || buf === \"[\"\r\n || buf === \"]\"\r\n || buf === \"+\"\r\n || buf === \"@\"\r\n || (buf === \"-\" && ahead !== \">\"))) {\r\n this.add();\r\n }\r\n if (!this.stream.advance()) {\r\n break;\r\n }\r\n }\r\n this.add();\r\n }\r\n}\r\nexports.Lexer = Lexer;\r\n//# sourceMappingURL=lexer.js.map\n\n//# sourceURL=webpack://@abaplint/transpiler-cli/./node_modules/@abaplint/core/build/src/abap/1_lexer/lexer.js?");
53
53
 
54
54
  /***/ }),
55
55
 
@@ -8684,7 +8684,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
8684
8684
  /***/ ((__unused_webpack_module, exports) => {
8685
8685
 
8686
8686
  "use strict";
8687
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.FlowGraph = void 0;\r\nclass FlowGraph {\r\n constructor(counter) {\r\n this.label = \"undefined\";\r\n this.edges = {};\r\n this.start = \"start#\" + counter;\r\n this.end = \"end#\" + counter;\r\n }\r\n getStart() {\r\n return this.start;\r\n }\r\n getEnd() {\r\n return this.end;\r\n }\r\n addEdge(from, to) {\r\n if (this.edges[from] === undefined) {\r\n this.edges[from] = {};\r\n }\r\n this.edges[from][to] = true;\r\n }\r\n removeEdge(from, to) {\r\n if (this.edges[from] === undefined) {\r\n return;\r\n }\r\n delete this.edges[from][to];\r\n if (Object.keys(this.edges[from]).length === 0) {\r\n delete this.edges[from];\r\n }\r\n }\r\n listEdges() {\r\n const list = [];\r\n for (const from of Object.keys(this.edges)) {\r\n for (const to of Object.keys(this.edges[from])) {\r\n list.push({ from, to });\r\n }\r\n }\r\n return list;\r\n }\r\n listNodes() {\r\n const set = new Set();\r\n for (const l of this.listEdges()) {\r\n set.add(l.from);\r\n set.add(l.to);\r\n }\r\n return Array.from(set.values());\r\n }\r\n hasEdges() {\r\n return Object.keys(this.edges).length > 0;\r\n }\r\n /** return value: end node of to graph */\r\n addGraph(from, to) {\r\n if (to.hasEdges() === false) {\r\n return from;\r\n }\r\n this.addEdge(from, to.getStart());\r\n to.listEdges().forEach(e => this.addEdge(e.from, e.to));\r\n return to.getEnd();\r\n }\r\n toJSON() {\r\n return JSON.stringify(this.edges);\r\n }\r\n toTextEdges() {\r\n let graph = \"\";\r\n for (const l of this.listEdges()) {\r\n graph += `\"${l.from}\" -> \"${l.to}\";\\n`;\r\n }\r\n return graph.trim();\r\n }\r\n setLabel(label) {\r\n this.label = label;\r\n }\r\n toDigraph() {\r\n return `digraph G {\r\nlabelloc=\"t\";\r\nlabel=\"${this.label}\";\r\ngraph [fontname = \"helvetica\"];\r\nnode [fontname = \"helvetica\", shape=\"box\"];\r\nedge [fontname = \"helvetica\"];\r\n${this.toTextEdges()}\r\n}`;\r\n }\r\n listSources(node) {\r\n const set = new Set();\r\n for (const l of this.listEdges()) {\r\n if (node === l.to) {\r\n set.add(l.from);\r\n }\r\n }\r\n return Array.from(set.values());\r\n }\r\n listTargets(node) {\r\n const set = new Set();\r\n for (const l of this.listEdges()) {\r\n if (node === l.from) {\r\n set.add(l.to);\r\n }\r\n }\r\n return Array.from(set.values());\r\n }\r\n /** removes all nodes containing \"#\" that have one ingoing and one outgoing edge */\r\n reduce() {\r\n for (const node of this.listNodes()) {\r\n if (node.includes(\"#\") === false) {\r\n continue;\r\n }\r\n const sources = this.listSources(node);\r\n const targets = this.listTargets(node);\r\n if (sources.length > 0 && targets.length > 0) {\r\n // hash node in the middle of the graph\r\n for (const s of sources) {\r\n this.removeEdge(s, node);\r\n }\r\n for (const t of targets) {\r\n this.removeEdge(node, t);\r\n }\r\n for (const s of sources) {\r\n for (const t of targets) {\r\n this.addEdge(s, t);\r\n }\r\n }\r\n }\r\n if (node.startsWith(\"end#\") && sources.length === 0) {\r\n for (const t of targets) {\r\n this.removeEdge(node, t);\r\n }\r\n }\r\n }\r\n return this;\r\n }\r\n}\r\nexports.FlowGraph = FlowGraph;\r\n//# sourceMappingURL=flow_graph.js.map\n\n//# sourceURL=webpack://@abaplint/transpiler-cli/./node_modules/@abaplint/core/build/src/abap/flow/flow_graph.js?");
8687
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.FlowGraph = void 0;\r\nclass FlowGraph {\r\n constructor(counter) {\r\n this.edges = {};\r\n this.label = \"undefined\";\r\n this.startNode = \"start#\" + counter;\r\n this.endNode = \"end#\" + counter;\r\n }\r\n getStart() {\r\n return this.startNode;\r\n }\r\n getEnd() {\r\n return this.endNode;\r\n }\r\n addEdge(from, to) {\r\n if (this.edges[from] === undefined) {\r\n this.edges[from] = {};\r\n }\r\n this.edges[from][to] = true;\r\n }\r\n removeEdge(from, to) {\r\n if (this.edges[from] === undefined) {\r\n return;\r\n }\r\n delete this.edges[from][to];\r\n if (Object.keys(this.edges[from]).length === 0) {\r\n delete this.edges[from];\r\n }\r\n }\r\n listEdges() {\r\n const list = [];\r\n for (const from of Object.keys(this.edges)) {\r\n for (const to of Object.keys(this.edges[from])) {\r\n list.push({ from, to });\r\n }\r\n }\r\n return list;\r\n }\r\n listInto(to, skipStart = true) {\r\n const ret = [];\r\n for (const e of this.listEdges()) {\r\n if (skipStart === true && e.from === this.getStart()) {\r\n continue;\r\n }\r\n if (e.to === to) {\r\n ret.push(e.from);\r\n }\r\n }\r\n return ret;\r\n }\r\n listNodes() {\r\n const set = new Set();\r\n for (const l of this.listEdges()) {\r\n set.add(l.from);\r\n set.add(l.to);\r\n }\r\n return Array.from(set.values());\r\n }\r\n hasEdges() {\r\n return Object.keys(this.edges).length > 0;\r\n }\r\n /** return value: end node of to graph */\r\n addGraph(from, to) {\r\n if (to.hasEdges() === false) {\r\n return from;\r\n }\r\n this.addEdge(from, to.getStart());\r\n to.listEdges().forEach(e => this.addEdge(e.from, e.to));\r\n return to.getEnd();\r\n }\r\n toJSON() {\r\n return JSON.stringify(this.edges);\r\n }\r\n toTextEdges() {\r\n let graph = \"\";\r\n for (const l of this.listEdges()) {\r\n graph += `\"${l.from}\" -> \"${l.to}\";\\n`;\r\n }\r\n return graph.trim();\r\n }\r\n setLabel(label) {\r\n this.label = label;\r\n }\r\n toDigraph() {\r\n return `digraph G {\r\nlabelloc=\"t\";\r\nlabel=\"${this.label}\";\r\ngraph [fontname = \"helvetica\"];\r\nnode [fontname = \"helvetica\", shape=\"box\"];\r\nedge [fontname = \"helvetica\"];\r\n${this.toTextEdges()}\r\n}`;\r\n }\r\n listSources(node) {\r\n const set = new Set();\r\n for (const l of this.listEdges()) {\r\n if (node === l.to) {\r\n set.add(l.from);\r\n }\r\n }\r\n return Array.from(set.values());\r\n }\r\n listTargets(node) {\r\n const set = new Set();\r\n for (const l of this.listEdges()) {\r\n if (node === l.from) {\r\n set.add(l.to);\r\n }\r\n }\r\n return Array.from(set.values());\r\n }\r\n /** removes all nodes containing \"#\" that have one in-going and one out-going edge */\r\n reduce() {\r\n for (const node of this.listNodes()) {\r\n if (node.includes(\"#\") === false) {\r\n continue;\r\n }\r\n const sources = this.listSources(node);\r\n const targets = this.listTargets(node);\r\n if (sources.length > 0 && targets.length > 0) {\r\n // hash node in the middle of the graph\r\n for (const s of sources) {\r\n this.removeEdge(s, node);\r\n }\r\n for (const t of targets) {\r\n this.removeEdge(node, t);\r\n }\r\n for (const s of sources) {\r\n for (const t of targets) {\r\n this.addEdge(s, t);\r\n }\r\n }\r\n }\r\n if (node.startsWith(\"end#\") && sources.length === 0) {\r\n for (const t of targets) {\r\n this.removeEdge(node, t);\r\n }\r\n }\r\n }\r\n return this;\r\n }\r\n}\r\nexports.FlowGraph = FlowGraph;\r\n//# sourceMappingURL=flow_graph.js.map\n\n//# sourceURL=webpack://@abaplint/transpiler-cli/./node_modules/@abaplint/core/build/src/abap/flow/flow_graph.js?");
8688
8688
 
8689
8689
  /***/ }),
8690
8690
 
@@ -8695,7 +8695,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
8695
8695
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
8696
8696
 
8697
8697
  "use strict";
8698
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.StatementFlow = void 0;\r\nconst nodes_1 = __webpack_require__(/*! ../nodes */ \"./node_modules/@abaplint/core/build/src/abap/nodes/index.js\");\r\nconst Structures = __webpack_require__(/*! ../3_structures/structures */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/index.js\");\r\nconst Statements = __webpack_require__(/*! ../2_statements/statements */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js\");\r\nconst Expressions = __webpack_require__(/*! ../2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst flow_graph_1 = __webpack_require__(/*! ./flow_graph */ \"./node_modules/@abaplint/core/build/src/abap/flow/flow_graph.js\");\r\nclass StatementFlow {\r\n constructor() {\r\n this.counter = 0;\r\n }\r\n build(stru) {\r\n var _a, _b;\r\n const ret = [];\r\n const forms = stru.findAllStructures(Structures.Form);\r\n for (const f of forms) {\r\n const formName = \"FORM \" + ((_a = f.findFirstExpression(Expressions.FormName)) === null || _a === void 0 ? void 0 : _a.concatTokens());\r\n this.counter = 1;\r\n const graph = this.traverseBody(this.findBody(f), { procedureEnd: \"end#1\" });\r\n graph.setLabel(formName);\r\n ret.push(graph);\r\n }\r\n const methods = stru.findAllStructures(Structures.Method);\r\n for (const f of methods) {\r\n const methodName = \"METHOD \" + ((_b = f.findFirstExpression(Expressions.MethodName)) === null || _b === void 0 ? void 0 : _b.concatTokens());\r\n this.counter = 1;\r\n const graph = this.traverseBody(this.findBody(f), { procedureEnd: \"end#1\" });\r\n graph.setLabel(methodName);\r\n ret.push(graph);\r\n }\r\n return ret.map(f => f.reduce());\r\n }\r\n findBody(f) {\r\n var _a;\r\n return ((_a = f.findDirectStructure(Structures.Body)) === null || _a === void 0 ? void 0 : _a.getChildren()) || [];\r\n }\r\n buildName(statement) {\r\n let token = undefined;\r\n const colon = statement.getColon();\r\n if (colon === undefined) {\r\n token = statement.getFirstToken();\r\n }\r\n else {\r\n for (const t of statement.getTokens()) {\r\n if (t.getStart().isAfter(colon.getEnd())) {\r\n token = t;\r\n break;\r\n }\r\n }\r\n }\r\n if (token === undefined) {\r\n return \"tokenError\";\r\n }\r\n return statement.get().constructor.name +\r\n \":\" + token.getRow() +\r\n \",\" + token.getCol();\r\n }\r\n traverseBody(children, context) {\r\n const graph = new flow_graph_1.FlowGraph(this.counter++);\r\n if (children.length === 0) {\r\n graph.addEdge(graph.getStart(), graph.getEnd());\r\n return graph;\r\n }\r\n let current = graph.getStart();\r\n for (const c of children) {\r\n if (c.get() instanceof Structures.Normal) {\r\n const firstChild = c.getFirstChild(); // \"Normal\" only has one child\r\n if (firstChild instanceof nodes_1.StatementNode) {\r\n const name = this.buildName(firstChild);\r\n graph.addEdge(current, name);\r\n current = name;\r\n if (firstChild.get() instanceof Statements.Check) {\r\n if (context.loopStart) {\r\n graph.addEdge(name, context.loopStart);\r\n }\r\n else {\r\n graph.addEdge(name, context.procedureEnd);\r\n }\r\n }\r\n else if (firstChild.get() instanceof Statements.Assert) {\r\n graph.addEdge(name, context.procedureEnd);\r\n }\r\n else if (firstChild.get() instanceof Statements.Continue && context.loopStart) {\r\n graph.addEdge(name, context.loopStart);\r\n return graph;\r\n }\r\n else if (firstChild.get() instanceof Statements.Exit) {\r\n if (context.loopEnd) {\r\n graph.addEdge(name, context.loopEnd);\r\n }\r\n else {\r\n graph.addEdge(name, context.procedureEnd);\r\n }\r\n return graph;\r\n }\r\n else if (firstChild.get() instanceof Statements.Return) {\r\n graph.addEdge(name, context.procedureEnd);\r\n return graph;\r\n }\r\n }\r\n else if (firstChild instanceof nodes_1.StructureNode) {\r\n const sub = this.traverseStructure(firstChild, context);\r\n current = graph.addGraph(current, sub);\r\n }\r\n }\r\n }\r\n graph.addEdge(current, graph.getEnd());\r\n return graph;\r\n }\r\n traverseStructure(n, context) {\r\n const graph = new flow_graph_1.FlowGraph(this.counter++);\r\n if (n === undefined) {\r\n return graph;\r\n }\r\n let current = graph.getStart();\r\n const type = n.get();\r\n if (type instanceof Structures.If) {\r\n const ifName = this.buildName(n.findDirectStatement(Statements.If));\r\n const sub = this.traverseBody(this.findBody(n), context);\r\n graph.addEdge(current, ifName);\r\n graph.addGraph(ifName, sub);\r\n graph.addEdge(sub.getEnd(), graph.getEnd());\r\n current = ifName;\r\n for (const e of n.findDirectStructures(Structures.ElseIf)) {\r\n const elseifst = e.findDirectStatement(Statements.ElseIf);\r\n if (elseifst === undefined) {\r\n continue;\r\n }\r\n const elseIfName = this.buildName(elseifst);\r\n const sub = this.traverseBody(this.findBody(e), context);\r\n graph.addEdge(current, elseIfName);\r\n graph.addGraph(elseIfName, sub);\r\n graph.addEdge(sub.getEnd(), graph.getEnd());\r\n current = elseIfName;\r\n }\r\n const els = n.findDirectStructure(Structures.Else);\r\n const elsest = els === null || els === void 0 ? void 0 : els.findDirectStatement(Statements.Else);\r\n if (els && elsest) {\r\n const elseName = this.buildName(elsest);\r\n const sub = this.traverseBody(this.findBody(els), context);\r\n graph.addEdge(current, elseName);\r\n graph.addGraph(elseName, sub);\r\n graph.addEdge(sub.getEnd(), graph.getEnd());\r\n }\r\n else {\r\n graph.addEdge(ifName, graph.getEnd());\r\n }\r\n }\r\n else if (type instanceof Structures.Loop\r\n || type instanceof Structures.While\r\n || type instanceof Structures.With\r\n || type instanceof Structures.Provide\r\n || type instanceof Structures.Select\r\n || type instanceof Structures.Do) {\r\n const loopName = this.buildName(n.getFirstStatement());\r\n const sub = this.traverseBody(this.findBody(n), Object.assign(Object.assign({}, context), { loopStart: loopName, loopEnd: graph.getEnd() }));\r\n graph.addEdge(current, loopName);\r\n graph.addGraph(loopName, sub);\r\n graph.addEdge(sub.getEnd(), loopName);\r\n graph.addEdge(loopName, graph.getEnd());\r\n }\r\n else if (type instanceof Structures.Try) {\r\n const tryName = this.buildName(n.getFirstStatement());\r\n const body = this.traverseBody(this.findBody(n), context);\r\n graph.addEdge(current, tryName);\r\n graph.addGraph(tryName, body);\r\n graph.addEdge(body.getEnd(), graph.getEnd());\r\n for (const c of n.findDirectStructures(Structures.Catch)) {\r\n const catchName = this.buildName(c.getFirstStatement());\r\n const catchBody = this.traverseBody(this.findBody(c), context);\r\n // TODO: this does not take exceptions into account\r\n graph.addEdge(body.getEnd(), catchName);\r\n graph.addGraph(catchName, catchBody);\r\n graph.addEdge(catchBody.getEnd(), graph.getEnd());\r\n }\r\n // TODO, handle CLEANUP\r\n }\r\n else if (type instanceof Structures.Case) {\r\n const caseName = this.buildName(n.getFirstStatement());\r\n graph.addEdge(current, caseName);\r\n let othersFound = false;\r\n for (const w of n.findDirectStructures(Structures.When)) {\r\n const first = w.getFirstStatement();\r\n if (first === undefined) {\r\n continue;\r\n }\r\n if (first.get() instanceof Statements.WhenOthers) {\r\n othersFound = true;\r\n }\r\n const firstName = this.buildName(first);\r\n const sub = this.traverseBody(this.findBody(w), context);\r\n graph.addEdge(caseName, firstName);\r\n graph.addGraph(firstName, sub);\r\n graph.addEdge(sub.getEnd(), graph.getEnd());\r\n }\r\n if (othersFound === false) {\r\n graph.addEdge(caseName, graph.getEnd());\r\n }\r\n }\r\n else if (type instanceof Structures.CaseType) {\r\n const caseName = this.buildName(n.getFirstStatement());\r\n graph.addEdge(current, caseName);\r\n let othersFound = false;\r\n for (const w of n.findDirectStructures(Structures.WhenType)) {\r\n const first = w.getFirstStatement();\r\n if (first === undefined) {\r\n continue;\r\n }\r\n if (first.get() instanceof Statements.WhenOthers) {\r\n othersFound = true;\r\n }\r\n const firstName = this.buildName(first);\r\n const sub = this.traverseBody(this.findBody(w), context);\r\n graph.addEdge(caseName, firstName);\r\n graph.addGraph(firstName, sub);\r\n graph.addEdge(sub.getEnd(), graph.getEnd());\r\n }\r\n if (othersFound === false) {\r\n graph.addEdge(caseName, graph.getEnd());\r\n }\r\n }\r\n else {\r\n console.dir(\"StatementFlow,todo, \" + n.get().constructor.name);\r\n }\r\n return graph;\r\n }\r\n}\r\nexports.StatementFlow = StatementFlow;\r\n//# sourceMappingURL=statement_flow.js.map\n\n//# sourceURL=webpack://@abaplint/transpiler-cli/./node_modules/@abaplint/core/build/src/abap/flow/statement_flow.js?");
8698
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.StatementFlow = void 0;\r\nconst nodes_1 = __webpack_require__(/*! ../nodes */ \"./node_modules/@abaplint/core/build/src/abap/nodes/index.js\");\r\nconst Structures = __webpack_require__(/*! ../3_structures/structures */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/index.js\");\r\nconst Statements = __webpack_require__(/*! ../2_statements/statements */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js\");\r\nconst Expressions = __webpack_require__(/*! ../2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst flow_graph_1 = __webpack_require__(/*! ./flow_graph */ \"./node_modules/@abaplint/core/build/src/abap/flow/flow_graph.js\");\r\nclass StatementFlow {\r\n constructor() {\r\n this.counter = 0;\r\n }\r\n build(stru) {\r\n var _a, _b;\r\n const ret = [];\r\n const forms = stru.findAllStructures(Structures.Form);\r\n for (const f of forms) {\r\n const formName = \"FORM \" + ((_a = f.findFirstExpression(Expressions.FormName)) === null || _a === void 0 ? void 0 : _a.concatTokens());\r\n this.counter = 1;\r\n const graph = this.traverseBody(this.findBody(f), { procedureEnd: \"end#1\" });\r\n graph.setLabel(formName);\r\n ret.push(graph);\r\n }\r\n const methods = stru.findAllStructures(Structures.Method);\r\n for (const f of methods) {\r\n const methodName = \"METHOD \" + ((_b = f.findFirstExpression(Expressions.MethodName)) === null || _b === void 0 ? void 0 : _b.concatTokens());\r\n this.counter = 1;\r\n const graph = this.traverseBody(this.findBody(f), { procedureEnd: \"end#1\" });\r\n graph.setLabel(methodName);\r\n ret.push(graph);\r\n }\r\n return ret.map(f => f.reduce());\r\n }\r\n ////////////////////\r\n findBody(f) {\r\n var _a;\r\n return ((_a = f.findDirectStructure(Structures.Body)) === null || _a === void 0 ? void 0 : _a.getChildren()) || [];\r\n }\r\n buildName(statement) {\r\n let token = undefined;\r\n const colon = statement.getColon();\r\n if (colon === undefined) {\r\n token = statement.getFirstToken();\r\n }\r\n else {\r\n for (const t of statement.getTokens()) {\r\n if (t.getStart().isAfter(colon.getEnd())) {\r\n token = t;\r\n break;\r\n }\r\n }\r\n }\r\n if (token === undefined) {\r\n return \"tokenError\";\r\n }\r\n return statement.get().constructor.name +\r\n \":\" + token.getRow() +\r\n \",\" + token.getCol();\r\n }\r\n traverseBody(children, context) {\r\n const graph = new flow_graph_1.FlowGraph(this.counter++);\r\n if (children.length === 0) {\r\n graph.addEdge(graph.getStart(), graph.getEnd());\r\n return graph;\r\n }\r\n let current = graph.getStart();\r\n for (const c of children) {\r\n if (c.get() instanceof Structures.Normal) {\r\n const firstChild = c.getFirstChild(); // \"Normal\" only has one child\r\n if (firstChild instanceof nodes_1.StatementNode) {\r\n const name = this.buildName(firstChild);\r\n graph.addEdge(current, name);\r\n current = name;\r\n if (firstChild.get() instanceof Statements.Check) {\r\n if (context.loopStart) {\r\n graph.addEdge(name, context.loopStart);\r\n }\r\n else {\r\n graph.addEdge(name, context.procedureEnd);\r\n }\r\n }\r\n else if (firstChild.get() instanceof Statements.Assert) {\r\n graph.addEdge(name, context.procedureEnd);\r\n }\r\n else if (firstChild.get() instanceof Statements.Continue && context.loopStart) {\r\n graph.addEdge(name, context.loopStart);\r\n return graph;\r\n }\r\n else if (firstChild.get() instanceof Statements.Exit) {\r\n if (context.loopEnd) {\r\n graph.addEdge(name, context.loopEnd);\r\n }\r\n else {\r\n graph.addEdge(name, context.procedureEnd);\r\n }\r\n return graph;\r\n }\r\n else if (firstChild.get() instanceof Statements.Return) {\r\n graph.addEdge(name, context.procedureEnd);\r\n return graph;\r\n }\r\n }\r\n else if (firstChild instanceof nodes_1.StructureNode) {\r\n const sub = this.traverseStructure(firstChild, context);\r\n current = graph.addGraph(current, sub);\r\n }\r\n }\r\n }\r\n graph.addEdge(current, graph.getEnd());\r\n return graph;\r\n }\r\n traverseStructure(n, context) {\r\n const graph = new flow_graph_1.FlowGraph(this.counter++);\r\n if (n === undefined) {\r\n return graph;\r\n }\r\n let current = graph.getStart();\r\n const type = n.get();\r\n if (type instanceof Structures.If) {\r\n const ifName = this.buildName(n.findDirectStatement(Statements.If));\r\n const sub = this.traverseBody(this.findBody(n), context);\r\n graph.addEdge(current, ifName);\r\n graph.addGraph(ifName, sub);\r\n graph.addEdge(sub.getEnd(), graph.getEnd());\r\n current = ifName;\r\n for (const e of n.findDirectStructures(Structures.ElseIf)) {\r\n const elseifst = e.findDirectStatement(Statements.ElseIf);\r\n if (elseifst === undefined) {\r\n continue;\r\n }\r\n const elseIfName = this.buildName(elseifst);\r\n const sub = this.traverseBody(this.findBody(e), context);\r\n graph.addEdge(current, elseIfName);\r\n graph.addGraph(elseIfName, sub);\r\n graph.addEdge(sub.getEnd(), graph.getEnd());\r\n current = elseIfName;\r\n }\r\n const els = n.findDirectStructure(Structures.Else);\r\n const elsest = els === null || els === void 0 ? void 0 : els.findDirectStatement(Statements.Else);\r\n if (els && elsest) {\r\n const elseName = this.buildName(elsest);\r\n const sub = this.traverseBody(this.findBody(els), context);\r\n graph.addEdge(current, elseName);\r\n graph.addGraph(elseName, sub);\r\n graph.addEdge(sub.getEnd(), graph.getEnd());\r\n }\r\n else {\r\n graph.addEdge(ifName, graph.getEnd());\r\n }\r\n }\r\n else if (type instanceof Structures.Loop\r\n || type instanceof Structures.While\r\n || type instanceof Structures.With\r\n || type instanceof Structures.Provide\r\n || type instanceof Structures.Select\r\n || type instanceof Structures.Do) {\r\n const loopName = this.buildName(n.getFirstStatement());\r\n const sub = this.traverseBody(this.findBody(n), Object.assign(Object.assign({}, context), { loopStart: loopName, loopEnd: graph.getEnd() }));\r\n graph.addEdge(current, loopName);\r\n graph.addGraph(loopName, sub);\r\n graph.addEdge(sub.getEnd(), loopName);\r\n graph.addEdge(loopName, graph.getEnd());\r\n }\r\n else if (type instanceof Structures.Try) {\r\n const tryName = this.buildName(n.getFirstStatement());\r\n const body = this.traverseBody(this.findBody(n), context);\r\n graph.addEdge(current, tryName);\r\n graph.addGraph(tryName, body);\r\n graph.addEdge(body.getEnd(), graph.getEnd());\r\n for (const c of n.findDirectStructures(Structures.Catch)) {\r\n const catchName = this.buildName(c.getFirstStatement());\r\n const catchBody = this.traverseBody(this.findBody(c), context);\r\n // TODO: this does not take exceptions into account\r\n graph.addEdge(body.getEnd(), catchName);\r\n graph.addGraph(catchName, catchBody);\r\n graph.addEdge(catchBody.getEnd(), graph.getEnd());\r\n }\r\n // TODO, handle CLEANUP\r\n }\r\n else if (type instanceof Structures.Case) {\r\n const caseName = this.buildName(n.getFirstStatement());\r\n graph.addEdge(current, caseName);\r\n let othersFound = false;\r\n for (const w of n.findDirectStructures(Structures.When)) {\r\n const first = w.getFirstStatement();\r\n if (first === undefined) {\r\n continue;\r\n }\r\n if (first.get() instanceof Statements.WhenOthers) {\r\n othersFound = true;\r\n }\r\n const firstName = this.buildName(first);\r\n const sub = this.traverseBody(this.findBody(w), context);\r\n graph.addEdge(caseName, firstName);\r\n graph.addGraph(firstName, sub);\r\n graph.addEdge(sub.getEnd(), graph.getEnd());\r\n }\r\n if (othersFound === false) {\r\n graph.addEdge(caseName, graph.getEnd());\r\n }\r\n }\r\n else if (type instanceof Structures.CaseType) {\r\n const caseName = this.buildName(n.getFirstStatement());\r\n graph.addEdge(current, caseName);\r\n let othersFound = false;\r\n for (const w of n.findDirectStructures(Structures.WhenType)) {\r\n const first = w.getFirstStatement();\r\n if (first === undefined) {\r\n continue;\r\n }\r\n if (first.get() instanceof Statements.WhenOthers) {\r\n othersFound = true;\r\n }\r\n const firstName = this.buildName(first);\r\n const sub = this.traverseBody(this.findBody(w), context);\r\n graph.addEdge(caseName, firstName);\r\n graph.addGraph(firstName, sub);\r\n graph.addEdge(sub.getEnd(), graph.getEnd());\r\n }\r\n if (othersFound === false) {\r\n graph.addEdge(caseName, graph.getEnd());\r\n }\r\n }\r\n else {\r\n console.dir(\"StatementFlow,todo, \" + n.get().constructor.name);\r\n }\r\n return graph;\r\n }\r\n}\r\nexports.StatementFlow = StatementFlow;\r\n//# sourceMappingURL=statement_flow.js.map\n\n//# sourceURL=webpack://@abaplint/transpiler-cli/./node_modules/@abaplint/core/build/src/abap/flow/statement_flow.js?");
8699
8699
 
8700
8700
  /***/ }),
8701
8701
 
@@ -11544,7 +11544,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
11544
11544
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
11545
11545
 
11546
11546
  "use strict";
11547
- eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.Registry = void 0;\nconst config_1 = __webpack_require__(/*! ./config */ \"./node_modules/@abaplint/core/build/src/config.js\");\nconst artifacts_objects_1 = __webpack_require__(/*! ./artifacts_objects */ \"./node_modules/@abaplint/core/build/src/artifacts_objects.js\");\nconst find_global_definitions_1 = __webpack_require__(/*! ./abap/5_syntax/global_definitions/find_global_definitions */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/global_definitions/find_global_definitions.js\");\nconst excludeHelper_1 = __webpack_require__(/*! ./utils/excludeHelper */ \"./node_modules/@abaplint/core/build/src/utils/excludeHelper.js\");\nconst ddic_references_1 = __webpack_require__(/*! ./ddic_references */ \"./node_modules/@abaplint/core/build/src/ddic_references.js\");\nconst rules_runner_1 = __webpack_require__(/*! ./rules_runner */ \"./node_modules/@abaplint/core/build/src/rules_runner.js\");\n// todo, this should really be an instance in case there are multiple Registry'ies\nclass ParsingPerformance {\n static clear() {\n this.results = [];\n this.lexing = 0;\n this.statements = 0;\n this.structure = 0;\n }\n static push(obj, result) {\n if (result.runtimeExtra) {\n this.lexing += result.runtimeExtra.lexing;\n this.statements += result.runtimeExtra.statements;\n this.structure += result.runtimeExtra.structure;\n }\n if (result.runtime < 100) {\n return;\n }\n if (this.results === undefined) {\n this.results = [];\n }\n let extra = \"\";\n if (result.runtimeExtra) {\n extra = `\\t(lexing: ${result.runtimeExtra.lexing}ms, statements: ${result.runtimeExtra.statements}ms, structure: ${result.runtimeExtra.structure}ms)`;\n }\n this.results.push({\n runtime: result.runtime,\n extra,\n name: obj.getType() + \" \" + obj.getName(),\n });\n }\n static output() {\n const MAX = 10;\n this.results.sort((a, b) => { return b.runtime - a.runtime; });\n for (let i = 0; i < MAX; i++) {\n const row = this.results[i];\n if (row === undefined) {\n break;\n }\n process.stderr.write(`\\t${row.runtime}ms\\t${row.name} ${row.extra}\\n`);\n }\n process.stderr.write(`\\tTotal lexing: ${this.lexing}ms\\n`);\n process.stderr.write(`\\tTotal statements: ${this.statements}ms\\n`);\n process.stderr.write(`\\tTotal structure: ${this.structure}ms\\n`);\n }\n}\n///////////////////////////////////////////////////////////////////////////////////////////////\nclass Registry {\n constructor(conf) {\n this.objects = {};\n this.objectsByType = {};\n this.dependencies = {};\n this.conf = conf ? conf : config_1.Config.getDefault();\n this.references = new ddic_references_1.DDICReferences();\n }\n static abaplintVersion() {\n // magic, see build script \"version.sh\"\n return \"2.93.99\";\n }\n getDDICReferences() {\n return this.references;\n }\n *getObjects() {\n for (const name in this.objects) {\n for (const type in this.objects[name]) {\n yield this.objects[name][type];\n }\n }\n }\n *getObjectsByType(type) {\n for (const name in this.objectsByType[type] || []) {\n yield this.objectsByType[type][name];\n }\n }\n *getFiles() {\n for (const obj of this.getObjects()) {\n for (const file of obj.getFiles()) {\n yield file;\n }\n }\n }\n getFirstObject() {\n for (const name in this.objects) {\n for (const type in this.objects[name]) {\n return this.objects[name][type];\n }\n }\n return undefined;\n }\n getObjectCount(skipDependencies = true) {\n let res = 0;\n for (const o of this.getObjects()) {\n if (skipDependencies === true && this.isDependency(o)) {\n continue;\n }\n res = res + 1;\n }\n return res;\n }\n getFileByName(filename) {\n const upper = filename.toUpperCase();\n for (const o of this.getObjects()) {\n for (const f of o.getFiles()) {\n if (f.getFilename().toUpperCase() === upper) {\n return f;\n }\n }\n }\n return undefined;\n }\n getObject(type, name) {\n if (type === undefined || name === undefined) {\n return undefined;\n }\n const searchName = name.toUpperCase();\n if (this.objects[searchName]) {\n return this.objects[searchName][type];\n }\n return undefined;\n }\n getConfig() {\n return this.conf;\n }\n // assumption: Config is immutable, and can only be changed via this method\n setConfig(conf) {\n for (const obj of this.getObjects()) {\n obj.setDirty();\n }\n this.conf = conf;\n return this;\n }\n inErrorNamespace(name) {\n // todo: performance? cache regexp?\n const reg = new RegExp(this.getConfig().getSyntaxSetttings().errorNamespace, \"i\");\n return reg.test(name);\n }\n addFile(file) {\n return this.addFiles([file]);\n }\n updateFile(file) {\n const obj = this.find(file.getObjectName(), file.getObjectType());\n obj.updateFile(file);\n return this;\n }\n removeFile(file) {\n const obj = this.find(file.getObjectName(), file.getObjectType());\n obj.removeFile(file);\n if (obj.getFiles().length === 0) {\n this.references.clear(obj);\n this.removeObject(obj);\n }\n return this;\n }\n _addFiles(files, dependency) {\n var _a;\n const globalExclude = ((_a = this.conf.getGlobal().exclude) !== null && _a !== void 0 ? _a : [])\n .map(pattern => new RegExp(pattern, \"i\"));\n for (const f of files) {\n const filename = f.getFilename();\n const isNotAbapgitFile = filename.split(\".\").length <= 2;\n if (isNotAbapgitFile || excludeHelper_1.ExcludeHelper.isExcluded(filename, globalExclude)) {\n continue;\n }\n let found = this.findOrCreate(f.getObjectName(), f.getObjectType());\n if (dependency === false && found && this.isDependency(found)) {\n this.removeDependency(found);\n found = this.findOrCreate(f.getObjectName(), f.getObjectType());\n }\n found.addFile(f);\n }\n return this;\n }\n addFiles(files) {\n this._addFiles(files, false);\n return this;\n }\n addDependencies(files) {\n for (const f of files) {\n this.addDependency(f);\n }\n return this;\n }\n addDependency(file) {\n var _a;\n const type = (_a = file.getObjectType()) === null || _a === void 0 ? void 0 : _a.toUpperCase();\n if (type === undefined) {\n return this;\n }\n const name = file.getObjectName().toUpperCase();\n if (this.dependencies[type] === undefined) {\n this.dependencies[type] = {};\n }\n this.dependencies[type][name] = true;\n this._addFiles([file], true);\n return this;\n }\n removeDependency(obj) {\n var _a;\n (_a = this.dependencies[obj.getType()]) === null || _a === void 0 ? true : delete _a[obj.getName()];\n this.removeObject(obj);\n }\n isDependency(obj) {\n var _a;\n return ((_a = this.dependencies[obj.getType()]) === null || _a === void 0 ? void 0 : _a[obj.getName()]) === true;\n }\n isFileDependency(filename) {\n var _a, _b;\n const f = this.getFileByName(filename);\n if (f === undefined) {\n return false;\n }\n const type = (_a = f.getObjectType()) === null || _a === void 0 ? void 0 : _a.toUpperCase();\n if (type === undefined) {\n return false;\n }\n const name = f.getObjectName().toUpperCase();\n return ((_b = this.dependencies[type]) === null || _b === void 0 ? void 0 : _b[name]) === true;\n }\n // assumption: the file is already in the registry\n findObjectForFile(file) {\n const filename = file.getFilename();\n for (const obj of this.getObjects()) {\n for (const ofile of obj.getFiles()) {\n if (ofile.getFilename() === filename) {\n return obj;\n }\n }\n }\n return undefined;\n }\n // todo, this will be changed to async sometime\n findIssues(input) {\n if (this.isDirty() === true) {\n this.parse();\n }\n return new rules_runner_1.RulesRunner(this).runRules(this.getObjects(), input);\n }\n // todo, this will be changed to async sometime\n findIssuesObject(iobj) {\n if (this.isDirty() === true) {\n this.parse();\n }\n return new rules_runner_1.RulesRunner(this).runRules([iobj]);\n }\n // todo, this will be changed to async sometime\n parse() {\n if (this.isDirty() === false) {\n return this;\n }\n ParsingPerformance.clear();\n for (const o of this.getObjects()) {\n this.parsePrivate(o);\n }\n new find_global_definitions_1.FindGlobalDefinitions(this).run();\n return this;\n }\n async parseAsync(input) {\n var _a, _b;\n if (this.isDirty() === false) {\n return this;\n }\n ParsingPerformance.clear();\n (_a = input === null || input === void 0 ? void 0 : input.progress) === null || _a === void 0 ? void 0 : _a.set(this.getObjectCount(false), \"Lexing and parsing\");\n for (const o of this.getObjects()) {\n await ((_b = input === null || input === void 0 ? void 0 : input.progress) === null || _b === void 0 ? void 0 : _b.tick(\"Lexing and parsing(\" + this.conf.getVersion() + \") - \" + o.getType() + \" \" + o.getName()));\n this.parsePrivate(o);\n }\n if ((input === null || input === void 0 ? void 0 : input.outputPerformance) === true) {\n ParsingPerformance.output();\n }\n new find_global_definitions_1.FindGlobalDefinitions(this).run(input === null || input === void 0 ? void 0 : input.progress);\n return this;\n }\n //////////////////////////////////////////\n // todo, refactor, this is a mess, see where-used, a lot of the code should be in this method instead\n parsePrivate(input) {\n const config = this.getConfig();\n const result = input.parse(config.getVersion(), config.getSyntaxSetttings().globalMacros, this);\n ParsingPerformance.push(input, result);\n }\n isDirty() {\n for (const o of this.getObjects()) {\n const dirty = o.isDirty();\n if (dirty === true) {\n return true;\n }\n }\n return false;\n }\n findOrCreate(name, type) {\n try {\n return this.find(name, type);\n }\n catch (_a) {\n const newName = name.toUpperCase();\n const newType = type ? type : \"UNKNOWN\";\n const add = artifacts_objects_1.ArtifactsObjects.newObject(newName, newType);\n if (this.objects[newName] === undefined) {\n this.objects[newName] = {};\n }\n this.objects[newName][newType] = add;\n if (this.objectsByType[newType] === undefined) {\n this.objectsByType[newType] = {};\n }\n this.objectsByType[newType][newName] = add;\n return add;\n }\n }\n removeObject(remove) {\n if (remove === undefined) {\n return;\n }\n if (this.objects[remove.getName()][remove.getType()] === undefined) {\n throw new Error(\"removeObject: object not found\");\n }\n if (Object.keys(this.objects[remove.getName()]).length === 1) {\n delete this.objects[remove.getName()];\n }\n else {\n delete this.objects[remove.getName()][remove.getType()];\n }\n if (Object.keys(this.objectsByType[remove.getType()]).length === 1) {\n delete this.objectsByType[remove.getType()];\n }\n else {\n delete this.objectsByType[remove.getType()][remove.getName()];\n }\n }\n find(name, type) {\n const searchType = type ? type : \"UNKNOWN\";\n const searchName = name.toUpperCase();\n if (this.objects[searchName] !== undefined\n && this.objects[searchName][searchType]) {\n return this.objects[searchName][searchType];\n }\n throw new Error(\"find: object not found, \" + type + \" \" + name);\n }\n}\nexports.Registry = Registry;\n//# sourceMappingURL=registry.js.map\n\n//# sourceURL=webpack://@abaplint/transpiler-cli/./node_modules/@abaplint/core/build/src/registry.js?");
11547
+ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.Registry = void 0;\nconst config_1 = __webpack_require__(/*! ./config */ \"./node_modules/@abaplint/core/build/src/config.js\");\nconst artifacts_objects_1 = __webpack_require__(/*! ./artifacts_objects */ \"./node_modules/@abaplint/core/build/src/artifacts_objects.js\");\nconst find_global_definitions_1 = __webpack_require__(/*! ./abap/5_syntax/global_definitions/find_global_definitions */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/global_definitions/find_global_definitions.js\");\nconst excludeHelper_1 = __webpack_require__(/*! ./utils/excludeHelper */ \"./node_modules/@abaplint/core/build/src/utils/excludeHelper.js\");\nconst ddic_references_1 = __webpack_require__(/*! ./ddic_references */ \"./node_modules/@abaplint/core/build/src/ddic_references.js\");\nconst rules_runner_1 = __webpack_require__(/*! ./rules_runner */ \"./node_modules/@abaplint/core/build/src/rules_runner.js\");\n// todo, this should really be an instance in case there are multiple Registry'ies\nclass ParsingPerformance {\n static clear() {\n this.results = [];\n this.lexing = 0;\n this.statements = 0;\n this.structure = 0;\n }\n static push(obj, result) {\n if (result.runtimeExtra) {\n this.lexing += result.runtimeExtra.lexing;\n this.statements += result.runtimeExtra.statements;\n this.structure += result.runtimeExtra.structure;\n }\n if (result.runtime < 100) {\n return;\n }\n if (this.results === undefined) {\n this.results = [];\n }\n let extra = \"\";\n if (result.runtimeExtra) {\n extra = `\\t(lexing: ${result.runtimeExtra.lexing}ms, statements: ${result.runtimeExtra.statements}ms, structure: ${result.runtimeExtra.structure}ms)`;\n }\n this.results.push({\n runtime: result.runtime,\n extra,\n name: obj.getType() + \" \" + obj.getName(),\n });\n }\n static output() {\n const MAX = 10;\n this.results.sort((a, b) => { return b.runtime - a.runtime; });\n for (let i = 0; i < MAX; i++) {\n const row = this.results[i];\n if (row === undefined) {\n break;\n }\n process.stderr.write(`\\t${row.runtime}ms\\t${row.name} ${row.extra}\\n`);\n }\n process.stderr.write(`\\tTotal lexing: ${this.lexing}ms\\n`);\n process.stderr.write(`\\tTotal statements: ${this.statements}ms\\n`);\n process.stderr.write(`\\tTotal structure: ${this.structure}ms\\n`);\n }\n}\n///////////////////////////////////////////////////////////////////////////////////////////////\nclass Registry {\n constructor(conf) {\n this.objects = {};\n this.objectsByType = {};\n this.dependencies = {};\n this.conf = conf ? conf : config_1.Config.getDefault();\n this.references = new ddic_references_1.DDICReferences();\n }\n static abaplintVersion() {\n // magic, see build script \"version.sh\"\n return \"2.94.0\";\n }\n getDDICReferences() {\n return this.references;\n }\n *getObjects() {\n for (const name in this.objects) {\n for (const type in this.objects[name]) {\n yield this.objects[name][type];\n }\n }\n }\n *getObjectsByType(type) {\n for (const name in this.objectsByType[type] || []) {\n yield this.objectsByType[type][name];\n }\n }\n *getFiles() {\n for (const obj of this.getObjects()) {\n for (const file of obj.getFiles()) {\n yield file;\n }\n }\n }\n getFirstObject() {\n for (const name in this.objects) {\n for (const type in this.objects[name]) {\n return this.objects[name][type];\n }\n }\n return undefined;\n }\n getObjectCount(skipDependencies = true) {\n let res = 0;\n for (const o of this.getObjects()) {\n if (skipDependencies === true && this.isDependency(o)) {\n continue;\n }\n res = res + 1;\n }\n return res;\n }\n getFileByName(filename) {\n const upper = filename.toUpperCase();\n for (const o of this.getObjects()) {\n for (const f of o.getFiles()) {\n if (f.getFilename().toUpperCase() === upper) {\n return f;\n }\n }\n }\n return undefined;\n }\n getObject(type, name) {\n if (type === undefined || name === undefined) {\n return undefined;\n }\n const searchName = name.toUpperCase();\n if (this.objects[searchName]) {\n return this.objects[searchName][type];\n }\n return undefined;\n }\n getConfig() {\n return this.conf;\n }\n // assumption: Config is immutable, and can only be changed via this method\n setConfig(conf) {\n for (const obj of this.getObjects()) {\n obj.setDirty();\n }\n this.conf = conf;\n return this;\n }\n inErrorNamespace(name) {\n // todo: performance? cache regexp?\n const reg = new RegExp(this.getConfig().getSyntaxSetttings().errorNamespace, \"i\");\n return reg.test(name);\n }\n addFile(file) {\n return this.addFiles([file]);\n }\n updateFile(file) {\n const obj = this.find(file.getObjectName(), file.getObjectType());\n obj.updateFile(file);\n return this;\n }\n removeFile(file) {\n const obj = this.find(file.getObjectName(), file.getObjectType());\n obj.removeFile(file);\n if (obj.getFiles().length === 0) {\n this.references.clear(obj);\n this.removeObject(obj);\n }\n return this;\n }\n _addFiles(files, dependency) {\n var _a;\n const globalExclude = ((_a = this.conf.getGlobal().exclude) !== null && _a !== void 0 ? _a : [])\n .map(pattern => new RegExp(pattern, \"i\"));\n for (const f of files) {\n const filename = f.getFilename();\n const isNotAbapgitFile = filename.split(\".\").length <= 2;\n if (isNotAbapgitFile || excludeHelper_1.ExcludeHelper.isExcluded(filename, globalExclude)) {\n continue;\n }\n let found = this.findOrCreate(f.getObjectName(), f.getObjectType());\n if (dependency === false && found && this.isDependency(found)) {\n this.removeDependency(found);\n found = this.findOrCreate(f.getObjectName(), f.getObjectType());\n }\n found.addFile(f);\n }\n return this;\n }\n addFiles(files) {\n this._addFiles(files, false);\n return this;\n }\n addDependencies(files) {\n for (const f of files) {\n this.addDependency(f);\n }\n return this;\n }\n addDependency(file) {\n var _a;\n const type = (_a = file.getObjectType()) === null || _a === void 0 ? void 0 : _a.toUpperCase();\n if (type === undefined) {\n return this;\n }\n const name = file.getObjectName().toUpperCase();\n if (this.dependencies[type] === undefined) {\n this.dependencies[type] = {};\n }\n this.dependencies[type][name] = true;\n this._addFiles([file], true);\n return this;\n }\n removeDependency(obj) {\n var _a;\n (_a = this.dependencies[obj.getType()]) === null || _a === void 0 ? true : delete _a[obj.getName()];\n this.removeObject(obj);\n }\n isDependency(obj) {\n var _a;\n return ((_a = this.dependencies[obj.getType()]) === null || _a === void 0 ? void 0 : _a[obj.getName()]) === true;\n }\n isFileDependency(filename) {\n var _a, _b;\n const f = this.getFileByName(filename);\n if (f === undefined) {\n return false;\n }\n const type = (_a = f.getObjectType()) === null || _a === void 0 ? void 0 : _a.toUpperCase();\n if (type === undefined) {\n return false;\n }\n const name = f.getObjectName().toUpperCase();\n return ((_b = this.dependencies[type]) === null || _b === void 0 ? void 0 : _b[name]) === true;\n }\n // assumption: the file is already in the registry\n findObjectForFile(file) {\n const filename = file.getFilename();\n for (const obj of this.getObjects()) {\n for (const ofile of obj.getFiles()) {\n if (ofile.getFilename() === filename) {\n return obj;\n }\n }\n }\n return undefined;\n }\n // todo, this will be changed to async sometime\n findIssues(input) {\n if (this.isDirty() === true) {\n this.parse();\n }\n return new rules_runner_1.RulesRunner(this).runRules(this.getObjects(), input);\n }\n // todo, this will be changed to async sometime\n findIssuesObject(iobj) {\n if (this.isDirty() === true) {\n this.parse();\n }\n return new rules_runner_1.RulesRunner(this).runRules([iobj]);\n }\n // todo, this will be changed to async sometime\n parse() {\n if (this.isDirty() === false) {\n return this;\n }\n ParsingPerformance.clear();\n for (const o of this.getObjects()) {\n this.parsePrivate(o);\n }\n new find_global_definitions_1.FindGlobalDefinitions(this).run();\n return this;\n }\n async parseAsync(input) {\n var _a, _b;\n if (this.isDirty() === false) {\n return this;\n }\n ParsingPerformance.clear();\n (_a = input === null || input === void 0 ? void 0 : input.progress) === null || _a === void 0 ? void 0 : _a.set(this.getObjectCount(false), \"Lexing and parsing\");\n for (const o of this.getObjects()) {\n await ((_b = input === null || input === void 0 ? void 0 : input.progress) === null || _b === void 0 ? void 0 : _b.tick(\"Lexing and parsing(\" + this.conf.getVersion() + \") - \" + o.getType() + \" \" + o.getName()));\n this.parsePrivate(o);\n }\n if ((input === null || input === void 0 ? void 0 : input.outputPerformance) === true) {\n ParsingPerformance.output();\n }\n new find_global_definitions_1.FindGlobalDefinitions(this).run(input === null || input === void 0 ? void 0 : input.progress);\n return this;\n }\n //////////////////////////////////////////\n // todo, refactor, this is a mess, see where-used, a lot of the code should be in this method instead\n parsePrivate(input) {\n const config = this.getConfig();\n const result = input.parse(config.getVersion(), config.getSyntaxSetttings().globalMacros, this);\n ParsingPerformance.push(input, result);\n }\n isDirty() {\n for (const o of this.getObjects()) {\n const dirty = o.isDirty();\n if (dirty === true) {\n return true;\n }\n }\n return false;\n }\n findOrCreate(name, type) {\n try {\n return this.find(name, type);\n }\n catch (_a) {\n const newName = name.toUpperCase();\n const newType = type ? type : \"UNKNOWN\";\n const add = artifacts_objects_1.ArtifactsObjects.newObject(newName, newType);\n if (this.objects[newName] === undefined) {\n this.objects[newName] = {};\n }\n this.objects[newName][newType] = add;\n if (this.objectsByType[newType] === undefined) {\n this.objectsByType[newType] = {};\n }\n this.objectsByType[newType][newName] = add;\n return add;\n }\n }\n removeObject(remove) {\n if (remove === undefined) {\n return;\n }\n if (this.objects[remove.getName()][remove.getType()] === undefined) {\n throw new Error(\"removeObject: object not found\");\n }\n if (Object.keys(this.objects[remove.getName()]).length === 1) {\n delete this.objects[remove.getName()];\n }\n else {\n delete this.objects[remove.getName()][remove.getType()];\n }\n if (Object.keys(this.objectsByType[remove.getType()]).length === 1) {\n delete this.objectsByType[remove.getType()];\n }\n else {\n delete this.objectsByType[remove.getType()][remove.getName()];\n }\n }\n find(name, type) {\n const searchType = type ? type : \"UNKNOWN\";\n const searchName = name.toUpperCase();\n if (this.objects[searchName] !== undefined\n && this.objects[searchName][searchType]) {\n return this.objects[searchName][searchType];\n }\n throw new Error(\"find: object not found, \" + type + \" \" + name);\n }\n}\nexports.Registry = Registry;\n//# sourceMappingURL=registry.js.map\n\n//# sourceURL=webpack://@abaplint/transpiler-cli/./node_modules/@abaplint/core/build/src/registry.js?");
11548
11548
 
11549
11549
  /***/ }),
11550
11550
 
@@ -12215,7 +12215,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
12215
12215
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
12216
12216
 
12217
12217
  "use strict";
12218
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.IfInIf = exports.IfInIfConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst Structures = __webpack_require__(/*! ../abap/3_structures/structures */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/index.js\");\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nclass IfInIfConf extends _basic_rule_config_1.BasicRuleConfig {\r\n}\r\nexports.IfInIfConf = IfInIfConf;\r\nclass IfInIf extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new IfInIfConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"if_in_if\",\r\n title: \"IF in IF\",\r\n shortDescription: `Detects nested ifs which can be refactored.`,\r\n extendedInformation: `\r\nDirectly nested IFs without ELSE can be refactored to a single condition using AND.\r\n\r\nELSE condtions with directly nested IF refactored to ELSEIF.\r\n\r\nhttps://docs.abapopenchecks.org/checks/01/\r\nhttps://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#keep-the-nesting-depth-low`,\r\n badExample: `IF condition1.\r\n IF condition2.\r\n ...\r\n ENDIF.\r\nENDIF.\r\n\r\nIF condition1.\r\n ...\r\nELSE.\r\n IF condition2.\r\n ...\r\n ENDIF.\r\nENDIF.`,\r\n goodExample: `IF ( condition1 ) AND ( condition2 ).\r\n ...\r\nENDIF.\r\n\r\nIF condition1.\r\n ...\r\nELSEIF condition2.\r\n ...\r\nENDIF.`,\r\n tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],\r\n };\r\n }\r\n getMessage() {\r\n return \"IF in IF. Use IF cond1 AND cond2 instead\";\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n runParsed(file, obj) {\r\n const issues = [];\r\n if (obj.getType() === \"INTF\") {\r\n return [];\r\n }\r\n const stru = file.getStructure();\r\n if (stru === undefined) {\r\n return [];\r\n }\r\n let possible = stru.findAllStructures(Structures.If);\r\n possible = possible.concat(stru.findAllStructures(Structures.Else));\r\n for (const i of possible) {\r\n if (i.findDirectStructures(Structures.ElseIf).length > 0\r\n || i.findDirectStructures(Structures.Else).length > 0) {\r\n continue;\r\n }\r\n const blist = i.findDirectStructures(Structures.Body);\r\n if (blist.length === 0) {\r\n continue;\r\n }\r\n const nlist = blist[0].findDirectStructures(Structures.Normal);\r\n if (nlist.length !== 1) {\r\n continue;\r\n }\r\n const niflist = nlist[0].findDirectStructures(Structures.If);\r\n if (niflist.length !== 1) {\r\n continue;\r\n }\r\n const nestedIf = niflist[0];\r\n if (i.get() instanceof Structures.If\r\n && (nestedIf.findDirectStructures(Structures.ElseIf).length > 0\r\n || nestedIf.findDirectStructures(Structures.Else).length > 0)) {\r\n continue;\r\n }\r\n const token = i.getFirstToken();\r\n const issue = issue_1.Issue.atToken(file, token, this.getMessage(), this.getMetadata().key, this.conf.severity);\r\n issues.push(issue);\r\n }\r\n return issues;\r\n }\r\n}\r\nexports.IfInIf = IfInIf;\r\n//# sourceMappingURL=if_in_if.js.map\n\n//# sourceURL=webpack://@abaplint/transpiler-cli/./node_modules/@abaplint/core/build/src/rules/if_in_if.js?");
12218
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.IfInIf = exports.IfInIfConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst Statements = __webpack_require__(/*! ../abap/2_statements/statements */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js\");\r\nconst Structures = __webpack_require__(/*! ../abap/3_structures/structures */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/index.js\");\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nconst edit_helper_1 = __webpack_require__(/*! ../edit_helper */ \"./node_modules/@abaplint/core/build/src/edit_helper.js\");\r\nclass IfInIfConf extends _basic_rule_config_1.BasicRuleConfig {\r\n}\r\nexports.IfInIfConf = IfInIfConf;\r\nclass IfInIf extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new IfInIfConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"if_in_if\",\r\n title: \"IF in IF\",\r\n shortDescription: `Detects nested ifs which can be refactored.`,\r\n extendedInformation: `\r\nDirectly nested IFs without ELSE can be refactored to a single condition using AND.\r\n\r\nELSE condtions with directly nested IF refactored to ELSEIF, quickfixes are suggested for this case.\r\n\r\nhttps://docs.abapopenchecks.org/checks/01/\r\nhttps://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#keep-the-nesting-depth-low`,\r\n badExample: `IF condition1.\r\n IF condition2.\r\n ...\r\n ENDIF.\r\nENDIF.\r\n\r\nIF condition1.\r\n ...\r\nELSE.\r\n IF condition2.\r\n ...\r\n ENDIF.\r\nENDIF.`,\r\n goodExample: `IF ( condition1 ) AND ( condition2 ).\r\n ...\r\nENDIF.\r\n\r\nIF condition1.\r\n ...\r\nELSEIF condition2.\r\n ...\r\nENDIF.`,\r\n tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],\r\n };\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n runParsed(file, obj) {\r\n var _a, _b;\r\n const issues = [];\r\n if (obj.getType() === \"INTF\") {\r\n return [];\r\n }\r\n const stru = file.getStructure();\r\n if (stru === undefined) {\r\n return [];\r\n }\r\n let fixed = false;\r\n let possible = stru.findAllStructures(Structures.If);\r\n possible = possible.concat(stru.findAllStructures(Structures.Else));\r\n for (const i of possible) {\r\n if (i.findDirectStructures(Structures.ElseIf).length > 0\r\n || i.findDirectStructures(Structures.Else).length > 0) {\r\n continue;\r\n }\r\n const blist = i.findDirectStructures(Structures.Body);\r\n if (blist.length === 0) {\r\n continue;\r\n }\r\n const nlist = blist[0].findDirectStructures(Structures.Normal);\r\n if (nlist.length !== 1) {\r\n continue;\r\n }\r\n const niflist = nlist[0].findDirectStructures(Structures.If);\r\n if (niflist.length !== 1) {\r\n continue;\r\n }\r\n const nestedIf = niflist[0];\r\n if (i.get() instanceof Structures.If\r\n && (nestedIf.findDirectStructures(Structures.ElseIf).length > 0\r\n || nestedIf.findDirectStructures(Structures.Else).length > 0)) {\r\n continue;\r\n }\r\n let message = \"IF in IF. Use IF cond1 AND cond2 instead\";\r\n let fix = undefined;\r\n if (i.get() instanceof Structures.Else) {\r\n message = \"Change ELSE part to ELSEIF\";\r\n const els = i.findFirstStatement(Statements.Else);\r\n const iff = (_a = i.findFirstStructure(Structures.If)) === null || _a === void 0 ? void 0 : _a.findDirectStatement(Statements.If);\r\n const endif = (_b = i.findFirstStructure(Structures.If)) === null || _b === void 0 ? void 0 : _b.findDirectStatement(Statements.EndIf);\r\n if (fixed === false && iff && els && endif) {\r\n const fix1 = edit_helper_1.EditHelper.deleteRange(file, els.getLastToken().getStart(), iff === null || iff === void 0 ? void 0 : iff.getFirstToken().getStart());\r\n const fix2 = edit_helper_1.EditHelper.deleteStatement(file, endif);\r\n fix = edit_helper_1.EditHelper.merge(fix1, fix2);\r\n // max one fix per file at a time\r\n fixed = true;\r\n }\r\n }\r\n const token = i.getFirstToken();\r\n const issue = issue_1.Issue.atToken(file, token, message, this.getMetadata().key, this.conf.severity, fix);\r\n issues.push(issue);\r\n }\r\n return issues;\r\n }\r\n}\r\nexports.IfInIf = IfInIf;\r\n//# sourceMappingURL=if_in_if.js.map\n\n//# sourceURL=webpack://@abaplint/transpiler-cli/./node_modules/@abaplint/core/build/src/rules/if_in_if.js?");
12219
12219
 
12220
12220
  /***/ }),
12221
12221
 
@@ -12259,7 +12259,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
12259
12259
  /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
12260
12260
 
12261
12261
  "use strict";
12262
- eval("\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\r\n};\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n__exportStar(__webpack_require__(/*! ./7bit_ascii */ \"./node_modules/@abaplint/core/build/src/rules/7bit_ascii.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./abapdoc */ \"./node_modules/@abaplint/core/build/src/rules/abapdoc.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./align_parameters */ \"./node_modules/@abaplint/core/build/src/rules/align_parameters.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./allowed_object_naming */ \"./node_modules/@abaplint/core/build/src/rules/allowed_object_naming.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./allowed_object_types */ \"./node_modules/@abaplint/core/build/src/rules/allowed_object_types.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./ambiguous_statement */ \"./node_modules/@abaplint/core/build/src/rules/ambiguous_statement.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./avoid_use */ \"./node_modules/@abaplint/core/build/src/rules/avoid_use.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./begin_end_names */ \"./node_modules/@abaplint/core/build/src/rules/begin_end_names.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./begin_single_include */ \"./node_modules/@abaplint/core/build/src/rules/begin_single_include.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./call_transaction_authority_check */ \"./node_modules/@abaplint/core/build/src/rules/call_transaction_authority_check.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_comment_style */ \"./node_modules/@abaplint/core/build/src/rules/cds_comment_style.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_legacy_view */ \"./node_modules/@abaplint/core/build/src/rules/cds_legacy_view.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_parser_error */ \"./node_modules/@abaplint/core/build/src/rules/cds_parser_error.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./chain_mainly_declarations */ \"./node_modules/@abaplint/core/build/src/rules/chain_mainly_declarations.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./change_if_to_case */ \"./node_modules/@abaplint/core/build/src/rules/change_if_to_case.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./check_abstract */ \"./node_modules/@abaplint/core/build/src/rules/check_abstract.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./check_comments */ \"./node_modules/@abaplint/core/build/src/rules/check_comments.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./check_ddic */ \"./node_modules/@abaplint/core/build/src/rules/check_ddic.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./check_include */ \"./node_modules/@abaplint/core/build/src/rules/check_include.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./check_subrc */ \"./node_modules/@abaplint/core/build/src/rules/check_subrc.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./check_syntax */ \"./node_modules/@abaplint/core/build/src/rules/check_syntax.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./check_text_elements */ \"./node_modules/@abaplint/core/build/src/rules/check_text_elements.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./check_transformation_exists */ \"./node_modules/@abaplint/core/build/src/rules/check_transformation_exists.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./class_attribute_names */ \"./node_modules/@abaplint/core/build/src/rules/class_attribute_names.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./classic_exceptions_overlap */ \"./node_modules/@abaplint/core/build/src/rules/classic_exceptions_overlap.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cloud_types */ \"./node_modules/@abaplint/core/build/src/rules/cloud_types.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./colon_missing_space */ \"./node_modules/@abaplint/core/build/src/rules/colon_missing_space.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./commented_code */ \"./node_modules/@abaplint/core/build/src/rules/commented_code.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./constant_classes */ \"./node_modules/@abaplint/core/build/src/rules/constant_classes.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./constructor_visibility_public */ \"./node_modules/@abaplint/core/build/src/rules/constructor_visibility_public.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./contains_tab */ \"./node_modules/@abaplint/core/build/src/rules/contains_tab.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cyclic_oo */ \"./node_modules/@abaplint/core/build/src/rules/cyclic_oo.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cyclomatic_complexity */ \"./node_modules/@abaplint/core/build/src/rules/cyclomatic_complexity.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./dangerous_statement */ \"./node_modules/@abaplint/core/build/src/rules/dangerous_statement.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./db_operation_in_loop */ \"./node_modules/@abaplint/core/build/src/rules/db_operation_in_loop.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./definitions_top */ \"./node_modules/@abaplint/core/build/src/rules/definitions_top.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./description_empty */ \"./node_modules/@abaplint/core/build/src/rules/description_empty.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./double_space */ \"./node_modules/@abaplint/core/build/src/rules/double_space.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./downport */ \"./node_modules/@abaplint/core/build/src/rules/downport.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./empty_line_in_statement */ \"./node_modules/@abaplint/core/build/src/rules/empty_line_in_statement.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./empty_statement */ \"./node_modules/@abaplint/core/build/src/rules/empty_statement.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./empty_structure */ \"./node_modules/@abaplint/core/build/src/rules/empty_structure.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./exit_or_check */ \"./node_modules/@abaplint/core/build/src/rules/exit_or_check.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./exporting */ \"./node_modules/@abaplint/core/build/src/rules/exporting.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./forbidden_identifier */ \"./node_modules/@abaplint/core/build/src/rules/forbidden_identifier.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./forbidden_pseudo_and_pragma */ \"./node_modules/@abaplint/core/build/src/rules/forbidden_pseudo_and_pragma.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./forbidden_void_type */ \"./node_modules/@abaplint/core/build/src/rules/forbidden_void_type.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./form_tables_obsolete */ \"./node_modules/@abaplint/core/build/src/rules/form_tables_obsolete.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./fully_type_constants */ \"./node_modules/@abaplint/core/build/src/rules/fully_type_constants.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./function_module_recommendations */ \"./node_modules/@abaplint/core/build/src/rules/function_module_recommendations.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./functional_writing */ \"./node_modules/@abaplint/core/build/src/rules/functional_writing.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./global_class */ \"./node_modules/@abaplint/core/build/src/rules/global_class.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./identical_conditions */ \"./node_modules/@abaplint/core/build/src/rules/identical_conditions.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./identical_contents */ \"./node_modules/@abaplint/core/build/src/rules/identical_contents.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./identical_descriptions */ \"./node_modules/@abaplint/core/build/src/rules/identical_descriptions.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./identical_form_names */ \"./node_modules/@abaplint/core/build/src/rules/identical_form_names.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./if_in_if */ \"./node_modules/@abaplint/core/build/src/rules/if_in_if.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./implement_methods */ \"./node_modules/@abaplint/core/build/src/rules/implement_methods.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./in_statement_indentation */ \"./node_modules/@abaplint/core/build/src/rules/in_statement_indentation.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./indentation */ \"./node_modules/@abaplint/core/build/src/rules/indentation.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./inline_data_old_versions */ \"./node_modules/@abaplint/core/build/src/rules/inline_data_old_versions.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./intf_referencing_clas */ \"./node_modules/@abaplint/core/build/src/rules/intf_referencing_clas.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./keep_single_parameter_on_one_line */ \"./node_modules/@abaplint/core/build/src/rules/keep_single_parameter_on_one_line.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./keyword_case */ \"./node_modules/@abaplint/core/build/src/rules/keyword_case.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./line_break_multiple_parameters */ \"./node_modules/@abaplint/core/build/src/rules/line_break_multiple_parameters.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./line_break_style */ \"./node_modules/@abaplint/core/build/src/rules/line_break_style.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./line_length */ \"./node_modules/@abaplint/core/build/src/rules/line_length.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./line_only_punc */ \"./node_modules/@abaplint/core/build/src/rules/line_only_punc.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./local_class_naming */ \"./node_modules/@abaplint/core/build/src/rules/local_class_naming.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./local_testclass_consistency */ \"./node_modules/@abaplint/core/build/src/rules/local_testclass_consistency.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./local_variable_names */ \"./node_modules/@abaplint/core/build/src/rules/local_variable_names.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./main_file_contents */ \"./node_modules/@abaplint/core/build/src/rules/main_file_contents.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./many_parentheses */ \"./node_modules/@abaplint/core/build/src/rules/many_parentheses.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./max_one_method_parameter_per_line */ \"./node_modules/@abaplint/core/build/src/rules/max_one_method_parameter_per_line.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./max_one_statement */ \"./node_modules/@abaplint/core/build/src/rules/max_one_statement.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./message_exists */ \"./node_modules/@abaplint/core/build/src/rules/message_exists.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./method_implemented_twice */ \"./node_modules/@abaplint/core/build/src/rules/method_implemented_twice.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./method_length */ \"./node_modules/@abaplint/core/build/src/rules/method_length.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./method_overwrites_builtin */ \"./node_modules/@abaplint/core/build/src/rules/method_overwrites_builtin.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./method_parameter_names */ \"./node_modules/@abaplint/core/build/src/rules/method_parameter_names.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./mix_returning */ \"./node_modules/@abaplint/core/build/src/rules/mix_returning.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./modify_only_own_db_tables */ \"./node_modules/@abaplint/core/build/src/rules/modify_only_own_db_tables.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./msag_consistency */ \"./node_modules/@abaplint/core/build/src/rules/msag_consistency.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./names_no_dash */ \"./node_modules/@abaplint/core/build/src/rules/names_no_dash.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./nesting */ \"./node_modules/@abaplint/core/build/src/rules/nesting.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./newline_between_methods */ \"./node_modules/@abaplint/core/build/src/rules/newline_between_methods.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./no_aliases */ \"./node_modules/@abaplint/core/build/src/rules/no_aliases.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./no_chained_assignment */ \"./node_modules/@abaplint/core/build/src/rules/no_chained_assignment.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./no_external_form_calls */ \"./node_modules/@abaplint/core/build/src/rules/no_external_form_calls.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./no_inline_in_optional_branches */ \"./node_modules/@abaplint/core/build/src/rules/no_inline_in_optional_branches.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./no_public_attributes */ \"./node_modules/@abaplint/core/build/src/rules/no_public_attributes.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./no_yoda_conditions */ \"./node_modules/@abaplint/core/build/src/rules/no_yoda_conditions.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./nrob_consistency */ \"./node_modules/@abaplint/core/build/src/rules/nrob_consistency.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./object_naming */ \"./node_modules/@abaplint/core/build/src/rules/object_naming.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./obsolete_statement */ \"./node_modules/@abaplint/core/build/src/rules/obsolete_statement.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./omit_parameter_name */ \"./node_modules/@abaplint/core/build/src/rules/omit_parameter_name.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./omit_preceding_zeros */ \"./node_modules/@abaplint/core/build/src/rules/omit_preceding_zeros.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./omit_receiving */ \"./node_modules/@abaplint/core/build/src/rules/omit_receiving.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./parser_702_chaining */ \"./node_modules/@abaplint/core/build/src/rules/parser_702_chaining.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./parser_error */ \"./node_modules/@abaplint/core/build/src/rules/parser_error.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./parser_missing_space */ \"./node_modules/@abaplint/core/build/src/rules/parser_missing_space.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./pragma_style */ \"./node_modules/@abaplint/core/build/src/rules/pragma_style.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./prefer_corresponding */ \"./node_modules/@abaplint/core/build/src/rules/prefer_corresponding.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./prefer_inline */ \"./node_modules/@abaplint/core/build/src/rules/prefer_inline.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./prefer_is_not */ \"./node_modules/@abaplint/core/build/src/rules/prefer_is_not.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./prefer_raise_exception_new */ \"./node_modules/@abaplint/core/build/src/rules/prefer_raise_exception_new.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./prefer_returning_to_exporting */ \"./node_modules/@abaplint/core/build/src/rules/prefer_returning_to_exporting.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./prefer_xsdbool */ \"./node_modules/@abaplint/core/build/src/rules/prefer_xsdbool.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./preferred_compare_operator */ \"./node_modules/@abaplint/core/build/src/rules/preferred_compare_operator.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./prefix_is_current_class */ \"./node_modules/@abaplint/core/build/src/rules/prefix_is_current_class.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./reduce_string_templates */ \"./node_modules/@abaplint/core/build/src/rules/reduce_string_templates.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./release_idoc */ \"./node_modules/@abaplint/core/build/src/rules/release_idoc.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./remove_descriptions */ \"./node_modules/@abaplint/core/build/src/rules/remove_descriptions.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./rfc_error_handling */ \"./node_modules/@abaplint/core/build/src/rules/rfc_error_handling.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./select_add_order_by */ \"./node_modules/@abaplint/core/build/src/rules/select_add_order_by.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./select_performance */ \"./node_modules/@abaplint/core/build/src/rules/select_performance.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./selection_screen_naming */ \"./node_modules/@abaplint/core/build/src/rules/selection_screen_naming.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./sequential_blank */ \"./node_modules/@abaplint/core/build/src/rules/sequential_blank.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./short_case */ \"./node_modules/@abaplint/core/build/src/rules/short_case.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./sicf_consistency */ \"./node_modules/@abaplint/core/build/src/rules/sicf_consistency.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./slow_parameter_passing */ \"./node_modules/@abaplint/core/build/src/rules/slow_parameter_passing.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./space_before_colon */ \"./node_modules/@abaplint/core/build/src/rules/space_before_colon.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./space_before_dot */ \"./node_modules/@abaplint/core/build/src/rules/space_before_dot.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./sql_escape_host_variables */ \"./node_modules/@abaplint/core/build/src/rules/sql_escape_host_variables.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./start_at_tab */ \"./node_modules/@abaplint/core/build/src/rules/start_at_tab.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./static_call_via_instance */ \"./node_modules/@abaplint/core/build/src/rules/static_call_via_instance.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./superclass_final */ \"./node_modules/@abaplint/core/build/src/rules/superclass_final.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./superfluous_value */ \"./node_modules/@abaplint/core/build/src/rules/superfluous_value.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./sy_modification */ \"./node_modules/@abaplint/core/build/src/rules/sy_modification.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./tabl_enhancement_category */ \"./node_modules/@abaplint/core/build/src/rules/tabl_enhancement_category.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./try_without_catch */ \"./node_modules/@abaplint/core/build/src/rules/try_without_catch.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./type_form_parameters */ \"./node_modules/@abaplint/core/build/src/rules/type_form_parameters.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./types_naming */ \"./node_modules/@abaplint/core/build/src/rules/types_naming.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./uncaught_exception */ \"./node_modules/@abaplint/core/build/src/rules/uncaught_exception.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./unknown_types */ \"./node_modules/@abaplint/core/build/src/rules/unknown_types.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./unnecessary_chaining */ \"./node_modules/@abaplint/core/build/src/rules/unnecessary_chaining.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./unnecessary_pragma */ \"./node_modules/@abaplint/core/build/src/rules/unnecessary_pragma.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./unreachable_code */ \"./node_modules/@abaplint/core/build/src/rules/unreachable_code.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./unsecure_fae */ \"./node_modules/@abaplint/core/build/src/rules/unsecure_fae.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./unused_ddic */ \"./node_modules/@abaplint/core/build/src/rules/unused_ddic.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./unused_methods */ \"./node_modules/@abaplint/core/build/src/rules/unused_methods.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./unused_types */ \"./node_modules/@abaplint/core/build/src/rules/unused_types.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./unused_variables */ \"./node_modules/@abaplint/core/build/src/rules/unused_variables.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./use_bool_expression */ \"./node_modules/@abaplint/core/build/src/rules/use_bool_expression.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./use_class_based_exceptions */ \"./node_modules/@abaplint/core/build/src/rules/use_class_based_exceptions.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./use_line_exists */ \"./node_modules/@abaplint/core/build/src/rules/use_line_exists.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./use_new */ \"./node_modules/@abaplint/core/build/src/rules/use_new.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./when_others_last */ \"./node_modules/@abaplint/core/build/src/rules/when_others_last.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./whitespace_end */ \"./node_modules/@abaplint/core/build/src/rules/whitespace_end.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./xml_consistency */ \"./node_modules/@abaplint/core/build/src/rules/xml_consistency.js\"), exports);\r\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://@abaplint/transpiler-cli/./node_modules/@abaplint/core/build/src/rules/index.js?");
12262
+ eval("\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\r\n};\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n__exportStar(__webpack_require__(/*! ./7bit_ascii */ \"./node_modules/@abaplint/core/build/src/rules/7bit_ascii.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./abapdoc */ \"./node_modules/@abaplint/core/build/src/rules/abapdoc.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./align_parameters */ \"./node_modules/@abaplint/core/build/src/rules/align_parameters.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./allowed_object_naming */ \"./node_modules/@abaplint/core/build/src/rules/allowed_object_naming.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./allowed_object_types */ \"./node_modules/@abaplint/core/build/src/rules/allowed_object_types.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./ambiguous_statement */ \"./node_modules/@abaplint/core/build/src/rules/ambiguous_statement.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./avoid_use */ \"./node_modules/@abaplint/core/build/src/rules/avoid_use.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./begin_end_names */ \"./node_modules/@abaplint/core/build/src/rules/begin_end_names.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./begin_single_include */ \"./node_modules/@abaplint/core/build/src/rules/begin_single_include.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./call_transaction_authority_check */ \"./node_modules/@abaplint/core/build/src/rules/call_transaction_authority_check.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_comment_style */ \"./node_modules/@abaplint/core/build/src/rules/cds_comment_style.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_legacy_view */ \"./node_modules/@abaplint/core/build/src/rules/cds_legacy_view.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_parser_error */ \"./node_modules/@abaplint/core/build/src/rules/cds_parser_error.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./chain_mainly_declarations */ \"./node_modules/@abaplint/core/build/src/rules/chain_mainly_declarations.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./change_if_to_case */ \"./node_modules/@abaplint/core/build/src/rules/change_if_to_case.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./check_abstract */ \"./node_modules/@abaplint/core/build/src/rules/check_abstract.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./check_comments */ \"./node_modules/@abaplint/core/build/src/rules/check_comments.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./check_ddic */ \"./node_modules/@abaplint/core/build/src/rules/check_ddic.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./check_include */ \"./node_modules/@abaplint/core/build/src/rules/check_include.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./check_subrc */ \"./node_modules/@abaplint/core/build/src/rules/check_subrc.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./check_syntax */ \"./node_modules/@abaplint/core/build/src/rules/check_syntax.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./check_text_elements */ \"./node_modules/@abaplint/core/build/src/rules/check_text_elements.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./check_transformation_exists */ \"./node_modules/@abaplint/core/build/src/rules/check_transformation_exists.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./class_attribute_names */ \"./node_modules/@abaplint/core/build/src/rules/class_attribute_names.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./classic_exceptions_overlap */ \"./node_modules/@abaplint/core/build/src/rules/classic_exceptions_overlap.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cloud_types */ \"./node_modules/@abaplint/core/build/src/rules/cloud_types.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./colon_missing_space */ \"./node_modules/@abaplint/core/build/src/rules/colon_missing_space.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./commented_code */ \"./node_modules/@abaplint/core/build/src/rules/commented_code.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./constant_classes */ \"./node_modules/@abaplint/core/build/src/rules/constant_classes.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./constructor_visibility_public */ \"./node_modules/@abaplint/core/build/src/rules/constructor_visibility_public.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./contains_tab */ \"./node_modules/@abaplint/core/build/src/rules/contains_tab.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cyclic_oo */ \"./node_modules/@abaplint/core/build/src/rules/cyclic_oo.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cyclomatic_complexity */ \"./node_modules/@abaplint/core/build/src/rules/cyclomatic_complexity.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./dangerous_statement */ \"./node_modules/@abaplint/core/build/src/rules/dangerous_statement.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./db_operation_in_loop */ \"./node_modules/@abaplint/core/build/src/rules/db_operation_in_loop.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./definitions_top */ \"./node_modules/@abaplint/core/build/src/rules/definitions_top.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./description_empty */ \"./node_modules/@abaplint/core/build/src/rules/description_empty.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./double_space */ \"./node_modules/@abaplint/core/build/src/rules/double_space.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./downport */ \"./node_modules/@abaplint/core/build/src/rules/downport.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./empty_line_in_statement */ \"./node_modules/@abaplint/core/build/src/rules/empty_line_in_statement.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./empty_statement */ \"./node_modules/@abaplint/core/build/src/rules/empty_statement.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./empty_structure */ \"./node_modules/@abaplint/core/build/src/rules/empty_structure.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./exit_or_check */ \"./node_modules/@abaplint/core/build/src/rules/exit_or_check.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./exporting */ \"./node_modules/@abaplint/core/build/src/rules/exporting.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./forbidden_identifier */ \"./node_modules/@abaplint/core/build/src/rules/forbidden_identifier.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./forbidden_pseudo_and_pragma */ \"./node_modules/@abaplint/core/build/src/rules/forbidden_pseudo_and_pragma.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./forbidden_void_type */ \"./node_modules/@abaplint/core/build/src/rules/forbidden_void_type.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./form_tables_obsolete */ \"./node_modules/@abaplint/core/build/src/rules/form_tables_obsolete.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./fully_type_constants */ \"./node_modules/@abaplint/core/build/src/rules/fully_type_constants.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./function_module_recommendations */ \"./node_modules/@abaplint/core/build/src/rules/function_module_recommendations.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./functional_writing */ \"./node_modules/@abaplint/core/build/src/rules/functional_writing.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./global_class */ \"./node_modules/@abaplint/core/build/src/rules/global_class.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./identical_conditions */ \"./node_modules/@abaplint/core/build/src/rules/identical_conditions.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./identical_contents */ \"./node_modules/@abaplint/core/build/src/rules/identical_contents.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./identical_descriptions */ \"./node_modules/@abaplint/core/build/src/rules/identical_descriptions.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./identical_form_names */ \"./node_modules/@abaplint/core/build/src/rules/identical_form_names.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./if_in_if */ \"./node_modules/@abaplint/core/build/src/rules/if_in_if.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./implement_methods */ \"./node_modules/@abaplint/core/build/src/rules/implement_methods.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./in_statement_indentation */ \"./node_modules/@abaplint/core/build/src/rules/in_statement_indentation.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./indentation */ \"./node_modules/@abaplint/core/build/src/rules/indentation.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./inline_data_old_versions */ \"./node_modules/@abaplint/core/build/src/rules/inline_data_old_versions.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./intf_referencing_clas */ \"./node_modules/@abaplint/core/build/src/rules/intf_referencing_clas.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./keep_single_parameter_on_one_line */ \"./node_modules/@abaplint/core/build/src/rules/keep_single_parameter_on_one_line.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./keyword_case */ \"./node_modules/@abaplint/core/build/src/rules/keyword_case.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./line_break_multiple_parameters */ \"./node_modules/@abaplint/core/build/src/rules/line_break_multiple_parameters.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./line_break_style */ \"./node_modules/@abaplint/core/build/src/rules/line_break_style.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./line_length */ \"./node_modules/@abaplint/core/build/src/rules/line_length.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./line_only_punc */ \"./node_modules/@abaplint/core/build/src/rules/line_only_punc.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./local_class_naming */ \"./node_modules/@abaplint/core/build/src/rules/local_class_naming.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./local_testclass_consistency */ \"./node_modules/@abaplint/core/build/src/rules/local_testclass_consistency.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./local_variable_names */ \"./node_modules/@abaplint/core/build/src/rules/local_variable_names.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./main_file_contents */ \"./node_modules/@abaplint/core/build/src/rules/main_file_contents.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./many_parentheses */ \"./node_modules/@abaplint/core/build/src/rules/many_parentheses.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./max_one_method_parameter_per_line */ \"./node_modules/@abaplint/core/build/src/rules/max_one_method_parameter_per_line.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./max_one_statement */ \"./node_modules/@abaplint/core/build/src/rules/max_one_statement.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./message_exists */ \"./node_modules/@abaplint/core/build/src/rules/message_exists.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./method_implemented_twice */ \"./node_modules/@abaplint/core/build/src/rules/method_implemented_twice.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./method_length */ \"./node_modules/@abaplint/core/build/src/rules/method_length.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./method_overwrites_builtin */ \"./node_modules/@abaplint/core/build/src/rules/method_overwrites_builtin.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./method_parameter_names */ \"./node_modules/@abaplint/core/build/src/rules/method_parameter_names.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./mix_returning */ \"./node_modules/@abaplint/core/build/src/rules/mix_returning.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./modify_only_own_db_tables */ \"./node_modules/@abaplint/core/build/src/rules/modify_only_own_db_tables.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./msag_consistency */ \"./node_modules/@abaplint/core/build/src/rules/msag_consistency.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./names_no_dash */ \"./node_modules/@abaplint/core/build/src/rules/names_no_dash.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./nesting */ \"./node_modules/@abaplint/core/build/src/rules/nesting.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./newline_between_methods */ \"./node_modules/@abaplint/core/build/src/rules/newline_between_methods.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./no_aliases */ \"./node_modules/@abaplint/core/build/src/rules/no_aliases.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./no_chained_assignment */ \"./node_modules/@abaplint/core/build/src/rules/no_chained_assignment.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./no_external_form_calls */ \"./node_modules/@abaplint/core/build/src/rules/no_external_form_calls.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./no_inline_in_optional_branches */ \"./node_modules/@abaplint/core/build/src/rules/no_inline_in_optional_branches.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./no_public_attributes */ \"./node_modules/@abaplint/core/build/src/rules/no_public_attributes.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./no_yoda_conditions */ \"./node_modules/@abaplint/core/build/src/rules/no_yoda_conditions.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./nrob_consistency */ \"./node_modules/@abaplint/core/build/src/rules/nrob_consistency.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./object_naming */ \"./node_modules/@abaplint/core/build/src/rules/object_naming.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./obsolete_statement */ \"./node_modules/@abaplint/core/build/src/rules/obsolete_statement.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./omit_parameter_name */ \"./node_modules/@abaplint/core/build/src/rules/omit_parameter_name.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./omit_preceding_zeros */ \"./node_modules/@abaplint/core/build/src/rules/omit_preceding_zeros.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./omit_receiving */ \"./node_modules/@abaplint/core/build/src/rules/omit_receiving.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./parser_702_chaining */ \"./node_modules/@abaplint/core/build/src/rules/parser_702_chaining.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./parser_error */ \"./node_modules/@abaplint/core/build/src/rules/parser_error.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./parser_missing_space */ \"./node_modules/@abaplint/core/build/src/rules/parser_missing_space.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./pragma_style */ \"./node_modules/@abaplint/core/build/src/rules/pragma_style.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./prefer_corresponding */ \"./node_modules/@abaplint/core/build/src/rules/prefer_corresponding.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./prefer_inline */ \"./node_modules/@abaplint/core/build/src/rules/prefer_inline.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./prefer_is_not */ \"./node_modules/@abaplint/core/build/src/rules/prefer_is_not.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./prefer_raise_exception_new */ \"./node_modules/@abaplint/core/build/src/rules/prefer_raise_exception_new.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./prefer_returning_to_exporting */ \"./node_modules/@abaplint/core/build/src/rules/prefer_returning_to_exporting.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./prefer_xsdbool */ \"./node_modules/@abaplint/core/build/src/rules/prefer_xsdbool.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./preferred_compare_operator */ \"./node_modules/@abaplint/core/build/src/rules/preferred_compare_operator.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./prefix_is_current_class */ \"./node_modules/@abaplint/core/build/src/rules/prefix_is_current_class.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./reduce_string_templates */ \"./node_modules/@abaplint/core/build/src/rules/reduce_string_templates.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./release_idoc */ \"./node_modules/@abaplint/core/build/src/rules/release_idoc.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./remove_descriptions */ \"./node_modules/@abaplint/core/build/src/rules/remove_descriptions.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./rfc_error_handling */ \"./node_modules/@abaplint/core/build/src/rules/rfc_error_handling.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./select_add_order_by */ \"./node_modules/@abaplint/core/build/src/rules/select_add_order_by.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./select_performance */ \"./node_modules/@abaplint/core/build/src/rules/select_performance.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./selection_screen_naming */ \"./node_modules/@abaplint/core/build/src/rules/selection_screen_naming.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./sequential_blank */ \"./node_modules/@abaplint/core/build/src/rules/sequential_blank.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./short_case */ \"./node_modules/@abaplint/core/build/src/rules/short_case.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./sicf_consistency */ \"./node_modules/@abaplint/core/build/src/rules/sicf_consistency.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./slow_parameter_passing */ \"./node_modules/@abaplint/core/build/src/rules/slow_parameter_passing.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./space_before_colon */ \"./node_modules/@abaplint/core/build/src/rules/space_before_colon.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./space_before_dot */ \"./node_modules/@abaplint/core/build/src/rules/space_before_dot.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./sql_escape_host_variables */ \"./node_modules/@abaplint/core/build/src/rules/sql_escape_host_variables.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./start_at_tab */ \"./node_modules/@abaplint/core/build/src/rules/start_at_tab.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./static_call_via_instance */ \"./node_modules/@abaplint/core/build/src/rules/static_call_via_instance.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./superclass_final */ \"./node_modules/@abaplint/core/build/src/rules/superclass_final.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./superfluous_value */ \"./node_modules/@abaplint/core/build/src/rules/superfluous_value.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./sy_modification */ \"./node_modules/@abaplint/core/build/src/rules/sy_modification.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./tabl_enhancement_category */ \"./node_modules/@abaplint/core/build/src/rules/tabl_enhancement_category.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./try_without_catch */ \"./node_modules/@abaplint/core/build/src/rules/try_without_catch.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./type_form_parameters */ \"./node_modules/@abaplint/core/build/src/rules/type_form_parameters.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./types_naming */ \"./node_modules/@abaplint/core/build/src/rules/types_naming.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./uncaught_exception */ \"./node_modules/@abaplint/core/build/src/rules/uncaught_exception.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./unknown_types */ \"./node_modules/@abaplint/core/build/src/rules/unknown_types.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./unnecessary_chaining */ \"./node_modules/@abaplint/core/build/src/rules/unnecessary_chaining.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./unnecessary_pragma */ \"./node_modules/@abaplint/core/build/src/rules/unnecessary_pragma.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./unnecessary_return */ \"./node_modules/@abaplint/core/build/src/rules/unnecessary_return.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./unreachable_code */ \"./node_modules/@abaplint/core/build/src/rules/unreachable_code.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./unsecure_fae */ \"./node_modules/@abaplint/core/build/src/rules/unsecure_fae.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./unused_ddic */ \"./node_modules/@abaplint/core/build/src/rules/unused_ddic.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./unused_methods */ \"./node_modules/@abaplint/core/build/src/rules/unused_methods.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./unused_types */ \"./node_modules/@abaplint/core/build/src/rules/unused_types.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./unused_variables */ \"./node_modules/@abaplint/core/build/src/rules/unused_variables.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./use_bool_expression */ \"./node_modules/@abaplint/core/build/src/rules/use_bool_expression.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./use_class_based_exceptions */ \"./node_modules/@abaplint/core/build/src/rules/use_class_based_exceptions.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./use_line_exists */ \"./node_modules/@abaplint/core/build/src/rules/use_line_exists.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./use_new */ \"./node_modules/@abaplint/core/build/src/rules/use_new.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./when_others_last */ \"./node_modules/@abaplint/core/build/src/rules/when_others_last.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./whitespace_end */ \"./node_modules/@abaplint/core/build/src/rules/whitespace_end.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./xml_consistency */ \"./node_modules/@abaplint/core/build/src/rules/xml_consistency.js\"), exports);\r\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://@abaplint/transpiler-cli/./node_modules/@abaplint/core/build/src/rules/index.js?");
12263
12263
 
12264
12264
  /***/ }),
12265
12265
 
@@ -13110,6 +13110,17 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
13110
13110
 
13111
13111
  /***/ }),
13112
13112
 
13113
+ /***/ "./node_modules/@abaplint/core/build/src/rules/unnecessary_return.js":
13114
+ /*!***************************************************************************!*\
13115
+ !*** ./node_modules/@abaplint/core/build/src/rules/unnecessary_return.js ***!
13116
+ \***************************************************************************/
13117
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
13118
+
13119
+ "use strict";
13120
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.UnnecessaryReturn = exports.UnnecessaryReturnConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nconst Statements = __webpack_require__(/*! ../abap/2_statements/statements */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js\");\r\nconst edit_helper_1 = __webpack_require__(/*! ../edit_helper */ \"./node_modules/@abaplint/core/build/src/edit_helper.js\");\r\nclass UnnecessaryReturnConf extends _basic_rule_config_1.BasicRuleConfig {\r\n}\r\nexports.UnnecessaryReturnConf = UnnecessaryReturnConf;\r\nclass UnnecessaryReturn extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new UnnecessaryReturnConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"unnecessary_return\",\r\n title: \"Unnecessary Return\",\r\n shortDescription: `Finds unnecessary RETURN statements`,\r\n extendedInformation: `Finds unnecessary RETURN statements`,\r\n tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],\r\n badExample: `METHOD hello.\r\n ...\r\n RETURN.\r\nENDMETHOD.`,\r\n goodExample: `METHOD hello.\r\n ...\r\nENDMETHOD.`,\r\n };\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n runParsed(file) {\r\n const issues = [];\r\n const structure = file.getStructure();\r\n if (structure === undefined) {\r\n return [];\r\n }\r\n const statements = file.getStatements();\r\n for (let i = 0; i < statements.length - 1; i++) {\r\n const node = statements[i];\r\n const next = statements[i + 1];\r\n if (node.get() instanceof Statements.Return\r\n && (next.get() instanceof Statements.EndMethod\r\n || next.get() instanceof Statements.EndForm\r\n || next.get() instanceof Statements.EndFunction)) {\r\n const message = \"Unnecessary RETURN\";\r\n const fix = edit_helper_1.EditHelper.deleteStatement(file, node);\r\n issues.push(issue_1.Issue.atStatement(file, node, message, this.getMetadata().key, this.getConfig().severity, fix));\r\n }\r\n }\r\n return issues;\r\n }\r\n}\r\nexports.UnnecessaryReturn = UnnecessaryReturn;\r\n//# sourceMappingURL=unnecessary_return.js.map\n\n//# sourceURL=webpack://@abaplint/transpiler-cli/./node_modules/@abaplint/core/build/src/rules/unnecessary_return.js?");
13121
+
13122
+ /***/ }),
13123
+
13113
13124
  /***/ "./node_modules/@abaplint/core/build/src/rules/unreachable_code.js":
13114
13125
  /*!*************************************************************************!*\
13115
13126
  !*** ./node_modules/@abaplint/core/build/src/rules/unreachable_code.js ***!
@@ -13469,7 +13480,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
13469
13480
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
13470
13481
 
13471
13482
  "use strict";
13472
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.CompareTranspiler = void 0;\r\nconst core_1 = __webpack_require__(/*! @abaplint/core */ \"./node_modules/@abaplint/core/build/src/index.js\");\r\nconst chunk_1 = __webpack_require__(/*! ../chunk */ \"./node_modules/@abaplint/transpiler/build/src/chunk.js\");\r\nclass CompareTranspiler {\r\n transpile(node, traversal) {\r\n // todo, this is not correct\r\n var _a, _b;\r\n const concat = node.concatTokens().toUpperCase();\r\n let pre = concat.startsWith(\"NOT \") ? \"!\" : \"\";\r\n const sources = node.findDirectExpressions(core_1.Expressions.Source).concat(node.findDirectExpressions(core_1.Expressions.SourceFieldSymbol));\r\n if (sources.length === 1) {\r\n const s0 = traversal.traverse(sources[0]);\r\n if ((concat.startsWith(\"NOT \") && concat.endsWith(\" IS INITIAL\"))\r\n || concat.endsWith(\"IS NOT INITIAL\")) {\r\n return new chunk_1.Chunk().appendString(\"abap.compare.initial(\").appendChunk(s0).appendString(\") === false\");\r\n }\r\n else if (concat.endsWith(\"IS INITIAL\")) {\r\n return new chunk_1.Chunk().appendString(\"abap.compare.initial(\").appendChunk(s0).appendString(\")\");\r\n }\r\n if ((concat.startsWith(\"NOT \") && concat.endsWith(\" IS BOUND\"))\r\n || concat.endsWith(\"IS NOT BOUND\")) {\r\n return new chunk_1.Chunk().appendString(\"abap.compare.initial(\").appendChunk(s0).appendString(\")\");\r\n }\r\n else if (concat.endsWith(\"IS BOUND\")) {\r\n return new chunk_1.Chunk().appendString(\"abap.compare.initial(\").appendChunk(s0).appendString(\") === false\");\r\n }\r\n if ((concat.startsWith(\"NOT \") && concat.endsWith(\" IS ASSIGNED\"))\r\n || concat.endsWith(\"IS NOT ASSIGNED\")) {\r\n return new chunk_1.Chunk().appendString(\"abap.compare.assigned(\").appendChunk(s0).appendString(\") === false\");\r\n }\r\n else if (concat.endsWith(\"IS ASSIGNED\")) {\r\n return new chunk_1.Chunk().appendString(\"abap.compare.assigned(\").appendChunk(s0).appendString(\")\");\r\n }\r\n if (concat.endsWith(\" IS SUPPLIED\")) {\r\n return new chunk_1.Chunk().appendString(pre + \"INPUT && INPUT.\" + concat.replace(\" IS SUPPLIED\", \"\").toLowerCase());\r\n }\r\n else if (concat.endsWith(\" IS NOT SUPPLIED\")) {\r\n return new chunk_1.Chunk().appendString(pre + \"INPUT && INPUT.\" + concat.replace(\" IS NOT SUPPLIED\", \"\").toLowerCase() + \" === undefined\");\r\n }\r\n if (concat.endsWith(\" IS REQUESTED\")) {\r\n return new chunk_1.Chunk().appendString(pre + \"INPUT && INPUT.\" + concat.replace(\" IS REQUESTED\", \"\").toLowerCase());\r\n }\r\n else if (concat.endsWith(\" IS NOT REQUESTED\")) {\r\n return new chunk_1.Chunk().appendString(pre + \"INPUT && INPUT.\" + concat.replace(\" IS NOT REQUESTED\", \"\").toLowerCase() + \" === undefined\");\r\n }\r\n if (concat.startsWith(\"NOT \") || concat.includes(\" IS NOT INSTANCE OF \")) {\r\n const cname = (_a = node.findDirectExpression(core_1.Expressions.ClassName)) === null || _a === void 0 ? void 0 : _a.concatTokens();\r\n return new chunk_1.Chunk().appendString(\"abap.compare.instance_of(\").appendChunk(s0).appendString(`, ${cname}) === false`);\r\n }\r\n else if (concat.includes(\" IS INSTANCE OF \")) {\r\n const cname = (_b = node.findDirectExpression(core_1.Expressions.ClassName)) === null || _b === void 0 ? void 0 : _b.concatTokens();\r\n return new chunk_1.Chunk().appendString(\"abap.compare.instance_of(\").appendChunk(s0).appendString(`, ${cname})`);\r\n }\r\n }\r\n else if (sources.length === 2 && node.findDirectTokenByText(\"IN\")) {\r\n if (concat.search(\" NOT IN \") >= 0) {\r\n pre = pre === \"!\" ? \"\" : \"!\";\r\n }\r\n const s0 = traversal.traverse(sources[0]);\r\n const s1 = traversal.traverse(sources[1]);\r\n return new chunk_1.Chunk().appendString(pre + \"abap.compare.in(\").join([s0, s1]).appendString(\")\");\r\n }\r\n else if (sources.length === 2) {\r\n const operator = traversal.traverse(node.findFirstExpression(core_1.Expressions.CompareOperator));\r\n const s0 = traversal.traverse(sources[0]);\r\n const s1 = traversal.traverse(sources[1]);\r\n return new chunk_1.Chunk().appendString(pre + \"abap.compare.\").appendChunk(operator).appendString(\"(\").join([s0, s1]).appendString(\")\");\r\n }\r\n else if (sources.length === 3 && node.findDirectTokenByText(\"BETWEEN\")) {\r\n if (concat.search(\" NOT BETWEEN \") >= 0) {\r\n pre = pre === \"!\" ? \"\" : \"!\";\r\n }\r\n const s0 = traversal.traverse(sources[0]);\r\n const s1 = traversal.traverse(sources[1]);\r\n const s2 = traversal.traverse(sources[2]);\r\n return new chunk_1.Chunk().appendString(pre + \"abap.compare.between(\").join([s0, s1, s2]).appendString(\")\");\r\n }\r\n console.dir(sources.length);\r\n console.dir(concat);\r\n return new chunk_1.Chunk(\"CompareTodo\");\r\n }\r\n}\r\nexports.CompareTranspiler = CompareTranspiler;\r\n//# sourceMappingURL=compare.js.map\n\n//# sourceURL=webpack://@abaplint/transpiler-cli/./node_modules/@abaplint/transpiler/build/src/expressions/compare.js?");
13483
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.CompareTranspiler = void 0;\r\nconst core_1 = __webpack_require__(/*! @abaplint/core */ \"./node_modules/@abaplint/core/build/src/index.js\");\r\nconst chunk_1 = __webpack_require__(/*! ../chunk */ \"./node_modules/@abaplint/transpiler/build/src/chunk.js\");\r\nclass CompareTranspiler {\r\n transpile(node, traversal) {\r\n // todo, this is not correct\r\n var _a, _b;\r\n const concat = node.concatTokens().toUpperCase();\r\n let pre = concat.startsWith(\"NOT \") ? \"!\" : \"\";\r\n const sources = node.findDirectExpressions(core_1.Expressions.Source).concat(node.findDirectExpressions(core_1.Expressions.SourceFieldSymbol));\r\n if (sources.length === 1) {\r\n const s0 = traversal.traverse(sources[0]);\r\n if (concat.startsWith(\"NOT \") && concat.endsWith(\" IS NOT INITIAL\")) {\r\n return new chunk_1.Chunk().appendString(\"abap.compare.initial(\").appendChunk(s0).appendString(\") === true\");\r\n }\r\n else if ((concat.startsWith(\"NOT \") && concat.endsWith(\" IS INITIAL\"))\r\n || concat.endsWith(\" IS NOT INITIAL\")) {\r\n return new chunk_1.Chunk().appendString(\"abap.compare.initial(\").appendChunk(s0).appendString(\") === false\");\r\n }\r\n else if (concat.endsWith(\" IS INITIAL\")) {\r\n return new chunk_1.Chunk().appendString(\"abap.compare.initial(\").appendChunk(s0).appendString(\")\");\r\n }\r\n if ((concat.startsWith(\"NOT \") && concat.endsWith(\" IS BOUND\"))\r\n || concat.endsWith(\"IS NOT BOUND\")) {\r\n return new chunk_1.Chunk().appendString(\"abap.compare.initial(\").appendChunk(s0).appendString(\")\");\r\n }\r\n else if (concat.endsWith(\"IS BOUND\")) {\r\n return new chunk_1.Chunk().appendString(\"abap.compare.initial(\").appendChunk(s0).appendString(\") === false\");\r\n }\r\n if ((concat.startsWith(\"NOT \") && concat.endsWith(\" IS ASSIGNED\"))\r\n || concat.endsWith(\"IS NOT ASSIGNED\")) {\r\n return new chunk_1.Chunk().appendString(\"abap.compare.assigned(\").appendChunk(s0).appendString(\") === false\");\r\n }\r\n else if (concat.endsWith(\"IS ASSIGNED\")) {\r\n return new chunk_1.Chunk().appendString(\"abap.compare.assigned(\").appendChunk(s0).appendString(\")\");\r\n }\r\n if (concat.endsWith(\" IS SUPPLIED\")) {\r\n return new chunk_1.Chunk().appendString(pre + \"INPUT && INPUT.\" + concat.replace(\" IS SUPPLIED\", \"\").toLowerCase());\r\n }\r\n else if (concat.endsWith(\" IS NOT SUPPLIED\")) {\r\n return new chunk_1.Chunk().appendString(pre + \"INPUT && INPUT.\" + concat.replace(\" IS NOT SUPPLIED\", \"\").toLowerCase() + \" === undefined\");\r\n }\r\n if (concat.endsWith(\" IS REQUESTED\")) {\r\n return new chunk_1.Chunk().appendString(pre + \"INPUT && INPUT.\" + concat.replace(\" IS REQUESTED\", \"\").toLowerCase());\r\n }\r\n else if (concat.endsWith(\" IS NOT REQUESTED\")) {\r\n return new chunk_1.Chunk().appendString(pre + \"INPUT && INPUT.\" + concat.replace(\" IS NOT REQUESTED\", \"\").toLowerCase() + \" === undefined\");\r\n }\r\n if (concat.startsWith(\"NOT \") || concat.includes(\" IS NOT INSTANCE OF \")) {\r\n const cname = (_a = node.findDirectExpression(core_1.Expressions.ClassName)) === null || _a === void 0 ? void 0 : _a.concatTokens();\r\n return new chunk_1.Chunk().appendString(\"abap.compare.instance_of(\").appendChunk(s0).appendString(`, ${cname}) === false`);\r\n }\r\n else if (concat.includes(\" IS INSTANCE OF \")) {\r\n const cname = (_b = node.findDirectExpression(core_1.Expressions.ClassName)) === null || _b === void 0 ? void 0 : _b.concatTokens();\r\n return new chunk_1.Chunk().appendString(\"abap.compare.instance_of(\").appendChunk(s0).appendString(`, ${cname})`);\r\n }\r\n }\r\n else if (sources.length === 2 && node.findDirectTokenByText(\"IN\")) {\r\n if (concat.search(\" NOT IN \") >= 0) {\r\n pre = pre === \"!\" ? \"\" : \"!\";\r\n }\r\n const s0 = traversal.traverse(sources[0]);\r\n const s1 = traversal.traverse(sources[1]);\r\n return new chunk_1.Chunk().appendString(pre + \"abap.compare.in(\").join([s0, s1]).appendString(\")\");\r\n }\r\n else if (sources.length === 2) {\r\n const operator = traversal.traverse(node.findFirstExpression(core_1.Expressions.CompareOperator));\r\n const s0 = traversal.traverse(sources[0]);\r\n const s1 = traversal.traverse(sources[1]);\r\n return new chunk_1.Chunk().appendString(pre + \"abap.compare.\").appendChunk(operator).appendString(\"(\").join([s0, s1]).appendString(\")\");\r\n }\r\n else if (sources.length === 3 && node.findDirectTokenByText(\"BETWEEN\")) {\r\n if (concat.search(\" NOT BETWEEN \") >= 0) {\r\n pre = pre === \"!\" ? \"\" : \"!\";\r\n }\r\n const s0 = traversal.traverse(sources[0]);\r\n const s1 = traversal.traverse(sources[1]);\r\n const s2 = traversal.traverse(sources[2]);\r\n return new chunk_1.Chunk().appendString(pre + \"abap.compare.between(\").join([s0, s1, s2]).appendString(\")\");\r\n }\r\n console.dir(sources.length);\r\n console.dir(concat);\r\n return new chunk_1.Chunk(\"CompareTodo\");\r\n }\r\n}\r\nexports.CompareTranspiler = CompareTranspiler;\r\n//# sourceMappingURL=compare.js.map\n\n//# sourceURL=webpack://@abaplint/transpiler-cli/./node_modules/@abaplint/transpiler/build/src/expressions/compare.js?");
13473
13484
 
13474
13485
  /***/ }),
13475
13486
 
@@ -14921,7 +14932,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
14921
14932
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
14922
14933
 
14923
14934
  "use strict";
14924
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.MethodImplementationTranspiler = void 0;\r\nconst abaplint = __webpack_require__(/*! @abaplint/core */ \"./node_modules/@abaplint/core/build/src/index.js\");\r\nconst transpile_types_1 = __webpack_require__(/*! ../transpile_types */ \"./node_modules/@abaplint/transpiler/build/src/transpile_types.js\");\r\nconst traversal_1 = __webpack_require__(/*! ../traversal */ \"./node_modules/@abaplint/transpiler/build/src/traversal.js\");\r\nconst expressions_1 = __webpack_require__(/*! ../expressions */ \"./node_modules/@abaplint/transpiler/build/src/expressions/index.js\");\r\nconst chunk_1 = __webpack_require__(/*! ../chunk */ \"./node_modules/@abaplint/transpiler/build/src/chunk.js\");\r\nconst unique_identifier_1 = __webpack_require__(/*! ../unique_identifier */ \"./node_modules/@abaplint/transpiler/build/src/unique_identifier.js\");\r\nclass MethodImplementationTranspiler {\r\n transpile(node, traversal) {\r\n var _a, _b;\r\n const token = node.findFirstExpression(abaplint.Expressions.MethodName).getFirstToken();\r\n let methodName = token.getStr();\r\n const scope = traversal.findCurrentScopeByToken(token);\r\n if (scope === undefined) {\r\n throw new Error(\"MethodTranspiler, scope not found, \" + methodName);\r\n }\r\n else if (scope.getIdentifier().sname !== methodName) {\r\n throw new Error(\"MethodTranspiler, wrong scope found, \" + scope.getIdentifier().sname);\r\n }\r\n let after = \"\";\r\n const classDef = traversal.getClassDefinition(token);\r\n let unique = \"\";\r\n if (methodName.toUpperCase() === \"CONSTRUCTOR\" && classDef) {\r\n // note that all ABAP identifiers are lower cased, sometimes the kernel does magic, so it needs to know the method input name\r\n unique = \"INPUT\";\r\n after = traversal.buildConstructorContents(scope.getParent(), classDef);\r\n methodName = \"constructor_\";\r\n }\r\n const methodDef = this.findMethodParameters(scope);\r\n const vars = scope.getData().vars;\r\n for (const n in vars) {\r\n const identifier = vars[n];\r\n const varName = n.toLowerCase();\r\n if (identifier.getMeta().includes(\"importing\" /* abaplint.IdentifierMeta.MethodImporting */)\r\n || identifier.getMeta().includes(\"changing\" /* abaplint.IdentifierMeta.MethodChanging */)\r\n || identifier.getMeta().includes(\"exporting\" /* abaplint.IdentifierMeta.MethodExporting */)) {\r\n if (unique === \"\") {\r\n unique = \"INPUT\";\r\n }\r\n after = after + new transpile_types_1.TranspileTypes().declare(identifier) + \"\\n\";\r\n const type = identifier.getType();\r\n const charOne = type instanceof abaplint.BasicTypes.CharacterType && type.getLength() === 1;\r\n if (identifier.getMeta().includes(\"importing\" /* abaplint.IdentifierMeta.MethodImporting */)\r\n && type.isGeneric() === false\r\n && charOne === false) {\r\n after += \"if (\" + unique + \" && \" + unique + \".\" + varName + \") {\" + varName + \".set(\" + unique + \".\" + varName + \");}\\n\";\r\n }\r\n else {\r\n after += \"if (\" + unique + \" && \" + unique + \".\" + varName + \") {\" + varName + \" = \" + unique + \".\" + varName + \";}\\n\";\r\n }\r\n const parameterDefault = methodDef === null || methodDef === void 0 ? void 0 : methodDef.getParameterDefault(varName);\r\n if (parameterDefault) {\r\n let val = \"\";\r\n if (parameterDefault.get() instanceof abaplint.Expressions.Constant) {\r\n val = new expressions_1.ConstantTranspiler().transpile(parameterDefault, traversal).getCode();\r\n }\r\n else if (parameterDefault.get() instanceof abaplint.Expressions.FieldChain) {\r\n if (parameterDefault.getFirstToken().getStr().toLowerCase() === \"abap_true\") {\r\n val = \"abap.builtin.abap_true\";\r\n }\r\n else if (parameterDefault.getFirstToken().getStr().toLowerCase() === \"abap_false\") {\r\n val = \"abap.builtin.abap_false\";\r\n }\r\n else if (parameterDefault.getFirstToken().getStr().toLowerCase() === \"space\") {\r\n val = \"abap.builtin.space\";\r\n }\r\n else if (parameterDefault.concatTokens().toLowerCase() === \"sy-uname\") {\r\n val = \"abap.builtin.sy.get().uname\";\r\n }\r\n else {\r\n // note: this can be difficult, the \"def\" might be from an interface, ie. a different scope than the method\r\n val = new expressions_1.FieldChainTranspiler().transpile(parameterDefault, traversal, true, methodDef === null || methodDef === void 0 ? void 0 : methodDef.getFilename()).getCode();\r\n if (val.startsWith(parameterDefault.getFirstToken().getStr().toLowerCase()) === true) {\r\n val = \"this.\" + val;\r\n }\r\n }\r\n }\r\n else {\r\n throw new Error(\"MethodImplementationTranspiler, unknown default param type\");\r\n }\r\n after += \"if (\" + unique + \" === undefined || \" + unique + \".\" + varName + \" === undefined) {\" + varName + \" = \" + val + \";}\\n\";\r\n }\r\n }\r\n else if (identifier.getMeta().includes(\"returning\" /* abaplint.IdentifierMeta.MethodReturning */)) {\r\n after = after + new transpile_types_1.TranspileTypes().declare(identifier) + \"\\n\";\r\n }\r\n }\r\n if (after.length > 0) { // argh\r\n after = \"\\n\" + after;\r\n after = after.substring(0, after.length - 1);\r\n }\r\n const method = this.findMethod(methodName, classDef, traversal);\r\n let staticMethod = \"\";\r\n methodName = methodName.replace(\"~\", \"$\").toLowerCase();\r\n if (method && method.isStatic()) {\r\n // in ABAP static methods can be called with instance arrows, \"->\"\r\n const className = (_b = (_a = scope.getParent()) === null || _a === void 0 ? void 0 : _a.getIdentifier().sname) === null || _b === void 0 ? void 0 : _b.toLowerCase();\r\n staticMethod = \"async \" + traversal_1.Traversal.escapeClassName(methodName) + \"(\" + unique + \") {\\n\" +\r\n \"return \" + traversal_1.Traversal.escapeClassName(className) + \".\" + traversal_1.Traversal.escapeClassName(methodName) + \"(\" + unique + \");\\n\" +\r\n \"}\\n\" + \"static \";\r\n }\r\n unique_identifier_1.UniqueIdentifier.resetIndexBackup();\r\n const str = staticMethod + \"async \" + traversal_1.Traversal.escapeClassName(methodName) + \"(\" + unique + \") {\" + after;\r\n return new chunk_1.Chunk().append(str, node, traversal);\r\n }\r\n /////////////////////////////\r\n findMethod(name, cdef, traversal) {\r\n var _a, _b;\r\n if (cdef === undefined) {\r\n return undefined;\r\n }\r\n if (name.includes(\"~\")) {\r\n const split = name.split(\"~\");\r\n const intfName = split[0];\r\n name = split[1];\r\n const scope = traversal.findCurrentScopeByToken(cdef.getToken());\r\n const intf = traversal.findInterfaceDefinition(intfName, scope);\r\n return (_a = intf === null || intf === void 0 ? void 0 : intf.getMethodDefinitions()) === null || _a === void 0 ? void 0 : _a.getByName(name);\r\n }\r\n else {\r\n return (_b = cdef.getMethodDefinitions()) === null || _b === void 0 ? void 0 : _b.getByName(name);\r\n }\r\n }\r\n findMethodParameters(scope) {\r\n for (const r of scope.getData().references) {\r\n if (r.referenceType === abaplint.ReferenceType.MethodImplementationReference\r\n && r.resolved instanceof abaplint.Types.MethodDefinition) {\r\n return r.resolved.getParameters();\r\n }\r\n }\r\n return undefined;\r\n }\r\n}\r\nexports.MethodImplementationTranspiler = MethodImplementationTranspiler;\r\n//# sourceMappingURL=method_implementation.js.map\n\n//# sourceURL=webpack://@abaplint/transpiler-cli/./node_modules/@abaplint/transpiler/build/src/statements/method_implementation.js?");
14935
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.MethodImplementationTranspiler = void 0;\r\nconst abaplint = __webpack_require__(/*! @abaplint/core */ \"./node_modules/@abaplint/core/build/src/index.js\");\r\nconst transpile_types_1 = __webpack_require__(/*! ../transpile_types */ \"./node_modules/@abaplint/transpiler/build/src/transpile_types.js\");\r\nconst traversal_1 = __webpack_require__(/*! ../traversal */ \"./node_modules/@abaplint/transpiler/build/src/traversal.js\");\r\nconst expressions_1 = __webpack_require__(/*! ../expressions */ \"./node_modules/@abaplint/transpiler/build/src/expressions/index.js\");\r\nconst chunk_1 = __webpack_require__(/*! ../chunk */ \"./node_modules/@abaplint/transpiler/build/src/chunk.js\");\r\nconst unique_identifier_1 = __webpack_require__(/*! ../unique_identifier */ \"./node_modules/@abaplint/transpiler/build/src/unique_identifier.js\");\r\nclass MethodImplementationTranspiler {\r\n transpile(node, traversal) {\r\n var _a, _b;\r\n const token = node.findFirstExpression(abaplint.Expressions.MethodName).getFirstToken();\r\n let methodName = token.getStr();\r\n const scope = traversal.findCurrentScopeByToken(token);\r\n if (scope === undefined) {\r\n throw new Error(\"MethodTranspiler, scope not found, \" + methodName);\r\n }\r\n else if (scope.getIdentifier().sname !== methodName) {\r\n throw new Error(\"MethodTranspiler, wrong scope found, \" + scope.getIdentifier().sname);\r\n }\r\n let after = \"\";\r\n const classDef = traversal.getClassDefinition(token);\r\n let unique = \"\";\r\n if (methodName.toUpperCase() === \"CONSTRUCTOR\" && classDef) {\r\n // note that all ABAP identifiers are lower cased, sometimes the kernel does magic, so it needs to know the method input name\r\n unique = \"INPUT\";\r\n after = traversal.buildConstructorContents(scope.getParent(), classDef);\r\n methodName = \"constructor_\";\r\n }\r\n const methodDef = this.findMethodParameters(scope);\r\n const vars = scope.getData().vars;\r\n for (const n in vars) {\r\n const identifier = vars[n];\r\n const varName = n.toLowerCase();\r\n if (identifier.getMeta().includes(\"importing\" /* abaplint.IdentifierMeta.MethodImporting */)\r\n || identifier.getMeta().includes(\"changing\" /* abaplint.IdentifierMeta.MethodChanging */)\r\n || identifier.getMeta().includes(\"exporting\" /* abaplint.IdentifierMeta.MethodExporting */)) {\r\n if (unique === \"\") {\r\n unique = \"INPUT\";\r\n }\r\n after = after + new transpile_types_1.TranspileTypes().declare(identifier) + \"\\n\";\r\n const type = identifier.getType();\r\n const charOne = type instanceof abaplint.BasicTypes.CharacterType && type.getLength() === 1;\r\n if (identifier.getMeta().includes(\"importing\" /* abaplint.IdentifierMeta.MethodImporting */)\r\n && type.isGeneric() === false\r\n && charOne === false) {\r\n after += \"if (\" + unique + \" && \" + unique + \".\" + varName + \") {\" + varName + \".set(\" + unique + \".\" + varName + \");}\\n\";\r\n }\r\n else {\r\n after += \"if (\" + unique + \" && \" + unique + \".\" + varName + \") {\" + varName + \" = \" + unique + \".\" + varName + \";}\\n\";\r\n }\r\n const parameterDefault = methodDef === null || methodDef === void 0 ? void 0 : methodDef.getParameterDefault(varName);\r\n if (parameterDefault) {\r\n let val = \"\";\r\n if (parameterDefault.get() instanceof abaplint.Expressions.Constant) {\r\n val = new expressions_1.ConstantTranspiler().transpile(parameterDefault, traversal).getCode();\r\n }\r\n else if (parameterDefault.get() instanceof abaplint.Expressions.FieldChain) {\r\n if (parameterDefault.getFirstToken().getStr().toLowerCase() === \"abap_true\") {\r\n val = \"abap.builtin.abap_true\";\r\n }\r\n else if (parameterDefault.getFirstToken().getStr().toLowerCase() === \"abap_false\") {\r\n val = \"abap.builtin.abap_false\";\r\n }\r\n else if (parameterDefault.getFirstToken().getStr().toLowerCase() === \"space\") {\r\n val = \"abap.builtin.space\";\r\n }\r\n else if (parameterDefault.concatTokens().toLowerCase() === \"sy-uname\") {\r\n val = \"abap.builtin.sy.get().uname\";\r\n }\r\n else {\r\n // note: this can be difficult, the \"def\" might be from an interface, ie. a different scope than the method\r\n val = new expressions_1.FieldChainTranspiler().transpile(parameterDefault, traversal, true, methodDef === null || methodDef === void 0 ? void 0 : methodDef.getFilename()).getCode();\r\n if (val.startsWith(parameterDefault.getFirstToken().getStr().toLowerCase()) === true) {\r\n val = \"this.\" + val;\r\n }\r\n }\r\n }\r\n else {\r\n throw new Error(\"MethodImplementationTranspiler, unknown default param type\");\r\n }\r\n after += \"if (\" + unique + \" === undefined || \" + unique + \".\" + varName + \" === undefined) {\" + varName + \" = \" + val + \";}\\n\";\r\n }\r\n }\r\n else if (identifier.getMeta().includes(\"returning\" /* abaplint.IdentifierMeta.MethodReturning */)) {\r\n after = after + new transpile_types_1.TranspileTypes().declare(identifier) + \"\\n\";\r\n }\r\n }\r\n if (after.length > 0) { // argh\r\n after = \"\\n\" + after;\r\n after = after.substring(0, after.length - 1);\r\n }\r\n const method = this.findMethod(methodName, classDef, traversal);\r\n let staticMethod = \"\";\r\n methodName = methodName.replace(\"~\", \"$\").toLowerCase();\r\n const superDef = traversal.findClassDefinition(classDef === null || classDef === void 0 ? void 0 : classDef.getSuperClass(), scope);\r\n for (const a of (superDef === null || superDef === void 0 ? void 0 : superDef.getAliases().getAll()) || []) {\r\n if (a.getName().toLowerCase() === methodName) {\r\n methodName = a.getComponent().replace(\"~\", \"$\").toLowerCase();\r\n }\r\n }\r\n if (method && method.isStatic()) {\r\n // in ABAP static methods can be called with instance arrows, \"->\"\r\n const className = (_b = (_a = scope.getParent()) === null || _a === void 0 ? void 0 : _a.getIdentifier().sname) === null || _b === void 0 ? void 0 : _b.toLowerCase();\r\n staticMethod = \"async \" + traversal_1.Traversal.escapeClassName(methodName) + \"(\" + unique + \") {\\n\" +\r\n \"return \" + traversal_1.Traversal.escapeClassName(className) + \".\" + traversal_1.Traversal.escapeClassName(methodName) + \"(\" + unique + \");\\n\" +\r\n \"}\\n\" + \"static \";\r\n }\r\n unique_identifier_1.UniqueIdentifier.resetIndexBackup();\r\n const str = staticMethod + \"async \" + traversal_1.Traversal.escapeClassName(methodName) + \"(\" + unique + \") {\" + after;\r\n return new chunk_1.Chunk().append(str, node, traversal);\r\n }\r\n /////////////////////////////\r\n findMethod(name, cdef, traversal) {\r\n var _a, _b;\r\n if (cdef === undefined) {\r\n return undefined;\r\n }\r\n if (name.includes(\"~\")) {\r\n const split = name.split(\"~\");\r\n const intfName = split[0];\r\n name = split[1];\r\n const scope = traversal.findCurrentScopeByToken(cdef.getToken());\r\n const intf = traversal.findInterfaceDefinition(intfName, scope);\r\n return (_a = intf === null || intf === void 0 ? void 0 : intf.getMethodDefinitions()) === null || _a === void 0 ? void 0 : _a.getByName(name);\r\n }\r\n else {\r\n return (_b = cdef.getMethodDefinitions()) === null || _b === void 0 ? void 0 : _b.getByName(name);\r\n }\r\n }\r\n findMethodParameters(scope) {\r\n for (const r of scope.getData().references) {\r\n if (r.referenceType === abaplint.ReferenceType.MethodImplementationReference\r\n && r.resolved instanceof abaplint.Types.MethodDefinition) {\r\n return r.resolved.getParameters();\r\n }\r\n }\r\n return undefined;\r\n }\r\n}\r\nexports.MethodImplementationTranspiler = MethodImplementationTranspiler;\r\n//# sourceMappingURL=method_implementation.js.map\n\n//# sourceURL=webpack://@abaplint/transpiler-cli/./node_modules/@abaplint/transpiler/build/src/statements/method_implementation.js?");
14925
14936
 
14926
14937
  /***/ }),
14927
14938
 
@@ -15647,7 +15658,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
15647
15658
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
15648
15659
 
15649
15660
  "use strict";
15650
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.Traversal = void 0;\r\nconst abaplint = __webpack_require__(/*! @abaplint/core */ \"./node_modules/@abaplint/core/build/src/index.js\");\r\nconst StatementTranspilers = __webpack_require__(/*! ./statements */ \"./node_modules/@abaplint/transpiler/build/src/statements/index.js\");\r\nconst ExpressionTranspilers = __webpack_require__(/*! ./expressions */ \"./node_modules/@abaplint/transpiler/build/src/expressions/index.js\");\r\nconst StructureTranspilers = __webpack_require__(/*! ./structures */ \"./node_modules/@abaplint/transpiler/build/src/structures/index.js\");\r\nconst transpile_types_1 = __webpack_require__(/*! ./transpile_types */ \"./node_modules/@abaplint/transpiler/build/src/transpile_types.js\");\r\nconst chunk_1 = __webpack_require__(/*! ./chunk */ \"./node_modules/@abaplint/transpiler/build/src/chunk.js\");\r\nconst expressions_1 = __webpack_require__(/*! ./expressions */ \"./node_modules/@abaplint/transpiler/build/src/expressions/index.js\");\r\nclass Traversal {\r\n constructor(spaghetti, file, obj, reg, runtimeTypeError = false) {\r\n this.scopeCache = undefined;\r\n this.spaghetti = spaghetti;\r\n this.file = file;\r\n this.obj = obj;\r\n this.reg = reg;\r\n this.runtimeTypeError = runtimeTypeError;\r\n }\r\n static escapeClassName(name) {\r\n return name === null || name === void 0 ? void 0 : name.replace(/\\//g, \"$\");\r\n }\r\n getCurrentObject() {\r\n return this.obj;\r\n }\r\n traverse(node) {\r\n if (node instanceof abaplint.Nodes.StructureNode) {\r\n return this.traverseStructure(node);\r\n }\r\n else if (node instanceof abaplint.Nodes.StatementNode) {\r\n return this.traverseStatement(node);\r\n }\r\n else if (node instanceof abaplint.Nodes.ExpressionNode) {\r\n return this.traverseExpression(node);\r\n }\r\n else if (node === undefined) {\r\n throw new Error(\"Traverse, node undefined\");\r\n }\r\n else {\r\n throw new Error(\"Traverse, unexpected node type\");\r\n }\r\n }\r\n getFilename() {\r\n return this.file.getFilename();\r\n }\r\n getFile() {\r\n return this.file;\r\n }\r\n getSpaghetti() {\r\n return this.spaghetti;\r\n }\r\n /** finds a statement in the _current_ file given a position */\r\n findStatementInFile(pos) {\r\n for (const s of this.file.getStatements()) {\r\n if (pos.isBetween(s.getStart(), s.getEnd())) {\r\n return s;\r\n }\r\n }\r\n return undefined;\r\n }\r\n findCurrentScopeByToken(token) {\r\n const filename = this.file.getFilename();\r\n if (this.scopeCache\r\n && this.scopeCache.filename === filename\r\n && token.getEnd().isBetween(this.scopeCache.cov.start, this.scopeCache.cov.end)) {\r\n return this.scopeCache.node;\r\n }\r\n const node = this.spaghetti.lookupPosition(token.getStart(), filename);\r\n // note: cache only works for leafs, as parent nodes cover multiple leaves\r\n if (node && node.getChildren().length === 0) {\r\n this.scopeCache = {\r\n cov: node.calcCoverage(),\r\n filename: filename,\r\n node: node,\r\n };\r\n }\r\n else {\r\n this.scopeCache = undefined;\r\n }\r\n return node;\r\n }\r\n getInterfaceDefinition(token) {\r\n let scope = this.findCurrentScopeByToken(token);\r\n while (scope !== undefined) {\r\n if (scope.getIdentifier().stype === abaplint.ScopeType.Interface) {\r\n return scope.findInterfaceDefinition(scope === null || scope === void 0 ? void 0 : scope.getIdentifier().sname);\r\n }\r\n scope = scope.getParent();\r\n }\r\n return undefined;\r\n }\r\n getClassDefinition(token) {\r\n let scope = this.findCurrentScopeByToken(token);\r\n while (scope !== undefined) {\r\n if (scope.getIdentifier().stype === abaplint.ScopeType.ClassImplementation\r\n || scope.getIdentifier().stype === abaplint.ScopeType.ClassDefinition) {\r\n return scope.findClassDefinition(scope === null || scope === void 0 ? void 0 : scope.getIdentifier().sname);\r\n }\r\n scope = scope.getParent();\r\n }\r\n return undefined;\r\n }\r\n isClassAttribute(token) {\r\n const scope = this.findCurrentScopeByToken(token);\r\n if (scope === undefined) {\r\n throw new Error(\"isClassAttribute, unable to lookup position\");\r\n }\r\n const name = token.getStr();\r\n if (name.toLowerCase() === \"me\") {\r\n return true;\r\n }\r\n const found = scope.findScopeForVariable(name);\r\n if (found && (found.stype === abaplint.ScopeType.MethodInstance\r\n || found.stype === abaplint.ScopeType.ClassImplementation)) {\r\n return true;\r\n }\r\n return false;\r\n }\r\n prefixAndName(t, filename) {\r\n let name = t.getStr().toLowerCase();\r\n if (filename && this.getCurrentObject().getABAPFileByName(filename) === undefined) {\r\n // the prefix is from a different object\r\n const file = this.reg.getFileByName(filename);\r\n if (file) {\r\n const found = this.reg.findObjectForFile(file);\r\n if (found) {\r\n if (found instanceof abaplint.Objects.Interface) {\r\n return Traversal.escapeClassName(this.lookupClassOrInterface(found.getName(), t)) + \".\" + found.getName().toLowerCase() + \"$\" + name;\r\n }\r\n else {\r\n return Traversal.escapeClassName(this.lookupClassOrInterface(found.getName(), t)) + \".\" + name;\r\n }\r\n }\r\n }\r\n }\r\n const className = this.isStaticClassAttribute(t);\r\n if (className) {\r\n name = Traversal.escapeClassName(className) + \".\" + name;\r\n }\r\n else if (name === \"super\") {\r\n return name;\r\n }\r\n else if (this.isClassAttribute(t)) {\r\n name = \"this.\" + Traversal.escapeClassName(name);\r\n }\r\n else if (this.isBuiltinVariable(t)) {\r\n name = \"abap.builtin.\" + name;\r\n }\r\n return name;\r\n }\r\n isStaticClassAttribute(token) {\r\n const scope = this.findCurrentScopeByToken(token);\r\n if (scope === undefined) {\r\n throw new Error(`isStaticClassAttribute, unable to lookup position, ${token.getStr()},${token.getRow()},${token.getCol()},` +\r\n this.file.getFilename());\r\n }\r\n const name = token.getStr();\r\n const found = scope.findScopeForVariable(name);\r\n const id = scope.findVariable(name);\r\n if (found && id\r\n && id.getMeta().includes(\"static\" /* abaplint.IdentifierMeta.Static */)\r\n && found.stype === abaplint.ScopeType.ClassImplementation) {\r\n // console.dir(found.sname);\r\n return found.sname.toLowerCase();\r\n }\r\n return undefined;\r\n }\r\n isBuiltinMethod(token) {\r\n const scope = this.findCurrentScopeByToken(token);\r\n if (scope === undefined) {\r\n return false;\r\n }\r\n for (const r of scope.getData().references) {\r\n if (r.referenceType === abaplint.ReferenceType.BuiltinMethodReference\r\n && r.position.getStart().equals(token.getStart())) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n findMethodReference(token, scope) {\r\n var _a, _b;\r\n if (scope === undefined) {\r\n return undefined;\r\n }\r\n for (const r of scope.getData().references) {\r\n if (r.referenceType === abaplint.ReferenceType.MethodReference\r\n && r.position.getStart().equals(token.getStart())\r\n && r.resolved instanceof abaplint.Types.MethodDefinition) {\r\n let name = r.resolved.getName();\r\n if (((_a = r.extra) === null || _a === void 0 ? void 0 : _a.ooName) && ((_b = r.extra) === null || _b === void 0 ? void 0 : _b.ooType) === \"INTF\") {\r\n name = r.extra.ooName + \"$\" + name;\r\n }\r\n return { def: r.resolved, name };\r\n }\r\n else if (r.referenceType === abaplint.ReferenceType.BuiltinMethodReference\r\n && r.position.getStart().equals(token.getStart())) {\r\n const def = r.resolved;\r\n const name = def.getName();\r\n return { def, name };\r\n }\r\n }\r\n return undefined;\r\n }\r\n isBuiltinVariable(token) {\r\n const scope = this.findCurrentScopeByToken(token);\r\n if (scope === undefined) {\r\n throw new Error(\"isBuiltin, unable to lookup position\");\r\n }\r\n const name = token.getStr();\r\n const found = scope.findScopeForVariable(name);\r\n if (found && found.stype === abaplint.ScopeType.BuiltIn) {\r\n return true;\r\n }\r\n return false;\r\n }\r\n // returns the interface name if interfaced\r\n isInterfaceAttribute(token) {\r\n const ref = this.findReadOrWriteReference(token);\r\n if (ref === undefined) {\r\n return undefined;\r\n }\r\n // local classes\r\n if (ref.getFilename() === this.getFilename()) {\r\n const scope = this.findCurrentScopeByToken(ref.getToken());\r\n if ((scope === null || scope === void 0 ? void 0 : scope.getIdentifier().stype) === abaplint.ScopeType.Interface) {\r\n return scope === null || scope === void 0 ? void 0 : scope.getIdentifier().sname;\r\n }\r\n }\r\n // global classes\r\n const file = this.reg.getFileByName(ref.getFilename());\r\n if (file) {\r\n const obj = this.reg.findObjectForFile(file);\r\n if ((obj === null || obj === void 0 ? void 0 : obj.getType()) === \"INTF\") {\r\n return obj.getName().toLowerCase();\r\n }\r\n }\r\n return undefined;\r\n }\r\n findReadOrWriteReference(token) {\r\n const scope = this.findCurrentScopeByToken(token);\r\n if (scope === undefined) {\r\n return undefined;\r\n }\r\n for (const r of scope.getData().references) {\r\n if ((r.referenceType === abaplint.ReferenceType.DataReadReference\r\n || r.referenceType === abaplint.ReferenceType.DataWriteReference)\r\n && r.position.getStart().equals(token.getStart())) {\r\n return r.resolved;\r\n }\r\n }\r\n return undefined;\r\n }\r\n buildConstructorContents(scope, def) {\r\n let ret = \"\";\r\n if (def.getSuperClass() !== undefined\r\n && def.getMethodDefinitions().getByName(\"CONSTRUCTOR\") === undefined) {\r\n ret += `await super.constructor_(INPUT);\\n`;\r\n }\r\n const cName = Traversal.escapeClassName(def.getName().toLowerCase());\r\n ret += \"this.me = new abap.types.ABAPObject();\\n\";\r\n ret += \"this.me.set(this);\\n\";\r\n for (const a of def.getAttributes().getAll()) {\r\n if (a.getMeta().includes(\"static\" /* abaplint.IdentifierMeta.Static */) === true) {\r\n continue;\r\n }\r\n const name = \"this.\" + a.getName().toLowerCase();\r\n ret += name + \" = \" + new transpile_types_1.TranspileTypes().toType(a.getType()) + \";\\n\";\r\n ret += this.setValues(a, name);\r\n }\r\n // attributes from directly implemented interfaces(not interfaces implemented in super classes)\r\n for (const i of def.getImplementing()) {\r\n ret += this.dataFromInterfaces(i.name, scope);\r\n }\r\n // handle aliases after initialization of carrier variables\r\n for (const a of def.getAliases().getAll()) {\r\n ret += \"this.\" + a.getName().toLowerCase() + \" = this.\" + Traversal.escapeClassName(a.getComponent().replace(\"~\", \"$\").toLowerCase()) + \";\\n\";\r\n }\r\n // constants can be accessed both statically and via reference\r\n for (const c of def.getAttributes().getConstants()) {\r\n ret += \"this.\" + c.getName().toLowerCase() + \" = \" + cName + \".\" + c.getName().toLowerCase() + \";\\n\";\r\n }\r\n return ret;\r\n }\r\n findInterfaceDefinition(name, scope) {\r\n let intf = scope === null || scope === void 0 ? void 0 : scope.findInterfaceDefinition(name);\r\n if (intf === undefined) {\r\n const iglobal = this.reg.getObject(\"INTF\", name);\r\n intf = iglobal === null || iglobal === void 0 ? void 0 : iglobal.getDefinition();\r\n }\r\n return intf;\r\n }\r\n findTable(name) {\r\n const tabl = this.reg.getObject(\"TABL\", name);\r\n return tabl;\r\n }\r\n findClassDefinition(name, scope) {\r\n let clas = scope === null || scope === void 0 ? void 0 : scope.findClassDefinition(name);\r\n if (clas === undefined) {\r\n const iglobal = this.reg.getObject(\"CLAS\", name);\r\n clas = iglobal === null || iglobal === void 0 ? void 0 : iglobal.getDefinition();\r\n }\r\n return clas;\r\n }\r\n dataFromInterfaces(name, scope) {\r\n let ret = \"\";\r\n const intf = this.findInterfaceDefinition(name, scope);\r\n for (const a of (intf === null || intf === void 0 ? void 0 : intf.getAttributes().getAll()) || []) {\r\n if (a.getMeta().includes(\"static\" /* abaplint.IdentifierMeta.Static */) === true) {\r\n continue;\r\n }\r\n const n = Traversal.escapeClassName(name.toLowerCase()) + \"$\" + a.getName().toLowerCase();\r\n ret += \"this.\" + n + \" = \" + new transpile_types_1.TranspileTypes().toType(a.getType()) + \";\\n\";\r\n }\r\n for (const i of (intf === null || intf === void 0 ? void 0 : intf.getImplementing()) || []) {\r\n ret += this.dataFromInterfaces(i.name, scope);\r\n }\r\n return ret;\r\n }\r\n determineType(node, scope) {\r\n var _a, _b, _c;\r\n if (scope === undefined) {\r\n return undefined;\r\n }\r\n const found = node.findDirectExpression(abaplint.Expressions.Target);\r\n if (found === undefined) {\r\n return undefined;\r\n }\r\n let context = undefined;\r\n for (const c of found.getChildren()) {\r\n if (context === undefined) {\r\n context = (_a = scope.findVariable(c.getFirstToken().getStr())) === null || _a === void 0 ? void 0 : _a.getType();\r\n }\r\n else if (c.get() instanceof abaplint.Expressions.ComponentName\r\n && context instanceof abaplint.BasicTypes.StructureType) {\r\n context = context.getComponentByName(c.getFirstToken().getStr());\r\n }\r\n else if (c.get() instanceof abaplint.Expressions.AttributeName\r\n && context instanceof abaplint.BasicTypes.ObjectReferenceType) {\r\n const id = context.getIdentifier();\r\n if (id instanceof abaplint.Types.ClassDefinition || id instanceof abaplint.Types.InterfaceDefinition) {\r\n const concat = c.concatTokens();\r\n if (concat.includes(\"~\")) {\r\n const [iname, aname] = concat.split(\"~\");\r\n const intf = this.findInterfaceDefinition(iname, scope);\r\n context = (_b = intf === null || intf === void 0 ? void 0 : intf.getAttributes().findByName(aname)) === null || _b === void 0 ? void 0 : _b.getType();\r\n }\r\n else {\r\n context = (_c = id.getAttributes().findByName(concat)) === null || _c === void 0 ? void 0 : _c.getType();\r\n }\r\n }\r\n }\r\n }\r\n return context;\r\n }\r\n isInsideLoop(node) {\r\n const stack = [];\r\n for (const statement of this.getFile().getStatements()) {\r\n const get = statement.get();\r\n if (get instanceof abaplint.Statements.Loop\r\n || get instanceof abaplint.Statements.While\r\n || get instanceof abaplint.Statements.SelectLoop\r\n || get instanceof abaplint.Statements.Do) {\r\n stack.push(statement);\r\n }\r\n else if (get instanceof abaplint.Statements.EndLoop\r\n || get instanceof abaplint.Statements.EndWhile\r\n || get instanceof abaplint.Statements.EndSelect\r\n || get instanceof abaplint.Statements.EndDo) {\r\n stack.pop();\r\n }\r\n if (statement === node) {\r\n break;\r\n }\r\n }\r\n return stack.length > 0;\r\n }\r\n isInsideDoOrWhile(node) {\r\n const stack = [];\r\n for (const statement of this.getFile().getStatements()) {\r\n const get = statement.get();\r\n if (get instanceof abaplint.Statements.While\r\n || get instanceof abaplint.Statements.Do) {\r\n stack.push(statement);\r\n }\r\n else if (get instanceof abaplint.Statements.EndWhile\r\n || get instanceof abaplint.Statements.EndDo) {\r\n stack.pop();\r\n }\r\n if (statement === node) {\r\n break;\r\n }\r\n }\r\n return stack.length > 0;\r\n }\r\n registerClassOrInterface(def) {\r\n if (def === undefined) {\r\n return \"\";\r\n }\r\n const name = def.getName();\r\n if (def.isGlobal() === false) {\r\n const prefix = this.buildPrefix(def);\r\n return `abap.Classes['${prefix}-${name.toUpperCase()}'] = ${Traversal.escapeClassName(name.toLowerCase())};`;\r\n }\r\n else {\r\n return `abap.Classes['${name.toUpperCase()}'] = ${Traversal.escapeClassName(name.toLowerCase())};`;\r\n }\r\n }\r\n setValues(identifier, name) {\r\n const val = identifier.getValue();\r\n let ret = \"\";\r\n if (typeof val === \"string\") {\r\n const e = new expressions_1.ConstantTranspiler().escape(val);\r\n ret += name + \".set(\" + e + \");\\n\";\r\n }\r\n else if (typeof val === \"object\") {\r\n const a = val;\r\n for (const v of Object.keys(val)) {\r\n let s = a[v];\r\n if (s === undefined) {\r\n continue;\r\n }\r\n s = new expressions_1.ConstantTranspiler().escape(s);\r\n ret += name + \".get().\" + v + \".set(\" + s + \");\\n\";\r\n }\r\n }\r\n return ret;\r\n }\r\n lookupClassOrInterface(name, token, directGlobal = false) {\r\n var _a, _b;\r\n if (name === undefined || token === undefined) {\r\n return \"abap.Classes['undefined']\";\r\n }\r\n if (directGlobal === true) {\r\n return \"abap.Classes[\" + name + \"]\";\r\n }\r\n const scope = this.findCurrentScopeByToken(token);\r\n // todo, add explicit type,\r\n let def = scope === null || scope === void 0 ? void 0 : scope.findClassDefinition(name);\r\n if (def === undefined) {\r\n def = scope === null || scope === void 0 ? void 0 : scope.findInterfaceDefinition(name);\r\n }\r\n if (def) {\r\n if (def.isGlobal() === false) {\r\n const prefix = this.buildPrefix(def);\r\n return `abap.Classes['${prefix}-${(_a = def === null || def === void 0 ? void 0 : def.getName()) === null || _a === void 0 ? void 0 : _a.toUpperCase()}']`;\r\n }\r\n else {\r\n return `abap.Classes['${(_b = def === null || def === void 0 ? void 0 : def.getName()) === null || _b === void 0 ? void 0 : _b.toUpperCase()}']`;\r\n }\r\n }\r\n else {\r\n // assume global\r\n return \"abap.Classes['\" + name.toUpperCase() + \"']\";\r\n }\r\n }\r\n buildPrefix(def) {\r\n const file = this.reg.getFileByName(def.getFilename());\r\n if (file === undefined) {\r\n return \"NOT_FOUND\";\r\n }\r\n const obj = this.reg.findObjectForFile(file);\r\n return (obj === null || obj === void 0 ? void 0 : obj.getType()) + \"-\" + (obj === null || obj === void 0 ? void 0 : obj.getName());\r\n }\r\n ////////////////////////////\r\n traverseStructure(node) {\r\n const list = StructureTranspilers;\r\n const ret = new chunk_1.Chunk();\r\n for (const c of node.getChildren()) {\r\n if (c instanceof abaplint.Nodes.StructureNode) {\r\n const search = c.get().constructor.name + \"Transpiler\";\r\n if (list[search]) {\r\n const transpiler = new list[search]();\r\n ret.appendChunk(transpiler.transpile(c, this));\r\n continue;\r\n }\r\n ret.appendChunk(this.traverseStructure(c));\r\n }\r\n else if (c instanceof abaplint.Nodes.StatementNode) {\r\n ret.appendChunk(this.traverseStatement(c));\r\n }\r\n else {\r\n throw new Error(\"traverseStructure, unexpected child node type\");\r\n }\r\n }\r\n return ret;\r\n }\r\n traverseStatement(node) {\r\n const list = StatementTranspilers;\r\n const search = node.get().constructor.name + \"Transpiler\";\r\n if (list[search]) {\r\n const transpiler = new list[search]();\r\n const chunk = transpiler.transpile(node, this);\r\n chunk.appendString(\"\\n\");\r\n return chunk;\r\n }\r\n throw new Error(`Statement ${node.get().constructor.name} not supported, ${node.concatTokens()}`);\r\n }\r\n traverseExpression(node) {\r\n const list = ExpressionTranspilers;\r\n const search = node.get().constructor.name + \"Transpiler\";\r\n if (list[search]) {\r\n const transpiler = new list[search]();\r\n return transpiler.transpile(node, this);\r\n }\r\n throw new Error(`Expression ${node.get().constructor.name} not supported, ${node.concatTokens()}`);\r\n }\r\n}\r\nexports.Traversal = Traversal;\r\n//# sourceMappingURL=traversal.js.map\n\n//# sourceURL=webpack://@abaplint/transpiler-cli/./node_modules/@abaplint/transpiler/build/src/traversal.js?");
15661
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.Traversal = void 0;\r\nconst abaplint = __webpack_require__(/*! @abaplint/core */ \"./node_modules/@abaplint/core/build/src/index.js\");\r\nconst StatementTranspilers = __webpack_require__(/*! ./statements */ \"./node_modules/@abaplint/transpiler/build/src/statements/index.js\");\r\nconst ExpressionTranspilers = __webpack_require__(/*! ./expressions */ \"./node_modules/@abaplint/transpiler/build/src/expressions/index.js\");\r\nconst StructureTranspilers = __webpack_require__(/*! ./structures */ \"./node_modules/@abaplint/transpiler/build/src/structures/index.js\");\r\nconst transpile_types_1 = __webpack_require__(/*! ./transpile_types */ \"./node_modules/@abaplint/transpiler/build/src/transpile_types.js\");\r\nconst chunk_1 = __webpack_require__(/*! ./chunk */ \"./node_modules/@abaplint/transpiler/build/src/chunk.js\");\r\nconst expressions_1 = __webpack_require__(/*! ./expressions */ \"./node_modules/@abaplint/transpiler/build/src/expressions/index.js\");\r\nclass Traversal {\r\n constructor(spaghetti, file, obj, reg, runtimeTypeError = false) {\r\n this.scopeCache = undefined;\r\n this.spaghetti = spaghetti;\r\n this.file = file;\r\n this.obj = obj;\r\n this.reg = reg;\r\n this.runtimeTypeError = runtimeTypeError;\r\n }\r\n static escapeClassName(name) {\r\n return name === null || name === void 0 ? void 0 : name.replace(/\\//g, \"$\");\r\n }\r\n getCurrentObject() {\r\n return this.obj;\r\n }\r\n traverse(node) {\r\n if (node instanceof abaplint.Nodes.StructureNode) {\r\n return this.traverseStructure(node);\r\n }\r\n else if (node instanceof abaplint.Nodes.StatementNode) {\r\n return this.traverseStatement(node);\r\n }\r\n else if (node instanceof abaplint.Nodes.ExpressionNode) {\r\n return this.traverseExpression(node);\r\n }\r\n else if (node === undefined) {\r\n throw new Error(\"Traverse, node undefined\");\r\n }\r\n else {\r\n throw new Error(\"Traverse, unexpected node type\");\r\n }\r\n }\r\n getFilename() {\r\n return this.file.getFilename();\r\n }\r\n getFile() {\r\n return this.file;\r\n }\r\n getSpaghetti() {\r\n return this.spaghetti;\r\n }\r\n /** finds a statement in the _current_ file given a position */\r\n findStatementInFile(pos) {\r\n for (const s of this.file.getStatements()) {\r\n if (pos.isBetween(s.getStart(), s.getEnd())) {\r\n return s;\r\n }\r\n }\r\n return undefined;\r\n }\r\n findCurrentScopeByToken(token) {\r\n const filename = this.file.getFilename();\r\n if (this.scopeCache\r\n && this.scopeCache.filename === filename\r\n && token.getEnd().isBetween(this.scopeCache.cov.start, this.scopeCache.cov.end)) {\r\n return this.scopeCache.node;\r\n }\r\n const node = this.spaghetti.lookupPosition(token.getStart(), filename);\r\n // note: cache only works for leafs, as parent nodes cover multiple leaves\r\n if (node && node.getChildren().length === 0) {\r\n this.scopeCache = {\r\n cov: node.calcCoverage(),\r\n filename: filename,\r\n node: node,\r\n };\r\n }\r\n else {\r\n this.scopeCache = undefined;\r\n }\r\n return node;\r\n }\r\n getInterfaceDefinition(token) {\r\n let scope = this.findCurrentScopeByToken(token);\r\n while (scope !== undefined) {\r\n if (scope.getIdentifier().stype === abaplint.ScopeType.Interface) {\r\n return scope.findInterfaceDefinition(scope === null || scope === void 0 ? void 0 : scope.getIdentifier().sname);\r\n }\r\n scope = scope.getParent();\r\n }\r\n return undefined;\r\n }\r\n getClassDefinition(token) {\r\n let scope = this.findCurrentScopeByToken(token);\r\n while (scope !== undefined) {\r\n if (scope.getIdentifier().stype === abaplint.ScopeType.ClassImplementation\r\n || scope.getIdentifier().stype === abaplint.ScopeType.ClassDefinition) {\r\n return scope.findClassDefinition(scope === null || scope === void 0 ? void 0 : scope.getIdentifier().sname);\r\n }\r\n scope = scope.getParent();\r\n }\r\n return undefined;\r\n }\r\n isClassAttribute(token) {\r\n const scope = this.findCurrentScopeByToken(token);\r\n if (scope === undefined) {\r\n throw new Error(\"isClassAttribute, unable to lookup position\");\r\n }\r\n const name = token.getStr();\r\n if (name.toLowerCase() === \"me\") {\r\n return true;\r\n }\r\n const found = scope.findScopeForVariable(name);\r\n if (found && (found.stype === abaplint.ScopeType.MethodInstance\r\n || found.stype === abaplint.ScopeType.ClassImplementation)) {\r\n return true;\r\n }\r\n return false;\r\n }\r\n prefixAndName(t, filename) {\r\n let name = t.getStr().toLowerCase();\r\n if (filename && this.getCurrentObject().getABAPFileByName(filename) === undefined) {\r\n // the prefix is from a different object\r\n const file = this.reg.getFileByName(filename);\r\n if (file) {\r\n const found = this.reg.findObjectForFile(file);\r\n if (found) {\r\n if (found instanceof abaplint.Objects.Interface) {\r\n return Traversal.escapeClassName(this.lookupClassOrInterface(found.getName(), t)) + \".\" + found.getName().toLowerCase() + \"$\" + name;\r\n }\r\n else {\r\n return Traversal.escapeClassName(this.lookupClassOrInterface(found.getName(), t)) + \".\" + name;\r\n }\r\n }\r\n }\r\n }\r\n const className = this.isStaticClassAttribute(t);\r\n if (className) {\r\n name = Traversal.escapeClassName(className) + \".\" + name;\r\n }\r\n else if (name === \"super\") {\r\n return name;\r\n }\r\n else if (this.isClassAttribute(t)) {\r\n name = \"this.\" + Traversal.escapeClassName(name);\r\n }\r\n else if (this.isBuiltinVariable(t)) {\r\n name = \"abap.builtin.\" + name;\r\n }\r\n return name;\r\n }\r\n isStaticClassAttribute(token) {\r\n const scope = this.findCurrentScopeByToken(token);\r\n if (scope === undefined) {\r\n throw new Error(`isStaticClassAttribute, unable to lookup position, ${token.getStr()},${token.getRow()},${token.getCol()},` +\r\n this.file.getFilename());\r\n }\r\n const name = token.getStr();\r\n const found = scope.findScopeForVariable(name);\r\n const id = scope.findVariable(name);\r\n if (found && id\r\n && id.getMeta().includes(\"static\" /* abaplint.IdentifierMeta.Static */)\r\n && found.stype === abaplint.ScopeType.ClassImplementation) {\r\n // console.dir(found.sname);\r\n return found.sname.toLowerCase();\r\n }\r\n return undefined;\r\n }\r\n isBuiltinMethod(token) {\r\n const scope = this.findCurrentScopeByToken(token);\r\n if (scope === undefined) {\r\n return false;\r\n }\r\n for (const r of scope.getData().references) {\r\n if (r.referenceType === abaplint.ReferenceType.BuiltinMethodReference\r\n && r.position.getStart().equals(token.getStart())) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n findMethodReference(token, scope) {\r\n var _a, _b;\r\n if (scope === undefined) {\r\n return undefined;\r\n }\r\n for (const r of scope.getData().references) {\r\n if (r.referenceType === abaplint.ReferenceType.MethodReference\r\n && r.position.getStart().equals(token.getStart())\r\n && r.resolved instanceof abaplint.Types.MethodDefinition) {\r\n let name = r.resolved.getName();\r\n if (((_a = r.extra) === null || _a === void 0 ? void 0 : _a.ooName) && ((_b = r.extra) === null || _b === void 0 ? void 0 : _b.ooType) === \"INTF\") {\r\n name = r.extra.ooName + \"$\" + name;\r\n }\r\n return { def: r.resolved, name };\r\n }\r\n else if (r.referenceType === abaplint.ReferenceType.BuiltinMethodReference\r\n && r.position.getStart().equals(token.getStart())) {\r\n const def = r.resolved;\r\n const name = def.getName();\r\n return { def, name };\r\n }\r\n }\r\n return undefined;\r\n }\r\n isBuiltinVariable(token) {\r\n const scope = this.findCurrentScopeByToken(token);\r\n if (scope === undefined) {\r\n throw new Error(\"isBuiltin, unable to lookup position\");\r\n }\r\n const name = token.getStr();\r\n const found = scope.findScopeForVariable(name);\r\n if (found && found.stype === abaplint.ScopeType.BuiltIn) {\r\n return true;\r\n }\r\n return false;\r\n }\r\n // returns the interface name if interfaced\r\n isInterfaceAttribute(token) {\r\n const ref = this.findReadOrWriteReference(token);\r\n if (ref === undefined) {\r\n return undefined;\r\n }\r\n // local classes\r\n if (ref.getFilename() === this.getFilename()) {\r\n const scope = this.findCurrentScopeByToken(ref.getToken());\r\n if ((scope === null || scope === void 0 ? void 0 : scope.getIdentifier().stype) === abaplint.ScopeType.Interface) {\r\n return scope === null || scope === void 0 ? void 0 : scope.getIdentifier().sname;\r\n }\r\n }\r\n // global classes\r\n const file = this.reg.getFileByName(ref.getFilename());\r\n if (file) {\r\n const obj = this.reg.findObjectForFile(file);\r\n if ((obj === null || obj === void 0 ? void 0 : obj.getType()) === \"INTF\") {\r\n return obj.getName().toLowerCase();\r\n }\r\n }\r\n return undefined;\r\n }\r\n findReadOrWriteReference(token) {\r\n const scope = this.findCurrentScopeByToken(token);\r\n if (scope === undefined) {\r\n return undefined;\r\n }\r\n for (const r of scope.getData().references) {\r\n if ((r.referenceType === abaplint.ReferenceType.DataReadReference\r\n || r.referenceType === abaplint.ReferenceType.DataWriteReference)\r\n && r.position.getStart().equals(token.getStart())) {\r\n return r.resolved;\r\n }\r\n }\r\n return undefined;\r\n }\r\n buildConstructorContents(scope, def) {\r\n let ret = \"\";\r\n if (def.getSuperClass() !== undefined\r\n && def.getMethodDefinitions().getByName(\"CONSTRUCTOR\") === undefined) {\r\n ret += `await super.constructor_(INPUT);\\n`;\r\n }\r\n const cName = Traversal.escapeClassName(def.getName().toLowerCase());\r\n ret += \"this.me = new abap.types.ABAPObject();\\n\";\r\n ret += \"this.me.set(this);\\n\";\r\n for (const a of def.getAttributes().getAll()) {\r\n if (a.getMeta().includes(\"static\" /* abaplint.IdentifierMeta.Static */) === true) {\r\n continue;\r\n }\r\n const name = \"this.\" + a.getName().toLowerCase();\r\n ret += name + \" = \" + new transpile_types_1.TranspileTypes().toType(a.getType()) + \";\\n\";\r\n ret += this.setValues(a, name);\r\n }\r\n // attributes from directly implemented interfaces(not interfaces implemented in super classes)\r\n for (const i of def.getImplementing()) {\r\n ret += this.dataFromInterfaces(i.name, scope);\r\n }\r\n // handle aliases after initialization of carrier variables\r\n for (const a of def.getAliases().getAll()) {\r\n ret += \"this.\" + a.getName().toLowerCase() + \" = this.\" + Traversal.escapeClassName(a.getComponent().replace(\"~\", \"$\").toLowerCase()) + \";\\n\";\r\n }\r\n // constants can be accessed both statically and via reference\r\n for (const c of def.getAttributes().getConstants()) {\r\n ret += \"this.\" + c.getName().toLowerCase() + \" = \" + cName + \".\" + c.getName().toLowerCase() + \";\\n\";\r\n }\r\n return ret;\r\n }\r\n findInterfaceDefinition(name, scope) {\r\n let intf = scope === null || scope === void 0 ? void 0 : scope.findInterfaceDefinition(name);\r\n if (intf === undefined) {\r\n const iglobal = this.reg.getObject(\"INTF\", name);\r\n intf = iglobal === null || iglobal === void 0 ? void 0 : iglobal.getDefinition();\r\n }\r\n return intf;\r\n }\r\n findTable(name) {\r\n const tabl = this.reg.getObject(\"TABL\", name);\r\n return tabl;\r\n }\r\n findClassDefinition(name, scope) {\r\n if (name === undefined || scope === undefined) {\r\n return undefined;\r\n }\r\n let clas = scope.findClassDefinition(name);\r\n if (clas === undefined) {\r\n const iglobal = this.reg.getObject(\"CLAS\", name);\r\n clas = iglobal === null || iglobal === void 0 ? void 0 : iglobal.getDefinition();\r\n }\r\n return clas;\r\n }\r\n dataFromInterfaces(name, scope) {\r\n let ret = \"\";\r\n const intf = this.findInterfaceDefinition(name, scope);\r\n for (const a of (intf === null || intf === void 0 ? void 0 : intf.getAttributes().getAll()) || []) {\r\n if (a.getMeta().includes(\"static\" /* abaplint.IdentifierMeta.Static */) === true) {\r\n continue;\r\n }\r\n const n = Traversal.escapeClassName(name.toLowerCase()) + \"$\" + a.getName().toLowerCase();\r\n ret += \"this.\" + n + \" = \" + new transpile_types_1.TranspileTypes().toType(a.getType()) + \";\\n\";\r\n }\r\n for (const i of (intf === null || intf === void 0 ? void 0 : intf.getImplementing()) || []) {\r\n ret += this.dataFromInterfaces(i.name, scope);\r\n }\r\n return ret;\r\n }\r\n determineType(node, scope) {\r\n var _a, _b, _c;\r\n if (scope === undefined) {\r\n return undefined;\r\n }\r\n const found = node.findDirectExpression(abaplint.Expressions.Target);\r\n if (found === undefined) {\r\n return undefined;\r\n }\r\n let context = undefined;\r\n for (const c of found.getChildren()) {\r\n if (context === undefined) {\r\n context = (_a = scope.findVariable(c.getFirstToken().getStr())) === null || _a === void 0 ? void 0 : _a.getType();\r\n }\r\n else if (c.get() instanceof abaplint.Expressions.ComponentName\r\n && context instanceof abaplint.BasicTypes.StructureType) {\r\n context = context.getComponentByName(c.getFirstToken().getStr());\r\n }\r\n else if (c.get() instanceof abaplint.Expressions.AttributeName\r\n && context instanceof abaplint.BasicTypes.ObjectReferenceType) {\r\n const id = context.getIdentifier();\r\n if (id instanceof abaplint.Types.ClassDefinition || id instanceof abaplint.Types.InterfaceDefinition) {\r\n const concat = c.concatTokens();\r\n if (concat.includes(\"~\")) {\r\n const [iname, aname] = concat.split(\"~\");\r\n const intf = this.findInterfaceDefinition(iname, scope);\r\n context = (_b = intf === null || intf === void 0 ? void 0 : intf.getAttributes().findByName(aname)) === null || _b === void 0 ? void 0 : _b.getType();\r\n }\r\n else {\r\n context = (_c = id.getAttributes().findByName(concat)) === null || _c === void 0 ? void 0 : _c.getType();\r\n }\r\n }\r\n }\r\n }\r\n return context;\r\n }\r\n isInsideLoop(node) {\r\n const stack = [];\r\n for (const statement of this.getFile().getStatements()) {\r\n const get = statement.get();\r\n if (get instanceof abaplint.Statements.Loop\r\n || get instanceof abaplint.Statements.While\r\n || get instanceof abaplint.Statements.SelectLoop\r\n || get instanceof abaplint.Statements.Do) {\r\n stack.push(statement);\r\n }\r\n else if (get instanceof abaplint.Statements.EndLoop\r\n || get instanceof abaplint.Statements.EndWhile\r\n || get instanceof abaplint.Statements.EndSelect\r\n || get instanceof abaplint.Statements.EndDo) {\r\n stack.pop();\r\n }\r\n if (statement === node) {\r\n break;\r\n }\r\n }\r\n return stack.length > 0;\r\n }\r\n isInsideDoOrWhile(node) {\r\n const stack = [];\r\n for (const statement of this.getFile().getStatements()) {\r\n const get = statement.get();\r\n if (get instanceof abaplint.Statements.While\r\n || get instanceof abaplint.Statements.Do) {\r\n stack.push(statement);\r\n }\r\n else if (get instanceof abaplint.Statements.EndWhile\r\n || get instanceof abaplint.Statements.EndDo) {\r\n stack.pop();\r\n }\r\n if (statement === node) {\r\n break;\r\n }\r\n }\r\n return stack.length > 0;\r\n }\r\n registerClassOrInterface(def) {\r\n if (def === undefined) {\r\n return \"\";\r\n }\r\n const name = def.getName();\r\n if (def.isGlobal() === false) {\r\n const prefix = this.buildPrefix(def);\r\n return `abap.Classes['${prefix}-${name.toUpperCase()}'] = ${Traversal.escapeClassName(name.toLowerCase())};`;\r\n }\r\n else {\r\n return `abap.Classes['${name.toUpperCase()}'] = ${Traversal.escapeClassName(name.toLowerCase())};`;\r\n }\r\n }\r\n setValues(identifier, name) {\r\n const val = identifier.getValue();\r\n let ret = \"\";\r\n if (typeof val === \"string\") {\r\n const e = new expressions_1.ConstantTranspiler().escape(val);\r\n ret += name + \".set(\" + e + \");\\n\";\r\n }\r\n else if (typeof val === \"object\") {\r\n const a = val;\r\n for (const v of Object.keys(val)) {\r\n let s = a[v];\r\n if (s === undefined) {\r\n continue;\r\n }\r\n s = new expressions_1.ConstantTranspiler().escape(s);\r\n ret += name + \".get().\" + v + \".set(\" + s + \");\\n\";\r\n }\r\n }\r\n return ret;\r\n }\r\n lookupClassOrInterface(name, token, directGlobal = false) {\r\n var _a, _b;\r\n if (name === undefined || token === undefined) {\r\n return \"abap.Classes['undefined']\";\r\n }\r\n if (directGlobal === true) {\r\n return \"abap.Classes[\" + name + \"]\";\r\n }\r\n const scope = this.findCurrentScopeByToken(token);\r\n // todo, add explicit type,\r\n let def = scope === null || scope === void 0 ? void 0 : scope.findClassDefinition(name);\r\n if (def === undefined) {\r\n def = scope === null || scope === void 0 ? void 0 : scope.findInterfaceDefinition(name);\r\n }\r\n if (def) {\r\n if (def.isGlobal() === false) {\r\n const prefix = this.buildPrefix(def);\r\n return `abap.Classes['${prefix}-${(_a = def === null || def === void 0 ? void 0 : def.getName()) === null || _a === void 0 ? void 0 : _a.toUpperCase()}']`;\r\n }\r\n else {\r\n return `abap.Classes['${(_b = def === null || def === void 0 ? void 0 : def.getName()) === null || _b === void 0 ? void 0 : _b.toUpperCase()}']`;\r\n }\r\n }\r\n else {\r\n // assume global\r\n return \"abap.Classes['\" + name.toUpperCase() + \"']\";\r\n }\r\n }\r\n buildPrefix(def) {\r\n const file = this.reg.getFileByName(def.getFilename());\r\n if (file === undefined) {\r\n return \"NOT_FOUND\";\r\n }\r\n const obj = this.reg.findObjectForFile(file);\r\n return (obj === null || obj === void 0 ? void 0 : obj.getType()) + \"-\" + (obj === null || obj === void 0 ? void 0 : obj.getName());\r\n }\r\n ////////////////////////////\r\n traverseStructure(node) {\r\n const list = StructureTranspilers;\r\n const ret = new chunk_1.Chunk();\r\n for (const c of node.getChildren()) {\r\n if (c instanceof abaplint.Nodes.StructureNode) {\r\n const search = c.get().constructor.name + \"Transpiler\";\r\n if (list[search]) {\r\n const transpiler = new list[search]();\r\n ret.appendChunk(transpiler.transpile(c, this));\r\n continue;\r\n }\r\n ret.appendChunk(this.traverseStructure(c));\r\n }\r\n else if (c instanceof abaplint.Nodes.StatementNode) {\r\n ret.appendChunk(this.traverseStatement(c));\r\n }\r\n else {\r\n throw new Error(\"traverseStructure, unexpected child node type\");\r\n }\r\n }\r\n return ret;\r\n }\r\n traverseStatement(node) {\r\n const list = StatementTranspilers;\r\n const search = node.get().constructor.name + \"Transpiler\";\r\n if (list[search]) {\r\n const transpiler = new list[search]();\r\n const chunk = transpiler.transpile(node, this);\r\n chunk.appendString(\"\\n\");\r\n return chunk;\r\n }\r\n throw new Error(`Statement ${node.get().constructor.name} not supported, ${node.concatTokens()}`);\r\n }\r\n traverseExpression(node) {\r\n const list = ExpressionTranspilers;\r\n const search = node.get().constructor.name + \"Transpiler\";\r\n if (list[search]) {\r\n const transpiler = new list[search]();\r\n return transpiler.transpile(node, this);\r\n }\r\n throw new Error(`Expression ${node.get().constructor.name} not supported, ${node.concatTokens()}`);\r\n }\r\n}\r\nexports.Traversal = Traversal;\r\n//# sourceMappingURL=traversal.js.map\n\n//# sourceURL=webpack://@abaplint/transpiler-cli/./node_modules/@abaplint/transpiler/build/src/traversal.js?");
15651
15662
 
15652
15663
  /***/ }),
15653
15664
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/transpiler-cli",
3
- "version": "2.3.63",
3
+ "version": "2.3.65",
4
4
  "description": "Transpiler - Command Line Interface",
5
5
  "bin": {
6
6
  "abap_transpile": "./abap_transpile"
@@ -25,11 +25,11 @@
25
25
  "author": "abaplint",
26
26
  "license": "MIT",
27
27
  "devDependencies": {
28
- "@abaplint/transpiler": "^2.3.63",
28
+ "@abaplint/transpiler": "^2.3.65",
29
29
  "@types/glob": "^7.2.0",
30
30
  "glob": "=7.2.0",
31
31
  "@types/progress": "^2.0.5",
32
- "@abaplint/core": "^2.93.99",
32
+ "@abaplint/core": "^2.94.0",
33
33
  "progress": "^2.0.3",
34
34
  "webpack": "^5.75.0",
35
35
  "webpack-cli": "^5.0.0",