@abaplint/cli 2.93.97 → 2.93.99

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/cli.js +18 -18
  2. package/package.json +2 -2
package/build/cli.js CHANGED
@@ -181,7 +181,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
181
181
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
182
182
 
183
183
  "use strict";
184
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.Lexer = void 0;\r\nconst Tokens = __webpack_require__(/*! ./tokens */ \"./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js\");\r\nconst position_1 = __webpack_require__(/*! ../../position */ \"./node_modules/@abaplint/core/build/src/position.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}\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 return this.raw.substr(this.offset - 1, 1);\r\n }\r\n prevPrevChar() {\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 return this.raw.substr(this.offset, 1);\r\n }\r\n nextChar() {\r\n return this.raw.substr(this.offset + 1, 1);\r\n }\r\n nextNextChar() {\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 static 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 static 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 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 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.Comment(pos, s);\r\n }\r\n else if (this.m === Mode.Ping || this.m === Mode.Str) {\r\n tok = new Tokens.String(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.StringTemplate(pos, s);\r\n }\r\n else if (first === \"|\" && last === \"{\" && whiteAfter === true) {\r\n tok = new Tokens.StringTemplateBegin(pos, s);\r\n }\r\n else if (first === \"}\" && last === \"|\" && whiteBefore === true) {\r\n tok = new Tokens.StringTemplateEnd(pos, s);\r\n }\r\n else if (first === \"}\" && last === \"{\" && whiteAfter === true && whiteBefore === true) {\r\n tok = new Tokens.StringTemplateMiddle(pos, s);\r\n }\r\n else {\r\n tok = new Tokens.Identifier(pos, s);\r\n }\r\n }\r\n else if (s.substr(0, 2) === \"##\") {\r\n tok = new Tokens.Pragma(pos, s);\r\n }\r\n else if (s.length === 1) {\r\n if (s === \".\" || s === \",\") {\r\n tok = new Tokens.Punctuation(pos, s);\r\n }\r\n else if (s === \"[\") {\r\n if (whiteBefore && whiteAfter) {\r\n tok = new Tokens.WBracketLeftW(pos, s);\r\n }\r\n else if (whiteBefore) {\r\n tok = new Tokens.WBracketLeft(pos, s);\r\n }\r\n else if (whiteAfter) {\r\n tok = new Tokens.BracketLeftW(pos, s);\r\n }\r\n else {\r\n tok = new Tokens.BracketLeft(pos, s);\r\n }\r\n }\r\n else if (s === \"(\") {\r\n if (whiteBefore && whiteAfter) {\r\n tok = new Tokens.WParenLeftW(pos, s);\r\n }\r\n else if (whiteBefore) {\r\n tok = new Tokens.WParenLeft(pos, s);\r\n }\r\n else if (whiteAfter) {\r\n tok = new Tokens.ParenLeftW(pos, s);\r\n }\r\n else {\r\n tok = new Tokens.ParenLeft(pos, s);\r\n }\r\n }\r\n else if (s === \"]\") {\r\n if (whiteBefore && whiteAfter) {\r\n tok = new Tokens.WBracketRightW(pos, s);\r\n }\r\n else if (whiteBefore) {\r\n tok = new Tokens.WBracketRight(pos, s);\r\n }\r\n else if (whiteAfter) {\r\n tok = new Tokens.BracketRightW(pos, s);\r\n }\r\n else {\r\n tok = new Tokens.BracketRight(pos, s);\r\n }\r\n }\r\n else if (s === \")\") {\r\n if (whiteBefore && whiteAfter) {\r\n tok = new Tokens.WParenRightW(pos, s);\r\n }\r\n else if (whiteBefore) {\r\n tok = new Tokens.WParenRight(pos, s);\r\n }\r\n else if (whiteAfter) {\r\n tok = new Tokens.ParenRightW(pos, s);\r\n }\r\n else {\r\n tok = new Tokens.ParenRight(pos, s);\r\n }\r\n }\r\n else if (s === \"-\") {\r\n if (whiteBefore && whiteAfter) {\r\n tok = new Tokens.WDashW(pos, s);\r\n }\r\n else if (whiteBefore) {\r\n tok = new Tokens.WDash(pos, s);\r\n }\r\n else if (whiteAfter) {\r\n tok = new Tokens.DashW(pos, s);\r\n }\r\n else {\r\n tok = new Tokens.Dash(pos, s);\r\n }\r\n }\r\n else if (s === \"+\") {\r\n if (whiteBefore && whiteAfter) {\r\n tok = new Tokens.WPlusW(pos, s);\r\n }\r\n else if (whiteBefore) {\r\n tok = new Tokens.WPlus(pos, s);\r\n }\r\n else if (whiteAfter) {\r\n tok = new Tokens.PlusW(pos, s);\r\n }\r\n else {\r\n tok = new Tokens.Plus(pos, s);\r\n }\r\n }\r\n else if (s === \"@\") {\r\n if (whiteBefore && whiteAfter) {\r\n tok = new Tokens.WAtW(pos, s);\r\n }\r\n else if (whiteBefore) {\r\n tok = new Tokens.WAt(pos, s);\r\n }\r\n else if (whiteAfter) {\r\n tok = new Tokens.AtW(pos, s);\r\n }\r\n else {\r\n tok = new Tokens.At(pos, s);\r\n }\r\n }\r\n }\r\n else if (s.length === 2) {\r\n if (s === \"->\") {\r\n if (whiteBefore && whiteAfter) {\r\n tok = new Tokens.WInstanceArrowW(pos, s);\r\n }\r\n else if (whiteBefore) {\r\n tok = new Tokens.WInstanceArrow(pos, s);\r\n }\r\n else if (whiteAfter) {\r\n tok = new Tokens.InstanceArrowW(pos, s);\r\n }\r\n else {\r\n tok = new Tokens.InstanceArrow(pos, s);\r\n }\r\n }\r\n else if (s === \"=>\") {\r\n if (whiteBefore && whiteAfter) {\r\n tok = new Tokens.WStaticArrowW(pos, s);\r\n }\r\n else if (whiteBefore) {\r\n tok = new Tokens.WStaticArrow(pos, s);\r\n }\r\n else if (whiteAfter) {\r\n tok = new Tokens.StaticArrowW(pos, s);\r\n }\r\n else {\r\n tok = new Tokens.StaticArrow(pos, s);\r\n }\r\n }\r\n }\r\n if (tok === undefined) {\r\n tok = new Tokens.Identifier(pos, s);\r\n }\r\n this.tokens.push(tok);\r\n }\r\n this.buffer.clear();\r\n }\r\n static 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 && (buf.split(\"`\").length - 1) % 2 === 0\r\n && ahead !== \"`\") {\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 && (buf.split(\"'\").length - 1) % 2 === 0\r\n && ahead !== \"'\") {\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/cli/./node_modules/@abaplint/core/build/src/abap/1_lexer/lexer.js?");
184
+ 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/cli/./node_modules/@abaplint/core/build/src/abap/1_lexer/lexer.js?");
185
185
 
186
186
  /***/ }),
187
187
 
@@ -368,7 +368,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
368
368
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
369
369
 
370
370
  "use strict";
371
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.StringTemplateMiddle = exports.StringTemplateEnd = exports.StringTemplateBegin = exports.StringTemplate = exports.String = void 0;\r\nconst _token_1 = __webpack_require__(/*! ./_token */ \"./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/_token.js\");\r\nclass String extends _token_1.Token {\r\n}\r\nexports.String = String;\r\nclass StringTemplate extends _token_1.Token {\r\n}\r\nexports.StringTemplate = StringTemplate;\r\nclass StringTemplateBegin extends _token_1.Token {\r\n}\r\nexports.StringTemplateBegin = StringTemplateBegin;\r\nclass StringTemplateEnd extends _token_1.Token {\r\n}\r\nexports.StringTemplateEnd = StringTemplateEnd;\r\nclass StringTemplateMiddle extends _token_1.Token {\r\n}\r\nexports.StringTemplateMiddle = StringTemplateMiddle;\r\n//# sourceMappingURL=string.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/string.js?");
371
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.StringTemplateMiddle = exports.StringTemplateEnd = exports.StringTemplateBegin = exports.StringTemplate = exports.StringToken = void 0;\r\nconst _token_1 = __webpack_require__(/*! ./_token */ \"./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/_token.js\");\r\nclass StringToken extends _token_1.Token {\r\n}\r\nexports.StringToken = StringToken;\r\nclass StringTemplate extends _token_1.Token {\r\n}\r\nexports.StringTemplate = StringTemplate;\r\nclass StringTemplateBegin extends _token_1.Token {\r\n}\r\nexports.StringTemplateBegin = StringTemplateBegin;\r\nclass StringTemplateEnd extends _token_1.Token {\r\n}\r\nexports.StringTemplateEnd = StringTemplateEnd;\r\nclass StringTemplateMiddle extends _token_1.Token {\r\n}\r\nexports.StringTemplateMiddle = StringTemplateMiddle;\r\n//# sourceMappingURL=string.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/string.js?");
372
372
 
373
373
  /***/ }),
374
374
 
@@ -390,7 +390,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
390
390
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
391
391
 
392
392
  "use strict";
393
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.ExpandMacros = void 0;\r\nconst Statements = __webpack_require__(/*! ./statements */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js\");\r\nconst Expressions = __webpack_require__(/*! ./expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst Tokens = __webpack_require__(/*! ../1_lexer/tokens */ \"./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js\");\r\nconst _statement_1 = __webpack_require__(/*! ./statements/_statement */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/_statement.js\");\r\nconst statement_node_1 = __webpack_require__(/*! ../nodes/statement_node */ \"./node_modules/@abaplint/core/build/src/abap/nodes/statement_node.js\");\r\nconst token_node_1 = __webpack_require__(/*! ../nodes/token_node */ \"./node_modules/@abaplint/core/build/src/abap/nodes/token_node.js\");\r\nconst statement_parser_1 = __webpack_require__(/*! ./statement_parser */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statement_parser.js\");\r\nconst memory_file_1 = __webpack_require__(/*! ../../files/memory_file */ \"./node_modules/@abaplint/core/build/src/files/memory_file.js\");\r\nconst lexer_1 = __webpack_require__(/*! ../1_lexer/lexer */ \"./node_modules/@abaplint/core/build/src/abap/1_lexer/lexer.js\");\r\nconst position_1 = __webpack_require__(/*! ../../position */ \"./node_modules/@abaplint/core/build/src/position.js\");\r\nclass Macros {\r\n constructor(globalMacros) {\r\n this.macros = {};\r\n for (const m of globalMacros) {\r\n this.macros[m.toUpperCase()] = [];\r\n }\r\n }\r\n addMacro(name, contents) {\r\n if (this.isMacro(name)) {\r\n return;\r\n }\r\n this.macros[name.toUpperCase()] = contents;\r\n }\r\n getContents(name) {\r\n return this.macros[name.toUpperCase()];\r\n }\r\n listMacroNames() {\r\n return Object.keys(this.macros);\r\n }\r\n isMacro(name) {\r\n if (this.macros[name.toUpperCase()]) {\r\n return true;\r\n }\r\n return false;\r\n }\r\n}\r\nclass ExpandMacros {\r\n // \"reg\" must be supplied if there are cross object macros via INCLUDE\r\n constructor(globalMacros, version, reg) {\r\n this.macros = new Macros(globalMacros);\r\n this.version = version;\r\n this.globalMacros = globalMacros;\r\n this.reg = reg;\r\n }\r\n find(statements) {\r\n var _a, _b;\r\n let name = undefined;\r\n let contents = [];\r\n for (let i = 0; i < statements.length; i++) {\r\n const statement = statements[i];\r\n const type = statement.get();\r\n if (type instanceof Statements.Define) {\r\n // todo, will this break if first token is a pragma?\r\n name = statement.getTokens()[1].getStr();\r\n contents = [];\r\n }\r\n else if (type instanceof Statements.Include) {\r\n const includeName = (_a = statement.findDirectExpression(Expressions.IncludeName)) === null || _a === void 0 ? void 0 : _a.concatTokens();\r\n // todo, this does not take function module includes into account\r\n const prog = (_b = this.reg) === null || _b === void 0 ? void 0 : _b.getObject(\"PROG\", includeName);\r\n if (prog) {\r\n prog.parse(this.version, this.globalMacros, this.reg);\r\n const main = prog.getMainABAPFile();\r\n if (main) {\r\n // slow, this copies everything,\r\n this.find([...main.getStatements()]);\r\n }\r\n }\r\n }\r\n else if (name) {\r\n if (type instanceof Statements.EndOfDefinition) {\r\n this.macros.addMacro(name, contents);\r\n name = undefined;\r\n }\r\n else if (!(type instanceof _statement_1.Comment)) {\r\n statements[i] = new statement_node_1.StatementNode(new _statement_1.MacroContent()).setChildren(this.tokensToNodes(statement.getTokens()));\r\n contents.push(statements[i]);\r\n }\r\n }\r\n }\r\n }\r\n handleMacros(statements) {\r\n const result = [];\r\n let containsUnknown = false;\r\n for (const statement of statements) {\r\n const type = statement.get();\r\n if (type instanceof _statement_1.Unknown || type instanceof _statement_1.MacroCall) {\r\n const macroName = this.findName(statement.getTokens());\r\n if (macroName && this.macros.isMacro(macroName)) {\r\n result.push(new statement_node_1.StatementNode(new _statement_1.MacroCall()).setChildren(this.tokensToNodes(statement.getTokens())));\r\n const expanded = this.expandContents(macroName, statement);\r\n const handled = this.handleMacros(expanded);\r\n for (const e of handled.statements) {\r\n result.push(e);\r\n }\r\n if (handled.containsUnknown === true) {\r\n containsUnknown = true;\r\n }\r\n continue;\r\n }\r\n else {\r\n containsUnknown = true;\r\n }\r\n }\r\n result.push(statement);\r\n }\r\n return { statements: result, containsUnknown };\r\n }\r\n //////////////\r\n expandContents(name, statement) {\r\n const contents = this.macros.getContents(name);\r\n if (contents === undefined || contents.length === 0) {\r\n return [];\r\n }\r\n let str = \"\";\r\n for (const c of contents) {\r\n let concat = c.concatTokens();\r\n if (c.getTerminator() === \",\") {\r\n // workaround for chained statements\r\n concat = concat.replace(/,$/, \".\");\r\n }\r\n str += concat + \"\\n\";\r\n }\r\n const inputs = this.buildInput(statement);\r\n let i = 1;\r\n for (const input of inputs) {\r\n const search = \"&\" + i;\r\n const reg = new RegExp(search, \"g\");\r\n str = str.replace(reg, input);\r\n i++;\r\n }\r\n const file = new memory_file_1.MemoryFile(\"expand_macros.abap.prog\", str);\r\n const lexerResult = lexer_1.Lexer.run(file, statement.getFirstToken().getStart());\r\n const result = new statement_parser_1.StatementParser(this.version, this.reg).run([lexerResult], this.macros.listMacroNames());\r\n return result[0].statements;\r\n }\r\n buildInput(statement) {\r\n const result = [];\r\n const tokens = statement.getTokens();\r\n let build = \"\";\r\n for (let i = 1; i < tokens.length - 1; i++) {\r\n const now = tokens[i];\r\n let next = tokens[i + 1];\r\n if (i + 2 === tokens.length) {\r\n next = undefined; // dont take the punctuation\r\n }\r\n // argh, macros is a nightmare\r\n let end = now.getStart();\r\n if (end instanceof position_1.VirtualPosition) {\r\n end = new position_1.VirtualPosition(end, end.vrow, end.vcol + now.getStr().length);\r\n }\r\n else {\r\n end = now.getEnd();\r\n }\r\n if (next && next.getStart().equals(end)) {\r\n build += now.getStr();\r\n }\r\n else {\r\n build += now.getStr();\r\n result.push(build);\r\n build = \"\";\r\n }\r\n }\r\n return result;\r\n }\r\n findName(tokens) {\r\n let macroName = undefined;\r\n let previous = undefined;\r\n for (const i of tokens) {\r\n if (previous && (previous === null || previous === void 0 ? void 0 : previous.getEnd().getCol()) !== i.getStart().getCol()) {\r\n break;\r\n }\r\n else if (i instanceof Tokens.Identifier || i.getStr() === \"-\") {\r\n if (macroName === undefined) {\r\n macroName = i.getStr();\r\n }\r\n else {\r\n macroName += i.getStr();\r\n }\r\n }\r\n else if (i instanceof Tokens.Pragma) {\r\n continue;\r\n }\r\n else {\r\n break;\r\n }\r\n previous = i;\r\n }\r\n return macroName;\r\n }\r\n tokensToNodes(tokens) {\r\n const ret = [];\r\n for (const t of tokens) {\r\n ret.push(new token_node_1.TokenNode(t));\r\n }\r\n return ret;\r\n }\r\n}\r\nexports.ExpandMacros = ExpandMacros;\r\n//# sourceMappingURL=expand_macros.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/2_statements/expand_macros.js?");
393
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.ExpandMacros = void 0;\r\nconst Statements = __webpack_require__(/*! ./statements */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js\");\r\nconst Expressions = __webpack_require__(/*! ./expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst Tokens = __webpack_require__(/*! ../1_lexer/tokens */ \"./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js\");\r\nconst _statement_1 = __webpack_require__(/*! ./statements/_statement */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/_statement.js\");\r\nconst statement_node_1 = __webpack_require__(/*! ../nodes/statement_node */ \"./node_modules/@abaplint/core/build/src/abap/nodes/statement_node.js\");\r\nconst token_node_1 = __webpack_require__(/*! ../nodes/token_node */ \"./node_modules/@abaplint/core/build/src/abap/nodes/token_node.js\");\r\nconst statement_parser_1 = __webpack_require__(/*! ./statement_parser */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statement_parser.js\");\r\nconst memory_file_1 = __webpack_require__(/*! ../../files/memory_file */ \"./node_modules/@abaplint/core/build/src/files/memory_file.js\");\r\nconst lexer_1 = __webpack_require__(/*! ../1_lexer/lexer */ \"./node_modules/@abaplint/core/build/src/abap/1_lexer/lexer.js\");\r\nconst position_1 = __webpack_require__(/*! ../../position */ \"./node_modules/@abaplint/core/build/src/position.js\");\r\nclass Macros {\r\n constructor(globalMacros) {\r\n this.macros = {};\r\n for (const m of globalMacros) {\r\n this.macros[m.toUpperCase()] = [];\r\n }\r\n }\r\n addMacro(name, contents) {\r\n if (this.isMacro(name)) {\r\n return;\r\n }\r\n this.macros[name.toUpperCase()] = contents;\r\n }\r\n getContents(name) {\r\n return this.macros[name.toUpperCase()];\r\n }\r\n listMacroNames() {\r\n return Object.keys(this.macros);\r\n }\r\n isMacro(name) {\r\n if (this.macros[name.toUpperCase()]) {\r\n return true;\r\n }\r\n return false;\r\n }\r\n}\r\nclass ExpandMacros {\r\n // \"reg\" must be supplied if there are cross object macros via INCLUDE\r\n constructor(globalMacros, version, reg) {\r\n this.macros = new Macros(globalMacros);\r\n this.version = version;\r\n this.globalMacros = globalMacros;\r\n this.reg = reg;\r\n }\r\n find(statements) {\r\n var _a, _b;\r\n let name = undefined;\r\n let contents = [];\r\n for (let i = 0; i < statements.length; i++) {\r\n const statement = statements[i];\r\n const type = statement.get();\r\n if (type instanceof Statements.Define) {\r\n // todo, will this break if first token is a pragma?\r\n name = statement.getTokens()[1].getStr();\r\n contents = [];\r\n }\r\n else if (type instanceof Statements.Include) {\r\n const includeName = (_a = statement.findDirectExpression(Expressions.IncludeName)) === null || _a === void 0 ? void 0 : _a.concatTokens();\r\n // todo, this does not take function module includes into account\r\n const prog = (_b = this.reg) === null || _b === void 0 ? void 0 : _b.getObject(\"PROG\", includeName);\r\n if (prog) {\r\n prog.parse(this.version, this.globalMacros, this.reg);\r\n const main = prog.getMainABAPFile();\r\n if (main) {\r\n // slow, this copies everything,\r\n this.find([...main.getStatements()]);\r\n }\r\n }\r\n }\r\n else if (name) {\r\n if (type instanceof Statements.EndOfDefinition) {\r\n this.macros.addMacro(name, contents);\r\n name = undefined;\r\n }\r\n else if (!(type instanceof _statement_1.Comment)) {\r\n statements[i] = new statement_node_1.StatementNode(new _statement_1.MacroContent()).setChildren(this.tokensToNodes(statement.getTokens()));\r\n contents.push(statements[i]);\r\n }\r\n }\r\n }\r\n }\r\n handleMacros(statements) {\r\n const result = [];\r\n let containsUnknown = false;\r\n for (const statement of statements) {\r\n const type = statement.get();\r\n if (type instanceof _statement_1.Unknown || type instanceof _statement_1.MacroCall) {\r\n const macroName = this.findName(statement.getTokens());\r\n if (macroName && this.macros.isMacro(macroName)) {\r\n result.push(new statement_node_1.StatementNode(new _statement_1.MacroCall()).setChildren(this.tokensToNodes(statement.getTokens())));\r\n const expanded = this.expandContents(macroName, statement);\r\n const handled = this.handleMacros(expanded);\r\n for (const e of handled.statements) {\r\n result.push(e);\r\n }\r\n if (handled.containsUnknown === true) {\r\n containsUnknown = true;\r\n }\r\n continue;\r\n }\r\n else {\r\n containsUnknown = true;\r\n }\r\n }\r\n result.push(statement);\r\n }\r\n return { statements: result, containsUnknown };\r\n }\r\n //////////////\r\n expandContents(name, statement) {\r\n const contents = this.macros.getContents(name);\r\n if (contents === undefined || contents.length === 0) {\r\n return [];\r\n }\r\n let str = \"\";\r\n for (const c of contents) {\r\n let concat = c.concatTokens();\r\n if (c.getTerminator() === \",\") {\r\n // workaround for chained statements\r\n concat = concat.replace(/,$/, \".\");\r\n }\r\n str += concat + \"\\n\";\r\n }\r\n const inputs = this.buildInput(statement);\r\n let i = 1;\r\n for (const input of inputs) {\r\n const search = \"&\" + i;\r\n const reg = new RegExp(search, \"g\");\r\n str = str.replace(reg, input);\r\n i++;\r\n }\r\n const file = new memory_file_1.MemoryFile(\"expand_macros.abap.prog\", str);\r\n const lexerResult = new lexer_1.Lexer().run(file, statement.getFirstToken().getStart());\r\n const result = new statement_parser_1.StatementParser(this.version, this.reg).run([lexerResult], this.macros.listMacroNames());\r\n return result[0].statements;\r\n }\r\n buildInput(statement) {\r\n const result = [];\r\n const tokens = statement.getTokens();\r\n let build = \"\";\r\n for (let i = 1; i < tokens.length - 1; i++) {\r\n const now = tokens[i];\r\n let next = tokens[i + 1];\r\n if (i + 2 === tokens.length) {\r\n next = undefined; // dont take the punctuation\r\n }\r\n // argh, macros is a nightmare\r\n let end = now.getStart();\r\n if (end instanceof position_1.VirtualPosition) {\r\n end = new position_1.VirtualPosition(end, end.vrow, end.vcol + now.getStr().length);\r\n }\r\n else {\r\n end = now.getEnd();\r\n }\r\n if (next && next.getStart().equals(end)) {\r\n build += now.getStr();\r\n }\r\n else {\r\n build += now.getStr();\r\n result.push(build);\r\n build = \"\";\r\n }\r\n }\r\n return result;\r\n }\r\n findName(tokens) {\r\n let macroName = undefined;\r\n let previous = undefined;\r\n for (const i of tokens) {\r\n if (previous && (previous === null || previous === void 0 ? void 0 : previous.getEnd().getCol()) !== i.getStart().getCol()) {\r\n break;\r\n }\r\n else if (i instanceof Tokens.Identifier || i.getStr() === \"-\") {\r\n if (macroName === undefined) {\r\n macroName = i.getStr();\r\n }\r\n else {\r\n macroName += i.getStr();\r\n }\r\n }\r\n else if (i instanceof Tokens.Pragma) {\r\n continue;\r\n }\r\n else {\r\n break;\r\n }\r\n previous = i;\r\n }\r\n return macroName;\r\n }\r\n tokensToNodes(tokens) {\r\n const ret = [];\r\n for (const t of tokens) {\r\n ret.push(new token_node_1.TokenNode(t));\r\n }\r\n return ret;\r\n }\r\n}\r\nexports.ExpandMacros = ExpandMacros;\r\n//# sourceMappingURL=expand_macros.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/2_statements/expand_macros.js?");
394
394
 
395
395
  /***/ }),
396
396
 
@@ -610,7 +610,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
610
610
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
611
611
 
612
612
  "use strict";
613
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.Compare = void 0;\r\nconst combi_1 = __webpack_require__(/*! ../combi */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js\");\r\nconst _1 = __webpack_require__(/*! . */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst tokens_1 = __webpack_require__(/*! ../../1_lexer/tokens */ \"./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js\");\r\nconst version_1 = __webpack_require__(/*! ../../../version */ \"./node_modules/@abaplint/core/build/src/version.js\");\r\nclass Compare extends combi_1.Expression {\r\n getRunnable() {\r\n const val = (0, combi_1.altPrio)(_1.FieldSub, _1.Constant);\r\n const list = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WParenLeft), val, (0, combi_1.plus)((0, combi_1.seq)(\",\", val)), (0, combi_1.tok)(tokens_1.ParenRightW));\r\n const inn = (0, combi_1.seq)((0, combi_1.optPrio)(\"NOT\"), \"IN\", (0, combi_1.altPrio)(_1.Source, list));\r\n const sopt = (0, combi_1.seq)(\"IS\", (0, combi_1.optPrio)(\"NOT\"), (0, combi_1.altPrio)(\"SUPPLIED\", \"BOUND\", (0, combi_1.ver)(version_1.Version.v750, (0, combi_1.seq)(\"INSTANCE OF\", _1.ClassName)), \"REQUESTED\", \"INITIAL\"));\r\n const between = (0, combi_1.seq)((0, combi_1.optPrio)(\"NOT\"), \"BETWEEN\", _1.Source, \"AND\", _1.Source);\r\n const predicate = (0, combi_1.ver)(version_1.Version.v740sp08, _1.MethodCallChain);\r\n const rett = (0, combi_1.seq)(_1.Source, (0, combi_1.altPrio)((0, combi_1.seq)(_1.CompareOperator, _1.Source), inn, between, sopt));\r\n const fsassign = (0, combi_1.seq)(_1.SourceFieldSymbol, \"IS\", (0, combi_1.optPrio)(\"NOT\"), \"ASSIGNED\");\r\n const ret = (0, combi_1.seq)((0, combi_1.opt)(\"NOT\"), (0, combi_1.altPrio)(rett, predicate, fsassign));\r\n return ret;\r\n }\r\n}\r\nexports.Compare = Compare;\r\n//# sourceMappingURL=compare.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/compare.js?");
613
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.Compare = void 0;\r\nconst combi_1 = __webpack_require__(/*! ../combi */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js\");\r\nconst _1 = __webpack_require__(/*! . */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst tokens_1 = __webpack_require__(/*! ../../1_lexer/tokens */ \"./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js\");\r\nconst version_1 = __webpack_require__(/*! ../../../version */ \"./node_modules/@abaplint/core/build/src/version.js\");\r\nclass Compare extends combi_1.Expression {\r\n getRunnable() {\r\n const val = (0, combi_1.altPrio)(_1.FieldSub, _1.Constant);\r\n const list = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WParenLeft), val, (0, combi_1.plus)((0, combi_1.seq)(\",\", val)), (0, combi_1.tok)(tokens_1.ParenRightW));\r\n const inn = (0, combi_1.seq)((0, combi_1.optPrio)(\"NOT\"), \"IN\", (0, combi_1.altPrio)(_1.Source, list));\r\n const sopt = (0, combi_1.seq)(\"IS\", (0, combi_1.optPrio)(\"NOT\"), (0, combi_1.altPrio)(\"SUPPLIED\", \"BOUND\", (0, combi_1.ver)(version_1.Version.v750, (0, combi_1.seq)(\"INSTANCE OF\", _1.ClassName), version_1.Version.OpenABAP), \"REQUESTED\", \"INITIAL\"));\r\n const between = (0, combi_1.seq)((0, combi_1.optPrio)(\"NOT\"), \"BETWEEN\", _1.Source, \"AND\", _1.Source);\r\n const predicate = (0, combi_1.ver)(version_1.Version.v740sp08, _1.MethodCallChain);\r\n const rett = (0, combi_1.seq)(_1.Source, (0, combi_1.altPrio)((0, combi_1.seq)(_1.CompareOperator, _1.Source), inn, between, sopt));\r\n const fsassign = (0, combi_1.seq)(_1.SourceFieldSymbol, \"IS\", (0, combi_1.optPrio)(\"NOT\"), \"ASSIGNED\");\r\n const ret = (0, combi_1.seq)((0, combi_1.opt)(\"NOT\"), (0, combi_1.altPrio)(rett, predicate, fsassign));\r\n return ret;\r\n }\r\n}\r\nexports.Compare = Compare;\r\n//# sourceMappingURL=compare.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/compare.js?");
614
614
 
615
615
  /***/ }),
616
616
 
@@ -2282,7 +2282,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
2282
2282
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
2283
2283
 
2284
2284
  "use strict";
2285
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.SQLIn = void 0;\r\nconst combi_1 = __webpack_require__(/*! ../combi */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js\");\r\nconst _1 = __webpack_require__(/*! . */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst tokens_1 = __webpack_require__(/*! ../../1_lexer/tokens */ \"./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js\");\r\nconst version_1 = __webpack_require__(/*! ../../../version */ \"./node_modules/@abaplint/core/build/src/version.js\");\r\nclass SQLIn extends combi_1.Expression {\r\n getRunnable() {\r\n const val = new _1.SQLSource();\r\n const short = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.At), _1.SimpleSource3);\r\n const listOld = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WParenLeft), (0, combi_1.alt)((0, combi_1.ver)(version_1.Version.v740sp05, short), val), (0, combi_1.starPrio)((0, combi_1.seq)(\",\", val)), (0, combi_1.altPrio)((0, combi_1.tok)(tokens_1.ParenRight), (0, combi_1.tok)(tokens_1.ParenRightW), (0, combi_1.tok)(tokens_1.WParenRightW)));\r\n const listNew = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WParenLeftW), val, (0, combi_1.starPrio)((0, combi_1.seq)(\",\", val)), (0, combi_1.altPrio)((0, combi_1.tok)(tokens_1.WParenRight), (0, combi_1.tok)(tokens_1.WParenRightW)));\r\n const list = (0, combi_1.alt)(listOld, (0, combi_1.ver)(version_1.Version.v740sp02, listNew)); // version is a guess, https://github.com/abaplint/abaplint/issues/2530\r\n const subSelect = (0, combi_1.seq)(\"(\", _1.Select, \")\");\r\n const inn = (0, combi_1.seq)(\"IN\", (0, combi_1.altPrio)(_1.SQLSource, list, subSelect));\r\n return inn;\r\n }\r\n}\r\nexports.SQLIn = SQLIn;\r\n//# sourceMappingURL=sql_in.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_in.js?");
2285
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.SQLIn = void 0;\r\nconst combi_1 = __webpack_require__(/*! ../combi */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js\");\r\nconst _1 = __webpack_require__(/*! . */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst tokens_1 = __webpack_require__(/*! ../../1_lexer/tokens */ \"./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js\");\r\nconst version_1 = __webpack_require__(/*! ../../../version */ \"./node_modules/@abaplint/core/build/src/version.js\");\r\nclass SQLIn extends combi_1.Expression {\r\n getRunnable() {\r\n const val = new _1.SQLSource();\r\n const short = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.At), _1.SimpleSource3);\r\n const listOld = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WParenLeft), (0, combi_1.alt)((0, combi_1.ver)(version_1.Version.v740sp05, short), val), (0, combi_1.starPrio)((0, combi_1.seq)(\",\", val)), (0, combi_1.altPrio)((0, combi_1.tok)(tokens_1.ParenRight), (0, combi_1.tok)(tokens_1.ParenRightW), (0, combi_1.tok)(tokens_1.WParenRightW)));\r\n const listNew = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WParenLeftW), val, (0, combi_1.starPrio)((0, combi_1.seq)(\",\", (0, combi_1.altPrio)(short, val))), (0, combi_1.altPrio)((0, combi_1.tok)(tokens_1.WParenRight), (0, combi_1.tok)(tokens_1.WParenRightW)));\r\n const list = (0, combi_1.alt)(listOld, (0, combi_1.ver)(version_1.Version.v740sp02, listNew)); // version is a guess, https://github.com/abaplint/abaplint/issues/2530\r\n const subSelect = (0, combi_1.seq)(\"(\", _1.Select, \")\");\r\n const inn = (0, combi_1.seq)(\"IN\", (0, combi_1.altPrio)(_1.SQLSource, list, subSelect));\r\n return inn;\r\n }\r\n}\r\nexports.SQLIn = SQLIn;\r\n//# sourceMappingURL=sql_in.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_in.js?");
2286
2286
 
2287
2287
  /***/ }),
2288
2288
 
@@ -6627,7 +6627,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
6627
6627
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
6628
6628
 
6629
6629
  "use strict";
6630
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.ABAPFileInformation = void 0;\r\nconst Structures = __webpack_require__(/*! ../3_structures/structures */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/index.js\");\r\nconst Expressions = __webpack_require__(/*! ../2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst Statements = __webpack_require__(/*! ../2_statements/statements */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js\");\r\nconst _abap_file_information_1 = __webpack_require__(/*! ./_abap_file_information */ \"./node_modules/@abaplint/core/build/src/abap/4_file_information/_abap_file_information.js\");\r\nconst _identifier_1 = __webpack_require__(/*! ./_identifier */ \"./node_modules/@abaplint/core/build/src/abap/4_file_information/_identifier.js\");\r\nconst Tokens = __webpack_require__(/*! ../1_lexer/tokens */ \"./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js\");\r\nconst visibility_1 = __webpack_require__(/*! ./visibility */ \"./node_modules/@abaplint/core/build/src/abap/4_file_information/visibility.js\");\r\nclass ABAPFileInformation {\r\n constructor(structure, filename) {\r\n this.forms = [];\r\n this.implementations = [];\r\n this.interfaces = [];\r\n this.classes = [];\r\n this.filename = filename;\r\n this.parse(structure);\r\n }\r\n listClassImplementations() {\r\n return this.implementations;\r\n }\r\n listInterfaceDefinitions() {\r\n return this.interfaces;\r\n }\r\n getInterfaceDefinitionByName(name) {\r\n const upper = name.toUpperCase();\r\n for (const i of this.listInterfaceDefinitions()) {\r\n if (i.identifier.getName().toUpperCase() === upper) {\r\n return i;\r\n }\r\n }\r\n return undefined;\r\n }\r\n listClassDefinitions() {\r\n return this.classes;\r\n }\r\n getClassDefinitionByName(name) {\r\n const upper = name.toUpperCase();\r\n for (const d of this.listClassDefinitions()) {\r\n if (d.identifier.getName().toUpperCase() === upper) {\r\n return d;\r\n }\r\n }\r\n return undefined;\r\n }\r\n getClassImplementationByName(name) {\r\n const upper = name.toUpperCase();\r\n for (const impl of this.listClassImplementations()) {\r\n if (impl.identifier.getName().toUpperCase() === upper) {\r\n return impl;\r\n }\r\n }\r\n return undefined;\r\n }\r\n listFormDefinitions() {\r\n return this.forms;\r\n }\r\n ///////////////////////\r\n parse(structure) {\r\n var _a;\r\n if (structure === undefined) {\r\n return;\r\n }\r\n this.parseClasses(structure);\r\n this.parseInterfaces(structure);\r\n for (const found of structure.findAllStructures(Structures.ClassImplementation)) {\r\n const methods = [];\r\n for (const method of found.findAllStructures(Structures.Method)) {\r\n const methodName = (_a = method.findFirstExpression(Expressions.MethodName)) === null || _a === void 0 ? void 0 : _a.getFirstToken();\r\n if (methodName) {\r\n methods.push(new _identifier_1.Identifier(methodName, this.filename));\r\n }\r\n }\r\n const name = found.findFirstStatement(Statements.ClassImplementation).findFirstExpression(Expressions.ClassName).getFirstToken();\r\n this.implementations.push({\r\n name: name.getStr(),\r\n identifier: new _identifier_1.Identifier(name, this.filename),\r\n methods,\r\n });\r\n }\r\n for (const statement of structure.findAllStructures(Structures.Form)) {\r\n // FORMs can contain a dash in the name\r\n const pos = statement.findFirstExpression(Expressions.FormName).getFirstToken().getStart();\r\n const name = statement.findFirstExpression(Expressions.FormName).concatTokens();\r\n const nameToken = new Tokens.Identifier(pos, name);\r\n this.forms.push({\r\n name: nameToken.getStr(),\r\n identifier: new _identifier_1.Identifier(nameToken, this.filename),\r\n });\r\n }\r\n }\r\n parseInterfaces(structure) {\r\n for (const found of structure.findDirectStructures(Structures.Interface)) {\r\n const i = found.findFirstStatement(Statements.Interface);\r\n if (i === undefined) {\r\n throw new Error(\"Interface expected, parseInterfaces\");\r\n }\r\n const interfaceName = i.findDirectExpression(Expressions.InterfaceName).getFirstToken();\r\n const methods = this.parseMethodDefinition(found, visibility_1.Visibility.Public);\r\n const attributes = this.parseAttributes(found, visibility_1.Visibility.Public);\r\n const aliases = this.parseAliases(found, visibility_1.Visibility.Public);\r\n const constants = this.parseConstants(found, visibility_1.Visibility.Public);\r\n const g = i.findDirectExpression(Expressions.ClassGlobal);\r\n this.interfaces.push({\r\n name: interfaceName.getStr(),\r\n identifier: new _identifier_1.Identifier(interfaceName, this.filename),\r\n isLocal: g === undefined,\r\n isGlobal: g !== undefined,\r\n interfaces: this.getImplementing(found),\r\n aliases,\r\n methods,\r\n constants,\r\n attributes,\r\n });\r\n }\r\n }\r\n parseClasses(structure) {\r\n var _a;\r\n for (const found of structure.findAllStructures(Structures.ClassDefinition)) {\r\n const className = found.findFirstStatement(Statements.ClassDefinition).findFirstExpression(Expressions.ClassName).getFirstToken();\r\n const methods = this.parseMethodDefinition(found.findFirstStructure(Structures.PublicSection), visibility_1.Visibility.Public);\r\n methods.push(...this.parseMethodDefinition(found.findFirstStructure(Structures.ProtectedSection), visibility_1.Visibility.Protected));\r\n methods.push(...this.parseMethodDefinition(found.findFirstStructure(Structures.PrivateSection), visibility_1.Visibility.Private));\r\n const attributes = this.parseAttributes(found.findFirstStructure(Structures.PublicSection), visibility_1.Visibility.Public);\r\n attributes.push(...this.parseAttributes(found.findFirstStructure(Structures.ProtectedSection), visibility_1.Visibility.Protected));\r\n attributes.push(...this.parseAttributes(found.findFirstStructure(Structures.PrivateSection), visibility_1.Visibility.Private));\r\n const aliases = this.parseAliases(found.findFirstStructure(Structures.PublicSection), visibility_1.Visibility.Public);\r\n aliases.push(...this.parseAliases(found.findFirstStructure(Structures.ProtectedSection), visibility_1.Visibility.Protected));\r\n aliases.push(...this.parseAliases(found.findFirstStructure(Structures.PrivateSection), visibility_1.Visibility.Private));\r\n const constants = this.parseConstants(found.findFirstStructure(Structures.PublicSection), visibility_1.Visibility.Public);\r\n constants.push(...this.parseConstants(found.findFirstStructure(Structures.ProtectedSection), visibility_1.Visibility.Protected));\r\n constants.push(...this.parseConstants(found.findFirstStructure(Structures.PrivateSection), visibility_1.Visibility.Private));\r\n const superClassName = (_a = found.findFirstExpression(Expressions.SuperClassName)) === null || _a === void 0 ? void 0 : _a.getFirstToken().getStr();\r\n const containsGlobal = found.findFirstExpression(Expressions.ClassGlobal);\r\n const concat = found.findFirstStatement(Statements.ClassDefinition).concatTokens().toUpperCase();\r\n this.classes.push({\r\n name: className.getStr(),\r\n identifier: new _identifier_1.Identifier(className, this.filename),\r\n isLocal: containsGlobal === undefined,\r\n isGlobal: containsGlobal !== undefined,\r\n methods,\r\n superClassName,\r\n interfaces: this.getImplementing(found),\r\n isForTesting: concat.includes(\" FOR TESTING\"),\r\n isAbstract: concat.includes(\" ABSTRACT\"),\r\n isSharedMemory: concat.includes(\" SHARED MEMORY ENABLED\"),\r\n isFinal: found.findFirstExpression(Expressions.ClassFinal) !== undefined,\r\n aliases,\r\n attributes,\r\n constants,\r\n });\r\n }\r\n }\r\n ///////////////////\r\n getImplementing(input) {\r\n const ret = [];\r\n for (const node of input.findAllStatements(Statements.InterfaceDef)) {\r\n const abstract = node.findDirectExpression(Expressions.AbstractMethods);\r\n const abstractMethods = [];\r\n if (abstract) {\r\n for (const m of abstract.findDirectExpressions(Expressions.MethodName)) {\r\n abstractMethods.push(m.concatTokens().toUpperCase());\r\n }\r\n }\r\n const final = node.findDirectExpression(Expressions.FinalMethods);\r\n const finalMethods = [];\r\n if (final) {\r\n for (const m of final.findDirectExpressions(Expressions.MethodName)) {\r\n finalMethods.push(m.concatTokens().toUpperCase());\r\n }\r\n }\r\n const concat = node.concatTokens().toUpperCase();\r\n const allAbstract = concat.includes(\" ALL METHODS ABSTRACT\");\r\n const partial = concat.includes(\" PARTIALLY IMPLEMENTED\");\r\n const name = node.findFirstExpression(Expressions.InterfaceName).getFirstToken().getStr().toUpperCase();\r\n ret.push({\r\n name,\r\n partial,\r\n allAbstract,\r\n abstractMethods,\r\n finalMethods,\r\n });\r\n }\r\n return ret;\r\n }\r\n parseAliases(node, visibility) {\r\n if (node === undefined) {\r\n return [];\r\n }\r\n const ret = [];\r\n for (const a of node.findAllStatements(Statements.Aliases)) {\r\n const name = a.findFirstExpression(Expressions.SimpleName).getFirstToken();\r\n const comp = a.findFirstExpression(Expressions.Field).getFirstToken();\r\n ret.push({\r\n name: name.getStr(),\r\n identifier: new _identifier_1.Identifier(name, this.filename),\r\n visibility,\r\n component: comp.getStr(),\r\n });\r\n }\r\n return ret;\r\n }\r\n parseConstants(node, visibility) {\r\n var _a, _b;\r\n if (node === undefined) {\r\n return [];\r\n }\r\n const results = [];\r\n for (const constant of node.findAllStatements(Statements.Constant)) {\r\n const name = constant.findFirstExpression(Expressions.DefinitionName).getFirstToken();\r\n const typeName = constant.findFirstExpression(Expressions.TypeName);\r\n // VALUE `const_value` -> `const_value`\r\n const literal = (_b = (_a = constant.findFirstExpression(Expressions.Value)) === null || _a === void 0 ? void 0 : _a.getTokens()[1].getStr()) !== null && _b !== void 0 ? _b : \"``\";\r\n // `const_value` -> const_value\r\n const value = literal.slice(1, (literal === null || literal === void 0 ? void 0 : literal.length) - 1);\r\n results.push({\r\n name: name.getStr(),\r\n typeName: typeName ? typeName.getFirstToken().getStr() : \"\",\r\n value: value,\r\n identifier: new _identifier_1.Identifier(name, this.filename),\r\n visibility,\r\n });\r\n }\r\n return results;\r\n }\r\n parseAttributes(node, visibility) {\r\n if (node === undefined) {\r\n return [];\r\n }\r\n const contents = node.findFirstStructure(Structures.SectionContents);\r\n if (contents === undefined) {\r\n return [];\r\n }\r\n const ret = [];\r\n for (const d of contents.findDirectStatements(Statements.Data)) {\r\n const name = d.findFirstExpression(Expressions.DefinitionName).getFirstToken();\r\n ret.push({\r\n name: name.getStr(),\r\n identifier: new _identifier_1.Identifier(name, this.filename),\r\n level: _abap_file_information_1.AttributeLevel.Instance,\r\n readOnly: d.concatTokens().toUpperCase().includes(\" READ-ONLY\"),\r\n visibility,\r\n });\r\n }\r\n for (const d of contents.findDirectStatements(Statements.ClassData)) {\r\n const name = d.findFirstExpression(Expressions.DefinitionName).getFirstToken();\r\n ret.push({\r\n name: name.getStr(),\r\n identifier: new _identifier_1.Identifier(name, this.filename),\r\n level: _abap_file_information_1.AttributeLevel.Static,\r\n readOnly: d.concatTokens().toUpperCase().includes(\" READ-ONLY\"),\r\n visibility,\r\n });\r\n }\r\n for (const d of contents.findDirectStatements(Statements.Constant)) {\r\n const name = d.findFirstExpression(Expressions.DefinitionName).getFirstToken();\r\n ret.push({\r\n name: name.getStr(),\r\n identifier: new _identifier_1.Identifier(name, this.filename),\r\n level: _abap_file_information_1.AttributeLevel.Constant,\r\n readOnly: true,\r\n visibility,\r\n });\r\n }\r\n return ret;\r\n }\r\n parseMethodDefinition(node, visibility) {\r\n var _a;\r\n if (node === undefined) {\r\n return [];\r\n }\r\n const methods = [];\r\n for (const def of node.findAllStatements(Statements.MethodDef)) {\r\n const methodName = (_a = def.findDirectExpression(Expressions.MethodName)) === null || _a === void 0 ? void 0 : _a.getFirstToken();\r\n if (methodName === undefined) {\r\n continue;\r\n }\r\n const parameters = this.parseMethodParameters(def);\r\n methods.push({\r\n name: methodName.getStr(),\r\n identifier: new _identifier_1.Identifier(methodName, this.filename),\r\n isRedefinition: def.findDirectExpression(Expressions.Redefinition) !== undefined,\r\n isForTesting: def.concatTokens().toUpperCase().includes(\" FOR TESTING\"),\r\n isAbstract: def.findDirectExpression(Expressions.Abstract) !== undefined,\r\n isEventHandler: def.findDirectExpression(Expressions.EventHandler) !== undefined,\r\n visibility,\r\n parameters,\r\n exceptions: [], // todo\r\n });\r\n }\r\n return methods;\r\n }\r\n // todo, refactor this method, it is too long\r\n parseMethodParameters(node) {\r\n var _a, _b, _c, _d;\r\n const ret = [];\r\n const importing = node.findFirstExpression(Expressions.MethodDefImporting);\r\n if (importing) {\r\n for (const param of importing.findAllExpressions(Expressions.MethodParam)) {\r\n const name = (_a = param.findDirectExpression(Expressions.MethodParamName)) === null || _a === void 0 ? void 0 : _a.getFirstToken();\r\n if (name) {\r\n ret.push({\r\n name: name.getStr().replace(\"!\", \"\"),\r\n identifier: new _identifier_1.Identifier(name, this.filename),\r\n direction: _abap_file_information_1.MethodParameterDirection.Importing,\r\n });\r\n }\r\n }\r\n }\r\n const exporting = node.findFirstExpression(Expressions.MethodDefExporting);\r\n if (exporting) {\r\n for (const param of exporting.findAllExpressions(Expressions.MethodParam)) {\r\n const name = (_b = param.findDirectExpression(Expressions.MethodParamName)) === null || _b === void 0 ? void 0 : _b.getFirstToken();\r\n if (name) {\r\n ret.push({\r\n name: name.getStr().replace(\"!\", \"\"),\r\n identifier: new _identifier_1.Identifier(name, this.filename),\r\n direction: _abap_file_information_1.MethodParameterDirection.Exporting,\r\n });\r\n }\r\n }\r\n }\r\n const changing = node.findFirstExpression(Expressions.MethodDefChanging);\r\n if (changing) {\r\n for (const param of changing.findAllExpressions(Expressions.MethodParam)) {\r\n const name = (_c = param.findDirectExpression(Expressions.MethodParamName)) === null || _c === void 0 ? void 0 : _c.getFirstToken();\r\n if (name) {\r\n ret.push({\r\n name: name.getStr().replace(\"!\", \"\"),\r\n identifier: new _identifier_1.Identifier(name, this.filename),\r\n direction: _abap_file_information_1.MethodParameterDirection.Changing,\r\n });\r\n }\r\n }\r\n }\r\n const returning = node.findFirstExpression(Expressions.MethodDefReturning);\r\n if (returning) {\r\n const name = (_d = returning.findDirectExpression(Expressions.MethodParamName)) === null || _d === void 0 ? void 0 : _d.getFirstToken();\r\n if (name) {\r\n ret.push({\r\n name: name.getStr().replace(\"!\", \"\"),\r\n identifier: new _identifier_1.Identifier(name, this.filename),\r\n direction: _abap_file_information_1.MethodParameterDirection.Returning,\r\n });\r\n }\r\n }\r\n return ret;\r\n }\r\n}\r\nexports.ABAPFileInformation = ABAPFileInformation;\r\n//# sourceMappingURL=abap_file_information.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/4_file_information/abap_file_information.js?");
6630
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.ABAPFileInformation = void 0;\r\nconst Structures = __webpack_require__(/*! ../3_structures/structures */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/index.js\");\r\nconst Expressions = __webpack_require__(/*! ../2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst Statements = __webpack_require__(/*! ../2_statements/statements */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js\");\r\nconst _abap_file_information_1 = __webpack_require__(/*! ./_abap_file_information */ \"./node_modules/@abaplint/core/build/src/abap/4_file_information/_abap_file_information.js\");\r\nconst _identifier_1 = __webpack_require__(/*! ./_identifier */ \"./node_modules/@abaplint/core/build/src/abap/4_file_information/_identifier.js\");\r\nconst Tokens = __webpack_require__(/*! ../1_lexer/tokens */ \"./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js\");\r\nconst visibility_1 = __webpack_require__(/*! ./visibility */ \"./node_modules/@abaplint/core/build/src/abap/4_file_information/visibility.js\");\r\nclass ABAPFileInformation {\r\n constructor(structure, filename) {\r\n this.forms = [];\r\n this.implementations = [];\r\n this.interfaces = [];\r\n this.classes = [];\r\n this.filename = filename;\r\n this.parse(structure);\r\n }\r\n listClassImplementations() {\r\n return this.implementations;\r\n }\r\n listInterfaceDefinitions() {\r\n return this.interfaces;\r\n }\r\n getInterfaceDefinitionByName(name) {\r\n const upper = name.toUpperCase();\r\n for (const i of this.listInterfaceDefinitions()) {\r\n if (i.identifier.getName().toUpperCase() === upper) {\r\n return i;\r\n }\r\n }\r\n return undefined;\r\n }\r\n listClassDefinitions() {\r\n return this.classes;\r\n }\r\n getClassDefinitionByName(name) {\r\n const upper = name.toUpperCase();\r\n for (const d of this.listClassDefinitions()) {\r\n if (d.identifier.getName().toUpperCase() === upper) {\r\n return d;\r\n }\r\n }\r\n return undefined;\r\n }\r\n getClassImplementationByName(name) {\r\n const upper = name.toUpperCase();\r\n for (const impl of this.listClassImplementations()) {\r\n if (impl.identifier.getName().toUpperCase() === upper) {\r\n return impl;\r\n }\r\n }\r\n return undefined;\r\n }\r\n listFormDefinitions() {\r\n return this.forms;\r\n }\r\n ///////////////////////\r\n parse(structure) {\r\n var _a;\r\n if (structure === undefined) {\r\n return;\r\n }\r\n this.parseClasses(structure);\r\n this.parseInterfaces(structure);\r\n for (const found of structure.findAllStructures(Structures.ClassImplementation)) {\r\n const methods = [];\r\n for (const method of found.findAllStructures(Structures.Method)) {\r\n const methodName = (_a = method.findFirstExpression(Expressions.MethodName)) === null || _a === void 0 ? void 0 : _a.getFirstToken();\r\n if (methodName) {\r\n methods.push(new _identifier_1.Identifier(methodName, this.filename));\r\n }\r\n }\r\n const name = found.findFirstStatement(Statements.ClassImplementation).findFirstExpression(Expressions.ClassName).getFirstToken();\r\n this.implementations.push({\r\n name: name.getStr(),\r\n identifier: new _identifier_1.Identifier(name, this.filename),\r\n methods,\r\n });\r\n }\r\n for (const statement of structure.findAllStructures(Structures.Form)) {\r\n // FORMs can contain a dash in the name\r\n const pos = statement.findFirstExpression(Expressions.FormName).getFirstToken().getStart();\r\n const name = statement.findFirstExpression(Expressions.FormName).concatTokens();\r\n const nameToken = new Tokens.Identifier(pos, name);\r\n this.forms.push({\r\n name: nameToken.getStr(),\r\n identifier: new _identifier_1.Identifier(nameToken, this.filename),\r\n });\r\n }\r\n }\r\n parseInterfaces(structure) {\r\n for (const found of structure.findDirectStructures(Structures.Interface)) {\r\n const i = found.findFirstStatement(Statements.Interface);\r\n if (i === undefined) {\r\n throw new Error(\"Interface expected, parseInterfaces\");\r\n }\r\n const interfaceName = i.findDirectExpression(Expressions.InterfaceName).getFirstToken();\r\n const methods = this.parseMethodDefinition(found, visibility_1.Visibility.Public);\r\n const attributes = this.parseAttributes(found, visibility_1.Visibility.Public);\r\n const aliases = this.parseAliases(found, visibility_1.Visibility.Public);\r\n const constants = this.parseConstants(found, visibility_1.Visibility.Public);\r\n const g = i.findDirectExpression(Expressions.ClassGlobal);\r\n this.interfaces.push({\r\n name: interfaceName.getStr(),\r\n identifier: new _identifier_1.Identifier(interfaceName, this.filename),\r\n isLocal: g === undefined,\r\n isGlobal: g !== undefined,\r\n interfaces: this.getImplementing(found),\r\n aliases,\r\n methods,\r\n constants,\r\n attributes,\r\n });\r\n }\r\n }\r\n parseClasses(structure) {\r\n var _a;\r\n for (const found of structure.findAllStructures(Structures.ClassDefinition)) {\r\n const className = found.findFirstStatement(Statements.ClassDefinition).findFirstExpression(Expressions.ClassName).getFirstToken();\r\n const methods = this.parseMethodDefinition(found.findFirstStructure(Structures.PublicSection), visibility_1.Visibility.Public);\r\n methods.push(...this.parseMethodDefinition(found.findFirstStructure(Structures.ProtectedSection), visibility_1.Visibility.Protected));\r\n methods.push(...this.parseMethodDefinition(found.findFirstStructure(Structures.PrivateSection), visibility_1.Visibility.Private));\r\n const attributes = this.parseAttributes(found.findFirstStructure(Structures.PublicSection), visibility_1.Visibility.Public);\r\n attributes.push(...this.parseAttributes(found.findFirstStructure(Structures.ProtectedSection), visibility_1.Visibility.Protected));\r\n attributes.push(...this.parseAttributes(found.findFirstStructure(Structures.PrivateSection), visibility_1.Visibility.Private));\r\n const aliases = this.parseAliases(found.findFirstStructure(Structures.PublicSection), visibility_1.Visibility.Public);\r\n aliases.push(...this.parseAliases(found.findFirstStructure(Structures.ProtectedSection), visibility_1.Visibility.Protected));\r\n aliases.push(...this.parseAliases(found.findFirstStructure(Structures.PrivateSection), visibility_1.Visibility.Private));\r\n const constants = this.parseConstants(found.findFirstStructure(Structures.PublicSection), visibility_1.Visibility.Public);\r\n constants.push(...this.parseConstants(found.findFirstStructure(Structures.ProtectedSection), visibility_1.Visibility.Protected));\r\n constants.push(...this.parseConstants(found.findFirstStructure(Structures.PrivateSection), visibility_1.Visibility.Private));\r\n const superClassName = (_a = found.findFirstExpression(Expressions.SuperClassName)) === null || _a === void 0 ? void 0 : _a.getFirstToken().getStr();\r\n const containsGlobal = found.findFirstExpression(Expressions.ClassGlobal);\r\n const cdef = found.findFirstStatement(Statements.ClassDefinition);\r\n const concat = (cdef === null || cdef === void 0 ? void 0 : cdef.concatTokens().toUpperCase()) || \"\";\r\n this.classes.push({\r\n name: className.getStr(),\r\n identifier: new _identifier_1.Identifier(className, this.filename),\r\n isLocal: containsGlobal === undefined,\r\n isGlobal: containsGlobal !== undefined,\r\n methods,\r\n superClassName,\r\n interfaces: this.getImplementing(found),\r\n isForTesting: concat.includes(\" FOR TESTING\"),\r\n isAbstract: (cdef === null || cdef === void 0 ? void 0 : cdef.findDirectTokenByText(\"ABSTRACT\")) !== undefined,\r\n isSharedMemory: concat.includes(\" SHARED MEMORY ENABLED\"),\r\n isFinal: found.findFirstExpression(Expressions.ClassFinal) !== undefined,\r\n aliases,\r\n attributes,\r\n constants,\r\n });\r\n }\r\n }\r\n ///////////////////\r\n getImplementing(input) {\r\n const ret = [];\r\n for (const node of input.findAllStatements(Statements.InterfaceDef)) {\r\n const abstract = node.findDirectExpression(Expressions.AbstractMethods);\r\n const abstractMethods = [];\r\n if (abstract) {\r\n for (const m of abstract.findDirectExpressions(Expressions.MethodName)) {\r\n abstractMethods.push(m.concatTokens().toUpperCase());\r\n }\r\n }\r\n const final = node.findDirectExpression(Expressions.FinalMethods);\r\n const finalMethods = [];\r\n if (final) {\r\n for (const m of final.findDirectExpressions(Expressions.MethodName)) {\r\n finalMethods.push(m.concatTokens().toUpperCase());\r\n }\r\n }\r\n const concat = node.concatTokens().toUpperCase();\r\n const allAbstract = concat.includes(\" ALL METHODS ABSTRACT\");\r\n const partial = concat.includes(\" PARTIALLY IMPLEMENTED\");\r\n const name = node.findFirstExpression(Expressions.InterfaceName).getFirstToken().getStr().toUpperCase();\r\n ret.push({\r\n name,\r\n partial,\r\n allAbstract,\r\n abstractMethods,\r\n finalMethods,\r\n });\r\n }\r\n return ret;\r\n }\r\n parseAliases(node, visibility) {\r\n if (node === undefined) {\r\n return [];\r\n }\r\n const ret = [];\r\n for (const a of node.findAllStatements(Statements.Aliases)) {\r\n const name = a.findFirstExpression(Expressions.SimpleName).getFirstToken();\r\n const comp = a.findFirstExpression(Expressions.Field).getFirstToken();\r\n ret.push({\r\n name: name.getStr(),\r\n identifier: new _identifier_1.Identifier(name, this.filename),\r\n visibility,\r\n component: comp.getStr(),\r\n });\r\n }\r\n return ret;\r\n }\r\n parseConstants(node, visibility) {\r\n var _a, _b;\r\n if (node === undefined) {\r\n return [];\r\n }\r\n const results = [];\r\n for (const constant of node.findAllStatements(Statements.Constant)) {\r\n const name = constant.findFirstExpression(Expressions.DefinitionName).getFirstToken();\r\n const typeName = constant.findFirstExpression(Expressions.TypeName);\r\n // VALUE `const_value` -> `const_value`\r\n const literal = (_b = (_a = constant.findFirstExpression(Expressions.Value)) === null || _a === void 0 ? void 0 : _a.getTokens()[1].getStr()) !== null && _b !== void 0 ? _b : \"``\";\r\n // `const_value` -> const_value\r\n const value = literal.slice(1, (literal === null || literal === void 0 ? void 0 : literal.length) - 1);\r\n results.push({\r\n name: name.getStr(),\r\n typeName: typeName ? typeName.getFirstToken().getStr() : \"\",\r\n value: value,\r\n identifier: new _identifier_1.Identifier(name, this.filename),\r\n visibility,\r\n });\r\n }\r\n return results;\r\n }\r\n parseAttributes(node, visibility) {\r\n if (node === undefined) {\r\n return [];\r\n }\r\n const contents = node.findFirstStructure(Structures.SectionContents);\r\n if (contents === undefined) {\r\n return [];\r\n }\r\n const ret = [];\r\n for (const d of contents.findDirectStatements(Statements.Data)) {\r\n const name = d.findFirstExpression(Expressions.DefinitionName).getFirstToken();\r\n ret.push({\r\n name: name.getStr(),\r\n identifier: new _identifier_1.Identifier(name, this.filename),\r\n level: _abap_file_information_1.AttributeLevel.Instance,\r\n readOnly: d.concatTokens().toUpperCase().includes(\" READ-ONLY\"),\r\n visibility,\r\n });\r\n }\r\n for (const d of contents.findDirectStatements(Statements.ClassData)) {\r\n const name = d.findFirstExpression(Expressions.DefinitionName).getFirstToken();\r\n ret.push({\r\n name: name.getStr(),\r\n identifier: new _identifier_1.Identifier(name, this.filename),\r\n level: _abap_file_information_1.AttributeLevel.Static,\r\n readOnly: d.concatTokens().toUpperCase().includes(\" READ-ONLY\"),\r\n visibility,\r\n });\r\n }\r\n for (const d of contents.findDirectStatements(Statements.Constant)) {\r\n const name = d.findFirstExpression(Expressions.DefinitionName).getFirstToken();\r\n ret.push({\r\n name: name.getStr(),\r\n identifier: new _identifier_1.Identifier(name, this.filename),\r\n level: _abap_file_information_1.AttributeLevel.Constant,\r\n readOnly: true,\r\n visibility,\r\n });\r\n }\r\n return ret;\r\n }\r\n parseMethodDefinition(node, visibility) {\r\n var _a;\r\n if (node === undefined) {\r\n return [];\r\n }\r\n const methods = [];\r\n for (const def of node.findAllStatements(Statements.MethodDef)) {\r\n const methodName = (_a = def.findDirectExpression(Expressions.MethodName)) === null || _a === void 0 ? void 0 : _a.getFirstToken();\r\n if (methodName === undefined) {\r\n continue;\r\n }\r\n const parameters = this.parseMethodParameters(def);\r\n methods.push({\r\n name: methodName.getStr(),\r\n identifier: new _identifier_1.Identifier(methodName, this.filename),\r\n isRedefinition: def.findDirectExpression(Expressions.Redefinition) !== undefined,\r\n isForTesting: def.concatTokens().toUpperCase().includes(\" FOR TESTING\"),\r\n isAbstract: def.findDirectExpression(Expressions.Abstract) !== undefined,\r\n isEventHandler: def.findDirectExpression(Expressions.EventHandler) !== undefined,\r\n visibility,\r\n parameters,\r\n exceptions: [], // todo\r\n });\r\n }\r\n return methods;\r\n }\r\n // todo, refactor this method, it is too long\r\n parseMethodParameters(node) {\r\n var _a, _b, _c, _d;\r\n const ret = [];\r\n const importing = node.findFirstExpression(Expressions.MethodDefImporting);\r\n if (importing) {\r\n for (const param of importing.findAllExpressions(Expressions.MethodParam)) {\r\n const name = (_a = param.findDirectExpression(Expressions.MethodParamName)) === null || _a === void 0 ? void 0 : _a.getFirstToken();\r\n if (name) {\r\n ret.push({\r\n name: name.getStr().replace(\"!\", \"\"),\r\n identifier: new _identifier_1.Identifier(name, this.filename),\r\n direction: _abap_file_information_1.MethodParameterDirection.Importing,\r\n });\r\n }\r\n }\r\n }\r\n const exporting = node.findFirstExpression(Expressions.MethodDefExporting);\r\n if (exporting) {\r\n for (const param of exporting.findAllExpressions(Expressions.MethodParam)) {\r\n const name = (_b = param.findDirectExpression(Expressions.MethodParamName)) === null || _b === void 0 ? void 0 : _b.getFirstToken();\r\n if (name) {\r\n ret.push({\r\n name: name.getStr().replace(\"!\", \"\"),\r\n identifier: new _identifier_1.Identifier(name, this.filename),\r\n direction: _abap_file_information_1.MethodParameterDirection.Exporting,\r\n });\r\n }\r\n }\r\n }\r\n const changing = node.findFirstExpression(Expressions.MethodDefChanging);\r\n if (changing) {\r\n for (const param of changing.findAllExpressions(Expressions.MethodParam)) {\r\n const name = (_c = param.findDirectExpression(Expressions.MethodParamName)) === null || _c === void 0 ? void 0 : _c.getFirstToken();\r\n if (name) {\r\n ret.push({\r\n name: name.getStr().replace(\"!\", \"\"),\r\n identifier: new _identifier_1.Identifier(name, this.filename),\r\n direction: _abap_file_information_1.MethodParameterDirection.Changing,\r\n });\r\n }\r\n }\r\n }\r\n const returning = node.findFirstExpression(Expressions.MethodDefReturning);\r\n if (returning) {\r\n const name = (_d = returning.findDirectExpression(Expressions.MethodParamName)) === null || _d === void 0 ? void 0 : _d.getFirstToken();\r\n if (name) {\r\n ret.push({\r\n name: name.getStr().replace(\"!\", \"\"),\r\n identifier: new _identifier_1.Identifier(name, this.filename),\r\n direction: _abap_file_information_1.MethodParameterDirection.Returning,\r\n });\r\n }\r\n }\r\n return ret;\r\n }\r\n}\r\nexports.ABAPFileInformation = ABAPFileInformation;\r\n//# sourceMappingURL=abap_file_information.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/4_file_information/abap_file_information.js?");
6631
6631
 
6632
6632
  /***/ }),
6633
6633
 
@@ -8794,7 +8794,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
8794
8794
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
8795
8795
 
8796
8796
  "use strict";
8797
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.ABAPParser = void 0;\r\nconst version_1 = __webpack_require__(/*! ../version */ \"./node_modules/@abaplint/core/build/src/version.js\");\r\nconst lexer_1 = __webpack_require__(/*! ./1_lexer/lexer */ \"./node_modules/@abaplint/core/build/src/abap/1_lexer/lexer.js\");\r\nconst statement_parser_1 = __webpack_require__(/*! ./2_statements/statement_parser */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statement_parser.js\");\r\nconst structure_parser_1 = __webpack_require__(/*! ./3_structures/structure_parser */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structure_parser.js\");\r\nconst abap_file_information_1 = __webpack_require__(/*! ./4_file_information/abap_file_information */ \"./node_modules/@abaplint/core/build/src/abap/4_file_information/abap_file_information.js\");\r\nconst abap_file_1 = __webpack_require__(/*! ./abap_file */ \"./node_modules/@abaplint/core/build/src/abap/abap_file.js\");\r\nclass ABAPParser {\r\n constructor(version, globalMacros, reg) {\r\n this.version = version ? version : version_1.defaultVersion;\r\n this.globalMacros = globalMacros ? globalMacros : [];\r\n this.reg = reg;\r\n }\r\n // files is input for a single object\r\n parse(files) {\r\n const issues = [];\r\n const output = [];\r\n const start = Date.now();\r\n // 1: lexing\r\n const b1 = Date.now();\r\n const lexerResult = files.map(f => lexer_1.Lexer.run(f));\r\n const lexingRuntime = Date.now() - b1;\r\n // 2: statements\r\n const b2 = Date.now();\r\n const statementResult = new statement_parser_1.StatementParser(this.version, this.reg).run(lexerResult, this.globalMacros);\r\n const statementsRuntime = Date.now() - b2;\r\n // 3: structures\r\n const b3 = Date.now();\r\n for (const f of statementResult) {\r\n const result = structure_parser_1.StructureParser.run(f);\r\n // 4: file information\r\n const info = new abap_file_information_1.ABAPFileInformation(result.node, f.file.getFilename());\r\n output.push(new abap_file_1.ABAPFile(f.file, f.tokens, f.statements, result.node, info));\r\n issues.push(...result.issues);\r\n }\r\n const structuresRuntime = Date.now() - b3;\r\n const end = Date.now();\r\n return { issues,\r\n output,\r\n runtime: end - start,\r\n runtimeExtra: { lexing: lexingRuntime, statements: statementsRuntime, structure: structuresRuntime },\r\n };\r\n }\r\n}\r\nexports.ABAPParser = ABAPParser;\r\n//# sourceMappingURL=abap_parser.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/abap_parser.js?");
8797
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.ABAPParser = void 0;\r\nconst version_1 = __webpack_require__(/*! ../version */ \"./node_modules/@abaplint/core/build/src/version.js\");\r\nconst lexer_1 = __webpack_require__(/*! ./1_lexer/lexer */ \"./node_modules/@abaplint/core/build/src/abap/1_lexer/lexer.js\");\r\nconst statement_parser_1 = __webpack_require__(/*! ./2_statements/statement_parser */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statement_parser.js\");\r\nconst structure_parser_1 = __webpack_require__(/*! ./3_structures/structure_parser */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structure_parser.js\");\r\nconst abap_file_information_1 = __webpack_require__(/*! ./4_file_information/abap_file_information */ \"./node_modules/@abaplint/core/build/src/abap/4_file_information/abap_file_information.js\");\r\nconst abap_file_1 = __webpack_require__(/*! ./abap_file */ \"./node_modules/@abaplint/core/build/src/abap/abap_file.js\");\r\nclass ABAPParser {\r\n constructor(version, globalMacros, reg) {\r\n this.version = version ? version : version_1.defaultVersion;\r\n this.globalMacros = globalMacros ? globalMacros : [];\r\n this.reg = reg;\r\n }\r\n // files is input for a single object\r\n parse(files) {\r\n const issues = [];\r\n const output = [];\r\n const start = Date.now();\r\n // 1: lexing\r\n const b1 = Date.now();\r\n const lexerResult = files.map(f => new lexer_1.Lexer().run(f));\r\n const lexingRuntime = Date.now() - b1;\r\n // 2: statements\r\n const b2 = Date.now();\r\n const statementResult = new statement_parser_1.StatementParser(this.version, this.reg).run(lexerResult, this.globalMacros);\r\n const statementsRuntime = Date.now() - b2;\r\n // 3: structures\r\n const b3 = Date.now();\r\n for (const f of statementResult) {\r\n const result = structure_parser_1.StructureParser.run(f);\r\n // 4: file information\r\n const info = new abap_file_information_1.ABAPFileInformation(result.node, f.file.getFilename());\r\n output.push(new abap_file_1.ABAPFile(f.file, f.tokens, f.statements, result.node, info));\r\n issues.push(...result.issues);\r\n }\r\n const structuresRuntime = Date.now() - b3;\r\n const end = Date.now();\r\n return { issues,\r\n output,\r\n runtime: end - start,\r\n runtimeExtra: { lexing: lexingRuntime, statements: statementsRuntime, structure: structuresRuntime },\r\n };\r\n }\r\n}\r\nexports.ABAPParser = ABAPParser;\r\n//# sourceMappingURL=abap_parser.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/abap_parser.js?");
8798
8798
 
8799
8799
  /***/ }),
8800
8800
 
@@ -8849,7 +8849,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
8849
8849
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
8850
8850
 
8851
8851
  "use strict";
8852
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.ExpressionNode = void 0;\r\nconst token_node_1 = __webpack_require__(/*! ./token_node */ \"./node_modules/@abaplint/core/build/src/abap/nodes/token_node.js\");\r\nconst tokens_1 = __webpack_require__(/*! ../1_lexer/tokens */ \"./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js\");\r\nconst _abstract_node_1 = __webpack_require__(/*! ./_abstract_node */ \"./node_modules/@abaplint/core/build/src/abap/nodes/_abstract_node.js\");\r\nclass ExpressionNode extends _abstract_node_1.AbstractNode {\r\n constructor(expression) {\r\n super();\r\n this.expression = expression;\r\n }\r\n get() {\r\n return this.expression;\r\n }\r\n countTokens() {\r\n let ret = 0;\r\n for (const c of this.getChildren()) {\r\n ret = ret + c.countTokens();\r\n }\r\n return ret;\r\n }\r\n getFirstToken() {\r\n for (const child of this.getChildren()) {\r\n return child.getFirstToken();\r\n }\r\n throw new Error(\"ExpressionNode, getFirstToken, no children\");\r\n }\r\n concatTokens() {\r\n let str = \"\";\r\n let prev;\r\n for (const token of this.getTokens()) {\r\n if (token instanceof tokens_1.Pragma) {\r\n continue;\r\n }\r\n if (str === \"\") {\r\n str = token.getStr();\r\n }\r\n else if (prev && prev.getStr().length + prev.getCol() === token.getCol()\r\n && prev.getRow() === token.getRow()) {\r\n str = str + token.getStr();\r\n }\r\n else {\r\n str = str + \" \" + token.getStr();\r\n }\r\n prev = token;\r\n }\r\n return str;\r\n }\r\n concatTokensWithoutStringsAndComments() {\r\n let str = \"\";\r\n let prev;\r\n for (const token of this.getTokens()) {\r\n if (token instanceof tokens_1.Comment\r\n || token instanceof tokens_1.String\r\n || token instanceof tokens_1.StringTemplate\r\n || token instanceof tokens_1.StringTemplateBegin\r\n || token instanceof tokens_1.StringTemplateMiddle\r\n || token instanceof tokens_1.StringTemplateEnd) {\r\n continue;\r\n }\r\n if (str === \"\") {\r\n str = token.getStr();\r\n }\r\n else if (prev && prev.getStr().length + prev.getCol() === token.getCol()\r\n && prev.getRow() === token.getRow()) {\r\n str = str + token.getStr();\r\n }\r\n else {\r\n str = str + \" \" + token.getStr();\r\n }\r\n prev = token;\r\n }\r\n return str;\r\n }\r\n getTokens() {\r\n const tokens = [];\r\n for (const c of this.getChildren()) {\r\n tokens.push(...this.toTokens(c));\r\n }\r\n return tokens;\r\n }\r\n toTokens(b) {\r\n const tokens = [];\r\n if (b instanceof token_node_1.TokenNode) {\r\n tokens.push(b.get());\r\n return tokens;\r\n }\r\n for (const c of b.getChildren()) {\r\n if (c instanceof token_node_1.TokenNode) {\r\n tokens.push(c.get());\r\n }\r\n else {\r\n tokens.push(...this.toTokens(c));\r\n }\r\n }\r\n return tokens;\r\n }\r\n getLastToken() {\r\n const child = this.getLastChild();\r\n if (child) {\r\n return child.getLastToken();\r\n }\r\n throw new Error(\"ExpressionNode, getLastToken, no children\");\r\n }\r\n getAllTokens() {\r\n const ret = [];\r\n for (const child of this.getChildren()) {\r\n if (child instanceof token_node_1.TokenNode) {\r\n ret.push(child.get());\r\n }\r\n else {\r\n ret.push(...child.getAllTokens());\r\n }\r\n }\r\n return ret;\r\n }\r\n getDirectTokens() {\r\n const ret = [];\r\n for (const child of this.getChildren()) {\r\n if (child instanceof token_node_1.TokenNode) {\r\n ret.push(child.get());\r\n }\r\n }\r\n return ret;\r\n }\r\n findDirectExpression(type) {\r\n for (const child of this.getChildren()) {\r\n if (child instanceof ExpressionNode && child.get() instanceof type) {\r\n return child;\r\n }\r\n }\r\n return undefined;\r\n }\r\n findExpressionAfterToken(text) {\r\n const children = this.getChildren();\r\n for (let i = 0; i < children.length - 1; i++) {\r\n const c = children[i];\r\n const next = children[i + 1];\r\n if (c instanceof token_node_1.TokenNode\r\n && c.get().getStr().toUpperCase() === text.toUpperCase()\r\n && next instanceof ExpressionNode) {\r\n return next;\r\n }\r\n }\r\n return undefined;\r\n }\r\n findDirectExpressions(type) {\r\n const ret = [];\r\n for (const child of this.getChildren()) {\r\n if (child instanceof ExpressionNode && child.get() instanceof type) {\r\n ret.push(child);\r\n }\r\n }\r\n return ret;\r\n }\r\n findDirectTokenByText(text) {\r\n for (const child of this.getChildren()) {\r\n if (child instanceof token_node_1.TokenNode && child.get().getStr().toUpperCase() === text.toUpperCase()) {\r\n return child.get();\r\n }\r\n }\r\n return undefined;\r\n }\r\n findAllExpressionsRecursive(type) {\r\n const ret = [];\r\n for (const child of this.getChildren()) {\r\n if (child instanceof token_node_1.TokenNode) {\r\n continue;\r\n }\r\n else if (child.get() instanceof type) {\r\n ret.push(child);\r\n }\r\n ret.push(...child.findAllExpressionsRecursive(type));\r\n }\r\n return ret;\r\n }\r\n findAllExpressions(type) {\r\n const ret = [];\r\n for (const child of this.getChildren()) {\r\n if (child instanceof token_node_1.TokenNode) {\r\n continue;\r\n }\r\n else if (child.get() instanceof type) {\r\n ret.push(child);\r\n }\r\n else {\r\n ret.push(...child.findAllExpressions(type));\r\n }\r\n }\r\n return ret;\r\n }\r\n findAllExpressionsMulti(type, recursive = false) {\r\n const ret = [];\r\n for (const child of this.getChildren()) {\r\n if (child instanceof token_node_1.TokenNode) {\r\n continue;\r\n }\r\n const before = ret.length;\r\n for (const t of type) {\r\n if (child.get() instanceof t) {\r\n ret.push(child);\r\n }\r\n }\r\n if (before === ret.length || recursive === true) {\r\n ret.push(...child.findAllExpressionsMulti(type, recursive));\r\n }\r\n }\r\n return ret;\r\n }\r\n findFirstExpression(type) {\r\n if (this.get() instanceof type) {\r\n return this;\r\n }\r\n for (const child of this.getChildren()) {\r\n if (child instanceof token_node_1.TokenNode) {\r\n continue;\r\n }\r\n else if (child.get() instanceof type) {\r\n return child;\r\n }\r\n else {\r\n const res = child.findFirstExpression(type);\r\n if (res) {\r\n return res;\r\n }\r\n }\r\n }\r\n return undefined;\r\n }\r\n}\r\nexports.ExpressionNode = ExpressionNode;\r\n//# sourceMappingURL=expression_node.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/nodes/expression_node.js?");
8852
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.ExpressionNode = void 0;\r\nconst token_node_1 = __webpack_require__(/*! ./token_node */ \"./node_modules/@abaplint/core/build/src/abap/nodes/token_node.js\");\r\nconst tokens_1 = __webpack_require__(/*! ../1_lexer/tokens */ \"./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js\");\r\nconst _abstract_node_1 = __webpack_require__(/*! ./_abstract_node */ \"./node_modules/@abaplint/core/build/src/abap/nodes/_abstract_node.js\");\r\nclass ExpressionNode extends _abstract_node_1.AbstractNode {\r\n constructor(expression) {\r\n super();\r\n this.expression = expression;\r\n }\r\n get() {\r\n return this.expression;\r\n }\r\n countTokens() {\r\n let ret = 0;\r\n for (const c of this.getChildren()) {\r\n ret = ret + c.countTokens();\r\n }\r\n return ret;\r\n }\r\n getFirstToken() {\r\n for (const child of this.getChildren()) {\r\n return child.getFirstToken();\r\n }\r\n throw new Error(\"ExpressionNode, getFirstToken, no children\");\r\n }\r\n concatTokens() {\r\n let str = \"\";\r\n let prev;\r\n for (const token of this.getTokens()) {\r\n if (token instanceof tokens_1.Pragma) {\r\n continue;\r\n }\r\n if (str === \"\") {\r\n str = token.getStr();\r\n }\r\n else if (prev && prev.getStr().length + prev.getCol() === token.getCol()\r\n && prev.getRow() === token.getRow()) {\r\n str = str + token.getStr();\r\n }\r\n else {\r\n str = str + \" \" + token.getStr();\r\n }\r\n prev = token;\r\n }\r\n return str;\r\n }\r\n concatTokensWithoutStringsAndComments() {\r\n let str = \"\";\r\n let prev;\r\n for (const token of this.getTokens()) {\r\n if (token instanceof tokens_1.Comment\r\n || token instanceof tokens_1.StringToken\r\n || token instanceof tokens_1.StringTemplate\r\n || token instanceof tokens_1.StringTemplateBegin\r\n || token instanceof tokens_1.StringTemplateMiddle\r\n || token instanceof tokens_1.StringTemplateEnd) {\r\n continue;\r\n }\r\n if (str === \"\") {\r\n str = token.getStr();\r\n }\r\n else if (prev && prev.getStr().length + prev.getCol() === token.getCol()\r\n && prev.getRow() === token.getRow()) {\r\n str = str + token.getStr();\r\n }\r\n else {\r\n str = str + \" \" + token.getStr();\r\n }\r\n prev = token;\r\n }\r\n return str;\r\n }\r\n getTokens() {\r\n const tokens = [];\r\n for (const c of this.getChildren()) {\r\n tokens.push(...this.toTokens(c));\r\n }\r\n return tokens;\r\n }\r\n toTokens(b) {\r\n const tokens = [];\r\n if (b instanceof token_node_1.TokenNode) {\r\n tokens.push(b.get());\r\n return tokens;\r\n }\r\n for (const c of b.getChildren()) {\r\n if (c instanceof token_node_1.TokenNode) {\r\n tokens.push(c.get());\r\n }\r\n else {\r\n tokens.push(...this.toTokens(c));\r\n }\r\n }\r\n return tokens;\r\n }\r\n getLastToken() {\r\n const child = this.getLastChild();\r\n if (child) {\r\n return child.getLastToken();\r\n }\r\n throw new Error(\"ExpressionNode, getLastToken, no children\");\r\n }\r\n getAllTokens() {\r\n const ret = [];\r\n for (const child of this.getChildren()) {\r\n if (child instanceof token_node_1.TokenNode) {\r\n ret.push(child.get());\r\n }\r\n else {\r\n ret.push(...child.getAllTokens());\r\n }\r\n }\r\n return ret;\r\n }\r\n getDirectTokens() {\r\n const ret = [];\r\n for (const child of this.getChildren()) {\r\n if (child instanceof token_node_1.TokenNode) {\r\n ret.push(child.get());\r\n }\r\n }\r\n return ret;\r\n }\r\n findDirectExpression(type) {\r\n for (const child of this.getChildren()) {\r\n if (child instanceof ExpressionNode && child.get() instanceof type) {\r\n return child;\r\n }\r\n }\r\n return undefined;\r\n }\r\n findExpressionAfterToken(text) {\r\n const children = this.getChildren();\r\n for (let i = 0; i < children.length - 1; i++) {\r\n const c = children[i];\r\n const next = children[i + 1];\r\n if (c instanceof token_node_1.TokenNode\r\n && c.get().getStr().toUpperCase() === text.toUpperCase()\r\n && next instanceof ExpressionNode) {\r\n return next;\r\n }\r\n }\r\n return undefined;\r\n }\r\n findDirectExpressions(type) {\r\n const ret = [];\r\n for (const child of this.getChildren()) {\r\n if (child instanceof ExpressionNode && child.get() instanceof type) {\r\n ret.push(child);\r\n }\r\n }\r\n return ret;\r\n }\r\n findDirectTokenByText(text) {\r\n for (const child of this.getChildren()) {\r\n if (child instanceof token_node_1.TokenNode && child.get().getStr().toUpperCase() === text.toUpperCase()) {\r\n return child.get();\r\n }\r\n }\r\n return undefined;\r\n }\r\n findAllExpressionsRecursive(type) {\r\n const ret = [];\r\n for (const child of this.getChildren()) {\r\n if (child instanceof token_node_1.TokenNode) {\r\n continue;\r\n }\r\n else if (child.get() instanceof type) {\r\n ret.push(child);\r\n }\r\n ret.push(...child.findAllExpressionsRecursive(type));\r\n }\r\n return ret;\r\n }\r\n findAllExpressions(type) {\r\n const ret = [];\r\n for (const child of this.getChildren()) {\r\n if (child instanceof token_node_1.TokenNode) {\r\n continue;\r\n }\r\n else if (child.get() instanceof type) {\r\n ret.push(child);\r\n }\r\n else {\r\n ret.push(...child.findAllExpressions(type));\r\n }\r\n }\r\n return ret;\r\n }\r\n findAllExpressionsMulti(type, recursive = false) {\r\n const ret = [];\r\n for (const child of this.getChildren()) {\r\n if (child instanceof token_node_1.TokenNode) {\r\n continue;\r\n }\r\n const before = ret.length;\r\n for (const t of type) {\r\n if (child.get() instanceof t) {\r\n ret.push(child);\r\n }\r\n }\r\n if (before === ret.length || recursive === true) {\r\n ret.push(...child.findAllExpressionsMulti(type, recursive));\r\n }\r\n }\r\n return ret;\r\n }\r\n findFirstExpression(type) {\r\n if (this.get() instanceof type) {\r\n return this;\r\n }\r\n for (const child of this.getChildren()) {\r\n if (child instanceof token_node_1.TokenNode) {\r\n continue;\r\n }\r\n else if (child.get() instanceof type) {\r\n return child;\r\n }\r\n else {\r\n const res = child.findFirstExpression(type);\r\n if (res) {\r\n return res;\r\n }\r\n }\r\n }\r\n return undefined;\r\n }\r\n}\r\nexports.ExpressionNode = ExpressionNode;\r\n//# sourceMappingURL=expression_node.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/nodes/expression_node.js?");
8853
8853
 
8854
8854
  /***/ }),
8855
8855
 
@@ -8871,7 +8871,7 @@ eval("\r\nvar __createBinding = (this && this.__createBinding) || (Object.create
8871
8871
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
8872
8872
 
8873
8873
  "use strict";
8874
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.StatementNode = void 0;\r\nconst _abstract_node_1 = __webpack_require__(/*! ./_abstract_node */ \"./node_modules/@abaplint/core/build/src/abap/nodes/_abstract_node.js\");\r\nconst token_node_1 = __webpack_require__(/*! ./token_node */ \"./node_modules/@abaplint/core/build/src/abap/nodes/token_node.js\");\r\nconst expression_node_1 = __webpack_require__(/*! ./expression_node */ \"./node_modules/@abaplint/core/build/src/abap/nodes/expression_node.js\");\r\nconst comment_1 = __webpack_require__(/*! ../1_lexer/tokens/comment */ \"./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/comment.js\");\r\nconst pragma_1 = __webpack_require__(/*! ../1_lexer/tokens/pragma */ \"./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/pragma.js\");\r\nconst string_1 = __webpack_require__(/*! ../1_lexer/tokens/string */ \"./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/string.js\");\r\nclass StatementNode extends _abstract_node_1.AbstractNode {\r\n constructor(statement, colon, pragmas) {\r\n super();\r\n this.statement = statement;\r\n this.colon = colon;\r\n if (pragmas) {\r\n this.pragmas = pragmas;\r\n }\r\n else {\r\n this.pragmas = [];\r\n }\r\n }\r\n get() {\r\n return this.statement;\r\n }\r\n getColon() {\r\n return this.colon;\r\n }\r\n getPragmas() {\r\n return this.pragmas;\r\n }\r\n setChildren(children) {\r\n if (children.length === 0) {\r\n throw new Error(\"statement: zero children\");\r\n }\r\n this.children = children;\r\n return this;\r\n }\r\n getStart() {\r\n return this.getFirstToken().getStart();\r\n }\r\n getEnd() {\r\n const last = this.getLastToken();\r\n return last.getEnd();\r\n }\r\n getTokens() {\r\n const tokens = [];\r\n for (const c of this.getChildren()) {\r\n tokens.push(...this.toTokens(c));\r\n }\r\n return tokens;\r\n }\r\n includesToken(search) {\r\n for (const t of this.getTokens()) {\r\n if (t.getStart().equals(search.getStart())) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n getTokenNodes() {\r\n const tokens = [];\r\n for (const c of this.getChildren()) {\r\n tokens.push(...this.toTokenNodess(c));\r\n }\r\n return tokens;\r\n }\r\n concatTokens() {\r\n let str = \"\";\r\n let prev;\r\n for (const token of this.getTokens()) {\r\n if (token instanceof pragma_1.Pragma) {\r\n continue;\r\n }\r\n if (str === \"\") {\r\n str = token.getStr();\r\n }\r\n else if (prev && prev.getStr().length + prev.getCol() === token.getCol()\r\n && prev.getRow() === token.getRow()) {\r\n str = str + token.getStr();\r\n }\r\n else {\r\n str = str + \" \" + token.getStr();\r\n }\r\n prev = token;\r\n }\r\n return str;\r\n }\r\n concatTokensWithoutStringsAndComments() {\r\n let str = \"\";\r\n let prev;\r\n for (const token of this.getTokens()) {\r\n if (token instanceof comment_1.Comment\r\n || token instanceof string_1.String\r\n || token instanceof string_1.StringTemplate\r\n || token instanceof string_1.StringTemplateBegin\r\n || token instanceof string_1.StringTemplateMiddle\r\n || token instanceof string_1.StringTemplateEnd) {\r\n continue;\r\n }\r\n if (str === \"\") {\r\n str = token.getStr();\r\n }\r\n else if (prev && prev.getStr().length + prev.getCol() === token.getCol()\r\n && prev.getRow() === token.getRow()) {\r\n str = str + token.getStr();\r\n }\r\n else {\r\n str = str + \" \" + token.getStr();\r\n }\r\n prev = token;\r\n }\r\n return str;\r\n }\r\n getTerminator() {\r\n return this.getLastToken().getStr();\r\n }\r\n getFirstToken() {\r\n for (const child of this.getChildren()) {\r\n return child.getFirstToken();\r\n }\r\n throw new Error(\"StatementNode, getFirstToken, no children, \" + this.get().constructor.name);\r\n }\r\n getLastToken() {\r\n const child = this.getLastChild();\r\n if (child !== undefined) {\r\n return child.getLastToken();\r\n }\r\n throw new Error(\"StatementNode, getLastToken, no children\");\r\n }\r\n findDirectExpression(type) {\r\n for (const child of this.getChildren()) {\r\n if (child instanceof expression_node_1.ExpressionNode && child.get() instanceof type) {\r\n return child;\r\n }\r\n }\r\n return undefined;\r\n }\r\n findDirectExpressions(type) {\r\n const ret = [];\r\n for (const child of this.getChildren()) {\r\n if (child instanceof expression_node_1.ExpressionNode && child.get() instanceof type) {\r\n ret.push(child);\r\n }\r\n }\r\n return ret;\r\n }\r\n findDirectTokenByText(text) {\r\n const upper = text.toUpperCase();\r\n for (const child of this.getChildren()) {\r\n if (child instanceof token_node_1.TokenNode && child.get().getStr().toUpperCase() === upper) {\r\n return child.get();\r\n }\r\n }\r\n return undefined;\r\n }\r\n findFirstExpression(type) {\r\n for (const child of this.getChildren()) {\r\n if (child instanceof token_node_1.TokenNode) {\r\n continue;\r\n }\r\n else if (child.get() instanceof type) {\r\n return child;\r\n }\r\n else {\r\n const res = child.findFirstExpression(type);\r\n if (res) {\r\n return res;\r\n }\r\n }\r\n }\r\n return undefined;\r\n }\r\n findAllExpressions(type) {\r\n const ret = [];\r\n for (const child of this.getChildren()) {\r\n if (child instanceof token_node_1.TokenNode) {\r\n continue;\r\n }\r\n else if (child.get() instanceof type) {\r\n ret.push(child);\r\n }\r\n else {\r\n ret.push(...child.findAllExpressions(type));\r\n }\r\n }\r\n return ret;\r\n }\r\n findAllExpressionsRecursive(type) {\r\n const ret = [];\r\n for (const child of this.getChildren()) {\r\n if (child instanceof token_node_1.TokenNode) {\r\n continue;\r\n }\r\n else if (child.get() instanceof type) {\r\n ret.push(child);\r\n }\r\n ret.push(...child.findAllExpressionsRecursive(type));\r\n }\r\n return ret;\r\n }\r\n findAllExpressionsMulti(type, recursive = false) {\r\n const ret = [];\r\n for (const child of this.getChildren()) {\r\n if (child instanceof token_node_1.TokenNode) {\r\n continue;\r\n }\r\n const before = ret.length;\r\n for (const t of type) {\r\n if (child.get() instanceof t) {\r\n ret.push(child);\r\n }\r\n }\r\n if (before === ret.length || recursive === true) {\r\n ret.push(...child.findAllExpressionsMulti(type, recursive));\r\n }\r\n }\r\n return ret;\r\n }\r\n /**\r\n * Returns the Position of the first token if the sequence is found,\r\n * otherwise undefined. Strings and Comments are ignored in this search.\r\n * @param first - Text of the first Token\r\n * @param second - Text of the second Token\r\n */\r\n findTokenSequencePosition(first, second) {\r\n let prev;\r\n for (const token of this.getTokens()) {\r\n if (token instanceof comment_1.Comment\r\n || token instanceof string_1.String\r\n || token instanceof string_1.StringTemplate\r\n || token instanceof string_1.StringTemplateBegin\r\n || token instanceof string_1.StringTemplateMiddle\r\n || token instanceof string_1.StringTemplateEnd) {\r\n continue;\r\n }\r\n if (prev && token.getStr().toUpperCase() === second && (prev === null || prev === void 0 ? void 0 : prev.getStr().toUpperCase()) === first.toUpperCase()) {\r\n return prev.getStart();\r\n }\r\n else {\r\n prev = token;\r\n }\r\n }\r\n return undefined;\r\n }\r\n findExpressionAfterToken(text) {\r\n const children = this.getChildren();\r\n for (let i = 0; i < children.length - 1; i++) {\r\n const c = children[i];\r\n const next = children[i + 1];\r\n if (c instanceof token_node_1.TokenNode\r\n && c.get().getStr().toUpperCase() === text.toUpperCase()\r\n && next instanceof expression_node_1.ExpressionNode) {\r\n return next;\r\n }\r\n }\r\n return undefined;\r\n }\r\n findExpressionsAfterToken(text) {\r\n const children = this.getChildren();\r\n const ret = [];\r\n for (let i = 0; i < children.length - 1; i++) {\r\n const c = children[i];\r\n const next = children[i + 1];\r\n if (c instanceof token_node_1.TokenNode\r\n && c.get().getStr().toUpperCase() === text.toUpperCase()\r\n && next instanceof expression_node_1.ExpressionNode) {\r\n ret.push(next);\r\n }\r\n }\r\n return ret;\r\n }\r\n ////////////////////////////////\r\n toTokens(b) {\r\n const tokens = [];\r\n if (b instanceof token_node_1.TokenNode) {\r\n tokens.push(b.get());\r\n return tokens;\r\n }\r\n for (const c of b.getChildren()) {\r\n if (c instanceof token_node_1.TokenNode) {\r\n tokens.push(c.get());\r\n }\r\n else {\r\n tokens.push(...this.toTokens(c));\r\n }\r\n }\r\n return tokens;\r\n }\r\n toTokenNodess(b) {\r\n const tokens = [];\r\n if (b instanceof token_node_1.TokenNode) {\r\n tokens.push(b);\r\n return tokens;\r\n }\r\n for (const c of b.getChildren()) {\r\n if (c instanceof token_node_1.TokenNode) {\r\n tokens.push(c);\r\n }\r\n else {\r\n tokens.push(...this.toTokenNodess(c));\r\n }\r\n }\r\n return tokens;\r\n }\r\n}\r\nexports.StatementNode = StatementNode;\r\n//# sourceMappingURL=statement_node.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/nodes/statement_node.js?");
8874
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.StatementNode = void 0;\r\nconst _abstract_node_1 = __webpack_require__(/*! ./_abstract_node */ \"./node_modules/@abaplint/core/build/src/abap/nodes/_abstract_node.js\");\r\nconst token_node_1 = __webpack_require__(/*! ./token_node */ \"./node_modules/@abaplint/core/build/src/abap/nodes/token_node.js\");\r\nconst expression_node_1 = __webpack_require__(/*! ./expression_node */ \"./node_modules/@abaplint/core/build/src/abap/nodes/expression_node.js\");\r\nconst comment_1 = __webpack_require__(/*! ../1_lexer/tokens/comment */ \"./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/comment.js\");\r\nconst pragma_1 = __webpack_require__(/*! ../1_lexer/tokens/pragma */ \"./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/pragma.js\");\r\nconst string_1 = __webpack_require__(/*! ../1_lexer/tokens/string */ \"./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/string.js\");\r\nclass StatementNode extends _abstract_node_1.AbstractNode {\r\n constructor(statement, colon, pragmas) {\r\n super();\r\n this.statement = statement;\r\n this.colon = colon;\r\n if (pragmas) {\r\n this.pragmas = pragmas;\r\n }\r\n else {\r\n this.pragmas = [];\r\n }\r\n }\r\n get() {\r\n return this.statement;\r\n }\r\n getColon() {\r\n return this.colon;\r\n }\r\n getPragmas() {\r\n return this.pragmas;\r\n }\r\n setChildren(children) {\r\n if (children.length === 0) {\r\n throw new Error(\"statement: zero children\");\r\n }\r\n this.children = children;\r\n return this;\r\n }\r\n getStart() {\r\n return this.getFirstToken().getStart();\r\n }\r\n getEnd() {\r\n const last = this.getLastToken();\r\n return last.getEnd();\r\n }\r\n getTokens() {\r\n const tokens = [];\r\n for (const c of this.getChildren()) {\r\n tokens.push(...this.toTokens(c));\r\n }\r\n return tokens;\r\n }\r\n includesToken(search) {\r\n for (const t of this.getTokens()) {\r\n if (t.getStart().equals(search.getStart())) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n getTokenNodes() {\r\n const tokens = [];\r\n for (const c of this.getChildren()) {\r\n tokens.push(...this.toTokenNodess(c));\r\n }\r\n return tokens;\r\n }\r\n concatTokens() {\r\n let str = \"\";\r\n let prev;\r\n for (const token of this.getTokens()) {\r\n if (token instanceof pragma_1.Pragma) {\r\n continue;\r\n }\r\n if (str === \"\") {\r\n str = token.getStr();\r\n }\r\n else if (prev && prev.getStr().length + prev.getCol() === token.getCol()\r\n && prev.getRow() === token.getRow()) {\r\n str = str + token.getStr();\r\n }\r\n else {\r\n str = str + \" \" + token.getStr();\r\n }\r\n prev = token;\r\n }\r\n return str;\r\n }\r\n concatTokensWithoutStringsAndComments() {\r\n let str = \"\";\r\n let prev;\r\n for (const token of this.getTokens()) {\r\n if (token instanceof comment_1.Comment\r\n || token instanceof string_1.StringToken\r\n || token instanceof string_1.StringTemplate\r\n || token instanceof string_1.StringTemplateBegin\r\n || token instanceof string_1.StringTemplateMiddle\r\n || token instanceof string_1.StringTemplateEnd) {\r\n continue;\r\n }\r\n if (str === \"\") {\r\n str = token.getStr();\r\n }\r\n else if (prev && prev.getStr().length + prev.getCol() === token.getCol()\r\n && prev.getRow() === token.getRow()) {\r\n str = str + token.getStr();\r\n }\r\n else {\r\n str = str + \" \" + token.getStr();\r\n }\r\n prev = token;\r\n }\r\n return str;\r\n }\r\n getTerminator() {\r\n return this.getLastToken().getStr();\r\n }\r\n getFirstToken() {\r\n for (const child of this.getChildren()) {\r\n return child.getFirstToken();\r\n }\r\n throw new Error(\"StatementNode, getFirstToken, no children, \" + this.get().constructor.name);\r\n }\r\n getLastToken() {\r\n const child = this.getLastChild();\r\n if (child !== undefined) {\r\n return child.getLastToken();\r\n }\r\n throw new Error(\"StatementNode, getLastToken, no children\");\r\n }\r\n findDirectExpression(type) {\r\n for (const child of this.getChildren()) {\r\n if (child instanceof expression_node_1.ExpressionNode && child.get() instanceof type) {\r\n return child;\r\n }\r\n }\r\n return undefined;\r\n }\r\n findDirectExpressions(type) {\r\n const ret = [];\r\n for (const child of this.getChildren()) {\r\n if (child instanceof expression_node_1.ExpressionNode && child.get() instanceof type) {\r\n ret.push(child);\r\n }\r\n }\r\n return ret;\r\n }\r\n findDirectTokenByText(text) {\r\n const upper = text.toUpperCase();\r\n for (const child of this.getChildren()) {\r\n if (child instanceof token_node_1.TokenNode && child.get().getStr().toUpperCase() === upper) {\r\n return child.get();\r\n }\r\n }\r\n return undefined;\r\n }\r\n findFirstExpression(type) {\r\n for (const child of this.getChildren()) {\r\n if (child instanceof token_node_1.TokenNode) {\r\n continue;\r\n }\r\n else if (child.get() instanceof type) {\r\n return child;\r\n }\r\n else {\r\n const res = child.findFirstExpression(type);\r\n if (res) {\r\n return res;\r\n }\r\n }\r\n }\r\n return undefined;\r\n }\r\n findAllExpressions(type) {\r\n const ret = [];\r\n for (const child of this.getChildren()) {\r\n if (child instanceof token_node_1.TokenNode) {\r\n continue;\r\n }\r\n else if (child.get() instanceof type) {\r\n ret.push(child);\r\n }\r\n else {\r\n ret.push(...child.findAllExpressions(type));\r\n }\r\n }\r\n return ret;\r\n }\r\n findAllExpressionsRecursive(type) {\r\n const ret = [];\r\n for (const child of this.getChildren()) {\r\n if (child instanceof token_node_1.TokenNode) {\r\n continue;\r\n }\r\n else if (child.get() instanceof type) {\r\n ret.push(child);\r\n }\r\n ret.push(...child.findAllExpressionsRecursive(type));\r\n }\r\n return ret;\r\n }\r\n findAllExpressionsMulti(type, recursive = false) {\r\n const ret = [];\r\n for (const child of this.getChildren()) {\r\n if (child instanceof token_node_1.TokenNode) {\r\n continue;\r\n }\r\n const before = ret.length;\r\n for (const t of type) {\r\n if (child.get() instanceof t) {\r\n ret.push(child);\r\n }\r\n }\r\n if (before === ret.length || recursive === true) {\r\n ret.push(...child.findAllExpressionsMulti(type, recursive));\r\n }\r\n }\r\n return ret;\r\n }\r\n /**\r\n * Returns the Position of the first token if the sequence is found,\r\n * otherwise undefined. Strings and Comments are ignored in this search.\r\n * @param first - Text of the first Token\r\n * @param second - Text of the second Token\r\n */\r\n findTokenSequencePosition(first, second) {\r\n let prev;\r\n for (const token of this.getTokens()) {\r\n if (token instanceof comment_1.Comment\r\n || token instanceof string_1.StringToken\r\n || token instanceof string_1.StringTemplate\r\n || token instanceof string_1.StringTemplateBegin\r\n || token instanceof string_1.StringTemplateMiddle\r\n || token instanceof string_1.StringTemplateEnd) {\r\n continue;\r\n }\r\n if (prev && token.getStr().toUpperCase() === second && (prev === null || prev === void 0 ? void 0 : prev.getStr().toUpperCase()) === first.toUpperCase()) {\r\n return prev.getStart();\r\n }\r\n else {\r\n prev = token;\r\n }\r\n }\r\n return undefined;\r\n }\r\n findExpressionAfterToken(text) {\r\n const children = this.getChildren();\r\n for (let i = 0; i < children.length - 1; i++) {\r\n const c = children[i];\r\n const next = children[i + 1];\r\n if (c instanceof token_node_1.TokenNode\r\n && c.get().getStr().toUpperCase() === text.toUpperCase()\r\n && next instanceof expression_node_1.ExpressionNode) {\r\n return next;\r\n }\r\n }\r\n return undefined;\r\n }\r\n findExpressionsAfterToken(text) {\r\n const children = this.getChildren();\r\n const ret = [];\r\n for (let i = 0; i < children.length - 1; i++) {\r\n const c = children[i];\r\n const next = children[i + 1];\r\n if (c instanceof token_node_1.TokenNode\r\n && c.get().getStr().toUpperCase() === text.toUpperCase()\r\n && next instanceof expression_node_1.ExpressionNode) {\r\n ret.push(next);\r\n }\r\n }\r\n return ret;\r\n }\r\n ////////////////////////////////\r\n toTokens(b) {\r\n const tokens = [];\r\n if (b instanceof token_node_1.TokenNode) {\r\n tokens.push(b.get());\r\n return tokens;\r\n }\r\n for (const c of b.getChildren()) {\r\n if (c instanceof token_node_1.TokenNode) {\r\n tokens.push(c.get());\r\n }\r\n else {\r\n tokens.push(...this.toTokens(c));\r\n }\r\n }\r\n return tokens;\r\n }\r\n toTokenNodess(b) {\r\n const tokens = [];\r\n if (b instanceof token_node_1.TokenNode) {\r\n tokens.push(b);\r\n return tokens;\r\n }\r\n for (const c of b.getChildren()) {\r\n if (c instanceof token_node_1.TokenNode) {\r\n tokens.push(c);\r\n }\r\n else {\r\n tokens.push(...this.toTokenNodess(c));\r\n }\r\n }\r\n return tokens;\r\n }\r\n}\r\nexports.StatementNode = StatementNode;\r\n//# sourceMappingURL=statement_node.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/nodes/statement_node.js?");
8875
8875
 
8876
8876
  /***/ }),
8877
8877
 
@@ -9311,7 +9311,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
9311
9311
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
9312
9312
 
9313
9313
  "use strict";
9314
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.ClassDefinition = void 0;\r\nconst method_definitions_1 = __webpack_require__(/*! ./method_definitions */ \"./node_modules/@abaplint/core/build/src/abap/types/method_definitions.js\");\r\nconst expressions_1 = __webpack_require__(/*! ../2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst Statements = __webpack_require__(/*! ../2_statements/statements */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js\");\r\nconst Structures = __webpack_require__(/*! ../3_structures/structures */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/index.js\");\r\nconst Expressions = __webpack_require__(/*! ../2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst class_attributes_1 = __webpack_require__(/*! ./class_attributes */ \"./node_modules/@abaplint/core/build/src/abap/types/class_attributes.js\");\r\nconst _identifier_1 = __webpack_require__(/*! ../4_file_information/_identifier */ \"./node_modules/@abaplint/core/build/src/abap/4_file_information/_identifier.js\");\r\nconst aliases_1 = __webpack_require__(/*! ./aliases */ \"./node_modules/@abaplint/core/build/src/abap/types/aliases.js\");\r\nconst _scope_type_1 = __webpack_require__(/*! ../5_syntax/_scope_type */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_scope_type.js\");\r\nconst event_definition_1 = __webpack_require__(/*! ./event_definition */ \"./node_modules/@abaplint/core/build/src/abap/types/event_definition.js\");\r\nconst visibility_1 = __webpack_require__(/*! ../4_file_information/visibility */ \"./node_modules/@abaplint/core/build/src/abap/4_file_information/visibility.js\");\r\nconst _object_oriented_1 = __webpack_require__(/*! ../5_syntax/_object_oriented */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_object_oriented.js\");\r\nconst _reference_1 = __webpack_require__(/*! ../5_syntax/_reference */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_reference.js\");\r\nclass ClassDefinition extends _identifier_1.Identifier {\r\n constructor(node, filename, scope) {\r\n if (!(node.get() instanceof Structures.ClassDefinition)) {\r\n throw new Error(\"ClassDefinition, unexpected node type\");\r\n }\r\n const def = node.findFirstStatement(Statements.ClassDefinition);\r\n const name = def.findDirectExpression(Expressions.ClassName).getFirstToken();\r\n super(name, filename);\r\n scope.addClassDefinition(this);\r\n this.node = node;\r\n this.events = [];\r\n this.implementing = [];\r\n scope.push(_scope_type_1.ScopeType.ClassDefinition, name.getStr(), name.getStart(), filename);\r\n this.superClass = this.findSuper(def, filename, scope);\r\n this.friends = this.findFriends(def, filename, scope);\r\n this.parse(filename, scope);\r\n const helper = new _object_oriented_1.ObjectOriented(scope);\r\n helper.fromSuperClassesAndInterfaces(this);\r\n helper.addAliasedTypes(this.aliases);\r\n this.attributes = new class_attributes_1.Attributes(this.node, this.filename, scope);\r\n this.types = this.attributes.getTypes();\r\n const events = this.node.findAllStatements(Statements.Events);\r\n for (const e of events) {\r\n this.events.push(new event_definition_1.EventDefinition(e, visibility_1.Visibility.Public, this.filename, scope)); // todo, all these are not Public\r\n }\r\n this.methodDefs = new method_definitions_1.MethodDefinitions(this.node, this.filename, scope);\r\n scope.pop(node.getLastToken().getEnd());\r\n const concat = this.node.findFirstStatement(Statements.ClassDefinition).concatTokens().toUpperCase();\r\n this.testing = concat.includes(\" FOR TESTING\");\r\n this.sharedMemory = concat.includes(\" SHARED MEMORY ENABLED\");\r\n this.abstract = concat.includes(\" ABSTRACT\");\r\n }\r\n getFriends() {\r\n return this.friends;\r\n }\r\n getEvents() {\r\n return this.events;\r\n }\r\n getMethodDefinitions() {\r\n return this.methodDefs;\r\n }\r\n getTypeDefinitions() {\r\n return this.types;\r\n }\r\n getSuperClass() {\r\n return this.superClass;\r\n }\r\n getAttributes() {\r\n return this.attributes;\r\n }\r\n isGlobal() {\r\n return this.node.findFirstExpression(Expressions.ClassGlobal) !== undefined;\r\n }\r\n isFinal() {\r\n return this.node.findFirstExpression(Expressions.ClassFinal) !== undefined;\r\n }\r\n getImplementing() {\r\n return this.implementing;\r\n }\r\n getAliases() {\r\n return this.aliases;\r\n }\r\n isForTesting() {\r\n return this.testing;\r\n }\r\n isAbstract() {\r\n return this.abstract;\r\n }\r\n isSharedMemory() {\r\n return this.sharedMemory;\r\n }\r\n /*\r\n public getEvents() {\r\n }\r\n */\r\n ///////////////////\r\n findSuper(def, filename, scope) {\r\n var _a;\r\n const token = (_a = def === null || def === void 0 ? void 0 : def.findDirectExpression(expressions_1.SuperClassName)) === null || _a === void 0 ? void 0 : _a.getFirstToken();\r\n this.addReference(token, filename, scope);\r\n const name = token === null || token === void 0 ? void 0 : token.getStr();\r\n return name;\r\n }\r\n findFriends(def, filename, scope) {\r\n var _a;\r\n const result = [];\r\n for (const n of ((_a = def === null || def === void 0 ? void 0 : def.findDirectExpression(Expressions.ClassFriends)) === null || _a === void 0 ? void 0 : _a.findDirectExpressions(Expressions.ClassName)) || []) {\r\n const token = n.getFirstToken();\r\n this.addReference(token, filename, scope);\r\n const name = token.getStr();\r\n result.push(name);\r\n }\r\n return result;\r\n }\r\n addReference(token, filename, scope) {\r\n const name = token === null || token === void 0 ? void 0 : token.getStr();\r\n if (name) {\r\n const s = scope.findClassDefinition(name);\r\n if (s) {\r\n scope.addReference(token, s, _reference_1.ReferenceType.ObjectOrientedReference, filename, { ooName: name.toUpperCase(), ooType: \"CLAS\" });\r\n }\r\n else if (scope.getDDIC().inErrorNamespace(name) === false) {\r\n scope.addReference(token, undefined, _reference_1.ReferenceType.ObjectOrientedVoidReference, filename);\r\n }\r\n }\r\n }\r\n parse(filename, scope) {\r\n var _a;\r\n for (const node of this.node.findAllStatements(Statements.InterfaceDef)) {\r\n const partial = node.concatTokens().toUpperCase().includes(\" PARTIALLY IMPLEMENTED\");\r\n const token = (_a = node.findFirstExpression(Expressions.InterfaceName)) === null || _a === void 0 ? void 0 : _a.getFirstToken();\r\n if (token === undefined) {\r\n throw new Error(\"ClassDefinition, unable to find interface token\");\r\n }\r\n const name = token.getStr().toUpperCase();\r\n this.implementing.push({ name, partial });\r\n const intf = scope.findInterfaceDefinition(name);\r\n if (intf) {\r\n scope.addReference(token, intf, _reference_1.ReferenceType.ObjectOrientedReference, filename, { ooName: name.toUpperCase(), ooType: \"INTF\" });\r\n }\r\n else if (scope.getDDIC().inErrorNamespace(name) === false) {\r\n scope.addReference(token, undefined, _reference_1.ReferenceType.ObjectOrientedVoidReference, filename, { ooName: name.toUpperCase(), ooType: \"INTF\" });\r\n }\r\n else {\r\n scope.addReference(token, undefined, _reference_1.ReferenceType.ObjectOrientedUnknownReference, filename, { ooName: name.toUpperCase(), ooType: \"INTF\" });\r\n }\r\n }\r\n this.aliases = new aliases_1.Aliases(this.node, this.filename, scope);\r\n }\r\n}\r\nexports.ClassDefinition = ClassDefinition;\r\n//# sourceMappingURL=class_definition.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/types/class_definition.js?");
9314
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.ClassDefinition = void 0;\r\nconst method_definitions_1 = __webpack_require__(/*! ./method_definitions */ \"./node_modules/@abaplint/core/build/src/abap/types/method_definitions.js\");\r\nconst expressions_1 = __webpack_require__(/*! ../2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst Statements = __webpack_require__(/*! ../2_statements/statements */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js\");\r\nconst Structures = __webpack_require__(/*! ../3_structures/structures */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/index.js\");\r\nconst Expressions = __webpack_require__(/*! ../2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst class_attributes_1 = __webpack_require__(/*! ./class_attributes */ \"./node_modules/@abaplint/core/build/src/abap/types/class_attributes.js\");\r\nconst _identifier_1 = __webpack_require__(/*! ../4_file_information/_identifier */ \"./node_modules/@abaplint/core/build/src/abap/4_file_information/_identifier.js\");\r\nconst aliases_1 = __webpack_require__(/*! ./aliases */ \"./node_modules/@abaplint/core/build/src/abap/types/aliases.js\");\r\nconst _scope_type_1 = __webpack_require__(/*! ../5_syntax/_scope_type */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_scope_type.js\");\r\nconst event_definition_1 = __webpack_require__(/*! ./event_definition */ \"./node_modules/@abaplint/core/build/src/abap/types/event_definition.js\");\r\nconst visibility_1 = __webpack_require__(/*! ../4_file_information/visibility */ \"./node_modules/@abaplint/core/build/src/abap/4_file_information/visibility.js\");\r\nconst _object_oriented_1 = __webpack_require__(/*! ../5_syntax/_object_oriented */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_object_oriented.js\");\r\nconst _reference_1 = __webpack_require__(/*! ../5_syntax/_reference */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_reference.js\");\r\nclass ClassDefinition extends _identifier_1.Identifier {\r\n constructor(node, filename, scope) {\r\n if (!(node.get() instanceof Structures.ClassDefinition)) {\r\n throw new Error(\"ClassDefinition, unexpected node type\");\r\n }\r\n const def = node.findFirstStatement(Statements.ClassDefinition);\r\n const name = def.findDirectExpression(Expressions.ClassName).getFirstToken();\r\n super(name, filename);\r\n scope.addClassDefinition(this);\r\n this.node = node;\r\n this.events = [];\r\n this.implementing = [];\r\n scope.push(_scope_type_1.ScopeType.ClassDefinition, name.getStr(), name.getStart(), filename);\r\n this.superClass = this.findSuper(def, filename, scope);\r\n this.friends = this.findFriends(def, filename, scope);\r\n this.parse(filename, scope);\r\n const helper = new _object_oriented_1.ObjectOriented(scope);\r\n helper.fromSuperClassesAndInterfaces(this);\r\n helper.addAliasedTypes(this.aliases);\r\n this.attributes = new class_attributes_1.Attributes(this.node, this.filename, scope);\r\n this.types = this.attributes.getTypes();\r\n const events = this.node.findAllStatements(Statements.Events);\r\n for (const e of events) {\r\n this.events.push(new event_definition_1.EventDefinition(e, visibility_1.Visibility.Public, this.filename, scope)); // todo, all these are not Public\r\n }\r\n this.methodDefs = new method_definitions_1.MethodDefinitions(this.node, this.filename, scope);\r\n scope.pop(node.getLastToken().getEnd());\r\n const cdef = this.node.findFirstStatement(Statements.ClassDefinition);\r\n const concat = cdef.concatTokens().toUpperCase();\r\n this.testing = concat.includes(\" FOR TESTING\");\r\n this.sharedMemory = concat.includes(\" SHARED MEMORY ENABLED\");\r\n this.abstract = (cdef === null || cdef === void 0 ? void 0 : cdef.findDirectTokenByText(\"ABSTRACT\")) !== undefined;\r\n }\r\n getFriends() {\r\n return this.friends;\r\n }\r\n getEvents() {\r\n return this.events;\r\n }\r\n getMethodDefinitions() {\r\n return this.methodDefs;\r\n }\r\n getTypeDefinitions() {\r\n return this.types;\r\n }\r\n getSuperClass() {\r\n return this.superClass;\r\n }\r\n getAttributes() {\r\n return this.attributes;\r\n }\r\n isGlobal() {\r\n return this.node.findFirstExpression(Expressions.ClassGlobal) !== undefined;\r\n }\r\n isFinal() {\r\n return this.node.findFirstExpression(Expressions.ClassFinal) !== undefined;\r\n }\r\n getImplementing() {\r\n return this.implementing;\r\n }\r\n getAliases() {\r\n return this.aliases;\r\n }\r\n isForTesting() {\r\n return this.testing;\r\n }\r\n isAbstract() {\r\n return this.abstract;\r\n }\r\n isSharedMemory() {\r\n return this.sharedMemory;\r\n }\r\n /*\r\n public getEvents() {\r\n }\r\n */\r\n ///////////////////\r\n findSuper(def, filename, scope) {\r\n var _a;\r\n const token = (_a = def === null || def === void 0 ? void 0 : def.findDirectExpression(expressions_1.SuperClassName)) === null || _a === void 0 ? void 0 : _a.getFirstToken();\r\n this.addReference(token, filename, scope);\r\n const name = token === null || token === void 0 ? void 0 : token.getStr();\r\n return name;\r\n }\r\n findFriends(def, filename, scope) {\r\n var _a;\r\n const result = [];\r\n for (const n of ((_a = def === null || def === void 0 ? void 0 : def.findDirectExpression(Expressions.ClassFriends)) === null || _a === void 0 ? void 0 : _a.findDirectExpressions(Expressions.ClassName)) || []) {\r\n const token = n.getFirstToken();\r\n this.addReference(token, filename, scope);\r\n const name = token.getStr();\r\n result.push(name);\r\n }\r\n return result;\r\n }\r\n addReference(token, filename, scope) {\r\n const name = token === null || token === void 0 ? void 0 : token.getStr();\r\n if (name) {\r\n const s = scope.findClassDefinition(name);\r\n if (s) {\r\n scope.addReference(token, s, _reference_1.ReferenceType.ObjectOrientedReference, filename, { ooName: name.toUpperCase(), ooType: \"CLAS\" });\r\n }\r\n else if (scope.getDDIC().inErrorNamespace(name) === false) {\r\n scope.addReference(token, undefined, _reference_1.ReferenceType.ObjectOrientedVoidReference, filename);\r\n }\r\n }\r\n }\r\n parse(filename, scope) {\r\n var _a;\r\n for (const node of this.node.findAllStatements(Statements.InterfaceDef)) {\r\n const partial = node.concatTokens().toUpperCase().includes(\" PARTIALLY IMPLEMENTED\");\r\n const token = (_a = node.findFirstExpression(Expressions.InterfaceName)) === null || _a === void 0 ? void 0 : _a.getFirstToken();\r\n if (token === undefined) {\r\n throw new Error(\"ClassDefinition, unable to find interface token\");\r\n }\r\n const name = token.getStr().toUpperCase();\r\n this.implementing.push({ name, partial });\r\n const intf = scope.findInterfaceDefinition(name);\r\n if (intf) {\r\n scope.addReference(token, intf, _reference_1.ReferenceType.ObjectOrientedReference, filename, { ooName: name.toUpperCase(), ooType: \"INTF\" });\r\n }\r\n else if (scope.getDDIC().inErrorNamespace(name) === false) {\r\n scope.addReference(token, undefined, _reference_1.ReferenceType.ObjectOrientedVoidReference, filename, { ooName: name.toUpperCase(), ooType: \"INTF\" });\r\n }\r\n else {\r\n scope.addReference(token, undefined, _reference_1.ReferenceType.ObjectOrientedUnknownReference, filename, { ooName: name.toUpperCase(), ooType: \"INTF\" });\r\n }\r\n }\r\n this.aliases = new aliases_1.Aliases(this.node, this.filename, scope);\r\n }\r\n}\r\nexports.ClassDefinition = ClassDefinition;\r\n//# sourceMappingURL=class_definition.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/types/class_definition.js?");
9315
9315
 
9316
9316
  /***/ }),
9317
9317
 
@@ -10037,7 +10037,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
10037
10037
  /***/ ((__unused_webpack_module, exports) => {
10038
10038
 
10039
10039
  "use strict";
10040
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.AbstractFile = void 0;\r\nclass AbstractFile {\r\n constructor(filename) {\r\n this.filename = filename;\r\n }\r\n getFilename() {\r\n return this.filename;\r\n }\r\n baseName() {\r\n const base1 = this.getFilename().split(\"\\\\\").reverse()[0];\r\n const base2 = base1.split(\"/\").reverse()[0];\r\n return base2;\r\n }\r\n getObjectType() {\r\n var _a;\r\n const split = this.baseName().split(\".\");\r\n return (_a = split[1]) === null || _a === void 0 ? void 0 : _a.toUpperCase();\r\n }\r\n getObjectName() {\r\n const split = this.baseName().split(\".\");\r\n // handle url escaped namespace\r\n split[0] = split[0].replace(/%23/g, \"#\");\r\n // handle additional escaping\r\n split[0] = split[0].replace(/%3e/g, \">\");\r\n split[0] = split[0].replace(/%3c/g, \"<\");\r\n // handle namespace\r\n return split[0].toUpperCase().replace(/#/g, \"/\");\r\n }\r\n}\r\nexports.AbstractFile = AbstractFile;\r\n//# sourceMappingURL=_abstract_file.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/files/_abstract_file.js?");
10040
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.AbstractFile = void 0;\r\nclass AbstractFile {\r\n constructor(filename) {\r\n this.filename = filename;\r\n }\r\n getFilename() {\r\n return this.filename;\r\n }\r\n baseName() {\r\n const first = this.getFilename().split(\"\\\\\");\r\n const base1 = first[first.length - 1];\r\n const base2 = base1.split(\"/\");\r\n return base2[base2.length - 1];\r\n }\r\n getObjectType() {\r\n var _a;\r\n const split = this.baseName().split(\".\");\r\n return (_a = split[1]) === null || _a === void 0 ? void 0 : _a.toUpperCase();\r\n }\r\n getObjectName() {\r\n const split = this.baseName().split(\".\");\r\n // handle url escaped namespace\r\n split[0] = split[0].replace(/%23/g, \"#\");\r\n // handle additional escaping\r\n split[0] = split[0].replace(/%3e/g, \">\");\r\n split[0] = split[0].replace(/%3c/g, \"<\");\r\n // handle namespace\r\n return split[0].toUpperCase().replace(/#/g, \"/\");\r\n }\r\n}\r\nexports.AbstractFile = AbstractFile;\r\n//# sourceMappingURL=_abstract_file.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/files/_abstract_file.js?");
10041
10041
 
10042
10042
  /***/ }),
10043
10043
 
@@ -10191,7 +10191,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
10191
10191
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
10192
10192
 
10193
10193
  "use strict";
10194
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.Hover = void 0;\r\nconst LServer = __webpack_require__(/*! vscode-languageserver-types */ \"./node_modules/vscode-languageserver-types/lib/esm/main.js\");\r\nconst _abap_object_1 = __webpack_require__(/*! ../objects/_abap_object */ \"./node_modules/@abaplint/core/build/src/objects/_abap_object.js\");\r\nconst _lsp_utils_1 = __webpack_require__(/*! ./_lsp_utils */ \"./node_modules/@abaplint/core/build/src/lsp/_lsp_utils.js\");\r\nconst Tokens = __webpack_require__(/*! ../abap/1_lexer/tokens */ \"./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js\");\r\nconst _lookup_1 = __webpack_require__(/*! ./_lookup */ \"./node_modules/@abaplint/core/build/src/lsp/_lookup.js\");\r\nclass Hover {\r\n constructor(reg) {\r\n this.reg = reg;\r\n }\r\n find(pos) {\r\n const file = _lsp_utils_1.LSPUtils.getABAPFile(this.reg, pos.textDocument.uri);\r\n if (file === undefined) {\r\n return undefined;\r\n }\r\n const obj = this.reg.getObject(file.getObjectType(), file.getObjectName());\r\n if (!(obj instanceof _abap_object_1.ABAPObject)) {\r\n return undefined;\r\n }\r\n const found = _lsp_utils_1.LSPUtils.findCursor(this.reg, pos);\r\n if (found === undefined) {\r\n return undefined;\r\n }\r\n else if (found.token instanceof Tokens.StringTemplate\r\n || found.token instanceof Tokens.StringTemplateBegin\r\n || found.token instanceof Tokens.StringTemplateEnd\r\n || found.token instanceof Tokens.StringTemplateMiddle) {\r\n return { kind: LServer.MarkupKind.Markdown, value: \"String Template\" };\r\n }\r\n else if (found.token instanceof Tokens.Comment) {\r\n return { kind: LServer.MarkupKind.Markdown, value: \"Comment\" };\r\n }\r\n const lookup = _lookup_1.LSPLookup.lookup(found, this.reg, obj);\r\n if (lookup === null || lookup === void 0 ? void 0 : lookup.hover) {\r\n return { kind: LServer.MarkupKind.Markdown, value: lookup.hover };\r\n }\r\n if (found.token instanceof Tokens.String) {\r\n return { kind: LServer.MarkupKind.Markdown, value: \"String\" };\r\n }\r\n return undefined;\r\n }\r\n}\r\nexports.Hover = Hover;\r\n//# sourceMappingURL=hover.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/lsp/hover.js?");
10194
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.Hover = void 0;\r\nconst LServer = __webpack_require__(/*! vscode-languageserver-types */ \"./node_modules/vscode-languageserver-types/lib/esm/main.js\");\r\nconst _abap_object_1 = __webpack_require__(/*! ../objects/_abap_object */ \"./node_modules/@abaplint/core/build/src/objects/_abap_object.js\");\r\nconst _lsp_utils_1 = __webpack_require__(/*! ./_lsp_utils */ \"./node_modules/@abaplint/core/build/src/lsp/_lsp_utils.js\");\r\nconst Tokens = __webpack_require__(/*! ../abap/1_lexer/tokens */ \"./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js\");\r\nconst _lookup_1 = __webpack_require__(/*! ./_lookup */ \"./node_modules/@abaplint/core/build/src/lsp/_lookup.js\");\r\nclass Hover {\r\n constructor(reg) {\r\n this.reg = reg;\r\n }\r\n find(pos) {\r\n const file = _lsp_utils_1.LSPUtils.getABAPFile(this.reg, pos.textDocument.uri);\r\n if (file === undefined) {\r\n return undefined;\r\n }\r\n const obj = this.reg.getObject(file.getObjectType(), file.getObjectName());\r\n if (!(obj instanceof _abap_object_1.ABAPObject)) {\r\n return undefined;\r\n }\r\n const found = _lsp_utils_1.LSPUtils.findCursor(this.reg, pos);\r\n if (found === undefined) {\r\n return undefined;\r\n }\r\n else if (found.token instanceof Tokens.StringTemplate\r\n || found.token instanceof Tokens.StringTemplateBegin\r\n || found.token instanceof Tokens.StringTemplateEnd\r\n || found.token instanceof Tokens.StringTemplateMiddle) {\r\n return { kind: LServer.MarkupKind.Markdown, value: \"String Template\" };\r\n }\r\n else if (found.token instanceof Tokens.Comment) {\r\n return { kind: LServer.MarkupKind.Markdown, value: \"Comment\" };\r\n }\r\n const lookup = _lookup_1.LSPLookup.lookup(found, this.reg, obj);\r\n if (lookup === null || lookup === void 0 ? void 0 : lookup.hover) {\r\n return { kind: LServer.MarkupKind.Markdown, value: lookup.hover };\r\n }\r\n if (found.token instanceof Tokens.StringToken) {\r\n return { kind: LServer.MarkupKind.Markdown, value: \"String\" };\r\n }\r\n return undefined;\r\n }\r\n}\r\nexports.Hover = Hover;\r\n//# sourceMappingURL=hover.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/lsp/hover.js?");
10195
10195
 
10196
10196
  /***/ }),
10197
10197
 
@@ -10246,7 +10246,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
10246
10246
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
10247
10247
 
10248
10248
  "use strict";
10249
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.SemanticHighlighting = void 0;\r\nconst LServer = __webpack_require__(/*! vscode-languageserver-types */ \"./node_modules/vscode-languageserver-types/lib/esm/main.js\");\r\nconst position_1 = __webpack_require__(/*! ../position */ \"./node_modules/@abaplint/core/build/src/position.js\");\r\nconst tokens_1 = __webpack_require__(/*! ../abap/1_lexer/tokens */ \"./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js\");\r\nconst nodes_1 = __webpack_require__(/*! ../abap/nodes */ \"./node_modules/@abaplint/core/build/src/abap/nodes/index.js\");\r\nconst Statements = __webpack_require__(/*! ../abap/2_statements/statements */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js\");\r\nconst _lsp_utils_1 = __webpack_require__(/*! ./_lsp_utils */ \"./node_modules/@abaplint/core/build/src/lsp/_lsp_utils.js\");\r\nconst SOURCE_ABAP = \"source.abap\";\r\nconst BLOCK_ABAP = \"storage.type.block.abap\";\r\nclass SemanticHighlighting {\r\n constructor(reg) {\r\n this.reg = reg;\r\n SemanticHighlighting.initLegend();\r\n }\r\n static semanticTokensLegend() {\r\n // https://code.visualstudio.com/api/language-extensions/semantic-highlight-guide#semantic-token-scope-map\r\n // https://microsoft.github.io/language-server-protocol/specifications/specification-3-17/#semanticTokenTypes\r\n this.initLegend();\r\n return {\r\n tokenTypes: SemanticHighlighting.tokenTypes,\r\n tokenModifiers: [],\r\n };\r\n }\r\n static initLegend() {\r\n if (SemanticHighlighting.tokenTypes.length === 0) {\r\n SemanticHighlighting.tokenTypeMap = {};\r\n SemanticHighlighting.tokenTypeMap[SOURCE_ABAP] = SemanticHighlighting.tokenTypes.length;\r\n SemanticHighlighting.tokenTypes.push(SOURCE_ABAP);\r\n SemanticHighlighting.tokenTypeMap[BLOCK_ABAP] = SemanticHighlighting.tokenTypes.length;\r\n SemanticHighlighting.tokenTypes.push(BLOCK_ABAP);\r\n for (const t in LServer.SemanticTokenTypes) {\r\n SemanticHighlighting.tokenTypeMap[t] = SemanticHighlighting.tokenTypes.length;\r\n SemanticHighlighting.tokenTypes.push(t);\r\n }\r\n }\r\n }\r\n // https://microsoft.github.io/language-server-protocol/specifications/specification-3-17/#textDocument_semanticTokens\r\n semanticTokensRange(range) {\r\n const file = _lsp_utils_1.LSPUtils.getABAPFile(this.reg, range.textDocument.uri);\r\n if (file === undefined) {\r\n return { data: [] };\r\n }\r\n const rangeStartPosition = new position_1.Position(range.start.line + 1, range.start.character + 1);\r\n const rangeEndPosition = new position_1.Position(range.end.line + 1, range.end.character + 1);\r\n const tokens = [];\r\n for (const s of file.getStatements()) {\r\n if (s.getFirstToken().getStart() instanceof position_1.VirtualPosition) {\r\n continue;\r\n }\r\n else if (s.getFirstToken().getStart().isAfter(rangeEndPosition)) {\r\n break;\r\n }\r\n else if (s.getLastToken().getEnd().isBefore(rangeStartPosition)) {\r\n continue;\r\n }\r\n const statementInstance = s.get();\r\n for (const t of s.getTokenNodes()) {\r\n const tokenInstance = t.get();\r\n let tokenType = LServer.SemanticTokenTypes.keyword;\r\n if (tokenInstance instanceof tokens_1.Punctuation) {\r\n tokenType = SOURCE_ABAP;\r\n }\r\n else if (statementInstance instanceof Statements.Public\r\n || statementInstance instanceof Statements.Private\r\n || statementInstance instanceof Statements.Protected\r\n || statementInstance instanceof Statements.ClassDefinition\r\n || statementInstance instanceof Statements.ClassImplementation\r\n || statementInstance instanceof Statements.MethodImplementation\r\n || statementInstance instanceof Statements.EndMethod\r\n || statementInstance instanceof Statements.EndClass\r\n || statementInstance instanceof Statements.Interface\r\n || statementInstance instanceof Statements.EndInterface\r\n || statementInstance instanceof Statements.Form\r\n || statementInstance instanceof Statements.EndForm) {\r\n tokenType = BLOCK_ABAP;\r\n }\r\n else if (tokenInstance instanceof tokens_1.String\r\n || tokenInstance instanceof tokens_1.StringTemplate\r\n || tokenInstance instanceof tokens_1.StringTemplateBegin\r\n || tokenInstance instanceof tokens_1.StringTemplateEnd\r\n || tokenInstance instanceof tokens_1.StringTemplateMiddle) {\r\n tokenType = LServer.SemanticTokenTypes.string;\r\n }\r\n else if (tokenInstance instanceof tokens_1.Comment) {\r\n tokenType = LServer.SemanticTokenTypes.comment;\r\n }\r\n else if (t instanceof nodes_1.TokenNodeRegex) {\r\n tokenType = SOURCE_ABAP;\r\n }\r\n const token = t.getFirstToken();\r\n tokens.push({\r\n line: token.getStart().getRow() - 1,\r\n startChar: token.getStart().getCol() - 1,\r\n length: token.getStr().length,\r\n tokenType: tokenType,\r\n tokenModifiers: [],\r\n });\r\n }\r\n }\r\n return { data: this.encodeTokens(tokens) };\r\n }\r\n encodeTokens(tokens) {\r\n const ret = [];\r\n let prevLine = undefined;\r\n let prevChar = undefined;\r\n for (const t of tokens) {\r\n if (prevLine === undefined) {\r\n ret.push(t.line);\r\n }\r\n else {\r\n ret.push(t.line - prevLine);\r\n }\r\n if (prevLine === t.line && prevChar) {\r\n ret.push(t.startChar - prevChar);\r\n }\r\n else {\r\n ret.push(t.startChar); // todo, delta?\r\n }\r\n ret.push(t.length);\r\n ret.push(SemanticHighlighting.tokenTypeMap[t.tokenType]);\r\n ret.push(0); // no modifier logic implemented yet\r\n prevLine = t.line;\r\n prevChar = t.startChar;\r\n }\r\n return ret;\r\n }\r\n}\r\nexports.SemanticHighlighting = SemanticHighlighting;\r\nSemanticHighlighting.tokenTypes = [];\r\n//# sourceMappingURL=semantic.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/lsp/semantic.js?");
10249
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.SemanticHighlighting = void 0;\r\nconst LServer = __webpack_require__(/*! vscode-languageserver-types */ \"./node_modules/vscode-languageserver-types/lib/esm/main.js\");\r\nconst position_1 = __webpack_require__(/*! ../position */ \"./node_modules/@abaplint/core/build/src/position.js\");\r\nconst tokens_1 = __webpack_require__(/*! ../abap/1_lexer/tokens */ \"./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js\");\r\nconst nodes_1 = __webpack_require__(/*! ../abap/nodes */ \"./node_modules/@abaplint/core/build/src/abap/nodes/index.js\");\r\nconst Statements = __webpack_require__(/*! ../abap/2_statements/statements */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js\");\r\nconst _lsp_utils_1 = __webpack_require__(/*! ./_lsp_utils */ \"./node_modules/@abaplint/core/build/src/lsp/_lsp_utils.js\");\r\nconst SOURCE_ABAP = \"source.abap\";\r\nconst BLOCK_ABAP = \"storage.type.block.abap\";\r\nclass SemanticHighlighting {\r\n constructor(reg) {\r\n this.reg = reg;\r\n SemanticHighlighting.initLegend();\r\n }\r\n static semanticTokensLegend() {\r\n // https://code.visualstudio.com/api/language-extensions/semantic-highlight-guide#semantic-token-scope-map\r\n // https://microsoft.github.io/language-server-protocol/specifications/specification-3-17/#semanticTokenTypes\r\n this.initLegend();\r\n return {\r\n tokenTypes: SemanticHighlighting.tokenTypes,\r\n tokenModifiers: [],\r\n };\r\n }\r\n static initLegend() {\r\n if (SemanticHighlighting.tokenTypes.length === 0) {\r\n SemanticHighlighting.tokenTypeMap = {};\r\n SemanticHighlighting.tokenTypeMap[SOURCE_ABAP] = SemanticHighlighting.tokenTypes.length;\r\n SemanticHighlighting.tokenTypes.push(SOURCE_ABAP);\r\n SemanticHighlighting.tokenTypeMap[BLOCK_ABAP] = SemanticHighlighting.tokenTypes.length;\r\n SemanticHighlighting.tokenTypes.push(BLOCK_ABAP);\r\n for (const t in LServer.SemanticTokenTypes) {\r\n SemanticHighlighting.tokenTypeMap[t] = SemanticHighlighting.tokenTypes.length;\r\n SemanticHighlighting.tokenTypes.push(t);\r\n }\r\n }\r\n }\r\n // https://microsoft.github.io/language-server-protocol/specifications/specification-3-17/#textDocument_semanticTokens\r\n semanticTokensRange(range) {\r\n const file = _lsp_utils_1.LSPUtils.getABAPFile(this.reg, range.textDocument.uri);\r\n if (file === undefined) {\r\n return { data: [] };\r\n }\r\n const rangeStartPosition = new position_1.Position(range.start.line + 1, range.start.character + 1);\r\n const rangeEndPosition = new position_1.Position(range.end.line + 1, range.end.character + 1);\r\n const tokens = [];\r\n for (const s of file.getStatements()) {\r\n if (s.getFirstToken().getStart() instanceof position_1.VirtualPosition) {\r\n continue;\r\n }\r\n else if (s.getFirstToken().getStart().isAfter(rangeEndPosition)) {\r\n break;\r\n }\r\n else if (s.getLastToken().getEnd().isBefore(rangeStartPosition)) {\r\n continue;\r\n }\r\n const statementInstance = s.get();\r\n for (const t of s.getTokenNodes()) {\r\n const tokenInstance = t.get();\r\n let tokenType = LServer.SemanticTokenTypes.keyword;\r\n if (tokenInstance instanceof tokens_1.Punctuation) {\r\n tokenType = SOURCE_ABAP;\r\n }\r\n else if (statementInstance instanceof Statements.Public\r\n || statementInstance instanceof Statements.Private\r\n || statementInstance instanceof Statements.Protected\r\n || statementInstance instanceof Statements.ClassDefinition\r\n || statementInstance instanceof Statements.ClassImplementation\r\n || statementInstance instanceof Statements.MethodImplementation\r\n || statementInstance instanceof Statements.EndMethod\r\n || statementInstance instanceof Statements.EndClass\r\n || statementInstance instanceof Statements.Interface\r\n || statementInstance instanceof Statements.EndInterface\r\n || statementInstance instanceof Statements.Form\r\n || statementInstance instanceof Statements.EndForm) {\r\n tokenType = BLOCK_ABAP;\r\n }\r\n else if (tokenInstance instanceof tokens_1.StringToken\r\n || tokenInstance instanceof tokens_1.StringTemplate\r\n || tokenInstance instanceof tokens_1.StringTemplateBegin\r\n || tokenInstance instanceof tokens_1.StringTemplateEnd\r\n || tokenInstance instanceof tokens_1.StringTemplateMiddle) {\r\n tokenType = LServer.SemanticTokenTypes.string;\r\n }\r\n else if (tokenInstance instanceof tokens_1.Comment) {\r\n tokenType = LServer.SemanticTokenTypes.comment;\r\n }\r\n else if (t instanceof nodes_1.TokenNodeRegex) {\r\n tokenType = SOURCE_ABAP;\r\n }\r\n const token = t.getFirstToken();\r\n tokens.push({\r\n line: token.getStart().getRow() - 1,\r\n startChar: token.getStart().getCol() - 1,\r\n length: token.getStr().length,\r\n tokenType: tokenType,\r\n tokenModifiers: [],\r\n });\r\n }\r\n }\r\n return { data: this.encodeTokens(tokens) };\r\n }\r\n encodeTokens(tokens) {\r\n const ret = [];\r\n let prevLine = undefined;\r\n let prevChar = undefined;\r\n for (const t of tokens) {\r\n if (prevLine === undefined) {\r\n ret.push(t.line);\r\n }\r\n else {\r\n ret.push(t.line - prevLine);\r\n }\r\n if (prevLine === t.line && prevChar) {\r\n ret.push(t.startChar - prevChar);\r\n }\r\n else {\r\n ret.push(t.startChar); // todo, delta?\r\n }\r\n ret.push(t.length);\r\n ret.push(SemanticHighlighting.tokenTypeMap[t.tokenType]);\r\n ret.push(0); // no modifier logic implemented yet\r\n prevLine = t.line;\r\n prevChar = t.startChar;\r\n }\r\n return ret;\r\n }\r\n}\r\nexports.SemanticHighlighting = SemanticHighlighting;\r\nSemanticHighlighting.tokenTypes = [];\r\n//# sourceMappingURL=semantic.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/lsp/semantic.js?");
10250
10250
 
10251
10251
  /***/ }),
10252
10252
 
@@ -11621,7 +11621,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
11621
11621
  /***/ ((__unused_webpack_module, exports) => {
11622
11622
 
11623
11623
  "use strict";
11624
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.VirtualPosition = exports.Position = void 0;\r\n// first position is (1,1)\r\nclass Position {\r\n constructor(row, col) {\r\n this.row = row;\r\n this.col = col;\r\n }\r\n getCol() {\r\n return this.col;\r\n }\r\n getRow() {\r\n return this.row;\r\n }\r\n isAfter(p) {\r\n return this.row > p.row || (this.row === p.row && this.col >= p.col);\r\n }\r\n equals(p) {\r\n return this.row === p.getRow() && this.col === p.getCol();\r\n }\r\n isBefore(p) {\r\n return this.row < p.row || (this.row === p.row && this.col < p.col);\r\n }\r\n isBetween(p1, p2) {\r\n return this.isAfter(p1) && this.isBefore(p2);\r\n }\r\n}\r\nexports.Position = Position;\r\n/** used for macro calls */\r\nclass VirtualPosition extends Position {\r\n constructor(virtual, row, col) {\r\n super(virtual.getRow(), virtual.getCol());\r\n this.virtual = virtual;\r\n this.vrow = row;\r\n this.vcol = col;\r\n }\r\n equals(p) {\r\n if (!(p instanceof VirtualPosition)) {\r\n return false;\r\n }\r\n return super.equals(this.virtual) && this.vrow === p.vrow && this.vcol === p.vcol;\r\n }\r\n}\r\nexports.VirtualPosition = VirtualPosition;\r\n//# sourceMappingURL=position.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/position.js?");
11624
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.VirtualPosition = exports.Position = void 0;\r\n// first position is (1,1)\r\nclass Position {\r\n constructor(row, col) {\r\n this.row = row;\r\n this.col = col;\r\n }\r\n getCol() {\r\n return this.col;\r\n }\r\n getRow() {\r\n return this.row;\r\n }\r\n isAfter(p) {\r\n return this.row > p.row || (this.row === p.row && this.col >= p.col);\r\n }\r\n equals(p) {\r\n return this.row === p.getRow() && this.col === p.getCol();\r\n }\r\n isBefore(p) {\r\n return this.row < p.row || (this.row === p.row && this.col < p.col);\r\n }\r\n isBetween(p1, p2) {\r\n return this.isAfter(p1) && this.isBefore(p2);\r\n }\r\n}\r\nexports.Position = Position;\r\n/** used for macro calls */\r\nclass VirtualPosition extends Position {\r\n constructor(virtual, row, col) {\r\n super(virtual.getRow(), virtual.getCol());\r\n this.virtual = virtual;\r\n this.vrow = row;\r\n this.vcol = col;\r\n }\r\n equals(p) {\r\n if (!(p instanceof VirtualPosition)) {\r\n return false;\r\n }\r\n const bar = p; // widening cast for ABAP translation\r\n return super.equals(this.virtual) && this.vrow === bar.vrow && this.vcol === bar.vcol;\r\n }\r\n}\r\nexports.VirtualPosition = VirtualPosition;\r\n//# sourceMappingURL=position.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/position.js?");
11625
11625
 
11626
11626
  /***/ }),
11627
11627
 
@@ -11632,7 +11632,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
11632
11632
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
11633
11633
 
11634
11634
  "use strict";
11635
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.FixCase = void 0;\r\nconst nodes_1 = __webpack_require__(/*! ../abap/nodes */ \"./node_modules/@abaplint/core/build/src/abap/nodes/index.js\");\r\nconst tokens_1 = __webpack_require__(/*! ../abap/1_lexer/tokens */ \"./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js\");\r\nconst keyword_case_1 = __webpack_require__(/*! ../rules/keyword_case */ \"./node_modules/@abaplint/core/build/src/rules/keyword_case.js\");\r\nconst Tokens = __webpack_require__(/*! ../abap/1_lexer/tokens */ \"./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js\");\r\nclass FixCase {\r\n constructor(fileContents, config) {\r\n this.keywordCase = new keyword_case_1.KeywordCase();\r\n this.keywordCase.setConfig(config.readByRule(this.keywordCase.getMetadata().key));\r\n this.fileContents = fileContents;\r\n this.config = config;\r\n }\r\n execute(statement) {\r\n for (const child of statement.getChildren()) {\r\n if (child instanceof nodes_1.TokenNodeRegex) {\r\n const token = child.get();\r\n if (token instanceof Tokens.String) {\r\n continue;\r\n }\r\n this.replaceString(token.getStart(), this.formatNonKeyword(token.getStr()));\r\n continue;\r\n }\r\n else if (child instanceof nodes_1.TokenNode) {\r\n const token = child.get();\r\n const str = token.getStr();\r\n if (this.keywordCase.violatesRule(str) && token instanceof tokens_1.Identifier) {\r\n this.replaceString(token.getStart(), this.formatKeyword(str));\r\n }\r\n }\r\n else if (child instanceof nodes_1.ExpressionNode) {\r\n this.execute(child);\r\n }\r\n else {\r\n throw new Error(\"pretty printer, traverse, unexpected node type\");\r\n }\r\n }\r\n return this.fileContents;\r\n }\r\n formatNonKeyword(str) {\r\n return str.toLowerCase();\r\n }\r\n formatKeyword(keyword) {\r\n const ruleKey = this.keywordCase.getMetadata().key;\r\n const rule = this.config.readByRule(ruleKey);\r\n const style = rule ? rule[\"style\"] : keyword_case_1.KeywordCaseStyle.Upper;\r\n return style === keyword_case_1.KeywordCaseStyle.Lower ? keyword.toLowerCase() : keyword.toUpperCase();\r\n }\r\n replaceString(pos, str) {\r\n const lines = this.fileContents.split(\"\\n\");\r\n const line = lines[pos.getRow() - 1];\r\n lines[pos.getRow() - 1] = line.substr(0, pos.getCol() - 1) + str + line.substr(pos.getCol() + str.length - 1);\r\n this.fileContents = lines.join(\"\\n\");\r\n }\r\n}\r\nexports.FixCase = FixCase;\r\n//# sourceMappingURL=fix_keyword_case.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/pretty_printer/fix_keyword_case.js?");
11635
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.FixCase = void 0;\r\nconst nodes_1 = __webpack_require__(/*! ../abap/nodes */ \"./node_modules/@abaplint/core/build/src/abap/nodes/index.js\");\r\nconst tokens_1 = __webpack_require__(/*! ../abap/1_lexer/tokens */ \"./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js\");\r\nconst keyword_case_1 = __webpack_require__(/*! ../rules/keyword_case */ \"./node_modules/@abaplint/core/build/src/rules/keyword_case.js\");\r\nconst Tokens = __webpack_require__(/*! ../abap/1_lexer/tokens */ \"./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js\");\r\nclass FixCase {\r\n constructor(fileContents, config) {\r\n this.keywordCase = new keyword_case_1.KeywordCase();\r\n this.keywordCase.setConfig(config.readByRule(this.keywordCase.getMetadata().key));\r\n this.fileContents = fileContents;\r\n this.config = config;\r\n }\r\n execute(statement) {\r\n for (const child of statement.getChildren()) {\r\n if (child instanceof nodes_1.TokenNodeRegex) {\r\n const token = child.get();\r\n if (token instanceof Tokens.StringToken) {\r\n continue;\r\n }\r\n this.replaceString(token.getStart(), this.formatNonKeyword(token.getStr()));\r\n continue;\r\n }\r\n else if (child instanceof nodes_1.TokenNode) {\r\n const token = child.get();\r\n const str = token.getStr();\r\n if (this.keywordCase.violatesRule(str) && token instanceof tokens_1.Identifier) {\r\n this.replaceString(token.getStart(), this.formatKeyword(str));\r\n }\r\n }\r\n else if (child instanceof nodes_1.ExpressionNode) {\r\n this.execute(child);\r\n }\r\n else {\r\n throw new Error(\"pretty printer, traverse, unexpected node type\");\r\n }\r\n }\r\n return this.fileContents;\r\n }\r\n formatNonKeyword(str) {\r\n return str.toLowerCase();\r\n }\r\n formatKeyword(keyword) {\r\n const ruleKey = this.keywordCase.getMetadata().key;\r\n const rule = this.config.readByRule(ruleKey);\r\n const style = rule ? rule[\"style\"] : keyword_case_1.KeywordCaseStyle.Upper;\r\n return style === keyword_case_1.KeywordCaseStyle.Lower ? keyword.toLowerCase() : keyword.toUpperCase();\r\n }\r\n replaceString(pos, str) {\r\n const lines = this.fileContents.split(\"\\n\");\r\n const line = lines[pos.getRow() - 1];\r\n lines[pos.getRow() - 1] = line.substr(0, pos.getCol() - 1) + str + line.substr(pos.getCol() + str.length - 1);\r\n this.fileContents = lines.join(\"\\n\");\r\n }\r\n}\r\nexports.FixCase = FixCase;\r\n//# sourceMappingURL=fix_keyword_case.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/pretty_printer/fix_keyword_case.js?");
11636
11636
 
11637
11637
  /***/ }),
11638
11638
 
@@ -11676,7 +11676,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
11676
11676
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
11677
11677
 
11678
11678
  "use strict";
11679
- 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.97\";\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/cli/./node_modules/@abaplint/core/build/src/registry.js?");
11679
+ 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/cli/./node_modules/@abaplint/core/build/src/registry.js?");
11680
11680
 
11681
11681
  /***/ }),
11682
11682
 
@@ -12347,7 +12347,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
12347
12347
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
12348
12348
 
12349
12349
  "use strict";
12350
- 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 to a single condition using AND.`,\r\n extendedInformation: `https://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 goodExample: `IF ( condition1 ) AND ( 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/cli/./node_modules/@abaplint/core/build/src/rules/if_in_if.js?");
12350
+ 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/cli/./node_modules/@abaplint/core/build/src/rules/if_in_if.js?");
12351
12351
 
12352
12352
  /***/ }),
12353
12353
 
@@ -12468,7 +12468,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
12468
12468
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
12469
12469
 
12470
12470
  "use strict";
12471
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.LineLength = exports.LineLengthConf = 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\nclass LineLengthConf extends _basic_rule_config_1.BasicRuleConfig {\r\n constructor() {\r\n super(...arguments);\r\n /** Maximum line length in characters, trailing whitespace ignored */\r\n this.length = 120;\r\n }\r\n}\r\nexports.LineLengthConf = LineLengthConf;\r\nclass LineLength extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new LineLengthConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"line_length\",\r\n title: \"Line length\",\r\n shortDescription: `Detects lines exceeding the provided maximum length.`,\r\n extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#stick-to-a-reasonable-line-length\r\nhttps://docs.abapopenchecks.org/checks/04/`,\r\n tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],\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 // maximum line length in abap files\r\n const maxLineLength = 255;\r\n const array = file.getRawRows();\r\n for (let rowIndex = 0; rowIndex < array.length; rowIndex++) {\r\n const row = array[rowIndex].replace(\"\\r\", \"\");\r\n if (row.length > maxLineLength) {\r\n const message = `Maximum allowed line length of ${maxLineLength} exceeded, currently ${row.length}`;\r\n issues.push(issue_1.Issue.atRow(file, rowIndex + 1, message, this.getMetadata().key, this.conf.severity));\r\n }\r\n else if (row.length > this.conf.length) {\r\n const message = `Reduce line length to max ${this.conf.length}, currently ${row.length}`;\r\n issues.push(issue_1.Issue.atRow(file, rowIndex + 1, message, this.getMetadata().key, this.conf.severity));\r\n }\r\n }\r\n return issues;\r\n }\r\n}\r\nexports.LineLength = LineLength;\r\n//# sourceMappingURL=line_length.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/line_length.js?");
12471
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.LineLength = exports.LineLengthConf = 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\nclass LineLengthConf extends _basic_rule_config_1.BasicRuleConfig {\r\n constructor() {\r\n super(...arguments);\r\n /** Maximum line length in characters, trailing whitespace ignored */\r\n this.length = 120;\r\n }\r\n}\r\nexports.LineLengthConf = LineLengthConf;\r\nclass LineLength extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new LineLengthConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"line_length\",\r\n title: \"Line length\",\r\n shortDescription: `Detects lines exceeding the provided maximum length.`,\r\n extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#stick-to-a-reasonable-line-length\r\nhttps://docs.abapopenchecks.org/checks/04/`,\r\n tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],\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 // maximum line length in abap files\r\n const maxLineLength = 255;\r\n const array = file.getRawRows();\r\n for (let rowIndex = 0; rowIndex < array.length; rowIndex++) {\r\n const row = array[rowIndex].replace(\"\\r\", \"\");\r\n if (row.length > maxLineLength) {\r\n const message = `Maximum allowed line length of ${maxLineLength} exceeded, currently ${row.length}`;\r\n issues.push(issue_1.Issue.atRow(file, rowIndex + 1, message, this.getMetadata().key, this.conf.severity));\r\n }\r\n else if (row.length > this.conf.length) {\r\n const message = `Reduce line length to max ${this.conf.length}, currently ${row.length}`;\r\n issues.push(issue_1.Issue.atRow(file, rowIndex + 1, message, this.getMetadata().key, this.conf.severity));\r\n }\r\n }\r\n return issues;\r\n }\r\n}\r\nexports.LineLength = LineLength;\r\n//# sourceMappingURL=line_length.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/line_length.js?");
12472
12472
 
12473
12473
  /***/ }),
12474
12474
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/cli",
3
- "version": "2.93.97",
3
+ "version": "2.93.99",
4
4
  "description": "abaplint - Command Line Interface",
5
5
  "bin": {
6
6
  "abaplint": "./abaplint"
@@ -37,7 +37,7 @@
37
37
  },
38
38
  "homepage": "https://abaplint.org",
39
39
  "devDependencies": {
40
- "@abaplint/core": "^2.93.97",
40
+ "@abaplint/core": "^2.93.99",
41
41
  "@types/chai": "^4.3.4",
42
42
  "@types/glob": "^7.2.0",
43
43
  "@types/minimist": "^1.2.2",