@abaplint/cli 2.85.40 → 2.85.43
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.
- package/build/cli.js +131 -151
- package/build/src/formatters/codeframe.js +4 -4
- package/package.json +3 -3
package/build/cli.js
CHANGED
|
@@ -82,7 +82,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
|
|
|
82
82
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
83
83
|
|
|
84
84
|
"use strict";
|
|
85
|
-
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.CodeFrame = void 0;\r\nconst total_1 = __webpack_require__(/*! ./total */ \"./build/src/formatters/total.js\");\r\nconst fs = __webpack_require__(/*! fs */ \"fs\");\r\nconst chalk_1 = __webpack_require__(/*! chalk */ \"./node_modules/chalk/source/index.js\");\r\nfunction issueSort(a, b) {\r\n return a.filename.localeCompare(b.filename)\r\n || (a.row - b.row)\r\n || (a.col - b.col);\r\n}\r\nclass CodeFrame {\r\n constructor() {\r\n this.currentFilename = \"\";\r\n this.currentFileLinesCount = 0;\r\n this.fileContent = [];\r\n }\r\n output(issues, fileCount) {\r\n const builtIssues = this.convertAllIssues(issues).sort(issueSort); // Make sure it is sorted by filename for caching to work\r\n return [\r\n ...builtIssues.map(i => this.renderIssue(i)),\r\n (issues.length > 0 ?
|
|
85
|
+
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.CodeFrame = void 0;\r\nconst total_1 = __webpack_require__(/*! ./total */ \"./build/src/formatters/total.js\");\r\nconst fs = __webpack_require__(/*! fs */ \"fs\");\r\nconst chalk_1 = __webpack_require__(/*! chalk */ \"./node_modules/chalk/source/index.js\");\r\nfunction issueSort(a, b) {\r\n return a.filename.localeCompare(b.filename)\r\n || (a.row - b.row)\r\n || (a.col - b.col);\r\n}\r\nclass CodeFrame {\r\n constructor() {\r\n this.currentFilename = \"\";\r\n this.currentFileLinesCount = 0;\r\n this.fileContent = [];\r\n }\r\n output(issues, fileCount) {\r\n const builtIssues = this.convertAllIssues(issues).sort(issueSort); // Make sure it is sorted by filename for caching to work\r\n return [\r\n ...builtIssues.map(i => this.renderIssue(i)),\r\n (issues.length > 0 ? chalk_1.default.red(new total_1.Total().output(issues, fileCount)) : chalk_1.default.green(new total_1.Total().output(issues, fileCount))),\r\n ].join(\"\\n\");\r\n }\r\n convertAllIssues(issues) {\r\n return issues.map(i => this.convertIssue(i));\r\n }\r\n cacheFile(filename) {\r\n if (filename !== this.currentFilename) {\r\n this.currentFilename = filename;\r\n this.fileContent = fs.readFileSync(filename, \"utf8\").split(/\\r?\\n/);\r\n this.currentFileLinesCount = this.fileContent.length;\r\n }\r\n }\r\n renderIssue(issue) {\r\n this.cacheFile(issue.filename);\r\n const frameSize = 1;\r\n const lineFrom = Math.max(issue.row - frameSize, 1);\r\n const lineTo = Math.min(issue.row + frameSize, this.currentFileLinesCount);\r\n const issueLineIndex = issue.row - 1;\r\n const padSize = Math.ceil(Math.log10(lineTo)) + 4;\r\n const code = [];\r\n for (let lineIndex = lineFrom - 1; lineIndex < lineTo; lineIndex++) {\r\n const prefix = `${ /*(lineIndex === issueLineIndex) ? \">\" :*/\" \"}${lineIndex + 1} |`.padStart(padSize);\r\n code.push(prefix + this.fileContent[lineIndex]);\r\n if (lineIndex === issueLineIndex) {\r\n code.push(\"|\".padStart(padSize) + \" \".repeat(issue.col - 1) + \"^\");\r\n }\r\n }\r\n const severityStr = issue.severity === \"E\"\r\n ? chalk_1.default.red(issue.severity)\r\n : chalk_1.default.yellow(issue.severity);\r\n return `[${severityStr}] ${issue.description} (${issue.issueKey}) @ ${issue.location}`\r\n + \"\\n\"\r\n + code.map(str => chalk_1.default.grey(str)).join(\"\\n\")\r\n + \"\\n\";\r\n }\r\n renderLocation(issue) {\r\n return issue.getFilename() + \"[\" + issue.getStart().getRow() + \", \" + issue.getStart().getCol() + \"]\";\r\n }\r\n convertIssue(issue) {\r\n return {\r\n location: this.renderLocation(issue),\r\n description: issue.getMessage(),\r\n issueKey: issue.getKey(),\r\n filename: issue.getFilename(),\r\n severity: issue.getSeverity().toString().charAt(0),\r\n row: issue.getStart().getRow(),\r\n col: issue.getStart().getCol(),\r\n };\r\n }\r\n}\r\nexports.CodeFrame = CodeFrame;\r\n//# sourceMappingURL=codeframe.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./build/src/formatters/codeframe.js?");
|
|
86
86
|
|
|
87
87
|
/***/ }),
|
|
88
88
|
|
|
@@ -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.verNot = exports.ver = exports.plusPrio = exports.plus = exports.starPrio = exports.star = exports.per = exports.optPrio = exports.opt = exports.altPrio = exports.alt = exports.seq = exports.tok = exports.regex = exports.str = exports.Combi = exports.Expression = void 0;\r\nconst Tokens = __webpack_require__(/*! ../1_lexer/tokens */ \"./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js\");\r\nconst nodes_1 = __webpack_require__(/*! ../nodes */ \"./node_modules/@abaplint/core/build/src/abap/nodes/index.js\");\r\nconst version_1 = __webpack_require__(/*! ../../version */ \"./node_modules/@abaplint/core/build/src/version.js\");\r\nconst result_1 = __webpack_require__(/*! ./result */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/result.js\");\r\nclass Regex {\r\n constructor(r) {\r\n this.regexp = r;\r\n }\r\n listKeywords() {\r\n return [];\r\n }\r\n getUsing() {\r\n return [];\r\n }\r\n run(r) {\r\n const result = [];\r\n for (const input of r) {\r\n if (input.remainingLength() === 0) {\r\n continue;\r\n }\r\n const token = input.peek();\r\n if (this.regexp.test(token.getStr()) === true) {\r\n result.push(input.shift(new nodes_1.TokenNodeRegex(token)));\r\n }\r\n }\r\n return result;\r\n }\r\n railroad() {\r\n return \"Railroad.Terminal(\\\"\" + this.regexp.source.replace(/\\\\/g, \"\\\\\\\\\") + \"\\\")\";\r\n }\r\n toStr() {\r\n return this.regexp.toString();\r\n }\r\n first() {\r\n return [\"\"];\r\n }\r\n}\r\nclass Word {\r\n constructor(s) {\r\n this.s = s.toUpperCase();\r\n }\r\n listKeywords() {\r\n return [this.s];\r\n }\r\n getUsing() {\r\n return [];\r\n }\r\n run(r) {\r\n const result = [];\r\n for (const input of r) {\r\n if (input.remainingLength() !== 0\r\n && input.peek().getStr().toUpperCase() === this.s) {\r\n // console.log(\"match, \" + this.s + result.length);\r\n result.push(input.shift(new nodes_1.TokenNode(input.peek())));\r\n }\r\n }\r\n return result;\r\n }\r\n railroad() {\r\n return \"Railroad.Terminal('\\\"\" + this.s + \"\\\"')\";\r\n }\r\n toStr() {\r\n return \"\\\"\" + this.s + \"\\\"\";\r\n }\r\n first() {\r\n return [this.s];\r\n }\r\n}\r\nclass Token {\r\n constructor(s) {\r\n this.name = s.toUpperCase();\r\n }\r\n listKeywords() {\r\n return [];\r\n }\r\n getUsing() {\r\n return [];\r\n }\r\n run(r) {\r\n const result = [];\r\n for (const input of r) {\r\n if (input.remainingLength() !== 0\r\n && input.peek().constructor.name.toUpperCase() === this.name) {\r\n result.push(input.shift(new nodes_1.TokenNode(input.peek())));\r\n }\r\n }\r\n return result;\r\n }\r\n railroad() {\r\n let text = this.name;\r\n const toke = Tokens;\r\n for (const token in Tokens) {\r\n if (token.toUpperCase() === this.name && toke[token].railroad) {\r\n text = toke[token].railroad();\r\n break;\r\n }\r\n }\r\n return \"Railroad.Terminal('!\\\"\" + text + \"\\\"')\";\r\n }\r\n toStr() {\r\n return \"Token \\\"\" + this.name + \"\\\"\";\r\n }\r\n first() {\r\n return [\"\"];\r\n }\r\n}\r\nclass Vers {\r\n constructor(version, runnable, or) {\r\n this.version = version;\r\n this.runnable = runnable;\r\n this.or = or;\r\n }\r\n listKeywords() {\r\n return this.runnable.listKeywords();\r\n }\r\n run(r) {\r\n const targetVersion = Combi.getVersion();\r\n if (this.or && targetVersion === this.or) {\r\n return this.runnable.run(r);\r\n }\r\n else if (targetVersion === version_1.Version.OpenABAP) {\r\n if (this.version > version_1.Version.v702) {\r\n return [];\r\n }\r\n else {\r\n return this.runnable.run(r);\r\n }\r\n }\r\n else if (targetVersion >= this.version || targetVersion === version_1.Version.Cloud) {\r\n return this.runnable.run(r);\r\n }\r\n else {\r\n return [];\r\n }\r\n }\r\n getUsing() {\r\n return this.runnable.getUsing();\r\n }\r\n railroad() {\r\n let text = this.version;\r\n if (this.or) {\r\n text += \" or \" + this.or;\r\n }\r\n return \"Railroad.Sequence(Railroad.Comment(\\\"\" +\r\n text +\r\n \"\\\", {}), \" +\r\n this.runnable.railroad() +\r\n \")\";\r\n }\r\n toStr() {\r\n return \"Version(\" + this.runnable.toStr() + \")\";\r\n }\r\n first() {\r\n return this.runnable.first();\r\n }\r\n}\r\nclass VersNot {\r\n constructor(version, runnable) {\r\n this.version = version;\r\n this.runnable = runnable;\r\n }\r\n listKeywords() {\r\n return this.runnable.listKeywords();\r\n }\r\n getUsing() {\r\n return this.runnable.getUsing();\r\n }\r\n run(r) {\r\n if (Combi.getVersion() !== this.version) {\r\n return this.runnable.run(r);\r\n }\r\n else {\r\n return [];\r\n }\r\n }\r\n railroad() {\r\n return \"Railroad.Sequence(Railroad.Comment(\\\"not \" +\r\n this.version +\r\n \"\\\", {}), \" +\r\n this.runnable.railroad() +\r\n \")\";\r\n }\r\n toStr() {\r\n return \"VersionNot(\" + this.runnable.toStr() + \")\";\r\n }\r\n first() {\r\n return this.runnable.first();\r\n }\r\n}\r\nclass OptionalPriority {\r\n constructor(optional) {\r\n this.optional = optional;\r\n }\r\n listKeywords() {\r\n return this.optional.listKeywords();\r\n }\r\n getUsing() {\r\n return this.optional.getUsing();\r\n }\r\n run(r) {\r\n const result = [];\r\n for (const input of r) {\r\n const res = this.optional.run([input]);\r\n if (res.length > 1) {\r\n result.push(...res);\r\n }\r\n else if (res.length === 0) {\r\n result.push(input);\r\n }\r\n else if (res[0].remainingLength() < input.remainingLength()) {\r\n result.push(...res);\r\n }\r\n else {\r\n result.push(input);\r\n }\r\n }\r\n return result;\r\n }\r\n railroad() {\r\n return \"Railroad.Optional(\" + this.optional.railroad() + \")\";\r\n }\r\n toStr() {\r\n return \"opt(\" + this.optional.toStr() + \")\";\r\n }\r\n first() {\r\n return [\"\"];\r\n }\r\n}\r\nclass Optional {\r\n constructor(optional) {\r\n this.optional = optional;\r\n }\r\n listKeywords() {\r\n return this.optional.listKeywords();\r\n }\r\n getUsing() {\r\n return this.optional.getUsing();\r\n }\r\n run(r) {\r\n const result = [];\r\n for (const input of r) {\r\n result.push(input);\r\n const res = this.optional.run([input]);\r\n result.push(...res);\r\n }\r\n return result;\r\n }\r\n railroad() {\r\n return \"Railroad.Optional(\" + this.optional.railroad() + \")\";\r\n }\r\n toStr() {\r\n return \"opt(\" + this.optional.toStr() + \")\";\r\n }\r\n first() {\r\n return [\"\"];\r\n }\r\n}\r\nclass Star {\r\n constructor(sta) {\r\n this.sta = sta;\r\n }\r\n listKeywords() {\r\n return this.sta.listKeywords();\r\n }\r\n getUsing() {\r\n return this.sta.getUsing();\r\n }\r\n run(r) {\r\n const result = r;\r\n let res = r;\r\n let input = [];\r\n for (;;) {\r\n input = res;\r\n res = this.sta.run(input);\r\n if (res.length === 0) {\r\n break;\r\n }\r\n result.push(...res);\r\n }\r\n // console.dir(result);\r\n return result;\r\n }\r\n railroad() {\r\n return \"Railroad.ZeroOrMore(\" + this.sta.railroad() + \")\";\r\n }\r\n toStr() {\r\n return \"star(\" + this.sta.toStr() + \")\";\r\n }\r\n first() {\r\n return [\"\"];\r\n }\r\n}\r\nclass StarPrioroity {\r\n constructor(sta) {\r\n this.sta = sta;\r\n }\r\n listKeywords() {\r\n return this.sta.listKeywords();\r\n }\r\n getUsing() {\r\n return this.sta.getUsing();\r\n }\r\n run(r) {\r\n let result = r;\r\n let res = r;\r\n // let input: Result[] = [];\r\n let prev;\r\n for (;;) {\r\n // input = res;\r\n res = this.sta.run(res);\r\n if (res.length === 0) {\r\n if (prev !== undefined) {\r\n // console.log(\"star length: \" + prev.length);\r\n let best = Number.MAX_SAFE_INTEGER;\r\n for (const p of prev) {\r\n if (p.remainingLength() < best) {\r\n result = [p];\r\n best = p.remainingLength();\r\n }\r\n }\r\n }\r\n break;\r\n }\r\n prev = res;\r\n }\r\n return result;\r\n }\r\n railroad() {\r\n return \"Railroad.ZeroOrMore(\" + this.sta.railroad() + \")\";\r\n }\r\n toStr() {\r\n return \"star(\" + this.sta.toStr() + \")\";\r\n }\r\n first() {\r\n return [\"\"];\r\n }\r\n}\r\nclass Plus {\r\n constructor(plu) {\r\n this.plu = plu;\r\n this.sub = new Sequence([this.plu, new Star(this.plu)]);\r\n }\r\n listKeywords() {\r\n return this.plu.listKeywords();\r\n }\r\n getUsing() {\r\n return this.plu.getUsing();\r\n }\r\n run(r) {\r\n return this.sub.run(r);\r\n }\r\n railroad() {\r\n return \"Railroad.OneOrMore(\" + this.plu.railroad() + \")\";\r\n }\r\n toStr() {\r\n return \"plus(\" + this.plu.toStr() + \")\";\r\n }\r\n first() {\r\n return this.plu.first();\r\n }\r\n}\r\nclass PlusPriority {\r\n constructor(plu) {\r\n this.plu = plu;\r\n this.sub = new Sequence([this.plu, new StarPrioroity(this.plu)]);\r\n }\r\n listKeywords() {\r\n return this.plu.listKeywords();\r\n }\r\n getUsing() {\r\n return this.plu.getUsing();\r\n }\r\n run(r) {\r\n return this.sub.run(r);\r\n }\r\n railroad() {\r\n return \"Railroad.OneOrMore(\" + this.plu.railroad() + \")\";\r\n }\r\n toStr() {\r\n return \"plus(\" + this.plu.toStr() + \")\";\r\n }\r\n first() {\r\n return this.plu.first();\r\n }\r\n}\r\nclass Sequence {\r\n constructor(list) {\r\n if (list.length < 2) {\r\n throw new Error(\"Sequence, length error\");\r\n }\r\n this.list = list;\r\n }\r\n listKeywords() {\r\n const ret = [];\r\n for (const i of this.list) {\r\n ret.push(...i.listKeywords());\r\n }\r\n return ret;\r\n }\r\n getUsing() {\r\n return this.list.reduce((a, c) => { return a.concat(c.getUsing()); }, []);\r\n }\r\n run(r) {\r\n const result = [];\r\n for (const input of r) {\r\n let temp = [input];\r\n let match = true;\r\n for (const sequence of this.list) {\r\n temp = sequence.run(temp);\r\n if (temp.length === 0) {\r\n match = false;\r\n break;\r\n }\r\n }\r\n if (match === true) {\r\n result.push(...temp);\r\n }\r\n }\r\n return result;\r\n }\r\n railroad() {\r\n const children = this.list.map((e) => { return e.railroad(); });\r\n return \"Railroad.Sequence(\" + children.join() + \")\";\r\n }\r\n toStr() {\r\n let ret = \"\";\r\n for (const i of this.list) {\r\n ret = ret + i.toStr() + \",\";\r\n }\r\n return \"seq(\" + ret + \")\";\r\n }\r\n first() {\r\n return this.list[0].first();\r\n }\r\n}\r\nclass WordSequence {\r\n constructor(stri) {\r\n this.words = [];\r\n this.stri = stri;\r\n const foo = this.stri.replace(/-/g, \" - \");\r\n const split = foo.split(\" \");\r\n for (const st of split) {\r\n // todo, use Dash token\r\n this.words.push(new Word(st));\r\n }\r\n this.seq = new Sequence(this.words);\r\n }\r\n listKeywords() {\r\n return [this.stri.toString()];\r\n }\r\n getUsing() {\r\n return [];\r\n }\r\n run(r) {\r\n return this.seq.run(r);\r\n }\r\n railroad() {\r\n return \"Railroad.Terminal('\\\"\" + this.stri + \"\\\"')\";\r\n }\r\n toStr() {\r\n return \"str(\" + this.stri + \")\";\r\n }\r\n first() {\r\n return this.words[0].first();\r\n }\r\n}\r\nclass Expression {\r\n constructor() {\r\n this.runnable = undefined;\r\n }\r\n run(r) {\r\n const results = [];\r\n if (this.runnable === undefined) {\r\n this.runnable = this.getRunnable();\r\n }\r\n for (const input of r) {\r\n const temp = this.runnable.run([input]);\r\n for (const t of temp) {\r\n let consumed = input.remainingLength() - t.remainingLength();\r\n if (consumed > 0) {\r\n const originalLength = t.getNodes().length;\r\n const children = [];\r\n while (consumed > 0) {\r\n const sub = t.popNode();\r\n if (sub) {\r\n children.push(sub);\r\n consumed = consumed - sub.countTokens();\r\n }\r\n }\r\n const re = new nodes_1.ExpressionNode(this);\r\n re.setChildren(children.reverse());\r\n const n = t.getNodes().slice(0, originalLength - consumed);\r\n n.push(re);\r\n t.setNodes(n);\r\n }\r\n results.push(t);\r\n }\r\n }\r\n // console.dir(results);\r\n return results;\r\n }\r\n listKeywords() {\r\n // do not recurse, all Expressions are evaluated only on first level\r\n return [];\r\n }\r\n getUsing() {\r\n return [\"expression/\" + this.getName()];\r\n }\r\n getName() {\r\n return this.constructor.name;\r\n }\r\n railroad() {\r\n return \"Railroad.NonTerminal('\" + this.getName() + \"', {href: '#/expression/\" + this.getName() + \"'})\";\r\n }\r\n toStr() {\r\n return \"expression(\" + this.getName() + \")\";\r\n }\r\n first() {\r\n return this.getRunnable().first();\r\n }\r\n}\r\nexports.Expression = Expression;\r\nclass Permutation {\r\n constructor(list) {\r\n if (list.length < 2) {\r\n throw new Error(\"Permutation, length error, got \" + list.length);\r\n }\r\n this.list = list;\r\n }\r\n listKeywords() {\r\n const ret = [];\r\n for (const i of this.list) {\r\n ret.push(...i.listKeywords());\r\n }\r\n return ret;\r\n }\r\n getUsing() {\r\n return this.list.reduce((a, c) => { return a.concat(c.getUsing()); }, []);\r\n }\r\n run(r) {\r\n const result = [];\r\n const copy = this.list.slice();\r\n for (let index = 0; index < this.list.length; index++) {\r\n const temp = this.list[index].run(r);\r\n if (temp.length !== 0) {\r\n // match\r\n result.push(...temp);\r\n const left = copy;\r\n left.splice(index, 1);\r\n if (left.length === 1) {\r\n result.push(...left[0].run(temp));\r\n }\r\n else {\r\n result.push(...new Permutation(left).run(temp));\r\n }\r\n }\r\n }\r\n return result;\r\n }\r\n railroad() {\r\n const children = this.list.map((e) => { return e.railroad(); });\r\n return \"Railroad.MultipleChoice(0, 'any',\" + children.join() + \")\";\r\n }\r\n toStr() {\r\n const children = this.list.map((e) => { return e.toStr(); });\r\n return \"per(\" + children.join() + \")\";\r\n }\r\n first() {\r\n return [\"\"];\r\n }\r\n}\r\nclass Alternative {\r\n constructor(list) {\r\n if (list.length < 2) {\r\n throw new Error(\"Alternative, length error\");\r\n }\r\n this.list = list;\r\n }\r\n listKeywords() {\r\n const ret = [];\r\n for (const i of this.list) {\r\n ret.push(...i.listKeywords());\r\n }\r\n return ret;\r\n }\r\n getUsing() {\r\n return this.list.reduce((a, c) => { return a.concat(c.getUsing()); }, []);\r\n }\r\n run(r) {\r\n const result = [];\r\n for (const sequ of this.list) {\r\n const temp = sequ.run(r);\r\n result.push(...temp);\r\n }\r\n return result;\r\n }\r\n railroad() {\r\n const children = this.list.map((e) => { return e.railroad(); });\r\n return \"Railroad.Choice(0, \" + children.join() + \")\";\r\n }\r\n toStr() {\r\n let ret = \"\";\r\n for (const i of this.list) {\r\n ret = ret + i.toStr() + \",\";\r\n }\r\n return \"alt(\" + ret + \")\";\r\n }\r\n first() {\r\n if (this.list.length !== 2) {\r\n return [\"\"];\r\n }\r\n const f1 = this.list[0].first();\r\n const f2 = this.list[1].first();\r\n if (f1.length === 1 && f1[0] === \"\") {\r\n return f1;\r\n }\r\n if (f2.length === 1 && f2[0] === \"\") {\r\n return f2;\r\n }\r\n if (f1.length === 1 && f2.length === 1 && f1[0] === f2[0]) {\r\n return f1;\r\n }\r\n f1.push(...f2);\r\n return f1;\r\n }\r\n}\r\n// prioritized alternative, skip others if match found\r\nclass AlternativePriority {\r\n constructor(list) {\r\n if (list.length < 2) {\r\n throw new Error(\"Alternative, length error\");\r\n }\r\n this.list = list;\r\n }\r\n listKeywords() {\r\n const ret = [];\r\n for (const i of this.list) {\r\n ret.push(...i.listKeywords());\r\n }\r\n return ret;\r\n }\r\n getUsing() {\r\n return this.list.reduce((a, c) => { return a.concat(c.getUsing()); }, []);\r\n }\r\n run(r) {\r\n const result = [];\r\n for (const sequ of this.list) {\r\n // console.log(seq.toStr());\r\n const temp = sequ.run(r);\r\n if (temp.length > 0) {\r\n result.push(...temp);\r\n break;\r\n }\r\n }\r\n return result;\r\n }\r\n railroad() {\r\n const children = this.list.map((e) => { return e.railroad(); });\r\n return \"Railroad.Choice(0, \" + children.join() + \")\";\r\n }\r\n toStr() {\r\n let ret = \"\";\r\n for (const i of this.list) {\r\n ret = ret + i.toStr() + \",\";\r\n }\r\n return \"alt(\" + ret + \")\";\r\n }\r\n first() {\r\n if (this.list.length !== 2) {\r\n return [\"\"];\r\n }\r\n const f1 = this.list[0].first();\r\n const f2 = this.list[1].first();\r\n if (f1.length === 1 && f1[0] === \"\") {\r\n return f1;\r\n }\r\n if (f2.length === 1 && f2[0] === \"\") {\r\n return f2;\r\n }\r\n if (f1.length === 1 && f2.length === 1 && f1[0] === f2[0]) {\r\n return f1;\r\n }\r\n f1.push(...f2);\r\n return f1;\r\n }\r\n}\r\nclass Combi {\r\n static railroad(runnable, complex = false) {\r\n // todo, move method to graph.js?\r\n let type = \"Railroad.Diagram(\";\r\n if (complex === true) {\r\n type = \"Railroad.ComplexDiagram(\";\r\n }\r\n const result = \"Railroad.Diagram.INTERNAL_ALIGNMENT = 'left';\\n\" +\r\n type +\r\n runnable.railroad() +\r\n \").toString();\";\r\n return result;\r\n }\r\n static listKeywords(runnable) {\r\n // todo, move these walkers of the syntax tree to some abstraction?\r\n let res = runnable.listKeywords();\r\n // remove duplicates\r\n res = res.filter((x, i, a) => { return a.indexOf(x) === i; });\r\n return res;\r\n }\r\n // assumption: no pragmas supplied in tokens input\r\n static run(runnable, tokens, version) {\r\n this.ver = version;\r\n const input = new result_1.Result(tokens, 0);\r\n const result = runnable.run([input]);\r\n /*\r\n console.log(\"res: \" + result.length);\r\n for (const res of result) {\r\n console.dir(res.getNodes().map(n => n.get().constructor.name));\r\n console.dir(res.getNodes().map(n => n.concatTokens()));\r\n }\r\n */\r\n for (const res of result) {\r\n if (res.remainingLength() === 0) {\r\n return res.getNodes();\r\n }\r\n }\r\n return undefined;\r\n }\r\n static getVersion() {\r\n return this.ver;\r\n }\r\n}\r\nexports.Combi = Combi;\r\n// -----------------------------------------------------------------------------\r\nfunction str(s) {\r\n if (s.indexOf(\" \") > 0 || s.indexOf(\"-\") > 0) {\r\n return new WordSequence(s);\r\n }\r\n else {\r\n return new Word(s);\r\n }\r\n}\r\nexports.str = str;\r\nfunction regex(r) {\r\n return new Regex(r);\r\n}\r\nexports.regex = regex;\r\nfunction tok(t) {\r\n return new Token(t.name);\r\n}\r\nexports.tok = tok;\r\nconst singletons = {};\r\nfunction map(s) {\r\n const type = typeof s;\r\n if (type === \"string\") {\r\n return str(s);\r\n }\r\n else if (type === \"function\") {\r\n // @ts-ignore\r\n const name = s.name;\r\n if (singletons[name] === undefined) {\r\n // @ts-ignore\r\n singletons[name] = new s();\r\n }\r\n return singletons[name];\r\n }\r\n else {\r\n return s;\r\n }\r\n}\r\nfunction seq(first, second, ...rest) {\r\n const list = [map(first), map(second)];\r\n list.push(...rest.map(map));\r\n return new Sequence(list);\r\n}\r\nexports.seq = seq;\r\nfunction alt(first, second, ...rest) {\r\n const list = [map(first), map(second)];\r\n list.push(...rest.map(map));\r\n return new Alternative(list);\r\n}\r\nexports.alt = alt;\r\nfunction altPrio(first, second, ...rest) {\r\n const list = [map(first), map(second)];\r\n list.push(...rest.map(map));\r\n return new AlternativePriority(list);\r\n}\r\nexports.altPrio = altPrio;\r\nfunction opt(first) {\r\n return new Optional(map(first));\r\n}\r\nexports.opt = opt;\r\nfunction optPrio(first) {\r\n return new OptionalPriority(map(first));\r\n}\r\nexports.optPrio = optPrio;\r\nfunction per(first, second, ...rest) {\r\n const list = [map(first), map(second)];\r\n list.push(...rest.map(map));\r\n return new Permutation(list);\r\n}\r\nexports.per = per;\r\nfunction star(first) {\r\n return new Star(map(first));\r\n}\r\nexports.star = star;\r\nfunction starPrio(first) {\r\n return new StarPrioroity(map(first));\r\n}\r\nexports.starPrio = starPrio;\r\nfunction plus(first) {\r\n return new Plus(map(first));\r\n}\r\nexports.plus = plus;\r\nfunction plusPrio(first) {\r\n return new PlusPriority(map(first));\r\n}\r\nexports.plusPrio = plusPrio;\r\nfunction ver(version, first, or) {\r\n return new Vers(version, map(first), or);\r\n}\r\nexports.ver = ver;\r\nfunction verNot(version, first) {\r\n return new VersNot(version, map(first));\r\n}\r\nexports.verNot = verNot;\r\n//# sourceMappingURL=combi.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js?");
|
|
371
|
+
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.fail = exports.verNot = exports.ver = exports.plusPrio = exports.plus = exports.starPrio = exports.star = exports.per = exports.optPrio = exports.opt = exports.altPrio = exports.alt = exports.seq = exports.tok = exports.regex = exports.str = exports.Combi = exports.Expression = void 0;\r\nconst Tokens = __webpack_require__(/*! ../1_lexer/tokens */ \"./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js\");\r\nconst nodes_1 = __webpack_require__(/*! ../nodes */ \"./node_modules/@abaplint/core/build/src/abap/nodes/index.js\");\r\nconst version_1 = __webpack_require__(/*! ../../version */ \"./node_modules/@abaplint/core/build/src/version.js\");\r\nconst result_1 = __webpack_require__(/*! ./result */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/result.js\");\r\nclass Regex {\r\n constructor(r) {\r\n this.regexp = r;\r\n }\r\n listKeywords() {\r\n return [];\r\n }\r\n getUsing() {\r\n return [];\r\n }\r\n run(r) {\r\n const result = [];\r\n for (const input of r) {\r\n if (input.remainingLength() === 0) {\r\n continue;\r\n }\r\n const token = input.peek();\r\n if (this.regexp.test(token.getStr()) === true) {\r\n result.push(input.shift(new nodes_1.TokenNodeRegex(token)));\r\n }\r\n }\r\n return result;\r\n }\r\n railroad() {\r\n return \"Railroad.Terminal(\\\"\" + this.regexp.source.replace(/\\\\/g, \"\\\\\\\\\") + \"\\\")\";\r\n }\r\n toStr() {\r\n return this.regexp.toString();\r\n }\r\n first() {\r\n return [\"\"];\r\n }\r\n}\r\nclass Word {\r\n constructor(s) {\r\n this.s = s.toUpperCase();\r\n }\r\n listKeywords() {\r\n return [this.s];\r\n }\r\n getUsing() {\r\n return [];\r\n }\r\n run(r) {\r\n const result = [];\r\n for (const input of r) {\r\n if (input.remainingLength() !== 0\r\n && input.peek().getStr().toUpperCase() === this.s) {\r\n // console.log(\"match, \" + this.s + result.length);\r\n result.push(input.shift(new nodes_1.TokenNode(input.peek())));\r\n }\r\n }\r\n return result;\r\n }\r\n railroad() {\r\n return \"Railroad.Terminal('\\\"\" + this.s + \"\\\"')\";\r\n }\r\n toStr() {\r\n return \"\\\"\" + this.s + \"\\\"\";\r\n }\r\n first() {\r\n return [this.s];\r\n }\r\n}\r\nclass Token {\r\n constructor(s) {\r\n this.name = s.toUpperCase();\r\n }\r\n listKeywords() {\r\n return [];\r\n }\r\n getUsing() {\r\n return [];\r\n }\r\n run(r) {\r\n const result = [];\r\n for (const input of r) {\r\n if (input.remainingLength() !== 0\r\n && input.peek().constructor.name.toUpperCase() === this.name) {\r\n result.push(input.shift(new nodes_1.TokenNode(input.peek())));\r\n }\r\n }\r\n return result;\r\n }\r\n railroad() {\r\n let text = this.name;\r\n const toke = Tokens;\r\n for (const token in Tokens) {\r\n if (token.toUpperCase() === this.name && toke[token].railroad) {\r\n text = toke[token].railroad();\r\n break;\r\n }\r\n }\r\n return \"Railroad.Terminal('!\\\"\" + text + \"\\\"')\";\r\n }\r\n toStr() {\r\n return \"Token \\\"\" + this.name + \"\\\"\";\r\n }\r\n first() {\r\n return [\"\"];\r\n }\r\n}\r\nclass Vers {\r\n constructor(version, runnable, or) {\r\n this.version = version;\r\n this.runnable = runnable;\r\n this.or = or;\r\n }\r\n listKeywords() {\r\n return this.runnable.listKeywords();\r\n }\r\n run(r) {\r\n const targetVersion = Combi.getVersion();\r\n if (this.or && targetVersion === this.or) {\r\n return this.runnable.run(r);\r\n }\r\n else if (targetVersion === version_1.Version.OpenABAP) {\r\n if (this.version > version_1.Version.v702) {\r\n return [];\r\n }\r\n else {\r\n return this.runnable.run(r);\r\n }\r\n }\r\n else if (targetVersion >= this.version || targetVersion === version_1.Version.Cloud) {\r\n return this.runnable.run(r);\r\n }\r\n else {\r\n return [];\r\n }\r\n }\r\n getUsing() {\r\n return this.runnable.getUsing();\r\n }\r\n railroad() {\r\n let text = this.version;\r\n if (this.or) {\r\n text += \" or \" + this.or;\r\n }\r\n return \"Railroad.Sequence(Railroad.Comment(\\\"\" +\r\n text +\r\n \"\\\", {}), \" +\r\n this.runnable.railroad() +\r\n \")\";\r\n }\r\n toStr() {\r\n return \"Version(\" + this.runnable.toStr() + \")\";\r\n }\r\n first() {\r\n return this.runnable.first();\r\n }\r\n}\r\nclass VersNot {\r\n constructor(version, runnable) {\r\n this.version = version;\r\n this.runnable = runnable;\r\n }\r\n listKeywords() {\r\n return this.runnable.listKeywords();\r\n }\r\n getUsing() {\r\n return this.runnable.getUsing();\r\n }\r\n run(r) {\r\n if (Combi.getVersion() !== this.version) {\r\n return this.runnable.run(r);\r\n }\r\n else {\r\n return [];\r\n }\r\n }\r\n railroad() {\r\n return \"Railroad.Sequence(Railroad.Comment(\\\"not \" +\r\n this.version +\r\n \"\\\", {}), \" +\r\n this.runnable.railroad() +\r\n \")\";\r\n }\r\n toStr() {\r\n return \"VersionNot(\" + this.runnable.toStr() + \")\";\r\n }\r\n first() {\r\n return this.runnable.first();\r\n }\r\n}\r\nclass OptionalPriority {\r\n constructor(optional) {\r\n this.optional = optional;\r\n }\r\n listKeywords() {\r\n return this.optional.listKeywords();\r\n }\r\n getUsing() {\r\n return this.optional.getUsing();\r\n }\r\n run(r) {\r\n const result = [];\r\n for (const input of r) {\r\n const res = this.optional.run([input]);\r\n if (res.length > 1) {\r\n result.push(...res);\r\n }\r\n else if (res.length === 0) {\r\n result.push(input);\r\n }\r\n else if (res[0].remainingLength() < input.remainingLength()) {\r\n result.push(...res);\r\n }\r\n else {\r\n result.push(input);\r\n }\r\n }\r\n return result;\r\n }\r\n railroad() {\r\n return \"Railroad.Optional(\" + this.optional.railroad() + \")\";\r\n }\r\n toStr() {\r\n return \"opt(\" + this.optional.toStr() + \")\";\r\n }\r\n first() {\r\n return [\"\"];\r\n }\r\n}\r\nclass Optional {\r\n constructor(optional) {\r\n this.optional = optional;\r\n }\r\n listKeywords() {\r\n return this.optional.listKeywords();\r\n }\r\n getUsing() {\r\n return this.optional.getUsing();\r\n }\r\n run(r) {\r\n const result = [];\r\n for (const input of r) {\r\n result.push(input);\r\n const res = this.optional.run([input]);\r\n result.push(...res);\r\n }\r\n return result;\r\n }\r\n railroad() {\r\n return \"Railroad.Optional(\" + this.optional.railroad() + \")\";\r\n }\r\n toStr() {\r\n return \"opt(\" + this.optional.toStr() + \")\";\r\n }\r\n first() {\r\n return [\"\"];\r\n }\r\n}\r\nclass Star {\r\n constructor(sta) {\r\n this.sta = sta;\r\n }\r\n listKeywords() {\r\n return this.sta.listKeywords();\r\n }\r\n getUsing() {\r\n return this.sta.getUsing();\r\n }\r\n run(r) {\r\n const result = r;\r\n let res = r;\r\n let input = [];\r\n for (;;) {\r\n input = res;\r\n res = this.sta.run(input);\r\n if (res.length === 0) {\r\n break;\r\n }\r\n result.push(...res);\r\n }\r\n // console.dir(result);\r\n return result;\r\n }\r\n railroad() {\r\n return \"Railroad.ZeroOrMore(\" + this.sta.railroad() + \")\";\r\n }\r\n toStr() {\r\n return \"star(\" + this.sta.toStr() + \")\";\r\n }\r\n first() {\r\n return [\"\"];\r\n }\r\n}\r\nclass StarPrioroity {\r\n constructor(sta) {\r\n this.sta = sta;\r\n }\r\n listKeywords() {\r\n return this.sta.listKeywords();\r\n }\r\n getUsing() {\r\n return this.sta.getUsing();\r\n }\r\n run(r) {\r\n let result = r;\r\n let res = r;\r\n // let input: Result[] = [];\r\n let prev;\r\n for (;;) {\r\n // input = res;\r\n res = this.sta.run(res);\r\n if (res.length === 0) {\r\n if (prev !== undefined) {\r\n // console.log(\"star length: \" + prev.length);\r\n let best = Number.MAX_SAFE_INTEGER;\r\n for (const p of prev) {\r\n if (p.remainingLength() < best) {\r\n result = [p];\r\n best = p.remainingLength();\r\n }\r\n }\r\n }\r\n break;\r\n }\r\n prev = res;\r\n }\r\n return result;\r\n }\r\n railroad() {\r\n return \"Railroad.ZeroOrMore(\" + this.sta.railroad() + \")\";\r\n }\r\n toStr() {\r\n return \"star(\" + this.sta.toStr() + \")\";\r\n }\r\n first() {\r\n return [\"\"];\r\n }\r\n}\r\nclass Plus {\r\n constructor(plu) {\r\n this.plu = plu;\r\n this.sub = new Sequence([this.plu, new Star(this.plu)]);\r\n }\r\n listKeywords() {\r\n return this.plu.listKeywords();\r\n }\r\n getUsing() {\r\n return this.plu.getUsing();\r\n }\r\n run(r) {\r\n return this.sub.run(r);\r\n }\r\n railroad() {\r\n return \"Railroad.OneOrMore(\" + this.plu.railroad() + \")\";\r\n }\r\n toStr() {\r\n return \"plus(\" + this.plu.toStr() + \")\";\r\n }\r\n first() {\r\n return this.plu.first();\r\n }\r\n}\r\nclass PlusPriority {\r\n constructor(plu) {\r\n this.plu = plu;\r\n this.sub = new Sequence([this.plu, new StarPrioroity(this.plu)]);\r\n }\r\n listKeywords() {\r\n return this.plu.listKeywords();\r\n }\r\n getUsing() {\r\n return this.plu.getUsing();\r\n }\r\n run(r) {\r\n return this.sub.run(r);\r\n }\r\n railroad() {\r\n return \"Railroad.OneOrMore(\" + this.plu.railroad() + \")\";\r\n }\r\n toStr() {\r\n return \"plus(\" + this.plu.toStr() + \")\";\r\n }\r\n first() {\r\n return this.plu.first();\r\n }\r\n}\r\nclass Sequence {\r\n constructor(list) {\r\n if (list.length < 2) {\r\n throw new Error(\"Sequence, length error\");\r\n }\r\n this.list = list;\r\n }\r\n listKeywords() {\r\n const ret = [];\r\n for (const i of this.list) {\r\n ret.push(...i.listKeywords());\r\n }\r\n return ret;\r\n }\r\n getUsing() {\r\n return this.list.reduce((a, c) => { return a.concat(c.getUsing()); }, []);\r\n }\r\n run(r) {\r\n const result = [];\r\n for (const input of r) {\r\n let temp = [input];\r\n let match = true;\r\n for (const sequence of this.list) {\r\n temp = sequence.run(temp);\r\n if (temp.length === 0) {\r\n match = false;\r\n break;\r\n }\r\n }\r\n if (match === true) {\r\n result.push(...temp);\r\n }\r\n }\r\n return result;\r\n }\r\n railroad() {\r\n const children = this.list.map((e) => { return e.railroad(); });\r\n return \"Railroad.Sequence(\" + children.join() + \")\";\r\n }\r\n toStr() {\r\n let ret = \"\";\r\n for (const i of this.list) {\r\n ret = ret + i.toStr() + \",\";\r\n }\r\n return \"seq(\" + ret + \")\";\r\n }\r\n first() {\r\n return this.list[0].first();\r\n }\r\n}\r\nclass WordSequence {\r\n constructor(stri) {\r\n this.words = [];\r\n this.stri = stri;\r\n const foo = this.stri.replace(/-/g, \" - \");\r\n const split = foo.split(\" \");\r\n for (const st of split) {\r\n // todo, use Dash token\r\n this.words.push(new Word(st));\r\n }\r\n this.seq = new Sequence(this.words);\r\n }\r\n listKeywords() {\r\n return [this.stri.toString()];\r\n }\r\n getUsing() {\r\n return [];\r\n }\r\n run(r) {\r\n return this.seq.run(r);\r\n }\r\n railroad() {\r\n return \"Railroad.Terminal('\\\"\" + this.stri + \"\\\"')\";\r\n }\r\n toStr() {\r\n return \"str(\" + this.stri + \")\";\r\n }\r\n first() {\r\n return this.words[0].first();\r\n }\r\n}\r\nclass Expression {\r\n constructor() {\r\n this.runnable = undefined;\r\n }\r\n run(r) {\r\n const results = [];\r\n if (this.runnable === undefined) {\r\n this.runnable = this.getRunnable();\r\n }\r\n for (const input of r) {\r\n const temp = this.runnable.run([input]);\r\n for (const t of temp) {\r\n let consumed = input.remainingLength() - t.remainingLength();\r\n if (consumed > 0) {\r\n const originalLength = t.getNodes().length;\r\n const children = [];\r\n while (consumed > 0) {\r\n const sub = t.popNode();\r\n if (sub) {\r\n children.push(sub);\r\n consumed = consumed - sub.countTokens();\r\n }\r\n }\r\n const re = new nodes_1.ExpressionNode(this);\r\n re.setChildren(children.reverse());\r\n const n = t.getNodes().slice(0, originalLength - consumed);\r\n n.push(re);\r\n t.setNodes(n);\r\n }\r\n results.push(t);\r\n }\r\n }\r\n // console.dir(results);\r\n return results;\r\n }\r\n listKeywords() {\r\n // do not recurse, all Expressions are evaluated only on first level\r\n return [];\r\n }\r\n getUsing() {\r\n return [\"expression/\" + this.getName()];\r\n }\r\n getName() {\r\n return this.constructor.name;\r\n }\r\n railroad() {\r\n return \"Railroad.NonTerminal('\" + this.getName() + \"', {href: '#/expression/\" + this.getName() + \"'})\";\r\n }\r\n toStr() {\r\n return \"expression(\" + this.getName() + \")\";\r\n }\r\n first() {\r\n return this.getRunnable().first();\r\n }\r\n}\r\nexports.Expression = Expression;\r\nclass Permutation {\r\n constructor(list) {\r\n if (list.length < 2) {\r\n throw new Error(\"Permutation, length error, got \" + list.length);\r\n }\r\n this.list = list;\r\n }\r\n listKeywords() {\r\n const ret = [];\r\n for (const i of this.list) {\r\n ret.push(...i.listKeywords());\r\n }\r\n return ret;\r\n }\r\n getUsing() {\r\n return this.list.reduce((a, c) => { return a.concat(c.getUsing()); }, []);\r\n }\r\n run(r) {\r\n const result = [];\r\n const copy = this.list.slice();\r\n for (let index = 0; index < this.list.length; index++) {\r\n const temp = this.list[index].run(r);\r\n if (temp.length !== 0) {\r\n // match\r\n result.push(...temp);\r\n const left = copy;\r\n left.splice(index, 1);\r\n if (left.length === 1) {\r\n result.push(...left[0].run(temp));\r\n }\r\n else {\r\n result.push(...new Permutation(left).run(temp));\r\n }\r\n }\r\n }\r\n return result;\r\n }\r\n railroad() {\r\n const children = this.list.map((e) => { return e.railroad(); });\r\n return \"Railroad.MultipleChoice(0, 'any',\" + children.join() + \")\";\r\n }\r\n toStr() {\r\n const children = this.list.map((e) => { return e.toStr(); });\r\n return \"per(\" + children.join() + \")\";\r\n }\r\n first() {\r\n return [\"\"];\r\n }\r\n}\r\nclass FailCombinator extends Error {\r\n}\r\nclass Fail {\r\n listKeywords() {\r\n return [];\r\n }\r\n getUsing() {\r\n return [];\r\n }\r\n run(_r) {\r\n throw new FailCombinator();\r\n }\r\n railroad() {\r\n return \"Railroad.Terminal('!Fail')\";\r\n }\r\n toStr() {\r\n return \"fail()\";\r\n }\r\n first() {\r\n return [];\r\n }\r\n}\r\nclass Alternative {\r\n constructor(list) {\r\n if (list.length < 2) {\r\n throw new Error(\"Alternative, length error\");\r\n }\r\n this.list = list;\r\n }\r\n listKeywords() {\r\n const ret = [];\r\n for (const i of this.list) {\r\n ret.push(...i.listKeywords());\r\n }\r\n return ret;\r\n }\r\n getUsing() {\r\n return this.list.reduce((a, c) => { return a.concat(c.getUsing()); }, []);\r\n }\r\n run(r) {\r\n const result = [];\r\n for (const sequ of this.list) {\r\n const temp = sequ.run(r);\r\n result.push(...temp);\r\n }\r\n return result;\r\n }\r\n railroad() {\r\n const children = this.list.map((e) => { return e.railroad(); });\r\n return \"Railroad.Choice(0, \" + children.join() + \")\";\r\n }\r\n toStr() {\r\n let ret = \"\";\r\n for (const i of this.list) {\r\n ret = ret + i.toStr() + \",\";\r\n }\r\n return \"alt(\" + ret + \")\";\r\n }\r\n first() {\r\n if (this.list.length !== 2) {\r\n return [\"\"];\r\n }\r\n const f1 = this.list[0].first();\r\n const f2 = this.list[1].first();\r\n if (f1.length === 1 && f1[0] === \"\") {\r\n return f1;\r\n }\r\n if (f2.length === 1 && f2[0] === \"\") {\r\n return f2;\r\n }\r\n if (f1.length === 1 && f2.length === 1 && f1[0] === f2[0]) {\r\n return f1;\r\n }\r\n f1.push(...f2);\r\n return f1;\r\n }\r\n}\r\n// prioritized alternative, skip others if match found\r\nclass AlternativePriority {\r\n constructor(list) {\r\n if (list.length < 2) {\r\n throw new Error(\"Alternative, length error\");\r\n }\r\n this.list = list;\r\n }\r\n listKeywords() {\r\n const ret = [];\r\n for (const i of this.list) {\r\n ret.push(...i.listKeywords());\r\n }\r\n return ret;\r\n }\r\n getUsing() {\r\n return this.list.reduce((a, c) => { return a.concat(c.getUsing()); }, []);\r\n }\r\n run(r) {\r\n const result = [];\r\n for (const sequ of this.list) {\r\n // console.log(seq.toStr());\r\n const temp = sequ.run(r);\r\n if (temp.length > 0) {\r\n result.push(...temp);\r\n break;\r\n }\r\n }\r\n return result;\r\n }\r\n railroad() {\r\n const children = this.list.map((e) => { return e.railroad(); });\r\n return \"Railroad.Choice(0, \" + children.join() + \")\";\r\n }\r\n toStr() {\r\n let ret = \"\";\r\n for (const i of this.list) {\r\n ret = ret + i.toStr() + \",\";\r\n }\r\n return \"alt(\" + ret + \")\";\r\n }\r\n first() {\r\n if (this.list.length !== 2) {\r\n return [\"\"];\r\n }\r\n const f1 = this.list[0].first();\r\n const f2 = this.list[1].first();\r\n if (f1.length === 1 && f1[0] === \"\") {\r\n return f1;\r\n }\r\n if (f2.length === 1 && f2[0] === \"\") {\r\n return f2;\r\n }\r\n if (f1.length === 1 && f2.length === 1 && f1[0] === f2[0]) {\r\n return f1;\r\n }\r\n f1.push(...f2);\r\n return f1;\r\n }\r\n}\r\nclass Combi {\r\n static railroad(runnable, complex = false) {\r\n // todo, move method to graph.js?\r\n let type = \"Railroad.Diagram(\";\r\n if (complex === true) {\r\n type = \"Railroad.ComplexDiagram(\";\r\n }\r\n const result = \"Railroad.Diagram.INTERNAL_ALIGNMENT = 'left';\\n\" +\r\n type +\r\n runnable.railroad() +\r\n \").toString();\";\r\n return result;\r\n }\r\n static listKeywords(runnable) {\r\n // todo, move these walkers of the syntax tree to some abstraction?\r\n let res = runnable.listKeywords();\r\n // remove duplicates\r\n res = res.filter((x, i, a) => { return a.indexOf(x) === i; });\r\n return res;\r\n }\r\n // assumption: no pragmas supplied in tokens input\r\n static run(runnable, tokens, version) {\r\n this.ver = version;\r\n const input = new result_1.Result(tokens, 0);\r\n try {\r\n const result = runnable.run([input]);\r\n /*\r\n console.log(\"res: \" + result.length);\r\n for (const res of result) {\r\n console.dir(res.getNodes().map(n => n.get().constructor.name));\r\n console.dir(res.getNodes().map(n => n.concatTokens()));\r\n }\r\n */\r\n for (const res of result) {\r\n if (res.remainingLength() === 0) {\r\n return res.getNodes();\r\n }\r\n }\r\n }\r\n catch (err) {\r\n if (err instanceof FailCombinator) {\r\n return undefined;\r\n }\r\n throw err;\r\n }\r\n return undefined;\r\n }\r\n static getVersion() {\r\n return this.ver;\r\n }\r\n}\r\nexports.Combi = Combi;\r\n// -----------------------------------------------------------------------------\r\nfunction str(s) {\r\n if (s.indexOf(\" \") > 0 || s.indexOf(\"-\") > 0) {\r\n return new WordSequence(s);\r\n }\r\n else {\r\n return new Word(s);\r\n }\r\n}\r\nexports.str = str;\r\nfunction regex(r) {\r\n return new Regex(r);\r\n}\r\nexports.regex = regex;\r\nfunction tok(t) {\r\n return new Token(t.name);\r\n}\r\nexports.tok = tok;\r\nconst singletons = {};\r\nfunction map(s) {\r\n const type = typeof s;\r\n if (type === \"string\") {\r\n return str(s);\r\n }\r\n else if (type === \"function\") {\r\n // @ts-ignore\r\n const name = s.name;\r\n if (singletons[name] === undefined) {\r\n // @ts-ignore\r\n singletons[name] = new s();\r\n }\r\n return singletons[name];\r\n }\r\n else {\r\n return s;\r\n }\r\n}\r\nfunction seq(first, second, ...rest) {\r\n const list = [map(first), map(second)];\r\n list.push(...rest.map(map));\r\n return new Sequence(list);\r\n}\r\nexports.seq = seq;\r\nfunction alt(first, second, ...rest) {\r\n const list = [map(first), map(second)];\r\n list.push(...rest.map(map));\r\n return new Alternative(list);\r\n}\r\nexports.alt = alt;\r\nfunction altPrio(first, second, ...rest) {\r\n const list = [map(first), map(second)];\r\n list.push(...rest.map(map));\r\n return new AlternativePriority(list);\r\n}\r\nexports.altPrio = altPrio;\r\nfunction opt(first) {\r\n return new Optional(map(first));\r\n}\r\nexports.opt = opt;\r\nfunction optPrio(first) {\r\n return new OptionalPriority(map(first));\r\n}\r\nexports.optPrio = optPrio;\r\nfunction per(first, second, ...rest) {\r\n const list = [map(first), map(second)];\r\n list.push(...rest.map(map));\r\n return new Permutation(list);\r\n}\r\nexports.per = per;\r\nfunction star(first) {\r\n return new Star(map(first));\r\n}\r\nexports.star = star;\r\nfunction starPrio(first) {\r\n return new StarPrioroity(map(first));\r\n}\r\nexports.starPrio = starPrio;\r\nfunction plus(first) {\r\n return new Plus(map(first));\r\n}\r\nexports.plus = plus;\r\nfunction plusPrio(first) {\r\n return new PlusPriority(map(first));\r\n}\r\nexports.plusPrio = plusPrio;\r\nfunction ver(version, first, or) {\r\n return new Vers(version, map(first), or);\r\n}\r\nexports.ver = ver;\r\nfunction verNot(version, first) {\r\n return new VersNot(version, map(first));\r\n}\r\nexports.verNot = verNot;\r\nfunction fail() {\r\n return new Fail();\r\n}\r\nexports.fail = fail;\r\n//# sourceMappingURL=combi.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js?");
|
|
372
372
|
|
|
373
373
|
/***/ }),
|
|
374
374
|
|
|
@@ -4185,7 +4185,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
|
|
|
4185
4185
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
4186
4186
|
|
|
4187
4187
|
"use strict";
|
|
4188
|
-
eval("\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\r\n};\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n// do not include statement.ts in this file.\r\n// this file only contains \"real\" statements\r\n// sequence of exports is optimized for parsing and precedence\r\n// see statement.ts for Unknown, Empty, Macro and Comment statements\r\n__exportStar(__webpack_require__(/*! ./data */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/data.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./report */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/report.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./write */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/write.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./endmethod */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/endmethod.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./method_implementation */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/method_implementation.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./endform */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/endform.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./form */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/form.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./import_nametab */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/import_nametab.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./check_select_options */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/check_select_options.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./call_badi */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/call_badi.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./class_data */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/class_data.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./class_data_begin */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/class_data_begin.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./class_data_end */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/class_data_end.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./select_loop */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/select_loop.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./do */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/do.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./break_id */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/break_id.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./interface_deferred */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/interface_deferred.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./while */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/while.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./loop */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/loop.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./check */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/check.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./endprovide */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/endprovide.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./if */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/if.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./convert_text */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/convert_text.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./log_point */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/log_point.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./window */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/window.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./endif */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/endif.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./type_enum */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/type_enum.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./type_enum_begin */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/type_enum_begin.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./type_enum_end */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/type_enum_end.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./set_run_time */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/set_run_time.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./field_group */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/field_group.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./print_control */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/print_control.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./extract */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/extract.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./sum */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/sum.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./end_of_page */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/end_of_page.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./generate_report */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/generate_report.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./elseif */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/elseif.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./else */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/else.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./perform */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/perform.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./append */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/append.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./clear */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/clear.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./concatenate */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/concatenate.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./enddo */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/enddo.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./endclass */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/endclass.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./try */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/try.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./endtry */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/endtry.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./assert */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/assert.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./return */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/return.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./endwhile */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/endwhile.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./constant */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/constant.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./catch */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/catch.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./infotypes */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/infotypes.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./message */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/message.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./read_table */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/read_table.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./endloop */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/endloop.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./case */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/case.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./create_object */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/create_object.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./select */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/select.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./call */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/call.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./class_local_friends */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/class_local_friends.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./class_deferred */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/class_deferred.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./fieldsymbol */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/fieldsymbol.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./class_definition */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/class_definition.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./class_implementation */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/class_implementation.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./translate */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/translate.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./exit */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/exit.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./endcase */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/endcase.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./constant_begin */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/constant_begin.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./constant_end */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/constant_end.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./when_others */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/when_others.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./when */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/when.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./continue */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/continue.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./assign */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/assign.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./get_badi */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/get_badi.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./suppress_dialog */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/suppress_dialog.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./type */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/type.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./hide */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/hide.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./get_locale */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/get_locale.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./set_locale */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/set_locale.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./commit */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/commit.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./modify_screen */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/modify_screen.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./commit_entities */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/commit_entities.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./modify_entities */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/modify_entities.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./read_entities */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/read_entities.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./rollback_entities */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/rollback_entities.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./summary */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/summary.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./on_change */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/on_change.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./at_user_command */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/at_user_command.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./position */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/position.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./resume */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/resume.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./stop */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/stop.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./get_pf_status */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/get_pf_status.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./delete_report */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/delete_report.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./controls */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/controls.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./at_line_selection */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/at_line_selection.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./new_page */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/new_page.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./set_dataset */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/set_dataset.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./get_property */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/get_property.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./scroll_list */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/scroll_list.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./load_of_program */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/load_of_program.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./top_of_page */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/top_of_page.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./truncate_dataset */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/truncate_dataset.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./set_update_task */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/set_update_task.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./set_user_command */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/set_user_command.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./rollback */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/rollback.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./delete_internal */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/delete_internal.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./delete_database */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/delete_database.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./delete_dataset */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/delete_dataset.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./free_memory */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/free_memory.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./catch_system_exceptions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/catch_system_exceptions.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./endcatch */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/endcatch.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./assign_local_copy */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/assign_local_copy.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./set_extended_check */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/set_extended_check.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./split */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/split.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./new_line */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/new_line.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./free_object */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/free_object.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./sort */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/sort.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./replace */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/replace.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./with_loop */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/with_loop.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./with */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/with.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./endwith */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/endwith.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./condense */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/condense.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./insert_internal */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/insert_internal.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./insert_database */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/insert_database.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./insert_field_group */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/insert_field_group.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./update_database */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/update_database.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./modify_database */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/modify_database.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./modify_internal */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/modify_internal.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./raise */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/raise.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./define */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/define.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./enddefine */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/enddefine.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./find */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/find.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./move */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/move.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./move_corresponding */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/move_corresponding.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./get_time */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/get_time.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./enhancement_point */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/enhancement_point.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./enhancement_section */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/enhancement_section.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./end_enhancement_section */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/end_enhancement_section.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./set_handler */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/set_handler.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./set_left */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/set_left.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./pack */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/pack.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./case_type */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/case_type.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./when_type */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/when_type.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./exec_sql */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/exec_sql.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./open_cursor */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/open_cursor.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./communication */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/communication.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./generate_subroutine */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/generate_subroutine.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./reject */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/reject.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./load_report */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/load_report.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./private */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/private.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./system_call */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/system_call.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./set_language */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/set_language.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./call_dialog */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/call_dialog.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./protected */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/protected.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./public */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/public.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./nodes */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/nodes.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./demand */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/demand.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./supply */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/supply.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./fields */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/fields.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./delete_cluster */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/delete_cluster.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./set_margin */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/set_margin.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./call_database */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/call_database.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./contexts */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/contexts.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./interface */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/interface.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./endinterface */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/endinterface.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./parameter */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/parameter.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./include */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/include.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./collect */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/collect.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./ranges */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/ranges.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./events */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/events.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./receive */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/receive.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./back */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/back.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./add_corresponding */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/add_corresponding.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./subtract_corresponding */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/subtract_corresponding.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./static_begin */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/static_begin.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./static_end */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/static_end.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./get_dataset */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/get_dataset.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./tables */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/tables.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./local */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/local.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./add */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/add.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./describe */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/describe.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./submit */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/submit.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./scan */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/scan.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./export */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/export.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./import */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/import.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./at */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/at.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./put */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/put.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./endat */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/endat.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./endselect */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/endselect.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./refresh */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/refresh.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./shift */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/shift.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./type_mesh */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/type_mesh.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./transfer */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/transfer.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./subtract */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/subtract.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./unassign */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/unassign.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./open_dataset */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/open_dataset.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./close_dataset */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/close_dataset.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./interface_load */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/interface_load.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./close_cursor */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/close_cursor.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./leave */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/leave.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./class_definition_load */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/class_definition_load.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./initialization */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/initialization.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./start_of_selection */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/start_of_selection.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./set_blank */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/set_blank.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./export_dynpro */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/export_dynpro.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./end_of_selection */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/end_of_selection.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./search */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/search.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./modify_line */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/modify_line.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./selectionscreen */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/selectionscreen.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./free */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/free.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./endon */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/endon.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./fetch_next_cursor */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/fetch_next_cursor.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./reserve */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/reserve.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./refresh_control */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/refresh_control.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./delete_dynpro */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/delete_dynpro.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./generate_dynpro */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/generate_dynpro.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./detail */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/detail.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./editor_call */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/editor_call.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./break */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/break.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./delete_textpool */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/delete_textpool.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./get */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/get.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./selectoption */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/selectoption.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./convert */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/convert.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./static */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/static.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./compute */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/compute.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./multiply */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/multiply.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./divide */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/divide.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./format */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/format.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./syntax_check */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/syntax_check.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./aliases */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/aliases.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./method_def */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/method_def.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./type_mesh_begin */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/type_mesh_begin.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./type_mesh_end */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/type_mesh_end.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./interface_def */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/interface_def.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./at_selection_screen */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/at_selection_screen.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./include_type */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/include_type.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./import_dynpro */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/import_dynpro.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./call_function */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/call_function.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./call_selection_screen */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/call_selection_screen.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./call_transformation */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/call_transformation.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./read_line */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/read_line.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./read_textpool */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/read_textpool.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./read_report */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/read_report.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./read_dataset */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/read_dataset.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./get_bit */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/get_bit.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./get_reference */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/get_reference.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./insert_report */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/insert_report.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./insert_textpool */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/insert_textpool.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./set_bit */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/set_bit.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./get_run_time */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/get_run_time.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./get_parameter */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/get_parameter.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./create_data */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/create_data.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./set_country */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/set_country.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./function_module */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/function_module.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./type_pools */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/type_pools.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./type_pool */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/type_pool.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./wait */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/wait.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./overlay */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/overlay.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./set_screen */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/set_screen.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./set_cursor */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/set_cursor.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./call_screen */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/call_screen.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./set_pf_status */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/set_pf_status.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./set_titlebar */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/set_titlebar.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./program */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/program.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./function_pool */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/function_pool.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./module */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/module.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./endmodule */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/endmodule.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./endfunction */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/endfunction.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./retry */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/retry.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./authority_check */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/authority_check.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./set_parameter */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/set_parameter.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./get_cursor */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/get_cursor.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./call_kernel */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/call_kernel.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./call_transaction */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/call_transaction.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./unpack */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/unpack.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./skip */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/skip.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./uline */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/uline.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./data_begin */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/data_begin.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./data_end */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/data_end.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./type_begin */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/type_begin.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./type_end */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/type_end.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./raise_event */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/raise_event.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cleanup */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/cleanup.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./create_ole */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/create_ole.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./call_ole */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/call_ole.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./set_property */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/set_property.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./test_injection */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/test_injection.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./end_test_injection */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/end_test_injection.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./test_seam */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/test_seam.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./end_test_seam */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/end_test_seam.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./delete_memory */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/delete_memory.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./provide */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/provide.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./endexec */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/endexec.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./sort_dataset */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/sort_dataset.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./enhancement */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/enhancement.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./end_enhancement */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/end_enhancement.js\"), exports);\r\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js?");
|
|
4188
|
+
eval("\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\r\n};\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n// do not include statement.ts in this file.\r\n// this file only contains \"real\" statements\r\n// sequence of exports is optimized for parsing and precedence\r\n// see statement.ts for Unknown, Empty, Macro and Comment statements\r\n__exportStar(__webpack_require__(/*! ./data */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/data.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./report */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/report.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./write */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/write.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./endmethod */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/endmethod.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./method_implementation */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/method_implementation.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./endform */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/endform.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./form */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/form.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./import_nametab */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/import_nametab.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./check_select_options */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/check_select_options.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./call_badi */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/call_badi.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./class_data */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/class_data.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./class_data_begin */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/class_data_begin.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./class_data_end */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/class_data_end.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./select_loop */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/select_loop.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./do */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/do.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./break_id */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/break_id.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./interface_deferred */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/interface_deferred.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./while */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/while.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./loop_at_screen */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/loop_at_screen.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./loop */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/loop.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./check */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/check.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./endprovide */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/endprovide.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./if */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/if.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./convert_text */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/convert_text.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./log_point */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/log_point.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./window */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/window.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./endif */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/endif.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./type_enum */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/type_enum.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./type_enum_begin */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/type_enum_begin.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./type_enum_end */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/type_enum_end.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./set_run_time */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/set_run_time.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./field_group */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/field_group.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./print_control */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/print_control.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./extract */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/extract.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./sum */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/sum.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./end_of_page */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/end_of_page.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./generate_report */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/generate_report.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./elseif */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/elseif.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./else */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/else.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./perform */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/perform.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./append */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/append.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./clear */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/clear.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./concatenate */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/concatenate.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./enddo */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/enddo.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./endclass */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/endclass.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./try */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/try.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./endtry */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/endtry.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./assert */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/assert.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./return */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/return.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./endwhile */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/endwhile.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./constant */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/constant.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./catch */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/catch.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./infotypes */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/infotypes.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./message */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/message.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./read_table */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/read_table.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./endloop */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/endloop.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./case */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/case.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./create_object */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/create_object.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./select */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/select.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./call */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/call.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./class_local_friends */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/class_local_friends.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./class_deferred */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/class_deferred.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./fieldsymbol */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/fieldsymbol.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./class_definition */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/class_definition.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./class_implementation */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/class_implementation.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./translate */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/translate.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./exit */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/exit.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./endcase */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/endcase.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./constant_begin */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/constant_begin.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./constant_end */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/constant_end.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./when_others */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/when_others.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./when */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/when.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./continue */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/continue.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./assign */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/assign.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./get_badi */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/get_badi.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./suppress_dialog */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/suppress_dialog.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./type */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/type.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./hide */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/hide.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./get_locale */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/get_locale.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./set_locale */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/set_locale.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./commit */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/commit.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./modify_screen */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/modify_screen.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./commit_entities */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/commit_entities.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./modify_entities */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/modify_entities.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./read_entities */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/read_entities.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./rollback_entities */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/rollback_entities.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./summary */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/summary.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./on_change */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/on_change.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./at_user_command */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/at_user_command.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./position */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/position.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./resume */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/resume.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./stop */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/stop.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./get_pf_status */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/get_pf_status.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./delete_report */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/delete_report.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./controls */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/controls.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./at_line_selection */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/at_line_selection.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./new_page */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/new_page.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./set_dataset */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/set_dataset.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./get_property */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/get_property.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./scroll_list */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/scroll_list.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./load_of_program */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/load_of_program.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./top_of_page */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/top_of_page.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./truncate_dataset */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/truncate_dataset.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./set_update_task */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/set_update_task.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./set_user_command */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/set_user_command.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./rollback */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/rollback.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./delete_internal */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/delete_internal.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./delete_database */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/delete_database.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./delete_dataset */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/delete_dataset.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./free_memory */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/free_memory.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./catch_system_exceptions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/catch_system_exceptions.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./endcatch */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/endcatch.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./assign_local_copy */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/assign_local_copy.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./set_extended_check */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/set_extended_check.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./split */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/split.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./new_line */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/new_line.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./free_object */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/free_object.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./sort */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/sort.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./replace */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/replace.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./with_loop */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/with_loop.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./with */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/with.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./endwith */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/endwith.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./condense */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/condense.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./insert_internal */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/insert_internal.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./insert_database */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/insert_database.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./insert_field_group */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/insert_field_group.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./update_database */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/update_database.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./modify_database */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/modify_database.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./modify_internal */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/modify_internal.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./raise */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/raise.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./define */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/define.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./enddefine */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/enddefine.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./find */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/find.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./move */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/move.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./move_corresponding */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/move_corresponding.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./get_time */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/get_time.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./enhancement_point */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/enhancement_point.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./enhancement_section */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/enhancement_section.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./end_enhancement_section */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/end_enhancement_section.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./set_handler */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/set_handler.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./set_left */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/set_left.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./pack */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/pack.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./case_type */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/case_type.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./when_type */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/when_type.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./exec_sql */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/exec_sql.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./open_cursor */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/open_cursor.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./communication */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/communication.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./generate_subroutine */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/generate_subroutine.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./reject */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/reject.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./load_report */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/load_report.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./private */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/private.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./system_call */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/system_call.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./set_language */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/set_language.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./call_dialog */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/call_dialog.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./protected */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/protected.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./public */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/public.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./nodes */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/nodes.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./demand */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/demand.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./supply */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/supply.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./fields */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/fields.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./delete_cluster */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/delete_cluster.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./set_margin */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/set_margin.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./call_database */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/call_database.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./contexts */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/contexts.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./interface */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/interface.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./endinterface */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/endinterface.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./parameter */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/parameter.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./include */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/include.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./collect */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/collect.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./ranges */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/ranges.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./events */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/events.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./receive */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/receive.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./back */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/back.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./add_corresponding */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/add_corresponding.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./subtract_corresponding */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/subtract_corresponding.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./static_begin */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/static_begin.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./static_end */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/static_end.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./get_dataset */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/get_dataset.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./tables */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/tables.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./local */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/local.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./add */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/add.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./describe */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/describe.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./submit */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/submit.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./scan */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/scan.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./export */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/export.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./import */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/import.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./at */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/at.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./put */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/put.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./endat */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/endat.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./endselect */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/endselect.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./refresh */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/refresh.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./shift */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/shift.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./type_mesh */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/type_mesh.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./transfer */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/transfer.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./subtract */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/subtract.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./unassign */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/unassign.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./open_dataset */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/open_dataset.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./close_dataset */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/close_dataset.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./interface_load */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/interface_load.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./close_cursor */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/close_cursor.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./leave */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/leave.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./class_definition_load */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/class_definition_load.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./initialization */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/initialization.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./start_of_selection */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/start_of_selection.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./set_blank */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/set_blank.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./export_dynpro */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/export_dynpro.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./end_of_selection */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/end_of_selection.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./search */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/search.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./modify_line */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/modify_line.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./selectionscreen */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/selectionscreen.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./free */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/free.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./endon */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/endon.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./fetch_next_cursor */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/fetch_next_cursor.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./reserve */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/reserve.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./refresh_control */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/refresh_control.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./delete_dynpro */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/delete_dynpro.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./generate_dynpro */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/generate_dynpro.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./detail */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/detail.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./editor_call */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/editor_call.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./break */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/break.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./delete_textpool */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/delete_textpool.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./get */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/get.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./selectoption */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/selectoption.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./convert */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/convert.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./static */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/static.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./compute */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/compute.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./multiply */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/multiply.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./divide */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/divide.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./format */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/format.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./syntax_check */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/syntax_check.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./aliases */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/aliases.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./method_def */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/method_def.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./type_mesh_begin */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/type_mesh_begin.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./type_mesh_end */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/type_mesh_end.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./interface_def */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/interface_def.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./at_selection_screen */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/at_selection_screen.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./include_type */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/include_type.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./import_dynpro */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/import_dynpro.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./call_function */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/call_function.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./call_selection_screen */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/call_selection_screen.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./call_transformation */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/call_transformation.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./read_line */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/read_line.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./read_textpool */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/read_textpool.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./read_report */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/read_report.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./read_dataset */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/read_dataset.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./get_bit */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/get_bit.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./get_reference */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/get_reference.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./insert_report */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/insert_report.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./insert_textpool */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/insert_textpool.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./set_bit */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/set_bit.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./get_run_time */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/get_run_time.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./get_parameter */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/get_parameter.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./create_data */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/create_data.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./set_country */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/set_country.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./function_module */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/function_module.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./type_pools */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/type_pools.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./type_pool */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/type_pool.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./wait */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/wait.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./overlay */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/overlay.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./set_screen */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/set_screen.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./set_cursor */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/set_cursor.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./call_screen */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/call_screen.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./set_pf_status */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/set_pf_status.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./set_titlebar */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/set_titlebar.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./program */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/program.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./function_pool */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/function_pool.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./module */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/module.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./endmodule */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/endmodule.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./endfunction */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/endfunction.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./retry */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/retry.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./authority_check */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/authority_check.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./set_parameter */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/set_parameter.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./get_cursor */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/get_cursor.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./call_kernel */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/call_kernel.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./call_transaction */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/call_transaction.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./unpack */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/unpack.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./skip */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/skip.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./uline */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/uline.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./data_begin */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/data_begin.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./data_end */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/data_end.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./type_begin */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/type_begin.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./type_end */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/type_end.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./raise_event */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/raise_event.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cleanup */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/cleanup.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./create_ole */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/create_ole.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./call_ole */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/call_ole.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./set_property */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/set_property.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./test_injection */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/test_injection.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./end_test_injection */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/end_test_injection.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./test_seam */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/test_seam.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./end_test_seam */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/end_test_seam.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./delete_memory */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/delete_memory.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./provide */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/provide.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./endexec */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/endexec.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./sort_dataset */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/sort_dataset.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./enhancement */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/enhancement.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./end_enhancement */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/end_enhancement.js\"), exports);\r\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js?");
|
|
4189
4189
|
|
|
4190
4190
|
/***/ }),
|
|
4191
4191
|
|
|
@@ -4372,7 +4372,18 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
|
|
|
4372
4372
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
4373
4373
|
|
|
4374
4374
|
"use strict";
|
|
4375
|
-
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.Loop = void 0;\r\nconst combi_1 = __webpack_require__(/*! ../combi */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js\");\r\nconst expressions_1 = __webpack_require__(/*! ../expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst version_1 = __webpack_require__(/*! ../../../version */ \"./node_modules/@abaplint/core/build/src/version.js\");\r\nconst simple_source2_1 = __webpack_require__(/*! ../expressions/simple_source2 */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/simple_source2.js\");\r\nconst loop_group_by_1 = __webpack_require__(/*! ../expressions/loop_group_by */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/loop_group_by.js\");\r\nclass Loop {\r\n getMatcher() {\r\n const where = (0, combi_1.seq)(\"WHERE\", (0, combi_1.alt)(expressions_1.ComponentCond, expressions_1.Dynamic));\r\n const into = (0, combi_1.seq)((0, combi_1.opt)(\"REFERENCE\"), \"INTO\", expressions_1.Target);\r\n const assigning = (0, combi_1.seq)(\"ASSIGNING\", expressions_1.FSTarget);\r\n const group = (0, combi_1.ver)(version_1.Version.v740sp08, (0, combi_1.seq)(\"GROUP BY\", loop_group_by_1.LoopGroupBy));\r\n const target = (0, combi_1.alt)((0, combi_1.seq)((0, combi_1.alt)(into, assigning), (0, combi_1.optPrio)(\"CASTING\")), \"TRANSPORTING NO FIELDS\");\r\n const from = (0, combi_1.seq)(\"FROM\", expressions_1.Source);\r\n const to = (0, combi_1.seq)(\"TO\", expressions_1.Source);\r\n const usingKey = (0, combi_1.seq)(\"USING KEY\", (0, combi_1.altPrio)(expressions_1.SimpleName, expressions_1.Dynamic));\r\n const options = (0, combi_1.per)(target, from, to, where, usingKey, group);\r\n const at = (0, combi_1.seq)(\"AT\", (0, combi_1.opt)((0, combi_1.ver)(version_1.Version.v740sp08, \"GROUP\")), (0, combi_1.alt)(simple_source2_1.SimpleSource2, (0, combi_1.ver)(version_1.Version.v740sp02, expressions_1.Source)), (0, combi_1.opt)(options));\r\n return (0, combi_1.seq)(\"LOOP\", (0, combi_1.opt)(at));\r\n }\r\n}\r\nexports.Loop = Loop;\r\n//# sourceMappingURL=loop.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/2_statements/statements/loop.js?");
|
|
4375
|
+
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.Loop = void 0;\r\nconst combi_1 = __webpack_require__(/*! ../combi */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js\");\r\nconst expressions_1 = __webpack_require__(/*! ../expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst version_1 = __webpack_require__(/*! ../../../version */ \"./node_modules/@abaplint/core/build/src/version.js\");\r\nconst simple_source2_1 = __webpack_require__(/*! ../expressions/simple_source2 */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/simple_source2.js\");\r\nconst loop_group_by_1 = __webpack_require__(/*! ../expressions/loop_group_by */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/loop_group_by.js\");\r\nclass Loop {\r\n getMatcher() {\r\n const where = (0, combi_1.seq)(\"WHERE\", (0, combi_1.alt)(expressions_1.ComponentCond, expressions_1.Dynamic));\r\n const into = (0, combi_1.seq)((0, combi_1.opt)(\"REFERENCE\"), \"INTO\", expressions_1.Target);\r\n const assigning = (0, combi_1.seq)(\"ASSIGNING\", expressions_1.FSTarget);\r\n const group = (0, combi_1.ver)(version_1.Version.v740sp08, (0, combi_1.seq)(\"GROUP BY\", loop_group_by_1.LoopGroupBy));\r\n const target = (0, combi_1.alt)((0, combi_1.seq)((0, combi_1.alt)(into, assigning), (0, combi_1.optPrio)(\"CASTING\")), \"TRANSPORTING NO FIELDS\");\r\n const from = (0, combi_1.seq)(\"FROM\", expressions_1.Source);\r\n const to = (0, combi_1.seq)(\"TO\", expressions_1.Source);\r\n const usingKey = (0, combi_1.seq)(\"USING KEY\", (0, combi_1.altPrio)(expressions_1.SimpleName, expressions_1.Dynamic));\r\n const options = (0, combi_1.per)(target, from, to, where, usingKey, group);\r\n const at = (0, combi_1.seq)(\"AT\", (0, combi_1.opt)((0, combi_1.seq)(\"SCREEN\", (0, combi_1.fail)())), (0, combi_1.opt)((0, combi_1.ver)(version_1.Version.v740sp08, \"GROUP\")), (0, combi_1.alt)(simple_source2_1.SimpleSource2, (0, combi_1.ver)(version_1.Version.v740sp02, expressions_1.Source)), (0, combi_1.opt)(options));\r\n return (0, combi_1.seq)(\"LOOP\", (0, combi_1.opt)(at));\r\n }\r\n}\r\nexports.Loop = Loop;\r\n//# sourceMappingURL=loop.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/2_statements/statements/loop.js?");
|
|
4376
|
+
|
|
4377
|
+
/***/ }),
|
|
4378
|
+
|
|
4379
|
+
/***/ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/loop_at_screen.js":
|
|
4380
|
+
/*!**********************************************************************************************!*\
|
|
4381
|
+
!*** ./node_modules/@abaplint/core/build/src/abap/2_statements/statements/loop_at_screen.js ***!
|
|
4382
|
+
\**********************************************************************************************/
|
|
4383
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
4384
|
+
|
|
4385
|
+
"use strict";
|
|
4386
|
+
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.LoopAtScreen = void 0;\r\nconst combi_1 = __webpack_require__(/*! ../combi */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js\");\r\nconst version_1 = __webpack_require__(/*! ../../../version */ \"./node_modules/@abaplint/core/build/src/version.js\");\r\nconst expressions_1 = __webpack_require__(/*! ../expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nclass LoopAtScreen {\r\n getMatcher() {\r\n const l = (0, combi_1.seq)(\"LOOP AT SCREEN\", (0, combi_1.opt)((0, combi_1.seq)(\"INTO\", expressions_1.Target)));\r\n return (0, combi_1.verNot)(version_1.Version.Cloud, l);\r\n }\r\n}\r\nexports.LoopAtScreen = LoopAtScreen;\r\n//# sourceMappingURL=loop_at_screen.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/2_statements/statements/loop_at_screen.js?");
|
|
4376
4387
|
|
|
4377
4388
|
/***/ }),
|
|
4378
4389
|
|
|
@@ -6077,7 +6088,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
|
|
|
6077
6088
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
6078
6089
|
|
|
6079
6090
|
"use strict";
|
|
6080
|
-
eval("\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\r\n};\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n__exportStar(__webpack_require__(/*! ./any */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/any.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./at */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/at.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./body */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/body.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./case_type */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/case_type.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./case */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/case.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./catch_system_exceptions */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/catch_system_exceptions.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./catch */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/catch.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./class_data */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/class_data.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./class_definition */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/class_definition.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./class_global */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/class_global.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./class_implementation */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/class_implementation.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cleanup */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/cleanup.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./constants */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/constants.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./data */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/data.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./define */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/define.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./do */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/do.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./type_mesh */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/type_mesh.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./else */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/else.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./elseif */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/elseif.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./enhancement_section */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/enhancement_section.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./enhancement */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/enhancement.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./exec_sql */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/exec_sql.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./form */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/form.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./function_module */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/function_module.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./if */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/if.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./interface_global */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/interface_global.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./interface */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/interface.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./loop */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/loop.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./method */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/method.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./module */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/module.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./normal */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/normal.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./on_change */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/on_change.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./private_section */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/private_section.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./protected_section */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/protected_section.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./provide */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/provide.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./public_section */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/public_section.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./section_section */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/section_section.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./select */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/select.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./statics */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/statics.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./test_injection */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/test_injection.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./test_seam */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/test_seam.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./try */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/try.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./type_enum */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/type_enum.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./types */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/types.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./when_type */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/when_type.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./when */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/when.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./while */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/while.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./with */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/with.js\"), exports);\r\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/3_structures/structures/index.js?");
|
|
6091
|
+
eval("\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\r\n};\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n__exportStar(__webpack_require__(/*! ./any */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/any.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./at */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/at.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./body */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/body.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./case_type */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/case_type.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./case */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/case.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./catch_system_exceptions */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/catch_system_exceptions.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./catch */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/catch.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./class_data */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/class_data.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./class_definition */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/class_definition.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./class_global */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/class_global.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./class_implementation */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/class_implementation.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cleanup */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/cleanup.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./constants */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/constants.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./data */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/data.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./define */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/define.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./do */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/do.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./type_mesh */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/type_mesh.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./else */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/else.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./elseif */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/elseif.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./enhancement_section */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/enhancement_section.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./enhancement */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/enhancement.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./exec_sql */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/exec_sql.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./form */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/form.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./function_module */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/function_module.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./if */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/if.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./interface_global */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/interface_global.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./interface */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/interface.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./loop_at_screen */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/loop_at_screen.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./loop */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/loop.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./method */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/method.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./module */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/module.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./normal */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/normal.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./on_change */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/on_change.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./private_section */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/private_section.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./protected_section */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/protected_section.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./provide */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/provide.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./public_section */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/public_section.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./section_section */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/section_section.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./select */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/select.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./statics */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/statics.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./test_injection */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/test_injection.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./test_seam */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/test_seam.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./try */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/try.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./type_enum */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/type_enum.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./types */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/types.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./when_type */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/when_type.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./when */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/when.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./while */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/while.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./with */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/with.js\"), exports);\r\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/3_structures/structures/index.js?");
|
|
6081
6092
|
|
|
6082
6093
|
/***/ }),
|
|
6083
6094
|
|
|
@@ -6114,6 +6125,17 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
|
|
|
6114
6125
|
|
|
6115
6126
|
/***/ }),
|
|
6116
6127
|
|
|
6128
|
+
/***/ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/loop_at_screen.js":
|
|
6129
|
+
/*!**********************************************************************************************!*\
|
|
6130
|
+
!*** ./node_modules/@abaplint/core/build/src/abap/3_structures/structures/loop_at_screen.js ***!
|
|
6131
|
+
\**********************************************************************************************/
|
|
6132
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
6133
|
+
|
|
6134
|
+
"use strict";
|
|
6135
|
+
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.LoopAtScreen = void 0;\r\nconst Statements = __webpack_require__(/*! ../../2_statements/statements */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js\");\r\nconst _combi_1 = __webpack_require__(/*! ./_combi */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/_combi.js\");\r\nconst _1 = __webpack_require__(/*! . */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/index.js\");\r\nclass LoopAtScreen {\r\n getMatcher() {\r\n return (0, _combi_1.beginEnd)((0, _combi_1.sta)(Statements.LoopAtScreen), (0, _combi_1.opt)((0, _combi_1.sub)(_1.Body)), (0, _combi_1.sta)(Statements.EndLoop));\r\n }\r\n}\r\nexports.LoopAtScreen = LoopAtScreen;\r\n//# sourceMappingURL=loop_at_screen.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/3_structures/structures/loop_at_screen.js?");
|
|
6136
|
+
|
|
6137
|
+
/***/ }),
|
|
6138
|
+
|
|
6117
6139
|
/***/ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/method.js":
|
|
6118
6140
|
/*!**************************************************************************************!*\
|
|
6119
6141
|
!*** ./node_modules/@abaplint/core/build/src/abap/3_structures/structures/method.js ***!
|
|
@@ -6143,7 +6165,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
|
|
|
6143
6165
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
6144
6166
|
|
|
6145
6167
|
"use strict";
|
|
6146
|
-
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.Normal = void 0;\r\nconst Structures = __webpack_require__(/*! . */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/index.js\");\r\nconst Statements = __webpack_require__(/*! ../../2_statements/statements */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js\");\r\nconst _combi_1 = __webpack_require__(/*! ./_combi */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/_combi.js\");\r\nconst _statement_1 = __webpack_require__(/*! ../../2_statements/statements/_statement */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/_statement.js\");\r\nclass Normal {\r\n getMatcher() {\r\n // note that the sequence of alternatives here influences performance\r\n return (0, _combi_1.alt)((0, _combi_1.sta)(Statements.Move), (0, _combi_1.sta)(Statements.Call), (0, _combi_1.sta)(Statements.Data), (0, _combi_1.sub)(Structures.If), (0, _combi_1.sta)(Statements.Clear), (0, _combi_1.sta)(Statements.FieldSymbol), (0, _combi_1.sta)(Statements.CreateObject), (0, _combi_1.sta)(Statements.CallFunction), (0, _combi_1.sta)(_statement_1.MacroCall), (0, _combi_1.sub)(Structures.Loop), (0, _combi_1.sta)(Statements.Append), (0, _combi_1.sub)(Structures.Try), (0, _combi_1.sta)(Statements.ReadTable), (0, _combi_1.sta)(Statements.Assert), (0, _combi_1.sta)(Statements.Return), (0, _combi_1.sta)(Statements.Select), (0, _combi_1.sta)(Statements.Assign), (0, _combi_1.sta)(Statements.InsertInternal), (0, _combi_1.sta)(Statements.DeleteInternal), (0, _combi_1.sta)(Statements.Concatenate), (0, _combi_1.sub)(Structures.Case), (0, _combi_1.sub)(Structures.CaseType), (0, _combi_1.sub)(Structures.Enhancement), (0, _combi_1.sub)(Structures.EnhancementSection), (0, _combi_1.sta)(Statements.AddCorresponding), (0, _combi_1.sta)(Statements.Add), (0, _combi_1.sta)(Statements.AssignLocalCopy), (0, _combi_1.sta)(Statements.AuthorityCheck), (0, _combi_1.sta)(Statements.Back), (0, _combi_1.sta)(Statements.Break), (0, _combi_1.sta)(Statements.BreakId), (0, _combi_1.sta)(Statements.CallDatabase), (0, _combi_1.sta)(Statements.CallDialog), (0, _combi_1.sta)(Statements.CallKernel), (0, _combi_1.sta)(Statements.CallOLE), (0, _combi_1.sta)(Statements.CallScreen), (0, _combi_1.sta)(Statements.ModifyScreen), (0, _combi_1.sta)(Statements.CallSelectionScreen), (0, _combi_1.sta)(Statements.CallTransaction), (0, _combi_1.sta)(Statements.CallTransformation), (0, _combi_1.sta)(Statements.Check), (0, _combi_1.sta)(Statements.ClassDefinitionLoad), (0, _combi_1.sta)(Statements.CloseCursor), (0, _combi_1.sta)(Statements.CloseDataset), (0, _combi_1.sta)(Statements.Collect), (0, _combi_1.sta)(Statements.Commit), (0, _combi_1.sta)(Statements.Communication), (0, _combi_1.sta)(Statements.Compute), (0, _combi_1.sta)(Statements.CallBadi), (0, _combi_1.sta)(Statements.Condense), (0, _combi_1.sta)(Statements.Constant), (0, _combi_1.sta)(Statements.Contexts), (0, _combi_1.sta)(Statements.Continue), (0, _combi_1.sta)(Statements.ConvertText), (0, _combi_1.sta)(Statements.Convert), (0, _combi_1.sta)(Statements.CreateData), (0, _combi_1.sta)(Statements.CreateOLE), (0, _combi_1.sta)(Statements.DeleteCluster), (0, _combi_1.sta)(Statements.DeleteDatabase), (0, _combi_1.sta)(Statements.DeleteDataset), (0, _combi_1.sta)(Statements.DeleteDynpro), (0, _combi_1.sta)(Statements.DeleteMemory), (0, _combi_1.sta)(Statements.DeleteReport), (0, _combi_1.sta)(Statements.DeleteTextpool), (0, _combi_1.sta)(Statements.Demand), (0, _combi_1.sta)(Statements.Describe), (0, _combi_1.sta)(Statements.Detail), (0, _combi_1.sta)(Statements.Divide), (0, _combi_1.sta)(Statements.EditorCall), (0, _combi_1.sta)(Statements.EnhancementPoint), (0, _combi_1.sta)(Statements.Exit), (0, _combi_1.sta)(Statements.ExportDynpro), (0, _combi_1.sta)(Statements.Export), (0, _combi_1.sta)(Statements.Extract), (0, _combi_1.sta)(Statements.FetchNextCursor), (0, _combi_1.sta)(Statements.FieldGroup), (0, _combi_1.sta)(Statements.Fields), (0, _combi_1.sta)(Statements.Find), (0, _combi_1.sta)(Statements.Format), (0, _combi_1.sta)(Statements.FreeMemory), (0, _combi_1.sta)(Statements.FreeObject), (0, _combi_1.sta)(Statements.Free), (0, _combi_1.sta)(Statements.GenerateDynpro), (0, _combi_1.sta)(Statements.GenerateReport), (0, _combi_1.sta)(Statements.GenerateSubroutine), (0, _combi_1.sta)(Statements.GetBadi), (0, _combi_1.sta)(Statements.GetBit), (0, _combi_1.sta)(Statements.GetCursor), (0, _combi_1.sta)(Statements.GetDataset), (0, _combi_1.sta)(Statements.GetLocale), (0, _combi_1.sta)(Statements.GetParameter), (0, _combi_1.sta)(Statements.GetPFStatus), (0, _combi_1.sta)(Statements.GetProperty), (0, _combi_1.sta)(Statements.GetReference), (0, _combi_1.sta)(Statements.GetRunTime), (0, _combi_1.sta)(Statements.GetTime), (0, _combi_1.sta)(Statements.Hide), (0, _combi_1.sta)(Statements.Nodes), (0, _combi_1.sta)(Statements.ImportDynpro), (0, _combi_1.sta)(Statements.ImportNametab), (0, _combi_1.sta)(Statements.MoveCorresponding), (0, _combi_1.sta)(Statements.Import), (0, _combi_1.sta)(Statements.Infotypes), (0, _combi_1.sta)(Statements.Include), // include does not have to be at top level\r\n (0, _combi_1.sta)(Statements.InsertDatabase), (0, _combi_1.sta)(Statements.InsertReport), (0, _combi_1.sta)(Statements.InsertTextpool), (0, _combi_1.sta)(Statements.InsertFieldGroup), (0, _combi_1.sta)(Statements.InterfaceLoad), (0, _combi_1.sta)(Statements.Leave), (0, _combi_1.sta)(Statements.LoadReport), (0, _combi_1.sta)(Statements.Local), (0, _combi_1.sta)(Statements.With), (0, _combi_1.sta)(Statements.LogPoint), (0, _combi_1.sta)(Statements.Message), (0, _combi_1.sta)(Statements.ModifyLine), (0, _combi_1.sta)(Statements.ModifyDatabase), (0, _combi_1.sta)(Statements.ModifyInternal), (0, _combi_1.sta)(Statements.Multiply), (0, _combi_1.sta)(Statements.NewLine), (0, _combi_1.sta)(Statements.NewPage), (0, _combi_1.sta)(Statements.OpenCursor), (0, _combi_1.sta)(Statements.OpenDataset), (0, _combi_1.sta)(Statements.Overlay), (0, _combi_1.sta)(Statements.Pack), (0, _combi_1.sta)(Statements.Perform), (0, _combi_1.sta)(Statements.Position), (0, _combi_1.sta)(Statements.Put), (0, _combi_1.sta)(Statements.PrintControl), (0, _combi_1.sta)(Statements.RaiseEvent), (0, _combi_1.sta)(Statements.Raise), (0, _combi_1.sta)(Statements.Ranges), (0, _combi_1.sta)(Statements.ReadDataset), (0, _combi_1.sta)(Statements.ReadLine), (0, _combi_1.sta)(Statements.ReadReport), (0, _combi_1.sta)(Statements.ReadTextpool), (0, _combi_1.sta)(Statements.Receive), (0, _combi_1.sta)(Statements.RefreshControl), (0, _combi_1.sta)(Statements.Refresh), (0, _combi_1.sta)(Statements.Reject), (0, _combi_1.sta)(Statements.Replace), (0, _combi_1.sta)(Statements.Reserve), (0, _combi_1.sta)(Statements.Resume), (0, _combi_1.sta)(Statements.Retry), (0, _combi_1.sta)(Statements.Rollback), (0, _combi_1.sta)(Statements.Scan), (0, _combi_1.sta)(Statements.ScrollList), (0, _combi_1.sta)(Statements.Search), (0, _combi_1.sta)(Statements.SetBit), (0, _combi_1.sta)(Statements.SetBlank), (0, _combi_1.sta)(Statements.SetCountry), (0, _combi_1.sta)(Statements.SetCursor), (0, _combi_1.sta)(Statements.SetDataset), (0, _combi_1.sta)(Statements.SetExtendedCheck), (0, _combi_1.sta)(Statements.SetHandler), (0, _combi_1.sta)(Statements.SetLanguage), (0, _combi_1.sta)(Statements.SetLeft), (0, _combi_1.sta)(Statements.SetLocale), (0, _combi_1.sta)(Statements.SetMargin), (0, _combi_1.sta)(Statements.SetParameter), (0, _combi_1.sta)(Statements.SetPFStatus), (0, _combi_1.sta)(Statements.SetProperty), (0, _combi_1.sta)(Statements.SetRunTime), (0, _combi_1.sta)(Statements.SetScreen), (0, _combi_1.sta)(Statements.SetTitlebar), (0, _combi_1.sta)(Statements.SetUserCommand), (0, _combi_1.sta)(Statements.SetUpdateTask), (0, _combi_1.sta)(Statements.Shift), (0, _combi_1.sta)(Statements.Skip), (0, _combi_1.sta)(Statements.SortDataset), (0, _combi_1.sta)(Statements.Sort), (0, _combi_1.sta)(Statements.Static), (0, _combi_1.sta)(Statements.Split), (0, _combi_1.sta)(Statements.Stop), (0, _combi_1.sta)(Statements.Submit), (0, _combi_1.sta)(Statements.Summary), (0, _combi_1.sta)(Statements.SubtractCorresponding), (0, _combi_1.sta)(Statements.Subtract), (0, _combi_1.sta)(Statements.SuppressDialog), (0, _combi_1.sta)(Statements.Supply), (0, _combi_1.sta)(Statements.Sum), (0, _combi_1.sta)(Statements.SyntaxCheck), (0, _combi_1.sta)(Statements.SystemCall), (0, _combi_1.sta)(Statements.Tables), (0, _combi_1.sta)(Statements.Transfer), (0, _combi_1.sta)(Statements.Translate), (0, _combi_1.sta)(Statements.Type), (0, _combi_1.sta)(Statements.TypePools), (0, _combi_1.sta)(Statements.Uline), (0, _combi_1.sta)(Statements.Unassign), (0, _combi_1.sta)(Statements.Unpack), (0, _combi_1.sta)(Statements.UpdateDatabase), (0, _combi_1.sta)(Statements.Wait), (0, _combi_1.sta)(Statements.Window), (0, _combi_1.sta)(Statements.Write), (0, _combi_1.sta)(Statements.CommitEntities), (0, _combi_1.sta)(Statements.ModifyEntities), (0, _combi_1.sta)(Statements.ReadEntities), (0, _combi_1.sta)(Statements.RollbackEntities), (0, _combi_1.sub)(Structures.Define), (0, _combi_1.sub)(Structures.TestInjection), (0, _combi_1.sub)(Structures.TestSeam), (0, _combi_1.sub)(Structures.TypeMesh), (0, _combi_1.sub)(Structures.Provide), (0, _combi_1.sub)(Structures.CatchSystemExceptions), (0, _combi_1.sub)(Structures.At), (0, _combi_1.sub)(Structures.Constants), (0, _combi_1.sub)(Structures.Types), (0, _combi_1.sub)(Structures.Statics), (0, _combi_1.sub)(Structures.Select), (0, _combi_1.sub)(Structures.Data), (0, _combi_1.sub)(Structures.TypeEnum), (0, _combi_1.sub)(Structures.While), (0, _combi_1.sub)(Structures.With), (0, _combi_1.sub)(Structures.Do), (0, _combi_1.sub)(Structures.ExecSQL));\r\n }\r\n}\r\nexports.Normal = Normal;\r\n//# sourceMappingURL=normal.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/3_structures/structures/normal.js?");
|
|
6168
|
+
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.Normal = void 0;\r\nconst Structures = __webpack_require__(/*! . */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/index.js\");\r\nconst Statements = __webpack_require__(/*! ../../2_statements/statements */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js\");\r\nconst _combi_1 = __webpack_require__(/*! ./_combi */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/_combi.js\");\r\nconst _statement_1 = __webpack_require__(/*! ../../2_statements/statements/_statement */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/_statement.js\");\r\nclass Normal {\r\n getMatcher() {\r\n // note that the sequence of alternatives here influences performance\r\n return (0, _combi_1.alt)((0, _combi_1.sta)(Statements.Move), (0, _combi_1.sta)(Statements.Call), (0, _combi_1.sta)(Statements.Data), (0, _combi_1.sub)(Structures.If), (0, _combi_1.sta)(Statements.Clear), (0, _combi_1.sta)(Statements.FieldSymbol), (0, _combi_1.sta)(Statements.CreateObject), (0, _combi_1.sta)(Statements.CallFunction), (0, _combi_1.sta)(_statement_1.MacroCall), (0, _combi_1.sub)(Structures.LoopAtScreen), (0, _combi_1.sub)(Structures.Loop), (0, _combi_1.sta)(Statements.Append), (0, _combi_1.sub)(Structures.Try), (0, _combi_1.sta)(Statements.ReadTable), (0, _combi_1.sta)(Statements.Assert), (0, _combi_1.sta)(Statements.Return), (0, _combi_1.sta)(Statements.Select), (0, _combi_1.sta)(Statements.Assign), (0, _combi_1.sta)(Statements.InsertInternal), (0, _combi_1.sta)(Statements.DeleteInternal), (0, _combi_1.sta)(Statements.Concatenate), (0, _combi_1.sub)(Structures.Case), (0, _combi_1.sub)(Structures.CaseType), (0, _combi_1.sub)(Structures.Enhancement), (0, _combi_1.sub)(Structures.EnhancementSection), (0, _combi_1.sta)(Statements.AddCorresponding), (0, _combi_1.sta)(Statements.Add), (0, _combi_1.sta)(Statements.AssignLocalCopy), (0, _combi_1.sta)(Statements.AuthorityCheck), (0, _combi_1.sta)(Statements.Back), (0, _combi_1.sta)(Statements.Break), (0, _combi_1.sta)(Statements.BreakId), (0, _combi_1.sta)(Statements.CallDatabase), (0, _combi_1.sta)(Statements.CallDialog), (0, _combi_1.sta)(Statements.CallKernel), (0, _combi_1.sta)(Statements.CallOLE), (0, _combi_1.sta)(Statements.CallScreen), (0, _combi_1.sta)(Statements.ModifyScreen), (0, _combi_1.sta)(Statements.CallSelectionScreen), (0, _combi_1.sta)(Statements.CallTransaction), (0, _combi_1.sta)(Statements.CallTransformation), (0, _combi_1.sta)(Statements.Check), (0, _combi_1.sta)(Statements.ClassDefinitionLoad), (0, _combi_1.sta)(Statements.CloseCursor), (0, _combi_1.sta)(Statements.CloseDataset), (0, _combi_1.sta)(Statements.Collect), (0, _combi_1.sta)(Statements.Commit), (0, _combi_1.sta)(Statements.Communication), (0, _combi_1.sta)(Statements.Compute), (0, _combi_1.sta)(Statements.CallBadi), (0, _combi_1.sta)(Statements.Condense), (0, _combi_1.sta)(Statements.Constant), (0, _combi_1.sta)(Statements.Contexts), (0, _combi_1.sta)(Statements.Continue), (0, _combi_1.sta)(Statements.ConvertText), (0, _combi_1.sta)(Statements.Convert), (0, _combi_1.sta)(Statements.CreateData), (0, _combi_1.sta)(Statements.CreateOLE), (0, _combi_1.sta)(Statements.DeleteCluster), (0, _combi_1.sta)(Statements.DeleteDatabase), (0, _combi_1.sta)(Statements.DeleteDataset), (0, _combi_1.sta)(Statements.DeleteDynpro), (0, _combi_1.sta)(Statements.DeleteMemory), (0, _combi_1.sta)(Statements.DeleteReport), (0, _combi_1.sta)(Statements.DeleteTextpool), (0, _combi_1.sta)(Statements.Demand), (0, _combi_1.sta)(Statements.Describe), (0, _combi_1.sta)(Statements.Detail), (0, _combi_1.sta)(Statements.Divide), (0, _combi_1.sta)(Statements.EditorCall), (0, _combi_1.sta)(Statements.EnhancementPoint), (0, _combi_1.sta)(Statements.Exit), (0, _combi_1.sta)(Statements.ExportDynpro), (0, _combi_1.sta)(Statements.Export), (0, _combi_1.sta)(Statements.Extract), (0, _combi_1.sta)(Statements.FetchNextCursor), (0, _combi_1.sta)(Statements.FieldGroup), (0, _combi_1.sta)(Statements.Fields), (0, _combi_1.sta)(Statements.Find), (0, _combi_1.sta)(Statements.Format), (0, _combi_1.sta)(Statements.FreeMemory), (0, _combi_1.sta)(Statements.FreeObject), (0, _combi_1.sta)(Statements.Free), (0, _combi_1.sta)(Statements.GenerateDynpro), (0, _combi_1.sta)(Statements.GenerateReport), (0, _combi_1.sta)(Statements.GenerateSubroutine), (0, _combi_1.sta)(Statements.GetBadi), (0, _combi_1.sta)(Statements.GetBit), (0, _combi_1.sta)(Statements.GetCursor), (0, _combi_1.sta)(Statements.GetDataset), (0, _combi_1.sta)(Statements.GetLocale), (0, _combi_1.sta)(Statements.GetParameter), (0, _combi_1.sta)(Statements.GetPFStatus), (0, _combi_1.sta)(Statements.GetProperty), (0, _combi_1.sta)(Statements.GetReference), (0, _combi_1.sta)(Statements.GetRunTime), (0, _combi_1.sta)(Statements.GetTime), (0, _combi_1.sta)(Statements.Hide), (0, _combi_1.sta)(Statements.Nodes), (0, _combi_1.sta)(Statements.ImportDynpro), (0, _combi_1.sta)(Statements.ImportNametab), (0, _combi_1.sta)(Statements.MoveCorresponding), (0, _combi_1.sta)(Statements.Import), (0, _combi_1.sta)(Statements.Infotypes), (0, _combi_1.sta)(Statements.Include), // include does not have to be at top level\r\n (0, _combi_1.sta)(Statements.InsertDatabase), (0, _combi_1.sta)(Statements.InsertReport), (0, _combi_1.sta)(Statements.InsertTextpool), (0, _combi_1.sta)(Statements.InsertFieldGroup), (0, _combi_1.sta)(Statements.InterfaceLoad), (0, _combi_1.sta)(Statements.Leave), (0, _combi_1.sta)(Statements.LoadReport), (0, _combi_1.sta)(Statements.Local), (0, _combi_1.sta)(Statements.With), (0, _combi_1.sta)(Statements.LogPoint), (0, _combi_1.sta)(Statements.Message), (0, _combi_1.sta)(Statements.ModifyLine), (0, _combi_1.sta)(Statements.ModifyDatabase), (0, _combi_1.sta)(Statements.ModifyInternal), (0, _combi_1.sta)(Statements.Multiply), (0, _combi_1.sta)(Statements.NewLine), (0, _combi_1.sta)(Statements.NewPage), (0, _combi_1.sta)(Statements.OpenCursor), (0, _combi_1.sta)(Statements.OpenDataset), (0, _combi_1.sta)(Statements.Overlay), (0, _combi_1.sta)(Statements.Pack), (0, _combi_1.sta)(Statements.Perform), (0, _combi_1.sta)(Statements.Position), (0, _combi_1.sta)(Statements.Put), (0, _combi_1.sta)(Statements.PrintControl), (0, _combi_1.sta)(Statements.RaiseEvent), (0, _combi_1.sta)(Statements.Raise), (0, _combi_1.sta)(Statements.Ranges), (0, _combi_1.sta)(Statements.ReadDataset), (0, _combi_1.sta)(Statements.ReadLine), (0, _combi_1.sta)(Statements.ReadReport), (0, _combi_1.sta)(Statements.ReadTextpool), (0, _combi_1.sta)(Statements.Receive), (0, _combi_1.sta)(Statements.RefreshControl), (0, _combi_1.sta)(Statements.Refresh), (0, _combi_1.sta)(Statements.Reject), (0, _combi_1.sta)(Statements.Replace), (0, _combi_1.sta)(Statements.Reserve), (0, _combi_1.sta)(Statements.Resume), (0, _combi_1.sta)(Statements.Retry), (0, _combi_1.sta)(Statements.Rollback), (0, _combi_1.sta)(Statements.Scan), (0, _combi_1.sta)(Statements.ScrollList), (0, _combi_1.sta)(Statements.Search), (0, _combi_1.sta)(Statements.SetBit), (0, _combi_1.sta)(Statements.SetBlank), (0, _combi_1.sta)(Statements.SetCountry), (0, _combi_1.sta)(Statements.SetCursor), (0, _combi_1.sta)(Statements.SetDataset), (0, _combi_1.sta)(Statements.SetExtendedCheck), (0, _combi_1.sta)(Statements.SetHandler), (0, _combi_1.sta)(Statements.SetLanguage), (0, _combi_1.sta)(Statements.SetLeft), (0, _combi_1.sta)(Statements.SetLocale), (0, _combi_1.sta)(Statements.SetMargin), (0, _combi_1.sta)(Statements.SetParameter), (0, _combi_1.sta)(Statements.SetPFStatus), (0, _combi_1.sta)(Statements.SetProperty), (0, _combi_1.sta)(Statements.SetRunTime), (0, _combi_1.sta)(Statements.SetScreen), (0, _combi_1.sta)(Statements.SetTitlebar), (0, _combi_1.sta)(Statements.SetUserCommand), (0, _combi_1.sta)(Statements.SetUpdateTask), (0, _combi_1.sta)(Statements.Shift), (0, _combi_1.sta)(Statements.Skip), (0, _combi_1.sta)(Statements.SortDataset), (0, _combi_1.sta)(Statements.Sort), (0, _combi_1.sta)(Statements.Static), (0, _combi_1.sta)(Statements.Split), (0, _combi_1.sta)(Statements.Stop), (0, _combi_1.sta)(Statements.Submit), (0, _combi_1.sta)(Statements.Summary), (0, _combi_1.sta)(Statements.SubtractCorresponding), (0, _combi_1.sta)(Statements.Subtract), (0, _combi_1.sta)(Statements.SuppressDialog), (0, _combi_1.sta)(Statements.Supply), (0, _combi_1.sta)(Statements.Sum), (0, _combi_1.sta)(Statements.SyntaxCheck), (0, _combi_1.sta)(Statements.SystemCall), (0, _combi_1.sta)(Statements.Tables), (0, _combi_1.sta)(Statements.Transfer), (0, _combi_1.sta)(Statements.Translate), (0, _combi_1.sta)(Statements.Type), (0, _combi_1.sta)(Statements.TypePools), (0, _combi_1.sta)(Statements.Uline), (0, _combi_1.sta)(Statements.Unassign), (0, _combi_1.sta)(Statements.Unpack), (0, _combi_1.sta)(Statements.UpdateDatabase), (0, _combi_1.sta)(Statements.Wait), (0, _combi_1.sta)(Statements.Window), (0, _combi_1.sta)(Statements.Write), (0, _combi_1.sta)(Statements.CommitEntities), (0, _combi_1.sta)(Statements.ModifyEntities), (0, _combi_1.sta)(Statements.ReadEntities), (0, _combi_1.sta)(Statements.RollbackEntities), (0, _combi_1.sub)(Structures.Define), (0, _combi_1.sub)(Structures.TestInjection), (0, _combi_1.sub)(Structures.TestSeam), (0, _combi_1.sub)(Structures.TypeMesh), (0, _combi_1.sub)(Structures.Provide), (0, _combi_1.sub)(Structures.CatchSystemExceptions), (0, _combi_1.sub)(Structures.At), (0, _combi_1.sub)(Structures.Constants), (0, _combi_1.sub)(Structures.Types), (0, _combi_1.sub)(Structures.Statics), (0, _combi_1.sub)(Structures.Select), (0, _combi_1.sub)(Structures.Data), (0, _combi_1.sub)(Structures.TypeEnum), (0, _combi_1.sub)(Structures.While), (0, _combi_1.sub)(Structures.With), (0, _combi_1.sub)(Structures.Do), (0, _combi_1.sub)(Structures.ExecSQL));\r\n }\r\n}\r\nexports.Normal = Normal;\r\n//# sourceMappingURL=normal.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/3_structures/structures/normal.js?");
|
|
6147
6169
|
|
|
6148
6170
|
/***/ }),
|
|
6149
6171
|
|
|
@@ -6374,7 +6396,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
|
|
|
6374
6396
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
6375
6397
|
|
|
6376
6398
|
"use strict";
|
|
6377
|
-
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 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?");
|
|
6399
|
+
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?");
|
|
6378
6400
|
|
|
6379
6401
|
/***/ }),
|
|
6380
6402
|
|
|
@@ -7254,7 +7276,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
|
|
|
7254
7276
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
7255
7277
|
|
|
7256
7278
|
"use strict";
|
|
7257
|
-
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.Catch = void 0;\r\nconst Expressions = __webpack_require__(/*! ../../2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst _typed_identifier_1 = __webpack_require__(/*! ../../types/_typed_identifier */ \"./node_modules/@abaplint/core/build/src/abap/types/_typed_identifier.js\");\r\nconst unknown_type_1 = __webpack_require__(/*! ../../types/basic/unknown_type */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/unknown_type.js\");\r\nconst basic_1 = __webpack_require__(/*! ../../types/basic */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/index.js\");\r\nconst target_1 = __webpack_require__(/*! ../expressions/target */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/target.js\");\r\nconst _reference_1 = __webpack_require__(/*! ../_reference */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_reference.js\");\r\nclass Catch {\r\n runSyntax(node, scope, filename) {\r\n var _a, _b;\r\n for (const c of node.findDirectExpressions(Expressions.ClassName)) {\r\n const token = c.getFirstToken();\r\n const className = token.getStr();\r\n const found = scope.existsObject(className);\r\n if (found.found === true && found.id) {\r\n scope.addReference(token, found.id, found.type, filename);\r\n }\r\n else if (scope.getDDIC().inErrorNamespace(className) === false) {\r\n const extra = { ooName: className, ooType: \"Void\" };\r\n scope.addReference(token, undefined, _reference_1.ReferenceType.ObjectOrientedVoidReference, filename, extra);\r\n }\r\n else {\r\n throw new Error(\"CATCH, unknown class \" + className);\r\n }\r\n }\r\n const target = node.findDirectExpression(Expressions.Target);\r\n const firstClassName = (_a = node.findDirectExpression(Expressions.ClassName)) === null || _a === void 0 ? void 0 : _a.getFirstToken().getStr();\r\n if (target === null || target === void 0 ? void 0 : target.findDirectExpression(Expressions.InlineData)) {\r\n const token = (_b = target.findFirstExpression(Expressions.TargetField)) === null || _b === void 0 ? void 0 : _b.getFirstToken();\r\n const found = scope.existsObject(firstClassName);\r\n if (token && found.found === true && firstClassName && found.id) {\r\n const identifier = new _typed_identifier_1.TypedIdentifier(token, filename, new basic_1.ObjectReferenceType(found.id), [\"inline\" /* InlineDefinition */]);\r\n scope.addIdentifier(identifier);\r\n scope.addReference(token, identifier, _reference_1.ReferenceType.DataWriteReference, filename);\r\n }\r\n else if (token && scope.getDDIC().inErrorNamespace(firstClassName) === false) {\r\n const identifier = new _typed_identifier_1.TypedIdentifier(token, filename, new basic_1.VoidType(firstClassName), [\"inline\" /* InlineDefinition */]);\r\n scope.addIdentifier(identifier);\r\n scope.addReference(token, identifier, _reference_1.ReferenceType.DataWriteReference, filename);\r\n }\r\n else if (token) {\r\n const message = \"Catch, could not determine type for \\\"\" + token.getStr() + \"\\\"\";\r\n const identifier = new _typed_identifier_1.TypedIdentifier(token, filename, new unknown_type_1.UnknownType(message), [\"inline\" /* InlineDefinition */]);\r\n scope.addIdentifier(identifier);\r\n scope.addReference(token, identifier, _reference_1.ReferenceType.DataWriteReference, filename);\r\n }\r\n }\r\n else if (target) {\r\n new target_1.Target().runSyntax(target, scope, filename);\r\n }\r\n }\r\n}\r\nexports.Catch = Catch;\r\n//# sourceMappingURL=catch.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/catch.js?");
|
|
7279
|
+
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.Catch = void 0;\r\nconst Expressions = __webpack_require__(/*! ../../2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst _typed_identifier_1 = __webpack_require__(/*! ../../types/_typed_identifier */ \"./node_modules/@abaplint/core/build/src/abap/types/_typed_identifier.js\");\r\nconst unknown_type_1 = __webpack_require__(/*! ../../types/basic/unknown_type */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/unknown_type.js\");\r\nconst basic_1 = __webpack_require__(/*! ../../types/basic */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/index.js\");\r\nconst target_1 = __webpack_require__(/*! ../expressions/target */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/target.js\");\r\nconst _reference_1 = __webpack_require__(/*! ../_reference */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_reference.js\");\r\nclass Catch {\r\n runSyntax(node, scope, filename) {\r\n var _a, _b;\r\n const names = new Set();\r\n for (const c of node.findDirectExpressions(Expressions.ClassName)) {\r\n const token = c.getFirstToken();\r\n const className = token.getStr().toUpperCase();\r\n const found = scope.existsObject(className);\r\n if (found.found === true && found.id) {\r\n scope.addReference(token, found.id, found.type, filename);\r\n }\r\n else if (scope.getDDIC().inErrorNamespace(className) === false) {\r\n const extra = { ooName: className, ooType: \"Void\" };\r\n scope.addReference(token, undefined, _reference_1.ReferenceType.ObjectOrientedVoidReference, filename, extra);\r\n }\r\n else {\r\n throw new Error(\"CATCH, unknown class \" + className);\r\n }\r\n if (names.has(className)) {\r\n throw new Error(\"Duplicate class name in CATCH: \" + className);\r\n }\r\n names.add(className);\r\n }\r\n const target = node.findDirectExpression(Expressions.Target);\r\n const firstClassName = (_a = node.findDirectExpression(Expressions.ClassName)) === null || _a === void 0 ? void 0 : _a.getFirstToken().getStr();\r\n if (target === null || target === void 0 ? void 0 : target.findDirectExpression(Expressions.InlineData)) {\r\n const token = (_b = target.findFirstExpression(Expressions.TargetField)) === null || _b === void 0 ? void 0 : _b.getFirstToken();\r\n const found = scope.existsObject(firstClassName);\r\n if (token && found.found === true && firstClassName && found.id) {\r\n const identifier = new _typed_identifier_1.TypedIdentifier(token, filename, new basic_1.ObjectReferenceType(found.id), [\"inline\" /* InlineDefinition */]);\r\n scope.addIdentifier(identifier);\r\n scope.addReference(token, identifier, _reference_1.ReferenceType.DataWriteReference, filename);\r\n }\r\n else if (token && scope.getDDIC().inErrorNamespace(firstClassName) === false) {\r\n const identifier = new _typed_identifier_1.TypedIdentifier(token, filename, new basic_1.VoidType(firstClassName), [\"inline\" /* InlineDefinition */]);\r\n scope.addIdentifier(identifier);\r\n scope.addReference(token, identifier, _reference_1.ReferenceType.DataWriteReference, filename);\r\n }\r\n else if (token) {\r\n const message = \"Catch, could not determine type for \\\"\" + token.getStr() + \"\\\"\";\r\n const identifier = new _typed_identifier_1.TypedIdentifier(token, filename, new unknown_type_1.UnknownType(message), [\"inline\" /* InlineDefinition */]);\r\n scope.addIdentifier(identifier);\r\n scope.addReference(token, identifier, _reference_1.ReferenceType.DataWriteReference, filename);\r\n }\r\n }\r\n else if (target) {\r\n new target_1.Target().runSyntax(target, scope, filename);\r\n }\r\n }\r\n}\r\nexports.Catch = Catch;\r\n//# sourceMappingURL=catch.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/catch.js?");
|
|
7258
7280
|
|
|
7259
7281
|
/***/ }),
|
|
7260
7282
|
|
|
@@ -7786,6 +7808,17 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
|
|
|
7786
7808
|
|
|
7787
7809
|
/***/ }),
|
|
7788
7810
|
|
|
7811
|
+
/***/ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/loop_at_screen.js":
|
|
7812
|
+
/*!******************************************************************************************!*\
|
|
7813
|
+
!*** ./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/loop_at_screen.js ***!
|
|
7814
|
+
\******************************************************************************************/
|
|
7815
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
7816
|
+
|
|
7817
|
+
"use strict";
|
|
7818
|
+
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.LoopAtScreen = void 0;\r\nconst Expressions = __webpack_require__(/*! ../../2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst target_1 = __webpack_require__(/*! ../expressions/target */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/target.js\");\r\nconst inline_data_1 = __webpack_require__(/*! ../expressions/inline_data */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/inline_data.js\");\r\nconst basic_1 = __webpack_require__(/*! ../../types/basic */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/index.js\");\r\nclass LoopAtScreen {\r\n runSyntax(node, scope, filename) {\r\n const target = node.findDirectExpression(Expressions.Target);\r\n if (target) {\r\n new target_1.Target().runSyntax(target, scope, filename);\r\n }\r\n const inline = target === null || target === void 0 ? void 0 : target.findDirectExpression(Expressions.InlineData);\r\n if (inline) {\r\n new inline_data_1.InlineData().runSyntax(inline, scope, filename, new basic_1.VoidType(\"SCREEN\"));\r\n }\r\n }\r\n}\r\nexports.LoopAtScreen = LoopAtScreen;\r\n//# sourceMappingURL=loop_at_screen.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/loop_at_screen.js?");
|
|
7819
|
+
|
|
7820
|
+
/***/ }),
|
|
7821
|
+
|
|
7789
7822
|
/***/ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/message.js":
|
|
7790
7823
|
/*!***********************************************************************************!*\
|
|
7791
7824
|
!*** ./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/message.js ***!
|
|
@@ -8431,7 +8464,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
|
|
|
8431
8464
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
8432
8465
|
|
|
8433
8466
|
"use strict";
|
|
8434
|
-
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.SyntaxLogic = void 0;\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 issue_1 = __webpack_require__(/*! ../../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst nodes_1 = __webpack_require__(/*! ../nodes */ \"./node_modules/@abaplint/core/build/src/abap/nodes/index.js\");\r\nconst _current_scope_1 = __webpack_require__(/*! ./_current_scope */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_current_scope.js\");\r\nconst _scope_type_1 = __webpack_require__(/*! ./_scope_type */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_scope_type.js\");\r\nconst _object_oriented_1 = __webpack_require__(/*! ./_object_oriented */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_object_oriented.js\");\r\nconst _procedural_1 = __webpack_require__(/*! ./_procedural */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_procedural.js\");\r\nconst objects_1 = __webpack_require__(/*! ../../objects */ \"./node_modules/@abaplint/core/build/src/objects/index.js\");\r\nconst position_1 = __webpack_require__(/*! ../../position */ \"./node_modules/@abaplint/core/build/src/position.js\");\r\nconst data_1 = __webpack_require__(/*! ./structures/data */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/structures/data.js\");\r\nconst type_enum_1 = __webpack_require__(/*! ./structures/type_enum */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/structures/type_enum.js\");\r\nconst types_1 = __webpack_require__(/*! ./structures/types */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/structures/types.js\");\r\nconst statics_1 = __webpack_require__(/*! ./structures/statics */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/structures/statics.js\");\r\nconst constants_1 = __webpack_require__(/*! ./structures/constants */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/structures/constants.js\");\r\nconst class_definition_1 = __webpack_require__(/*! ../types/class_definition */ \"./node_modules/@abaplint/core/build/src/abap/types/class_definition.js\");\r\nconst interface_definition_1 = __webpack_require__(/*! ../types/interface_definition */ \"./node_modules/@abaplint/core/build/src/abap/types/interface_definition.js\");\r\nconst perform_1 = __webpack_require__(/*! ./statements/perform */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/perform.js\");\r\nconst type_1 = __webpack_require__(/*! ./statements/type */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/type.js\");\r\nconst constant_1 = __webpack_require__(/*! ./statements/constant */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/constant.js\");\r\nconst static_1 = __webpack_require__(/*! ./statements/static */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/static.js\");\r\nconst data_2 = __webpack_require__(/*! ./statements/data */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/data.js\");\r\nconst parameter_1 = __webpack_require__(/*! ./statements/parameter */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/parameter.js\");\r\nconst fieldsymbol_1 = __webpack_require__(/*! ./statements/fieldsymbol */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/fieldsymbol.js\");\r\nconst tables_1 = __webpack_require__(/*! ./statements/tables */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/tables.js\");\r\nconst selectoption_1 = __webpack_require__(/*! ./statements/selectoption */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/selectoption.js\");\r\nconst interface_deferred_1 = __webpack_require__(/*! ./statements/interface_deferred */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/interface_deferred.js\");\r\nconst class_deferred_1 = __webpack_require__(/*! ./statements/class_deferred */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/class_deferred.js\");\r\nconst call_1 = __webpack_require__(/*! ./statements/call */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/call.js\");\r\nconst class_implementation_1 = __webpack_require__(/*! ./statements/class_implementation */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/class_implementation.js\");\r\nconst method_implementation_1 = __webpack_require__(/*! ./statements/method_implementation */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/method_implementation.js\");\r\nconst move_1 = __webpack_require__(/*! ./statements/move */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/move.js\");\r\nconst move_corresponding_1 = __webpack_require__(/*! ./statements/move_corresponding */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/move_corresponding.js\");\r\nconst catch_1 = __webpack_require__(/*! ./statements/catch */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/catch.js\");\r\nconst loop_1 = __webpack_require__(/*! ./statements/loop */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/loop.js\");\r\nconst read_table_1 = __webpack_require__(/*! ./statements/read_table */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/read_table.js\");\r\nconst select_1 = __webpack_require__(/*! ./statements/select */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/select.js\");\r\nconst insert_internal_1 = __webpack_require__(/*! ./statements/insert_internal */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/insert_internal.js\");\r\nconst split_1 = __webpack_require__(/*! ./statements/split */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/split.js\");\r\nconst assign_1 = __webpack_require__(/*! ./statements/assign */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/assign.js\");\r\nconst convert_1 = __webpack_require__(/*! ./statements/convert */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/convert.js\");\r\nconst describe_1 = __webpack_require__(/*! ./statements/describe */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/describe.js\");\r\nconst find_1 = __webpack_require__(/*! ./statements/find */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/find.js\");\r\nconst message_1 = __webpack_require__(/*! ./statements/message */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/message.js\");\r\nconst get_time_1 = __webpack_require__(/*! ./statements/get_time */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/get_time.js\");\r\nconst get_parameter_1 = __webpack_require__(/*! ./statements/get_parameter */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/get_parameter.js\");\r\nconst when_type_1 = __webpack_require__(/*! ./statements/when_type */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/when_type.js\");\r\nconst if_1 = __webpack_require__(/*! ./statements/if */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/if.js\");\r\nconst else_if_1 = __webpack_require__(/*! ./statements/else_if */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/else_if.js\");\r\nconst append_1 = __webpack_require__(/*! ./statements/append */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/append.js\");\r\nconst selection_screen_1 = __webpack_require__(/*! ./statements/selection_screen */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/selection_screen.js\");\r\nconst ranges_1 = __webpack_require__(/*! ./statements/ranges */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/ranges.js\");\r\nconst write_1 = __webpack_require__(/*! ./statements/write */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/write.js\");\r\nconst case_1 = __webpack_require__(/*! ./statements/case */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/case.js\");\r\nconst create_object_1 = __webpack_require__(/*! ./statements/create_object */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/create_object.js\");\r\nconst do_1 = __webpack_require__(/*! ./statements/do */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/do.js\");\r\nconst concatenate_1 = __webpack_require__(/*! ./statements/concatenate */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/concatenate.js\");\r\nconst call_function_1 = __webpack_require__(/*! ./statements/call_function */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/call_function.js\");\r\nconst clear_1 = __webpack_require__(/*! ./statements/clear */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/clear.js\");\r\nconst replace_1 = __webpack_require__(/*! ./statements/replace */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/replace.js\");\r\nconst get_bit_1 = __webpack_require__(/*! ./statements/get_bit */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/get_bit.js\");\r\nconst raise_1 = __webpack_require__(/*! ./statements/raise */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/raise.js\");\r\nconst delete_internal_1 = __webpack_require__(/*! ./statements/delete_internal */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/delete_internal.js\");\r\nconst receive_1 = __webpack_require__(/*! ./statements/receive */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/receive.js\");\r\nconst when_1 = __webpack_require__(/*! ./statements/when */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/when.js\");\r\nconst create_data_1 = __webpack_require__(/*! ./statements/create_data */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/create_data.js\");\r\nconst call_transformation_1 = __webpack_require__(/*! ./statements/call_transformation */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/call_transformation.js\");\r\nconst get_locale_1 = __webpack_require__(/*! ./statements/get_locale */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/get_locale.js\");\r\nconst set_locale_1 = __webpack_require__(/*! ./statements/set_locale */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/set_locale.js\");\r\nconst sort_1 = __webpack_require__(/*! ./statements/sort */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/sort.js\");\r\nconst read_report_1 = __webpack_require__(/*! ./statements/read_report */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/read_report.js\");\r\nconst authority_check_1 = __webpack_require__(/*! ./statements/authority_check */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/authority_check.js\");\r\nconst insert_report_1 = __webpack_require__(/*! ./statements/insert_report */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/insert_report.js\");\r\nconst get_reference_1 = __webpack_require__(/*! ./statements/get_reference */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/get_reference.js\");\r\nconst insert_database_1 = __webpack_require__(/*! ./statements/insert_database */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/insert_database.js\");\r\nconst delete_database_1 = __webpack_require__(/*! ./statements/delete_database */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/delete_database.js\");\r\nconst import_dynpro_1 = __webpack_require__(/*! ./statements/import_dynpro */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/import_dynpro.js\");\r\nconst syntax_check_1 = __webpack_require__(/*! ./statements/syntax_check */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/syntax_check.js\");\r\nconst import_1 = __webpack_require__(/*! ./statements/import */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/import.js\");\r\nconst export_1 = __webpack_require__(/*! ./statements/export */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/export.js\");\r\nconst scan_1 = __webpack_require__(/*! ./statements/scan */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/scan.js\");\r\nconst submit_1 = __webpack_require__(/*! ./statements/submit */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/submit.js\");\r\nconst open_dataset_1 = __webpack_require__(/*! ./statements/open_dataset */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/open_dataset.js\");\r\nconst close_dataset_1 = __webpack_require__(/*! ./statements/close_dataset */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/close_dataset.js\");\r\nconst get_run_time_1 = __webpack_require__(/*! ./statements/get_run_time */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/get_run_time.js\");\r\nconst update_database_1 = __webpack_require__(/*! ./statements/update_database */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/update_database.js\");\r\nconst add_1 = __webpack_require__(/*! ./statements/add */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/add.js\");\r\nconst subtract_1 = __webpack_require__(/*! ./statements/subtract */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/subtract.js\");\r\nconst add_corresponding_1 = __webpack_require__(/*! ./statements/add_corresponding */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/add_corresponding.js\");\r\nconst subtract_corresponding_1 = __webpack_require__(/*! ./statements/subtract_corresponding */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/subtract_corresponding.js\");\r\nconst multiply_1 = __webpack_require__(/*! ./statements/multiply */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/multiply.js\");\r\nconst divide_1 = __webpack_require__(/*! ./statements/divide */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/divide.js\");\r\nconst condense_1 = __webpack_require__(/*! ./statements/condense */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/condense.js\");\r\nconst controls_1 = __webpack_require__(/*! ./statements/controls */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/controls.js\");\r\nconst while_1 = __webpack_require__(/*! ./statements/while */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/while.js\");\r\nconst select_loop_1 = __webpack_require__(/*! ./statements/select_loop */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/select_loop.js\");\r\nconst check_1 = __webpack_require__(/*! ./statements/check */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/check.js\");\r\nconst log_point_1 = __webpack_require__(/*! ./statements/log_point */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/log_point.js\");\r\nconst severity_1 = __webpack_require__(/*! ../../severity */ \"./node_modules/@abaplint/core/build/src/severity.js\");\r\nconst raise_event_1 = __webpack_require__(/*! ./statements/raise_event */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/raise_event.js\");\r\nconst form_1 = __webpack_require__(/*! ./statements/form */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/form.js\");\r\nconst assert_1 = __webpack_require__(/*! ./statements/assert */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/assert.js\");\r\nconst set_parameter_1 = __webpack_require__(/*! ./statements/set_parameter */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/set_parameter.js\");\r\nconst class_local_friends_1 = __webpack_require__(/*! ./statements/class_local_friends */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/class_local_friends.js\");\r\nconst get_badi_1 = __webpack_require__(/*! ./statements/get_badi */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/get_badi.js\");\r\nconst with_1 = __webpack_require__(/*! ./statements/with */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/with.js\");\r\nconst with_loop_1 = __webpack_require__(/*! ./statements/with_loop */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/with_loop.js\");\r\nconst system_call_1 = __webpack_require__(/*! ./statements/system_call */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/system_call.js\");\r\nconst collect_1 = __webpack_require__(/*! ./statements/collect */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/collect.js\");\r\nconst transfer_1 = __webpack_require__(/*! ./statements/transfer */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/transfer.js\");\r\nconst modify_database_1 = __webpack_require__(/*! ./statements/modify_database */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/modify_database.js\");\r\nconst truncate_dataset_1 = __webpack_require__(/*! ./statements/truncate_dataset */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/truncate_dataset.js\");\r\nconst call_badi_1 = __webpack_require__(/*! ./statements/call_badi */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/call_badi.js\");\r\nconst pack_1 = __webpack_require__(/*! ./statements/pack */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/pack.js\");\r\nconst unpack_1 = __webpack_require__(/*! ./statements/unpack */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/unpack.js\");\r\nconst format_1 = __webpack_require__(/*! ./statements/format */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/format.js\");\r\nconst set_pf_status_1 = __webpack_require__(/*! ./statements/set_pf_status */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/set_pf_status.js\");\r\nconst set_titlebar_1 = __webpack_require__(/*! ./statements/set_titlebar */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/set_titlebar.js\");\r\nconst call_transaction_1 = __webpack_require__(/*! ./statements/call_transaction */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/call_transaction.js\");\r\nconst set_handler_1 = __webpack_require__(/*! ./statements/set_handler */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/set_handler.js\");\r\nconst wait_1 = __webpack_require__(/*! ./statements/wait */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/wait.js\");\r\nconst delete_report_1 = __webpack_require__(/*! ./statements/delete_report */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/delete_report.js\");\r\nconst shift_1 = __webpack_require__(/*! ./statements/shift */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/shift.js\");\r\nconst set_bit_1 = __webpack_require__(/*! ./statements/set_bit */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/set_bit.js\");\r\nconst modify_screen_1 = __webpack_require__(/*! ./statements/modify_screen */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/modify_screen.js\");\r\nconst delete_cluster_1 = __webpack_require__(/*! ./statements/delete_cluster */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/delete_cluster.js\");\r\nconst unassign_1 = __webpack_require__(/*! ./statements/unassign */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/unassign.js\");\r\nconst insert_textpool_1 = __webpack_require__(/*! ./statements/insert_textpool */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/insert_textpool.js\");\r\nconst get_cursor_1 = __webpack_require__(/*! ./statements/get_cursor */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/get_cursor.js\");\r\n// -----------------------------------\r\nconst map = {};\r\nfunction addToMap(handler) {\r\n if (map[handler.constructor.name] !== undefined) {\r\n throw new Error(\"syntax.ts duplicate statement syntax handler\");\r\n }\r\n map[handler.constructor.name] = handler;\r\n}\r\nif (Object.keys(map).length === 0) {\r\n addToMap(new interface_deferred_1.InterfaceDeferred());\r\n addToMap(new perform_1.Perform());\r\n addToMap(new class_deferred_1.ClassDeferred());\r\n addToMap(new call_1.Call());\r\n addToMap(new set_handler_1.SetHandler());\r\n addToMap(new class_implementation_1.ClassImplementation());\r\n addToMap(new method_implementation_1.MethodImplementation());\r\n addToMap(new move_1.Move());\r\n addToMap(new get_badi_1.GetBadi());\r\n addToMap(new call_badi_1.CallBadi());\r\n addToMap(new get_cursor_1.GetCursor());\r\n addToMap(new replace_1.Replace());\r\n addToMap(new truncate_dataset_1.TruncateDataset());\r\n addToMap(new assert_1.Assert());\r\n addToMap(new catch_1.Catch());\r\n addToMap(new loop_1.Loop());\r\n addToMap(new set_pf_status_1.SetPFStatus());\r\n addToMap(new set_titlebar_1.SetTitlebar());\r\n addToMap(new submit_1.Submit());\r\n addToMap(new insert_textpool_1.InsertTextpool());\r\n addToMap(new read_table_1.ReadTable());\r\n addToMap(new syntax_check_1.SyntaxCheck());\r\n addToMap(new delete_report_1.DeleteReport());\r\n addToMap(new import_1.Import());\r\n addToMap(new collect_1.Collect());\r\n addToMap(new export_1.Export());\r\n addToMap(new scan_1.Scan());\r\n addToMap(new transfer_1.Transfer());\r\n addToMap(new split_1.Split());\r\n addToMap(new call_function_1.CallFunction());\r\n addToMap(new delete_internal_1.DeleteInternal());\r\n addToMap(new delete_cluster_1.DeleteCluster());\r\n addToMap(new clear_1.Clear());\r\n addToMap(new receive_1.Receive());\r\n addToMap(new get_bit_1.GetBit());\r\n addToMap(new class_local_friends_1.ClassLocalFriends());\r\n addToMap(new select_1.Select());\r\n addToMap(new modify_screen_1.ModifyScreen());\r\n addToMap(new insert_internal_1.InsertInternal());\r\n addToMap(new pack_1.Pack());\r\n addToMap(new unpack_1.Unpack());\r\n addToMap(new assign_1.Assign());\r\n addToMap(new set_locale_1.SetLocale());\r\n addToMap(new set_parameter_1.SetParameter());\r\n addToMap(new convert_1.Convert());\r\n addToMap(new controls_1.Controls());\r\n addToMap(new when_1.When());\r\n addToMap(new insert_database_1.InsertDatabase());\r\n addToMap(new delete_database_1.DeleteDatabase());\r\n addToMap(new update_database_1.UpdateDatabase());\r\n addToMap(new sort_1.Sort());\r\n addToMap(new wait_1.Wait());\r\n addToMap(new condense_1.Condense());\r\n addToMap(new set_bit_1.SetBit());\r\n addToMap(new open_dataset_1.OpenDataset());\r\n addToMap(new close_dataset_1.CloseDataset());\r\n addToMap(new read_report_1.ReadReport());\r\n addToMap(new do_1.Do());\r\n addToMap(new describe_1.Describe());\r\n addToMap(new find_1.Find());\r\n addToMap(new message_1.Message());\r\n addToMap(new system_call_1.SystemCall());\r\n addToMap(new get_time_1.GetTime());\r\n addToMap(new unassign_1.Unassign());\r\n addToMap(new get_parameter_1.GetParameter());\r\n addToMap(new format_1.Format());\r\n addToMap(new when_type_1.WhenType());\r\n addToMap(new if_1.If());\r\n addToMap(new log_point_1.LogPoint());\r\n addToMap(new while_1.While());\r\n addToMap(new with_1.With());\r\n addToMap(new with_loop_1.WithLoop());\r\n addToMap(new call_transformation_1.CallTransformation());\r\n addToMap(new call_transaction_1.CallTransaction());\r\n addToMap(new get_locale_1.GetLocale());\r\n addToMap(new get_reference_1.GetReference());\r\n addToMap(new else_if_1.ElseIf());\r\n addToMap(new get_run_time_1.GetRunTime());\r\n addToMap(new create_object_1.CreateObject());\r\n addToMap(new import_dynpro_1.ImportDynpro());\r\n addToMap(new create_data_1.CreateData());\r\n addToMap(new case_1.Case());\r\n addToMap(new shift_1.Shift());\r\n addToMap(new raise_1.Raise());\r\n addToMap(new concatenate_1.Concatenate());\r\n addToMap(new append_1.Append());\r\n addToMap(new select_loop_1.SelectLoop());\r\n addToMap(new write_1.Write());\r\n addToMap(new move_corresponding_1.MoveCorresponding());\r\n addToMap(new authority_check_1.AuthorityCheck());\r\n addToMap(new insert_report_1.InsertReport());\r\n addToMap(new selection_screen_1.SelectionScreen());\r\n addToMap(new ranges_1.Ranges());\r\n addToMap(new add_1.Add());\r\n addToMap(new raise_event_1.RaiseEvent());\r\n addToMap(new subtract_1.Subtract());\r\n addToMap(new add_corresponding_1.AddCorresponding());\r\n addToMap(new subtract_corresponding_1.SubtractCorresponding());\r\n addToMap(new multiply_1.Multiply());\r\n addToMap(new divide_1.Divide());\r\n addToMap(new check_1.Check());\r\n addToMap(new modify_database_1.ModifyDatabase());\r\n addToMap(new form_1.Form());\r\n addToMap(new selectoption_1.SelectOption());\r\n addToMap(new tables_1.Tables());\r\n addToMap(new parameter_1.Parameter());\r\n addToMap(new fieldsymbol_1.FieldSymbol());\r\n}\r\n// -----------------------------------\r\nclass SyntaxLogic {\r\n constructor(reg, object) {\r\n this.reg = reg;\r\n this.issues = [];\r\n this.object = object;\r\n this.scope = _current_scope_1.CurrentScope.buildDefault(this.reg, object);\r\n this.helpers = {\r\n oooc: new _object_oriented_1.ObjectOriented(this.scope),\r\n proc: new _procedural_1.Procedural(this.reg, this.scope),\r\n };\r\n }\r\n run() {\r\n if (this.object.syntaxResult !== undefined) {\r\n return this.object.syntaxResult;\r\n }\r\n this.issues = [];\r\n this.reg.getDDICReferences().clear(this.object);\r\n if (this.object instanceof objects_1.Program && this.object.isInclude()) {\r\n // todo, show some kind of error?\r\n return { issues: [], spaghetti: this.scope.pop(new position_1.Position(Number.MAX_SAFE_INTEGER, Number.MAX_SAFE_INTEGER)) };\r\n }\r\n this.traverseObject();\r\n for (;;) {\r\n const spaghetti = this.scope.pop(new position_1.Position(Number.MAX_SAFE_INTEGER, Number.MAX_SAFE_INTEGER)); // pop built-in scopes\r\n if (spaghetti.getTop().getIdentifier().stype === _scope_type_1.ScopeType.BuiltIn) {\r\n const result = { issues: this.issues, spaghetti };\r\n this.object.syntaxResult = result;\r\n return result;\r\n }\r\n }\r\n }\r\n /////////////////////////////\r\n traverseObject() {\r\n const traversal = this.object.getSequencedFiles();\r\n if (this.object instanceof objects_1.Program\r\n || this.object instanceof objects_1.FunctionGroup) {\r\n for (const f of this.object.getSequencedFiles()) {\r\n // add FORM defintions to the _global object scope\r\n this.helpers.proc.addAllFormDefinitions(f, this.object);\r\n }\r\n const main = this.object.getMainABAPFile();\r\n if (main !== undefined) {\r\n let stype = _scope_type_1.ScopeType.Program;\r\n if (this.object instanceof objects_1.FunctionGroup) {\r\n stype = _scope_type_1.ScopeType.FunctionGroup;\r\n }\r\n this.scope.push(stype, this.object.getName(), new position_1.Position(1, 1), main.getFilename());\r\n }\r\n }\r\n else if (this.object instanceof objects_1.TypePool) {\r\n const main = this.object.getMainABAPFile();\r\n if (main !== undefined) {\r\n this.scope.push(_scope_type_1.ScopeType.TypePool, this.object.getName(), new position_1.Position(1, 1), main.getFilename());\r\n }\r\n }\r\n for (const file of traversal) {\r\n this.currentFile = file;\r\n const structure = this.currentFile.getStructure();\r\n if (structure === undefined) {\r\n return this.scope;\r\n }\r\n else {\r\n this.traverse(structure);\r\n }\r\n }\r\n return this.scope;\r\n }\r\n newIssue(token, message) {\r\n const issue = issue_1.Issue.atToken(this.currentFile, token, message, \"check_syntax\", severity_1.Severity.Error);\r\n this.issues.push(issue);\r\n }\r\n traverse(node) {\r\n for (const child of node.getChildren()) {\r\n const isStructure = child instanceof nodes_1.StructureNode;\r\n const isStatement = child instanceof nodes_1.StatementNode;\r\n try {\r\n if (isStructure) {\r\n const gotoNext = this.updateScopeStructure(child);\r\n if (gotoNext === true) {\r\n continue;\r\n }\r\n }\r\n else if (isStatement) {\r\n this.updateScopeStatement(child);\r\n }\r\n }\r\n catch (e) {\r\n this.newIssue(child.getFirstToken(), e.message);\r\n break;\r\n }\r\n // walk into INCLUDEs\r\n if (isStatement && child.get() instanceof Statements.Include) {\r\n const file = this.helpers.proc.findInclude(child, this.object);\r\n if (file !== undefined && file.getStructure() !== undefined) {\r\n const old = this.currentFile;\r\n this.currentFile = file;\r\n this.traverse(file.getStructure());\r\n this.currentFile = old;\r\n }\r\n }\r\n if (isStructure || isStatement) {\r\n this.traverse(child);\r\n }\r\n }\r\n }\r\n // if this returns true, then the traversal should continue with next child\r\n updateScopeStructure(node) {\r\n const filename = this.currentFile.getFilename();\r\n const stru = node.get();\r\n if (stru instanceof Structures.ClassDefinition) {\r\n new class_definition_1.ClassDefinition(node, filename, this.scope);\r\n return true;\r\n }\r\n else if (stru instanceof Structures.Interface) {\r\n new interface_definition_1.InterfaceDefinition(node, filename, this.scope);\r\n return true;\r\n }\r\n else if (stru instanceof Structures.Types) {\r\n this.scope.addType(new types_1.Types().runSyntax(node, this.scope, filename));\r\n return true;\r\n }\r\n else if (stru instanceof Structures.Constants) {\r\n this.scope.addIdentifier(new constants_1.Constants().runSyntax(node, this.scope, filename).type);\r\n return true;\r\n }\r\n else if (stru instanceof Structures.Data) {\r\n this.scope.addIdentifier(new data_1.Data().runSyntax(node, this.scope, filename));\r\n return true;\r\n }\r\n else if (stru instanceof Structures.Statics) {\r\n this.scope.addIdentifier(new statics_1.Statics().runSyntax(node, this.scope, filename));\r\n return true;\r\n }\r\n else if (stru instanceof Structures.TypeEnum) {\r\n const values = new type_enum_1.TypeEnum().runSyntax(node, this.scope, filename).values;\r\n this.scope.addList(values);\r\n return true;\r\n }\r\n return false;\r\n }\r\n updateScopeStatement(node) {\r\n const filename = this.currentFile.getFilename();\r\n const s = node.get();\r\n // todo, refactor\r\n if (s instanceof Statements.Type) {\r\n this.scope.addType(new type_1.Type().runSyntax(node, this.scope, filename));\r\n return;\r\n }\r\n else if (s instanceof Statements.Constant) {\r\n this.scope.addIdentifier(new constant_1.Constant().runSyntax(node, this.scope, filename));\r\n return;\r\n }\r\n else if (s instanceof Statements.Static) {\r\n this.scope.addIdentifier(new static_1.Static().runSyntax(node, this.scope, filename));\r\n return;\r\n }\r\n else if (s instanceof Statements.Data) {\r\n this.scope.addIdentifier(new data_2.Data().runSyntax(node, this.scope, filename));\r\n return;\r\n }\r\n const name = s.constructor.name;\r\n if (map[name]) {\r\n map[name].runSyntax(node, this.scope, filename);\r\n return;\r\n }\r\n if (s instanceof Statements.FunctionModule) {\r\n this.helpers.proc.findFunctionScope(this.object, node, filename);\r\n }\r\n else if (s instanceof Statements.EndForm\r\n || s instanceof Statements.EndFunction\r\n || s instanceof Statements.EndClass\r\n || s instanceof Statements.EndInterface) {\r\n this.scope.pop(node.getLastToken().getEnd());\r\n }\r\n else if (s instanceof Statements.EndMethod) {\r\n this.scope.pop(node.getLastToken().getEnd());\r\n if (this.scope.getType() === _scope_type_1.ScopeType.MethodInstance) {\r\n this.scope.pop(node.getLastToken().getEnd());\r\n }\r\n }\r\n }\r\n}\r\nexports.SyntaxLogic = SyntaxLogic;\r\n//# sourceMappingURL=syntax.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/5_syntax/syntax.js?");
|
|
8467
|
+
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.SyntaxLogic = void 0;\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 issue_1 = __webpack_require__(/*! ../../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst nodes_1 = __webpack_require__(/*! ../nodes */ \"./node_modules/@abaplint/core/build/src/abap/nodes/index.js\");\r\nconst _current_scope_1 = __webpack_require__(/*! ./_current_scope */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_current_scope.js\");\r\nconst _scope_type_1 = __webpack_require__(/*! ./_scope_type */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_scope_type.js\");\r\nconst _object_oriented_1 = __webpack_require__(/*! ./_object_oriented */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_object_oriented.js\");\r\nconst _procedural_1 = __webpack_require__(/*! ./_procedural */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_procedural.js\");\r\nconst objects_1 = __webpack_require__(/*! ../../objects */ \"./node_modules/@abaplint/core/build/src/objects/index.js\");\r\nconst position_1 = __webpack_require__(/*! ../../position */ \"./node_modules/@abaplint/core/build/src/position.js\");\r\nconst data_1 = __webpack_require__(/*! ./structures/data */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/structures/data.js\");\r\nconst type_enum_1 = __webpack_require__(/*! ./structures/type_enum */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/structures/type_enum.js\");\r\nconst types_1 = __webpack_require__(/*! ./structures/types */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/structures/types.js\");\r\nconst statics_1 = __webpack_require__(/*! ./structures/statics */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/structures/statics.js\");\r\nconst constants_1 = __webpack_require__(/*! ./structures/constants */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/structures/constants.js\");\r\nconst class_definition_1 = __webpack_require__(/*! ../types/class_definition */ \"./node_modules/@abaplint/core/build/src/abap/types/class_definition.js\");\r\nconst interface_definition_1 = __webpack_require__(/*! ../types/interface_definition */ \"./node_modules/@abaplint/core/build/src/abap/types/interface_definition.js\");\r\nconst perform_1 = __webpack_require__(/*! ./statements/perform */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/perform.js\");\r\nconst type_1 = __webpack_require__(/*! ./statements/type */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/type.js\");\r\nconst constant_1 = __webpack_require__(/*! ./statements/constant */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/constant.js\");\r\nconst static_1 = __webpack_require__(/*! ./statements/static */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/static.js\");\r\nconst data_2 = __webpack_require__(/*! ./statements/data */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/data.js\");\r\nconst parameter_1 = __webpack_require__(/*! ./statements/parameter */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/parameter.js\");\r\nconst fieldsymbol_1 = __webpack_require__(/*! ./statements/fieldsymbol */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/fieldsymbol.js\");\r\nconst tables_1 = __webpack_require__(/*! ./statements/tables */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/tables.js\");\r\nconst selectoption_1 = __webpack_require__(/*! ./statements/selectoption */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/selectoption.js\");\r\nconst interface_deferred_1 = __webpack_require__(/*! ./statements/interface_deferred */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/interface_deferred.js\");\r\nconst class_deferred_1 = __webpack_require__(/*! ./statements/class_deferred */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/class_deferred.js\");\r\nconst call_1 = __webpack_require__(/*! ./statements/call */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/call.js\");\r\nconst class_implementation_1 = __webpack_require__(/*! ./statements/class_implementation */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/class_implementation.js\");\r\nconst method_implementation_1 = __webpack_require__(/*! ./statements/method_implementation */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/method_implementation.js\");\r\nconst move_1 = __webpack_require__(/*! ./statements/move */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/move.js\");\r\nconst move_corresponding_1 = __webpack_require__(/*! ./statements/move_corresponding */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/move_corresponding.js\");\r\nconst catch_1 = __webpack_require__(/*! ./statements/catch */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/catch.js\");\r\nconst loop_1 = __webpack_require__(/*! ./statements/loop */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/loop.js\");\r\nconst read_table_1 = __webpack_require__(/*! ./statements/read_table */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/read_table.js\");\r\nconst select_1 = __webpack_require__(/*! ./statements/select */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/select.js\");\r\nconst insert_internal_1 = __webpack_require__(/*! ./statements/insert_internal */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/insert_internal.js\");\r\nconst split_1 = __webpack_require__(/*! ./statements/split */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/split.js\");\r\nconst assign_1 = __webpack_require__(/*! ./statements/assign */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/assign.js\");\r\nconst convert_1 = __webpack_require__(/*! ./statements/convert */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/convert.js\");\r\nconst describe_1 = __webpack_require__(/*! ./statements/describe */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/describe.js\");\r\nconst find_1 = __webpack_require__(/*! ./statements/find */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/find.js\");\r\nconst message_1 = __webpack_require__(/*! ./statements/message */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/message.js\");\r\nconst get_time_1 = __webpack_require__(/*! ./statements/get_time */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/get_time.js\");\r\nconst get_parameter_1 = __webpack_require__(/*! ./statements/get_parameter */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/get_parameter.js\");\r\nconst when_type_1 = __webpack_require__(/*! ./statements/when_type */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/when_type.js\");\r\nconst if_1 = __webpack_require__(/*! ./statements/if */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/if.js\");\r\nconst else_if_1 = __webpack_require__(/*! ./statements/else_if */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/else_if.js\");\r\nconst append_1 = __webpack_require__(/*! ./statements/append */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/append.js\");\r\nconst selection_screen_1 = __webpack_require__(/*! ./statements/selection_screen */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/selection_screen.js\");\r\nconst ranges_1 = __webpack_require__(/*! ./statements/ranges */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/ranges.js\");\r\nconst write_1 = __webpack_require__(/*! ./statements/write */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/write.js\");\r\nconst case_1 = __webpack_require__(/*! ./statements/case */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/case.js\");\r\nconst create_object_1 = __webpack_require__(/*! ./statements/create_object */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/create_object.js\");\r\nconst do_1 = __webpack_require__(/*! ./statements/do */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/do.js\");\r\nconst concatenate_1 = __webpack_require__(/*! ./statements/concatenate */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/concatenate.js\");\r\nconst call_function_1 = __webpack_require__(/*! ./statements/call_function */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/call_function.js\");\r\nconst clear_1 = __webpack_require__(/*! ./statements/clear */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/clear.js\");\r\nconst replace_1 = __webpack_require__(/*! ./statements/replace */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/replace.js\");\r\nconst get_bit_1 = __webpack_require__(/*! ./statements/get_bit */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/get_bit.js\");\r\nconst raise_1 = __webpack_require__(/*! ./statements/raise */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/raise.js\");\r\nconst delete_internal_1 = __webpack_require__(/*! ./statements/delete_internal */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/delete_internal.js\");\r\nconst receive_1 = __webpack_require__(/*! ./statements/receive */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/receive.js\");\r\nconst when_1 = __webpack_require__(/*! ./statements/when */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/when.js\");\r\nconst create_data_1 = __webpack_require__(/*! ./statements/create_data */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/create_data.js\");\r\nconst call_transformation_1 = __webpack_require__(/*! ./statements/call_transformation */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/call_transformation.js\");\r\nconst get_locale_1 = __webpack_require__(/*! ./statements/get_locale */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/get_locale.js\");\r\nconst set_locale_1 = __webpack_require__(/*! ./statements/set_locale */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/set_locale.js\");\r\nconst sort_1 = __webpack_require__(/*! ./statements/sort */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/sort.js\");\r\nconst read_report_1 = __webpack_require__(/*! ./statements/read_report */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/read_report.js\");\r\nconst authority_check_1 = __webpack_require__(/*! ./statements/authority_check */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/authority_check.js\");\r\nconst insert_report_1 = __webpack_require__(/*! ./statements/insert_report */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/insert_report.js\");\r\nconst get_reference_1 = __webpack_require__(/*! ./statements/get_reference */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/get_reference.js\");\r\nconst insert_database_1 = __webpack_require__(/*! ./statements/insert_database */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/insert_database.js\");\r\nconst delete_database_1 = __webpack_require__(/*! ./statements/delete_database */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/delete_database.js\");\r\nconst import_dynpro_1 = __webpack_require__(/*! ./statements/import_dynpro */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/import_dynpro.js\");\r\nconst syntax_check_1 = __webpack_require__(/*! ./statements/syntax_check */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/syntax_check.js\");\r\nconst import_1 = __webpack_require__(/*! ./statements/import */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/import.js\");\r\nconst export_1 = __webpack_require__(/*! ./statements/export */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/export.js\");\r\nconst scan_1 = __webpack_require__(/*! ./statements/scan */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/scan.js\");\r\nconst submit_1 = __webpack_require__(/*! ./statements/submit */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/submit.js\");\r\nconst open_dataset_1 = __webpack_require__(/*! ./statements/open_dataset */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/open_dataset.js\");\r\nconst close_dataset_1 = __webpack_require__(/*! ./statements/close_dataset */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/close_dataset.js\");\r\nconst get_run_time_1 = __webpack_require__(/*! ./statements/get_run_time */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/get_run_time.js\");\r\nconst update_database_1 = __webpack_require__(/*! ./statements/update_database */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/update_database.js\");\r\nconst add_1 = __webpack_require__(/*! ./statements/add */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/add.js\");\r\nconst subtract_1 = __webpack_require__(/*! ./statements/subtract */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/subtract.js\");\r\nconst add_corresponding_1 = __webpack_require__(/*! ./statements/add_corresponding */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/add_corresponding.js\");\r\nconst subtract_corresponding_1 = __webpack_require__(/*! ./statements/subtract_corresponding */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/subtract_corresponding.js\");\r\nconst multiply_1 = __webpack_require__(/*! ./statements/multiply */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/multiply.js\");\r\nconst divide_1 = __webpack_require__(/*! ./statements/divide */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/divide.js\");\r\nconst condense_1 = __webpack_require__(/*! ./statements/condense */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/condense.js\");\r\nconst controls_1 = __webpack_require__(/*! ./statements/controls */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/controls.js\");\r\nconst while_1 = __webpack_require__(/*! ./statements/while */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/while.js\");\r\nconst select_loop_1 = __webpack_require__(/*! ./statements/select_loop */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/select_loop.js\");\r\nconst check_1 = __webpack_require__(/*! ./statements/check */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/check.js\");\r\nconst log_point_1 = __webpack_require__(/*! ./statements/log_point */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/log_point.js\");\r\nconst severity_1 = __webpack_require__(/*! ../../severity */ \"./node_modules/@abaplint/core/build/src/severity.js\");\r\nconst raise_event_1 = __webpack_require__(/*! ./statements/raise_event */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/raise_event.js\");\r\nconst form_1 = __webpack_require__(/*! ./statements/form */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/form.js\");\r\nconst assert_1 = __webpack_require__(/*! ./statements/assert */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/assert.js\");\r\nconst set_parameter_1 = __webpack_require__(/*! ./statements/set_parameter */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/set_parameter.js\");\r\nconst class_local_friends_1 = __webpack_require__(/*! ./statements/class_local_friends */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/class_local_friends.js\");\r\nconst get_badi_1 = __webpack_require__(/*! ./statements/get_badi */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/get_badi.js\");\r\nconst with_1 = __webpack_require__(/*! ./statements/with */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/with.js\");\r\nconst with_loop_1 = __webpack_require__(/*! ./statements/with_loop */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/with_loop.js\");\r\nconst system_call_1 = __webpack_require__(/*! ./statements/system_call */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/system_call.js\");\r\nconst collect_1 = __webpack_require__(/*! ./statements/collect */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/collect.js\");\r\nconst transfer_1 = __webpack_require__(/*! ./statements/transfer */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/transfer.js\");\r\nconst modify_database_1 = __webpack_require__(/*! ./statements/modify_database */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/modify_database.js\");\r\nconst truncate_dataset_1 = __webpack_require__(/*! ./statements/truncate_dataset */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/truncate_dataset.js\");\r\nconst call_badi_1 = __webpack_require__(/*! ./statements/call_badi */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/call_badi.js\");\r\nconst pack_1 = __webpack_require__(/*! ./statements/pack */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/pack.js\");\r\nconst unpack_1 = __webpack_require__(/*! ./statements/unpack */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/unpack.js\");\r\nconst format_1 = __webpack_require__(/*! ./statements/format */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/format.js\");\r\nconst set_pf_status_1 = __webpack_require__(/*! ./statements/set_pf_status */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/set_pf_status.js\");\r\nconst set_titlebar_1 = __webpack_require__(/*! ./statements/set_titlebar */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/set_titlebar.js\");\r\nconst call_transaction_1 = __webpack_require__(/*! ./statements/call_transaction */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/call_transaction.js\");\r\nconst set_handler_1 = __webpack_require__(/*! ./statements/set_handler */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/set_handler.js\");\r\nconst wait_1 = __webpack_require__(/*! ./statements/wait */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/wait.js\");\r\nconst delete_report_1 = __webpack_require__(/*! ./statements/delete_report */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/delete_report.js\");\r\nconst shift_1 = __webpack_require__(/*! ./statements/shift */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/shift.js\");\r\nconst set_bit_1 = __webpack_require__(/*! ./statements/set_bit */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/set_bit.js\");\r\nconst modify_screen_1 = __webpack_require__(/*! ./statements/modify_screen */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/modify_screen.js\");\r\nconst delete_cluster_1 = __webpack_require__(/*! ./statements/delete_cluster */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/delete_cluster.js\");\r\nconst unassign_1 = __webpack_require__(/*! ./statements/unassign */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/unassign.js\");\r\nconst insert_textpool_1 = __webpack_require__(/*! ./statements/insert_textpool */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/insert_textpool.js\");\r\nconst get_cursor_1 = __webpack_require__(/*! ./statements/get_cursor */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/get_cursor.js\");\r\nconst loop_at_screen_1 = __webpack_require__(/*! ./statements/loop_at_screen */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/loop_at_screen.js\");\r\n// -----------------------------------\r\nconst map = {};\r\nfunction addToMap(handler) {\r\n if (map[handler.constructor.name] !== undefined) {\r\n throw new Error(\"syntax.ts duplicate statement syntax handler\");\r\n }\r\n map[handler.constructor.name] = handler;\r\n}\r\nif (Object.keys(map).length === 0) {\r\n addToMap(new interface_deferred_1.InterfaceDeferred());\r\n addToMap(new perform_1.Perform());\r\n addToMap(new class_deferred_1.ClassDeferred());\r\n addToMap(new call_1.Call());\r\n addToMap(new set_handler_1.SetHandler());\r\n addToMap(new class_implementation_1.ClassImplementation());\r\n addToMap(new method_implementation_1.MethodImplementation());\r\n addToMap(new move_1.Move());\r\n addToMap(new get_badi_1.GetBadi());\r\n addToMap(new call_badi_1.CallBadi());\r\n addToMap(new get_cursor_1.GetCursor());\r\n addToMap(new replace_1.Replace());\r\n addToMap(new truncate_dataset_1.TruncateDataset());\r\n addToMap(new assert_1.Assert());\r\n addToMap(new catch_1.Catch());\r\n addToMap(new loop_1.Loop());\r\n addToMap(new loop_at_screen_1.LoopAtScreen());\r\n addToMap(new set_pf_status_1.SetPFStatus());\r\n addToMap(new set_titlebar_1.SetTitlebar());\r\n addToMap(new submit_1.Submit());\r\n addToMap(new insert_textpool_1.InsertTextpool());\r\n addToMap(new read_table_1.ReadTable());\r\n addToMap(new syntax_check_1.SyntaxCheck());\r\n addToMap(new delete_report_1.DeleteReport());\r\n addToMap(new import_1.Import());\r\n addToMap(new collect_1.Collect());\r\n addToMap(new export_1.Export());\r\n addToMap(new scan_1.Scan());\r\n addToMap(new transfer_1.Transfer());\r\n addToMap(new split_1.Split());\r\n addToMap(new call_function_1.CallFunction());\r\n addToMap(new delete_internal_1.DeleteInternal());\r\n addToMap(new delete_cluster_1.DeleteCluster());\r\n addToMap(new clear_1.Clear());\r\n addToMap(new receive_1.Receive());\r\n addToMap(new get_bit_1.GetBit());\r\n addToMap(new class_local_friends_1.ClassLocalFriends());\r\n addToMap(new select_1.Select());\r\n addToMap(new modify_screen_1.ModifyScreen());\r\n addToMap(new insert_internal_1.InsertInternal());\r\n addToMap(new pack_1.Pack());\r\n addToMap(new unpack_1.Unpack());\r\n addToMap(new assign_1.Assign());\r\n addToMap(new set_locale_1.SetLocale());\r\n addToMap(new set_parameter_1.SetParameter());\r\n addToMap(new convert_1.Convert());\r\n addToMap(new controls_1.Controls());\r\n addToMap(new when_1.When());\r\n addToMap(new insert_database_1.InsertDatabase());\r\n addToMap(new delete_database_1.DeleteDatabase());\r\n addToMap(new update_database_1.UpdateDatabase());\r\n addToMap(new sort_1.Sort());\r\n addToMap(new wait_1.Wait());\r\n addToMap(new condense_1.Condense());\r\n addToMap(new set_bit_1.SetBit());\r\n addToMap(new open_dataset_1.OpenDataset());\r\n addToMap(new close_dataset_1.CloseDataset());\r\n addToMap(new read_report_1.ReadReport());\r\n addToMap(new do_1.Do());\r\n addToMap(new describe_1.Describe());\r\n addToMap(new find_1.Find());\r\n addToMap(new message_1.Message());\r\n addToMap(new system_call_1.SystemCall());\r\n addToMap(new get_time_1.GetTime());\r\n addToMap(new unassign_1.Unassign());\r\n addToMap(new get_parameter_1.GetParameter());\r\n addToMap(new format_1.Format());\r\n addToMap(new when_type_1.WhenType());\r\n addToMap(new if_1.If());\r\n addToMap(new log_point_1.LogPoint());\r\n addToMap(new while_1.While());\r\n addToMap(new with_1.With());\r\n addToMap(new with_loop_1.WithLoop());\r\n addToMap(new call_transformation_1.CallTransformation());\r\n addToMap(new call_transaction_1.CallTransaction());\r\n addToMap(new get_locale_1.GetLocale());\r\n addToMap(new get_reference_1.GetReference());\r\n addToMap(new else_if_1.ElseIf());\r\n addToMap(new get_run_time_1.GetRunTime());\r\n addToMap(new create_object_1.CreateObject());\r\n addToMap(new import_dynpro_1.ImportDynpro());\r\n addToMap(new create_data_1.CreateData());\r\n addToMap(new case_1.Case());\r\n addToMap(new shift_1.Shift());\r\n addToMap(new raise_1.Raise());\r\n addToMap(new concatenate_1.Concatenate());\r\n addToMap(new append_1.Append());\r\n addToMap(new select_loop_1.SelectLoop());\r\n addToMap(new write_1.Write());\r\n addToMap(new move_corresponding_1.MoveCorresponding());\r\n addToMap(new authority_check_1.AuthorityCheck());\r\n addToMap(new insert_report_1.InsertReport());\r\n addToMap(new selection_screen_1.SelectionScreen());\r\n addToMap(new ranges_1.Ranges());\r\n addToMap(new add_1.Add());\r\n addToMap(new raise_event_1.RaiseEvent());\r\n addToMap(new subtract_1.Subtract());\r\n addToMap(new add_corresponding_1.AddCorresponding());\r\n addToMap(new subtract_corresponding_1.SubtractCorresponding());\r\n addToMap(new multiply_1.Multiply());\r\n addToMap(new divide_1.Divide());\r\n addToMap(new check_1.Check());\r\n addToMap(new modify_database_1.ModifyDatabase());\r\n addToMap(new form_1.Form());\r\n addToMap(new selectoption_1.SelectOption());\r\n addToMap(new tables_1.Tables());\r\n addToMap(new parameter_1.Parameter());\r\n addToMap(new fieldsymbol_1.FieldSymbol());\r\n}\r\n// -----------------------------------\r\nclass SyntaxLogic {\r\n constructor(reg, object) {\r\n this.reg = reg;\r\n this.issues = [];\r\n this.object = object;\r\n this.scope = _current_scope_1.CurrentScope.buildDefault(this.reg, object);\r\n this.helpers = {\r\n oooc: new _object_oriented_1.ObjectOriented(this.scope),\r\n proc: new _procedural_1.Procedural(this.reg, this.scope),\r\n };\r\n }\r\n run() {\r\n if (this.object.syntaxResult !== undefined) {\r\n return this.object.syntaxResult;\r\n }\r\n this.issues = [];\r\n this.reg.getDDICReferences().clear(this.object);\r\n if (this.object instanceof objects_1.Program && this.object.isInclude()) {\r\n // todo, show some kind of error?\r\n return { issues: [], spaghetti: this.scope.pop(new position_1.Position(Number.MAX_SAFE_INTEGER, Number.MAX_SAFE_INTEGER)) };\r\n }\r\n this.traverseObject();\r\n for (;;) {\r\n const spaghetti = this.scope.pop(new position_1.Position(Number.MAX_SAFE_INTEGER, Number.MAX_SAFE_INTEGER)); // pop built-in scopes\r\n if (spaghetti.getTop().getIdentifier().stype === _scope_type_1.ScopeType.BuiltIn) {\r\n const result = { issues: this.issues, spaghetti };\r\n this.object.syntaxResult = result;\r\n return result;\r\n }\r\n }\r\n }\r\n /////////////////////////////\r\n traverseObject() {\r\n const traversal = this.object.getSequencedFiles();\r\n if (this.object instanceof objects_1.Program\r\n || this.object instanceof objects_1.FunctionGroup) {\r\n for (const f of this.object.getSequencedFiles()) {\r\n // add FORM defintions to the _global object scope\r\n this.helpers.proc.addAllFormDefinitions(f, this.object);\r\n }\r\n const main = this.object.getMainABAPFile();\r\n if (main !== undefined) {\r\n let stype = _scope_type_1.ScopeType.Program;\r\n if (this.object instanceof objects_1.FunctionGroup) {\r\n stype = _scope_type_1.ScopeType.FunctionGroup;\r\n }\r\n this.scope.push(stype, this.object.getName(), new position_1.Position(1, 1), main.getFilename());\r\n }\r\n }\r\n else if (this.object instanceof objects_1.TypePool) {\r\n const main = this.object.getMainABAPFile();\r\n if (main !== undefined) {\r\n this.scope.push(_scope_type_1.ScopeType.TypePool, this.object.getName(), new position_1.Position(1, 1), main.getFilename());\r\n }\r\n }\r\n for (const file of traversal) {\r\n this.currentFile = file;\r\n const structure = this.currentFile.getStructure();\r\n if (structure === undefined) {\r\n return this.scope;\r\n }\r\n else {\r\n this.traverse(structure);\r\n }\r\n }\r\n return this.scope;\r\n }\r\n newIssue(token, message) {\r\n const issue = issue_1.Issue.atToken(this.currentFile, token, message, \"check_syntax\", severity_1.Severity.Error);\r\n this.issues.push(issue);\r\n }\r\n traverse(node) {\r\n for (const child of node.getChildren()) {\r\n const isStructure = child instanceof nodes_1.StructureNode;\r\n const isStatement = child instanceof nodes_1.StatementNode;\r\n try {\r\n if (isStructure) {\r\n const gotoNext = this.updateScopeStructure(child);\r\n if (gotoNext === true) {\r\n continue;\r\n }\r\n }\r\n else if (isStatement) {\r\n this.updateScopeStatement(child);\r\n }\r\n }\r\n catch (e) {\r\n this.newIssue(child.getFirstToken(), e.message);\r\n break;\r\n }\r\n // walk into INCLUDEs\r\n if (isStatement && child.get() instanceof Statements.Include) {\r\n const file = this.helpers.proc.findInclude(child, this.object);\r\n if (file !== undefined && file.getStructure() !== undefined) {\r\n const old = this.currentFile;\r\n this.currentFile = file;\r\n this.traverse(file.getStructure());\r\n this.currentFile = old;\r\n }\r\n }\r\n if (isStructure || isStatement) {\r\n this.traverse(child);\r\n }\r\n }\r\n }\r\n // if this returns true, then the traversal should continue with next child\r\n updateScopeStructure(node) {\r\n const filename = this.currentFile.getFilename();\r\n const stru = node.get();\r\n if (stru instanceof Structures.ClassDefinition) {\r\n new class_definition_1.ClassDefinition(node, filename, this.scope);\r\n return true;\r\n }\r\n else if (stru instanceof Structures.Interface) {\r\n new interface_definition_1.InterfaceDefinition(node, filename, this.scope);\r\n return true;\r\n }\r\n else if (stru instanceof Structures.Types) {\r\n this.scope.addType(new types_1.Types().runSyntax(node, this.scope, filename));\r\n return true;\r\n }\r\n else if (stru instanceof Structures.Constants) {\r\n this.scope.addIdentifier(new constants_1.Constants().runSyntax(node, this.scope, filename).type);\r\n return true;\r\n }\r\n else if (stru instanceof Structures.Data) {\r\n this.scope.addIdentifier(new data_1.Data().runSyntax(node, this.scope, filename));\r\n return true;\r\n }\r\n else if (stru instanceof Structures.Statics) {\r\n this.scope.addIdentifier(new statics_1.Statics().runSyntax(node, this.scope, filename));\r\n return true;\r\n }\r\n else if (stru instanceof Structures.TypeEnum) {\r\n const values = new type_enum_1.TypeEnum().runSyntax(node, this.scope, filename).values;\r\n this.scope.addList(values);\r\n return true;\r\n }\r\n return false;\r\n }\r\n updateScopeStatement(node) {\r\n const filename = this.currentFile.getFilename();\r\n const s = node.get();\r\n // todo, refactor\r\n if (s instanceof Statements.Type) {\r\n this.scope.addType(new type_1.Type().runSyntax(node, this.scope, filename));\r\n return;\r\n }\r\n else if (s instanceof Statements.Constant) {\r\n this.scope.addIdentifier(new constant_1.Constant().runSyntax(node, this.scope, filename));\r\n return;\r\n }\r\n else if (s instanceof Statements.Static) {\r\n this.scope.addIdentifier(new static_1.Static().runSyntax(node, this.scope, filename));\r\n return;\r\n }\r\n else if (s instanceof Statements.Data) {\r\n this.scope.addIdentifier(new data_2.Data().runSyntax(node, this.scope, filename));\r\n return;\r\n }\r\n const name = s.constructor.name;\r\n if (map[name]) {\r\n map[name].runSyntax(node, this.scope, filename);\r\n return;\r\n }\r\n if (s instanceof Statements.FunctionModule) {\r\n this.helpers.proc.findFunctionScope(this.object, node, filename);\r\n }\r\n else if (s instanceof Statements.EndForm\r\n || s instanceof Statements.EndFunction\r\n || s instanceof Statements.EndClass\r\n || s instanceof Statements.EndInterface) {\r\n this.scope.pop(node.getLastToken().getEnd());\r\n }\r\n else if (s instanceof Statements.EndMethod) {\r\n this.scope.pop(node.getLastToken().getEnd());\r\n if (this.scope.getType() === _scope_type_1.ScopeType.MethodInstance) {\r\n this.scope.pop(node.getLastToken().getEnd());\r\n }\r\n }\r\n }\r\n}\r\nexports.SyntaxLogic = SyntaxLogic;\r\n//# sourceMappingURL=syntax.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/5_syntax/syntax.js?");
|
|
8435
8468
|
|
|
8436
8469
|
/***/ }),
|
|
8437
8470
|
|
|
@@ -8970,7 +9003,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
|
|
|
8970
9003
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
8971
9004
|
|
|
8972
9005
|
"use strict";
|
|
8973
|
-
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.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 /*\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?");
|
|
9006
|
+
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?");
|
|
8974
9007
|
|
|
8975
9008
|
/***/ }),
|
|
8976
9009
|
|
|
@@ -11159,7 +11192,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
|
|
|
11159
11192
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
11160
11193
|
|
|
11161
11194
|
"use strict";
|
|
11162
|
-
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.Indent = void 0;\r\nconst Statements = __webpack_require__(/*! ../abap/2_statements/statements */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js\");\r\nconst Expressions = __webpack_require__(/*! ../abap/2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst _statement_1 = __webpack_require__(/*! ../abap/2_statements/statements/_statement */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/_statement.js\");\r\nconst position_1 = __webpack_require__(/*! ../position */ \"./node_modules/@abaplint/core/build/src/position.js\");\r\n// todo, will break if there is multiple statements per line?\r\nclass Indent {\r\n constructor(options) {\r\n this.globalClasses = new Set();\r\n this.options = options || {};\r\n }\r\n execute(original, modified) {\r\n const statements = original.getStatements();\r\n const expected = this.getExpectedIndents(original);\r\n const lines = modified.split(\"\\n\");\r\n for (const statement of statements) {\r\n if (statement.getFirstToken().getStart() instanceof position_1.VirtualPosition) {\r\n continue; // macro contents\r\n }\r\n const exp = expected.shift();\r\n if (exp === undefined || exp < 0) {\r\n continue;\r\n }\r\n const row = statement.getFirstToken().getStart().getRow() - 1;\r\n lines[row] = lines[row].trim();\r\n for (let i = 1; i < exp; i++) {\r\n lines[row] = \" \" + lines[row];\r\n }\r\n }\r\n return lines.join(\"\\n\");\r\n }\r\n // returns list of expected indentation for each line/statement?\r\n getExpectedIndents(file) {\r\n const ret = [];\r\n const init = 1;\r\n const stack = new Stack();\r\n let indent = init;\r\n let parentIsEvent = false;\r\n let previousStatement = undefined;\r\n for (const statement of file.getStatements()) {\r\n if (statement.getFirstToken().getStart() instanceof position_1.VirtualPosition) {\r\n continue; // skip macro contents\r\n }\r\n const type = statement.get();\r\n if (type instanceof Statements.EndIf\r\n || type instanceof Statements.EndWhile\r\n || type instanceof Statements.EndModule\r\n || type instanceof Statements.EndSelect\r\n || type instanceof Statements.EndMethod\r\n || type instanceof Statements.EndAt\r\n || type instanceof Statements.Else\r\n || type instanceof Statements.EndExec\r\n || type instanceof Statements.EndOfDefinition\r\n || type instanceof Statements.EndLoop\r\n || type instanceof Statements.EndTestInjection\r\n || type instanceof Statements.EndTestSeam\r\n || type instanceof Statements.EndForm\r\n || type instanceof Statements.EndCatch\r\n || (this.options.selectionScreenBlockIndentation === true\r\n && type instanceof Statements.SelectionScreen\r\n && statement.concatTokens().toUpperCase().includes(\"END OF BLOCK\"))\r\n || type instanceof Statements.ElseIf\r\n || type instanceof Statements.EndFunction\r\n || type instanceof Statements.EndInterface\r\n || type instanceof Statements.EndDo) {\r\n indent = indent - 2;\r\n }\r\n else if (type instanceof Statements.StartOfSelection\r\n || type instanceof Statements.AtSelectionScreen\r\n || type instanceof Statements.AtLineSelection\r\n || type instanceof Statements.Initialization\r\n || type instanceof Statements.AtUserCommand\r\n || type instanceof Statements.TopOfPage\r\n || type instanceof Statements.EndOfSelection\r\n || type instanceof Statements.LoadOfProgram) {\r\n indent = init;\r\n parentIsEvent = true;\r\n }\r\n else if (type instanceof Statements.Form\r\n || (type instanceof Statements.Include && parentIsEvent)\r\n || type instanceof Statements.Module\r\n || type instanceof Statements.ClassImplementation\r\n || type instanceof Statements.ClassDefinition) {\r\n indent = init;\r\n parentIsEvent = false;\r\n }\r\n else if (type instanceof Statements.Cleanup\r\n || type instanceof Statements.Catch) {\r\n indent = stack.peek() - 2;\r\n }\r\n else if (type instanceof Statements.Public\r\n || type instanceof Statements.Protected\r\n || type instanceof Statements.Private\r\n || type instanceof Statements.WhenType\r\n || type instanceof Statements.WhenOthers\r\n || type instanceof Statements.When) {\r\n indent = stack.peek();\r\n }\r\n else if (type instanceof Statements.EndTry) {\r\n indent = stack.pop() - (this.options.alignTryCatch ? 2 : 4);\r\n }\r\n else if (type instanceof Statements.EndClass\r\n || type instanceof Statements.EndCase) {\r\n indent = stack.pop() - 2;\r\n indent = Math.max(indent, init); // maybe move this out of switch before ret.push(indent)\r\n }\r\n else if (type instanceof _statement_1.Comment\r\n || type instanceof Statements.IncludeType\r\n || type instanceof _statement_1.Empty\r\n || type instanceof _statement_1.MacroContent) {\r\n ret.push(-1);\r\n previousStatement = statement;\r\n continue;\r\n }\r\n if (previousStatement\r\n && !(previousStatement.get() instanceof _statement_1.Comment)\r\n && previousStatement.getLastToken().getEnd().getRow() === statement.getFirstToken().getStart().getRow()) {\r\n // any indentation allowed if there are multiple statements on the same line\r\n ret.push(-1);\r\n previousStatement = statement;\r\n continue;\r\n }\r\n ret.push(indent);\r\n if (type instanceof Statements.If\r\n || type instanceof Statements.While\r\n || type instanceof Statements.Module\r\n || type instanceof Statements.SelectLoop\r\n || type instanceof Statements.FunctionModule\r\n || type instanceof Statements.Interface\r\n || type instanceof Statements.Do\r\n || type instanceof Statements.At\r\n || type instanceof Statements.ExecSQL\r\n || type instanceof Statements.Catch\r\n || type instanceof Statements.Define\r\n || type instanceof Statements.When\r\n || type instanceof Statements.WhenType\r\n || type instanceof Statements.WhenOthers\r\n || type instanceof Statements.Cleanup\r\n || type instanceof Statements.Loop\r\n || type instanceof Statements.CatchSystemExceptions\r\n || type instanceof Statements.Form\r\n || type instanceof Statements.Else\r\n || type instanceof Statements.ElseIf\r\n || type instanceof Statements.MethodImplementation\r\n || type instanceof Statements.TestInjection\r\n || type instanceof Statements.TestSeam\r\n || (this.options.selectionScreenBlockIndentation === true\r\n && type instanceof Statements.SelectionScreen\r\n && statement.concatTokens().toUpperCase().includes(\"BEGIN OF BLOCK\"))\r\n || type instanceof Statements.StartOfSelection\r\n || type instanceof Statements.AtSelectionScreen\r\n || type instanceof Statements.AtLineSelection\r\n || type instanceof Statements.LoadOfProgram\r\n || type instanceof Statements.Initialization\r\n || type instanceof Statements.AtUserCommand\r\n || type instanceof Statements.TopOfPage\r\n || type instanceof Statements.EndOfSelection\r\n || type instanceof Statements.Public\r\n || type instanceof Statements.Protected\r\n || type instanceof Statements.Private) {\r\n indent = indent + 2;\r\n }\r\n else if (type instanceof Statements.Try) {\r\n indent = indent + (this.options.alignTryCatch ? 2 : 4);\r\n stack.push(indent);\r\n }\r\n else if (type instanceof Statements.ClassDefinition\r\n || type instanceof Statements.Case\r\n || type instanceof Statements.CaseType\r\n || type instanceof Statements.ClassImplementation) {\r\n indent = indent + (this.skipIndentForGlobalClass(statement) ? 0 : 2);\r\n stack.push(indent);\r\n }\r\n previousStatement = statement;\r\n }\r\n return ret;\r\n }\r\n skipIndentForGlobalClass(statement) {\r\n if (!this.options.globalClassSkipFirst) {\r\n return false;\r\n }\r\n const type = statement.get();\r\n if (type instanceof Statements.ClassDefinition && statement.findFirstExpression(Expressions.ClassGlobal)) {\r\n const className = statement.findFirstExpression(Expressions.ClassName);\r\n if (className) {\r\n this.globalClasses.add(className.getFirstToken().getStr().toUpperCase());\r\n }\r\n return true;\r\n }\r\n else if (type instanceof Statements.ClassImplementation) {\r\n const className = statement.findFirstExpression(Expressions.ClassName);\r\n if (className && this.globalClasses.has(className.getFirstToken().getStr().toUpperCase())) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n}\r\nexports.Indent = Indent;\r\nclass Stack {\r\n constructor() {\r\n this.items = [];\r\n }\r\n push(item) {\r\n this.items.push(item);\r\n }\r\n peek() {\r\n return this.items[this.items.length - 1];\r\n }\r\n pop() {\r\n const peek = this.peek();\r\n this.items = this.items.slice(0, this.items.length - 1);\r\n return peek;\r\n }\r\n}\r\n//# sourceMappingURL=indent.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/pretty_printer/indent.js?");
|
|
11195
|
+
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.Indent = void 0;\r\nconst Statements = __webpack_require__(/*! ../abap/2_statements/statements */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js\");\r\nconst Expressions = __webpack_require__(/*! ../abap/2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst _statement_1 = __webpack_require__(/*! ../abap/2_statements/statements/_statement */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/_statement.js\");\r\nconst position_1 = __webpack_require__(/*! ../position */ \"./node_modules/@abaplint/core/build/src/position.js\");\r\n// todo, will break if there is multiple statements per line?\r\nclass Indent {\r\n constructor(options) {\r\n this.globalClasses = new Set();\r\n this.options = options || {};\r\n }\r\n execute(original, modified) {\r\n const statements = original.getStatements();\r\n const expected = this.getExpectedIndents(original);\r\n const lines = modified.split(\"\\n\");\r\n for (const statement of statements) {\r\n if (statement.getFirstToken().getStart() instanceof position_1.VirtualPosition) {\r\n continue; // macro contents\r\n }\r\n const exp = expected.shift();\r\n if (exp === undefined || exp < 0) {\r\n continue;\r\n }\r\n const row = statement.getFirstToken().getStart().getRow() - 1;\r\n lines[row] = lines[row].trim();\r\n for (let i = 1; i < exp; i++) {\r\n lines[row] = \" \" + lines[row];\r\n }\r\n }\r\n return lines.join(\"\\n\");\r\n }\r\n // returns list of expected indentation for each line/statement?\r\n getExpectedIndents(file) {\r\n const ret = [];\r\n const init = 1;\r\n const stack = new Stack();\r\n let indent = init;\r\n let parentIsEvent = false;\r\n let previousStatement = undefined;\r\n for (const statement of file.getStatements()) {\r\n if (statement.getFirstToken().getStart() instanceof position_1.VirtualPosition) {\r\n continue; // skip macro contents\r\n }\r\n const type = statement.get();\r\n if (type instanceof Statements.EndIf\r\n || type instanceof Statements.EndWhile\r\n || type instanceof Statements.EndModule\r\n || type instanceof Statements.EndSelect\r\n || type instanceof Statements.EndMethod\r\n || type instanceof Statements.EndAt\r\n || type instanceof Statements.Else\r\n || type instanceof Statements.EndExec\r\n || type instanceof Statements.EndOfDefinition\r\n || type instanceof Statements.EndLoop\r\n || type instanceof Statements.EndTestInjection\r\n || type instanceof Statements.EndTestSeam\r\n || type instanceof Statements.EndForm\r\n || type instanceof Statements.EndCatch\r\n || (this.options.selectionScreenBlockIndentation === true\r\n && type instanceof Statements.SelectionScreen\r\n && statement.concatTokens().toUpperCase().includes(\"END OF BLOCK\"))\r\n || type instanceof Statements.ElseIf\r\n || type instanceof Statements.EndFunction\r\n || type instanceof Statements.EndInterface\r\n || type instanceof Statements.EndDo) {\r\n indent = indent - 2;\r\n }\r\n else if (type instanceof Statements.StartOfSelection\r\n || type instanceof Statements.AtSelectionScreen\r\n || type instanceof Statements.AtLineSelection\r\n || type instanceof Statements.Initialization\r\n || type instanceof Statements.AtUserCommand\r\n || type instanceof Statements.TopOfPage\r\n || type instanceof Statements.EndOfSelection\r\n || type instanceof Statements.LoadOfProgram) {\r\n indent = init;\r\n parentIsEvent = true;\r\n }\r\n else if (type instanceof Statements.Form\r\n || (type instanceof Statements.Include && parentIsEvent)\r\n || type instanceof Statements.Module\r\n || type instanceof Statements.ClassImplementation\r\n || type instanceof Statements.ClassDefinition) {\r\n indent = init;\r\n parentIsEvent = false;\r\n }\r\n else if (type instanceof Statements.Cleanup\r\n || type instanceof Statements.Catch) {\r\n indent = stack.peek() - 2;\r\n }\r\n else if (type instanceof Statements.Public\r\n || type instanceof Statements.Protected\r\n || type instanceof Statements.Private\r\n || type instanceof Statements.WhenType\r\n || type instanceof Statements.WhenOthers\r\n || type instanceof Statements.When) {\r\n indent = stack.peek();\r\n }\r\n else if (type instanceof Statements.EndTry) {\r\n indent = stack.pop() - (this.options.alignTryCatch ? 2 : 4);\r\n }\r\n else if (type instanceof Statements.EndClass\r\n || type instanceof Statements.EndCase) {\r\n indent = stack.pop() - 2;\r\n indent = Math.max(indent, init); // maybe move this out of switch before ret.push(indent)\r\n }\r\n else if (type instanceof _statement_1.Comment\r\n || type instanceof Statements.IncludeType\r\n || type instanceof _statement_1.Empty\r\n || type instanceof _statement_1.MacroContent) {\r\n ret.push(-1);\r\n previousStatement = statement;\r\n continue;\r\n }\r\n if (previousStatement\r\n && !(previousStatement.get() instanceof _statement_1.Comment)\r\n && previousStatement.getLastToken().getEnd().getRow() === statement.getFirstToken().getStart().getRow()) {\r\n // any indentation allowed if there are multiple statements on the same line\r\n ret.push(-1);\r\n previousStatement = statement;\r\n continue;\r\n }\r\n ret.push(indent);\r\n if (type instanceof Statements.If\r\n || type instanceof Statements.While\r\n || type instanceof Statements.Module\r\n || type instanceof Statements.SelectLoop\r\n || type instanceof Statements.FunctionModule\r\n || type instanceof Statements.Interface\r\n || type instanceof Statements.Do\r\n || type instanceof Statements.At\r\n || type instanceof Statements.ExecSQL\r\n || type instanceof Statements.Catch\r\n || type instanceof Statements.Define\r\n || type instanceof Statements.When\r\n || type instanceof Statements.WhenType\r\n || type instanceof Statements.WhenOthers\r\n || type instanceof Statements.Cleanup\r\n || type instanceof Statements.Loop\r\n || type instanceof Statements.LoopAtScreen\r\n || type instanceof Statements.CatchSystemExceptions\r\n || type instanceof Statements.Form\r\n || type instanceof Statements.Else\r\n || type instanceof Statements.ElseIf\r\n || type instanceof Statements.MethodImplementation\r\n || type instanceof Statements.TestInjection\r\n || type instanceof Statements.TestSeam\r\n || (this.options.selectionScreenBlockIndentation === true\r\n && type instanceof Statements.SelectionScreen\r\n && statement.concatTokens().toUpperCase().includes(\"BEGIN OF BLOCK\"))\r\n || type instanceof Statements.StartOfSelection\r\n || type instanceof Statements.AtSelectionScreen\r\n || type instanceof Statements.AtLineSelection\r\n || type instanceof Statements.LoadOfProgram\r\n || type instanceof Statements.Initialization\r\n || type instanceof Statements.AtUserCommand\r\n || type instanceof Statements.TopOfPage\r\n || type instanceof Statements.EndOfSelection\r\n || type instanceof Statements.Public\r\n || type instanceof Statements.Protected\r\n || type instanceof Statements.Private) {\r\n indent = indent + 2;\r\n }\r\n else if (type instanceof Statements.Try) {\r\n indent = indent + (this.options.alignTryCatch ? 2 : 4);\r\n stack.push(indent);\r\n }\r\n else if (type instanceof Statements.ClassDefinition\r\n || type instanceof Statements.Case\r\n || type instanceof Statements.CaseType\r\n || type instanceof Statements.ClassImplementation) {\r\n indent = indent + (this.skipIndentForGlobalClass(statement) ? 0 : 2);\r\n stack.push(indent);\r\n }\r\n previousStatement = statement;\r\n }\r\n return ret;\r\n }\r\n skipIndentForGlobalClass(statement) {\r\n if (!this.options.globalClassSkipFirst) {\r\n return false;\r\n }\r\n const type = statement.get();\r\n if (type instanceof Statements.ClassDefinition && statement.findFirstExpression(Expressions.ClassGlobal)) {\r\n const className = statement.findFirstExpression(Expressions.ClassName);\r\n if (className) {\r\n this.globalClasses.add(className.getFirstToken().getStr().toUpperCase());\r\n }\r\n return true;\r\n }\r\n else if (type instanceof Statements.ClassImplementation) {\r\n const className = statement.findFirstExpression(Expressions.ClassName);\r\n if (className && this.globalClasses.has(className.getFirstToken().getStr().toUpperCase())) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n}\r\nexports.Indent = Indent;\r\nclass Stack {\r\n constructor() {\r\n this.items = [];\r\n }\r\n push(item) {\r\n this.items.push(item);\r\n }\r\n peek() {\r\n return this.items[this.items.length - 1];\r\n }\r\n pop() {\r\n const peek = this.peek();\r\n this.items = this.items.slice(0, this.items.length - 1);\r\n return peek;\r\n }\r\n}\r\n//# sourceMappingURL=indent.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/pretty_printer/indent.js?");
|
|
11163
11196
|
|
|
11164
11197
|
/***/ }),
|
|
11165
11198
|
|
|
@@ -11192,7 +11225,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
|
|
|
11192
11225
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
11193
11226
|
|
|
11194
11227
|
"use strict";
|
|
11195
|
-
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 artifacts_rules_1 = __webpack_require__(/*! ./artifacts_rules */ \"./node_modules/@abaplint/core/build/src/artifacts_rules.js\");\nconst skip_logic_1 = __webpack_require__(/*! ./skip_logic */ \"./node_modules/@abaplint/core/build/src/skip_logic.js\");\nconst _abap_object_1 = __webpack_require__(/*! ./objects/_abap_object */ \"./node_modules/@abaplint/core/build/src/objects/_abap_object.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 syntax_1 = __webpack_require__(/*! ./abap/5_syntax/syntax */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/syntax.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\");\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 /** object containing filenames of dependencies */\n this.dependencies = {};\n this.issues = [];\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.85.40\";\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 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) {\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 const found = this.findOrCreate(f.getObjectName(), f.getObjectType());\n found.addFile(f);\n }\n return this;\n }\n addDependencies(files) {\n for (const f of files) {\n this.dependencies[f.getFilename().toUpperCase()] = true;\n }\n return this.addFiles(files);\n }\n addDependency(file) {\n this.dependencies[file.getFilename().toUpperCase()] = true;\n this.addFile(file);\n return this;\n }\n isDependency(obj) {\n const filename = obj.getFiles()[0].getFilename().toUpperCase();\n return this.dependencies[filename] === true;\n }\n isFileDependency(filename) {\n return this.dependencies[filename.toUpperCase()] === 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 this.runRules(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 this.runRules(undefined, 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 this.issues = [];\n for (const o of this.getObjects()) {\n this.parsePrivate(o);\n this.issues.push(...o.getParsingIssues());\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 this.issues = [];\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 this.issues.push(...o.getParsingIssues());\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 runRules(input, iobj) {\n var _a, _b, _c, _d, _e, _f;\n const rulePerformance = {};\n const issues = this.issues.slice(0);\n const objects = iobj ? [iobj] : this.getObjects();\n const rules = this.conf.getEnabledRules();\n const skipLogic = new skip_logic_1.SkipLogic(this);\n (_a = input === null || input === void 0 ? void 0 : input.progress) === null || _a === void 0 ? void 0 : _a.set(iobj ? 1 : this.getObjectCount(false), \"Run Syntax\");\n const check = [];\n for (const obj of objects) {\n (_b = input === null || input === void 0 ? void 0 : input.progress) === null || _b === void 0 ? void 0 : _b.tick(\"Run Syntax - \" + obj.getName());\n if (skipLogic.skip(obj) || this.isDependency(obj)) {\n continue;\n }\n if (obj instanceof _abap_object_1.ABAPObject) {\n new syntax_1.SyntaxLogic(this, obj).run();\n }\n check.push(obj);\n }\n (_c = input === null || input === void 0 ? void 0 : input.progress) === null || _c === void 0 ? void 0 : _c.set(rules.length, \"Initialize Rules\");\n for (const rule of rules) {\n (_d = input === null || input === void 0 ? void 0 : input.progress) === null || _d === void 0 ? void 0 : _d.tick(\"Initialize Rules - \" + rule.getMetadata().key);\n if (rule.initialize === undefined) {\n throw new Error(rule.getMetadata().key + \" missing initialize method\");\n }\n rule.initialize(this);\n rulePerformance[rule.getMetadata().key] = 0;\n }\n (_e = input === null || input === void 0 ? void 0 : input.progress) === null || _e === void 0 ? void 0 : _e.set(check.length, \"Finding Issues\");\n for (const obj of check) {\n (_f = input === null || input === void 0 ? void 0 : input.progress) === null || _f === void 0 ? void 0 : _f.tick(\"Finding Issues - \" + obj.getType() + \" \" + obj.getName());\n for (const rule of rules) {\n const before = Date.now();\n issues.push(...rule.run(obj));\n const runtime = Date.now() - before;\n rulePerformance[rule.getMetadata().key] = rulePerformance[rule.getMetadata().key] + runtime;\n }\n }\n if ((input === null || input === void 0 ? void 0 : input.outputPerformance) === true) {\n const perf = [];\n for (const p in rulePerformance) {\n if (rulePerformance[p] > 100) { // ignore rules if it takes less than 100ms\n perf.push({ name: p, time: rulePerformance[p] });\n }\n }\n perf.sort((a, b) => { return b.time - a.time; });\n for (const p of perf) {\n process.stderr.write(\"\\t\" + p.time + \"ms\\t\" + p.name + \"\\n\");\n }\n }\n return this.excludeIssues(issues);\n }\n excludeIssues(issues) {\n var _a;\n const ret = issues;\n const globalNoIssues = this.conf.getGlobal().noIssues || [];\n const globalNoIssuesPatterns = globalNoIssues.map(x => new RegExp(x, \"i\"));\n if (globalNoIssuesPatterns.length > 0) {\n for (let i = ret.length - 1; i >= 0; i--) {\n const filename = ret[i].getFilename();\n if (excludeHelper_1.ExcludeHelper.isExcluded(filename, globalNoIssuesPatterns)) {\n ret.splice(i, 1);\n }\n }\n }\n // exclude issues, as now we know both the filename and issue key\n for (const rule of artifacts_rules_1.ArtifactsRules.getRules()) {\n const key = rule.getMetadata().key;\n const ruleExclude = (_a = this.conf.readByKey(key, \"exclude\")) !== null && _a !== void 0 ? _a : [];\n if (ruleExclude.length === 0) {\n continue;\n }\n const ruleExcludePatterns = ruleExclude.map(x => new RegExp(x, \"i\"));\n for (let i = ret.length - 1; i >= 0; i--) {\n if (ret[i].getKey() !== key) {\n continue;\n }\n const filename = ret[i].getFilename();\n if (excludeHelper_1.ExcludeHelper.isExcluded(filename, ruleExcludePatterns)) {\n ret.splice(i, 1);\n }\n }\n }\n return ret;\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?");
|
|
11228
|
+
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 artifacts_rules_1 = __webpack_require__(/*! ./artifacts_rules */ \"./node_modules/@abaplint/core/build/src/artifacts_rules.js\");\nconst skip_logic_1 = __webpack_require__(/*! ./skip_logic */ \"./node_modules/@abaplint/core/build/src/skip_logic.js\");\nconst _abap_object_1 = __webpack_require__(/*! ./objects/_abap_object */ \"./node_modules/@abaplint/core/build/src/objects/_abap_object.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 syntax_1 = __webpack_require__(/*! ./abap/5_syntax/syntax */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/syntax.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\");\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 /** object containing filenames of dependencies */\n this.dependencies = {};\n this.issues = [];\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.85.43\";\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 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) {\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 const found = this.findOrCreate(f.getObjectName(), f.getObjectType());\n found.addFile(f);\n }\n return this;\n }\n addDependencies(files) {\n for (const f of files) {\n this.dependencies[f.getFilename().toUpperCase()] = true;\n }\n return this.addFiles(files);\n }\n addDependency(file) {\n this.dependencies[file.getFilename().toUpperCase()] = true;\n this.addFile(file);\n return this;\n }\n isDependency(obj) {\n const filename = obj.getFiles()[0].getFilename().toUpperCase();\n return this.dependencies[filename] === true;\n }\n isFileDependency(filename) {\n return this.dependencies[filename.toUpperCase()] === 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 this.runRules(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 this.runRules(undefined, 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 this.issues = [];\n for (const o of this.getObjects()) {\n this.parsePrivate(o);\n this.issues.push(...o.getParsingIssues());\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 this.issues = [];\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 this.issues.push(...o.getParsingIssues());\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 runRules(input, iobj) {\n var _a, _b, _c, _d, _e, _f;\n const rulePerformance = {};\n const issues = this.issues.slice(0);\n const objects = iobj ? [iobj] : this.getObjects();\n const rules = this.conf.getEnabledRules();\n const skipLogic = new skip_logic_1.SkipLogic(this);\n (_a = input === null || input === void 0 ? void 0 : input.progress) === null || _a === void 0 ? void 0 : _a.set(iobj ? 1 : this.getObjectCount(false), \"Run Syntax\");\n const check = [];\n for (const obj of objects) {\n (_b = input === null || input === void 0 ? void 0 : input.progress) === null || _b === void 0 ? void 0 : _b.tick(\"Run Syntax - \" + obj.getName());\n if (skipLogic.skip(obj) || this.isDependency(obj)) {\n continue;\n }\n if (obj instanceof _abap_object_1.ABAPObject) {\n new syntax_1.SyntaxLogic(this, obj).run();\n }\n check.push(obj);\n }\n (_c = input === null || input === void 0 ? void 0 : input.progress) === null || _c === void 0 ? void 0 : _c.set(rules.length, \"Initialize Rules\");\n for (const rule of rules) {\n (_d = input === null || input === void 0 ? void 0 : input.progress) === null || _d === void 0 ? void 0 : _d.tick(\"Initialize Rules - \" + rule.getMetadata().key);\n if (rule.initialize === undefined) {\n throw new Error(rule.getMetadata().key + \" missing initialize method\");\n }\n rule.initialize(this);\n rulePerformance[rule.getMetadata().key] = 0;\n }\n (_e = input === null || input === void 0 ? void 0 : input.progress) === null || _e === void 0 ? void 0 : _e.set(check.length, \"Finding Issues\");\n for (const obj of check) {\n (_f = input === null || input === void 0 ? void 0 : input.progress) === null || _f === void 0 ? void 0 : _f.tick(\"Finding Issues - \" + obj.getType() + \" \" + obj.getName());\n for (const rule of rules) {\n const before = Date.now();\n issues.push(...rule.run(obj));\n const runtime = Date.now() - before;\n rulePerformance[rule.getMetadata().key] = rulePerformance[rule.getMetadata().key] + runtime;\n }\n }\n if ((input === null || input === void 0 ? void 0 : input.outputPerformance) === true) {\n const perf = [];\n for (const p in rulePerformance) {\n if (rulePerformance[p] > 100) { // ignore rules if it takes less than 100ms\n perf.push({ name: p, time: rulePerformance[p] });\n }\n }\n perf.sort((a, b) => { return b.time - a.time; });\n for (const p of perf) {\n process.stderr.write(\"\\t\" + p.time + \"ms\\t\" + p.name + \"\\n\");\n }\n }\n return this.excludeIssues(issues);\n }\n excludeIssues(issues) {\n var _a;\n const ret = issues;\n const globalNoIssues = this.conf.getGlobal().noIssues || [];\n const globalNoIssuesPatterns = globalNoIssues.map(x => new RegExp(x, \"i\"));\n if (globalNoIssuesPatterns.length > 0) {\n for (let i = ret.length - 1; i >= 0; i--) {\n const filename = ret[i].getFilename();\n if (excludeHelper_1.ExcludeHelper.isExcluded(filename, globalNoIssuesPatterns)) {\n ret.splice(i, 1);\n }\n }\n }\n // exclude issues, as now we know both the filename and issue key\n for (const rule of artifacts_rules_1.ArtifactsRules.getRules()) {\n const key = rule.getMetadata().key;\n const ruleExclude = (_a = this.conf.readByKey(key, \"exclude\")) !== null && _a !== void 0 ? _a : [];\n if (ruleExclude.length === 0) {\n continue;\n }\n const ruleExcludePatterns = ruleExclude.map(x => new RegExp(x, \"i\"));\n for (let i = ret.length - 1; i >= 0; i--) {\n if (ret[i].getKey() !== key) {\n continue;\n }\n const filename = ret[i].getFilename();\n if (excludeHelper_1.ExcludeHelper.isExcluded(filename, ruleExcludePatterns)) {\n ret.splice(i, 1);\n }\n }\n }\n return ret;\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?");
|
|
11196
11229
|
|
|
11197
11230
|
/***/ }),
|
|
11198
11231
|
|
|
@@ -11555,7 +11588,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
|
|
|
11555
11588
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
11556
11589
|
|
|
11557
11590
|
"use strict";
|
|
11558
|
-
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.CyclicOO = exports.CyclicOOConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.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 objects_1 = __webpack_require__(/*! ../objects */ \"./node_modules/@abaplint/core/build/src/objects/index.js\");\r\nconst syntax_1 = __webpack_require__(/*! ../abap/5_syntax/syntax */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/syntax.js\");\r\nconst _reference_1 = __webpack_require__(/*! ../abap/5_syntax/_reference */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_reference.js\");\r\nconst _builtin_1 = __webpack_require__(/*! ../abap/5_syntax/_builtin */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_builtin.js\");\r\nconst _abap_object_1 = __webpack_require__(/*! ../objects/_abap_object */ \"./node_modules/@abaplint/core/build/src/objects/_abap_object.js\");\r\nclass CyclicOOConf extends _basic_rule_config_1.BasicRuleConfig {\r\n constructor() {\r\n super(...arguments);\r\n /** List of object names to skip, must be full upper case name\r\n * @uniqueItems true\r\n */\r\n this.skip = [];\r\n }\r\n}\r\nexports.CyclicOOConf = CyclicOOConf;\r\nclass CyclicOO {\r\n constructor() {\r\n this.conf = new CyclicOOConf();\r\n this.edges = {};\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"cyclic_oo\",\r\n title: \"Cyclic OO\",\r\n shortDescription: `Finds cyclic OO references`,\r\n extendedInformation: `Runs for global INTF + CLAS objects`,\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 if (this.conf.skip === undefined) {\r\n this.conf.skip = [];\r\n }\r\n }\r\n initialize(reg) {\r\n this.reg = reg;\r\n this.edges = {};\r\n for (const obj of this.reg.getObjectsByType(\"CLAS\")) {\r\n const name = obj.getName().toUpperCase();\r\n if (!(obj instanceof
|
|
11591
|
+
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.CyclicOO = exports.CyclicOOConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.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 objects_1 = __webpack_require__(/*! ../objects */ \"./node_modules/@abaplint/core/build/src/objects/index.js\");\r\nconst syntax_1 = __webpack_require__(/*! ../abap/5_syntax/syntax */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/syntax.js\");\r\nconst _reference_1 = __webpack_require__(/*! ../abap/5_syntax/_reference */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_reference.js\");\r\nconst _builtin_1 = __webpack_require__(/*! ../abap/5_syntax/_builtin */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_builtin.js\");\r\nconst _abap_object_1 = __webpack_require__(/*! ../objects/_abap_object */ \"./node_modules/@abaplint/core/build/src/objects/_abap_object.js\");\r\nclass CyclicOOConf extends _basic_rule_config_1.BasicRuleConfig {\r\n constructor() {\r\n super(...arguments);\r\n /** List of object names to skip, must be full upper case name\r\n * @uniqueItems true\r\n */\r\n this.skip = [];\r\n /** Skips shared memory enabled classes*/\r\n this.skipSharedMemory = true;\r\n }\r\n}\r\nexports.CyclicOOConf = CyclicOOConf;\r\nclass CyclicOO {\r\n constructor() {\r\n this.conf = new CyclicOOConf();\r\n this.edges = {};\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"cyclic_oo\",\r\n title: \"Cyclic OO\",\r\n shortDescription: `Finds cyclic OO references`,\r\n extendedInformation: `Runs for global INTF + CLAS objects`,\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 if (this.conf.skip === undefined) {\r\n this.conf.skip = [];\r\n }\r\n }\r\n initialize(reg) {\r\n var _a;\r\n this.reg = reg;\r\n this.edges = {};\r\n for (const obj of this.reg.getObjectsByType(\"CLAS\")) {\r\n const name = obj.getName().toUpperCase();\r\n if (!(obj instanceof objects_1.Class)) {\r\n continue;\r\n }\r\n else if (this.conf.skip.indexOf(name) >= 0) {\r\n continue;\r\n }\r\n else if (this.conf.skipSharedMemory === true && ((_a = obj.getClassDefinition()) === null || _a === void 0 ? void 0 : _a.isSharedMemory) === true) {\r\n continue;\r\n }\r\n this.buildEdges(name, new syntax_1.SyntaxLogic(this.reg, obj).run().spaghetti.getTop());\r\n }\r\n for (const obj of this.reg.getObjectsByType(\"INTF\")) {\r\n const name = obj.getName().toUpperCase();\r\n if (!(obj instanceof _abap_object_1.ABAPObject)) {\r\n continue;\r\n }\r\n else if (this.conf.skip.indexOf(name) >= 0) {\r\n continue;\r\n }\r\n this.buildEdges(name, new syntax_1.SyntaxLogic(this.reg, obj).run().spaghetti.getTop());\r\n }\r\n return this;\r\n }\r\n run(obj) {\r\n if (!(obj instanceof objects_1.Interface) && !(obj instanceof objects_1.Class)) {\r\n return [];\r\n }\r\n const id = obj.getIdentifier();\r\n if (id === undefined) {\r\n return [];\r\n }\r\n const path = this.findCycle(obj.getName(), obj.getName(), [obj.getName()]);\r\n if (path) {\r\n const message = \"Cyclic definition/usage: \" + path;\r\n return [issue_1.Issue.atIdentifier(id, message, this.getMetadata().key, this.conf.severity)];\r\n }\r\n return [];\r\n }\r\n /////////////////////////////\r\n findCycle(source, current, previous) {\r\n if (this.edges[current] === undefined) {\r\n return undefined;\r\n }\r\n for (const e of this.edges[current]) {\r\n if (e === source) {\r\n return previous.join(\" -> \") + \" -> \" + source;\r\n }\r\n if (previous.indexOf(e) < 0) { // dont revisit vertices\r\n const found = this.findCycle(source, e, previous.concat([e]));\r\n if (found) {\r\n return found;\r\n }\r\n }\r\n }\r\n return undefined;\r\n }\r\n buildEdges(from, node) {\r\n var _a;\r\n for (const r of node.getData().references) {\r\n if (r.resolved === undefined\r\n || node.getIdentifier().filename === r.resolved.getFilename()\r\n || r.resolved.getFilename() === _builtin_1.BuiltIn.filename) {\r\n continue;\r\n }\r\n if (r.referenceType === _reference_1.ReferenceType.ObjectOrientedReference\r\n && ((_a = r.extra) === null || _a === void 0 ? void 0 : _a.ooName)) {\r\n if (this.edges[from] === undefined) {\r\n this.edges[from] = [];\r\n }\r\n const name = r.extra.ooName.toUpperCase();\r\n if (name !== from && this.edges[from].indexOf(name) < 0) {\r\n this.edges[from].push(name);\r\n }\r\n }\r\n }\r\n for (const c of node.getChildren()) {\r\n this.buildEdges(from, c);\r\n }\r\n }\r\n}\r\nexports.CyclicOO = CyclicOO;\r\n//# sourceMappingURL=cyclic_oo.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/cyclic_oo.js?");
|
|
11559
11592
|
|
|
11560
11593
|
/***/ }),
|
|
11561
11594
|
|
|
@@ -11632,7 +11665,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
|
|
|
11632
11665
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
11633
11666
|
|
|
11634
11667
|
"use strict";
|
|
11635
|
-
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.Downport = exports.DownportConf = void 0;\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nconst _statement_1 = __webpack_require__(/*! ../abap/2_statements/statements/_statement */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/_statement.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 Expressions = __webpack_require__(/*! ../abap/2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst edit_helper_1 = __webpack_require__(/*! ../edit_helper */ \"./node_modules/@abaplint/core/build/src/edit_helper.js\");\r\nconst position_1 = __webpack_require__(/*! ../position */ \"./node_modules/@abaplint/core/build/src/position.js\");\r\nconst _abap_object_1 = __webpack_require__(/*! ../objects/_abap_object */ \"./node_modules/@abaplint/core/build/src/objects/_abap_object.js\");\r\nconst version_1 = __webpack_require__(/*! ../version */ \"./node_modules/@abaplint/core/build/src/version.js\");\r\nconst registry_1 = __webpack_require__(/*! ../registry */ \"./node_modules/@abaplint/core/build/src/registry.js\");\r\nconst syntax_1 = __webpack_require__(/*! ../abap/5_syntax/syntax */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/syntax.js\");\r\nconst _reference_1 = __webpack_require__(/*! ../abap/5_syntax/_reference */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_reference.js\");\r\nconst _typed_identifier_1 = __webpack_require__(/*! ../abap/types/_typed_identifier */ \"./node_modules/@abaplint/core/build/src/abap/types/_typed_identifier.js\");\r\nconst basic_1 = __webpack_require__(/*! ../abap/types/basic */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/index.js\");\r\nconst config_1 = __webpack_require__(/*! ../config */ \"./node_modules/@abaplint/core/build/src/config.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 include_graph_1 = __webpack_require__(/*! ../utils/include_graph */ \"./node_modules/@abaplint/core/build/src/utils/include_graph.js\");\r\nconst objects_1 = __webpack_require__(/*! ../objects */ \"./node_modules/@abaplint/core/build/src/objects/index.js\");\r\n// todo: refactor each sub-rule to new classes?\r\n// todo: add configuration\r\nclass DownportConf extends _basic_rule_config_1.BasicRuleConfig {\r\n}\r\nexports.DownportConf = DownportConf;\r\nclass Downport {\r\n constructor() {\r\n this.conf = new DownportConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"downport\",\r\n title: \"Downport statement\",\r\n shortDescription: `Experimental downport functionality`,\r\n extendedInformation: `Much like the 'commented_code' rule this rule loops through unknown statements and tries parsing with\r\na higher level language version. If successful, various rules are applied to downport the statement.\r\nTarget downport version is always v702, thus rule is only enabled if target version is v702.\r\n\r\nCurrent rules:\r\n* NEW transformed to CREATE OBJECT, opposite of https://rules.abaplint.org/use_new/\r\n* DATA() definitions are outlined, opposite of https://rules.abaplint.org/prefer_inline/\r\n* FIELD-SYMBOL() definitions are outlined\r\n* CONV is outlined\r\n* COND is outlined\r\n* REDUCE is outlined\r\n* SWITCH is outlined\r\n* APPEND expression is outlined\r\n* EMPTY KEY is changed to DEFAULT KEY, opposite of DEFAULT KEY in https://rules.abaplint.org/avoid_use/\r\n* CAST changed to ?=\r\n* LOOP AT method_call( ) is outlined\r\n* VALUE # with structure fields\r\n* VALUE # with internal table lines\r\n* Table Expressions are outlined\r\n* SELECT INTO @DATA definitions are outlined\r\n* Some occurrences of string template formatting option ALPHA changed to function module call\r\n* SELECT/INSERT/MODIFY/DELETE/UPDATE \",\" in field list removed, \"@\" in source/targets removed\r\n* PARTIALLY IMPLEMENTED removed, it can be quick fixed via rule implement_methods\r\n* RAISE EXCEPTION ... MESSAGE\r\n* Moving with +=, -=, /=, *=, &&= is expanded\r\n* line_exists and line_index is downported to READ TABLE\r\n\r\nOnly one transformation is applied to a statement at a time, so multiple steps might be required to do the full downport.`,\r\n tags: [_irule_1.RuleTag.Experimental, _irule_1.RuleTag.Downport, _irule_1.RuleTag.Quickfix],\r\n };\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n initialize(reg) {\r\n this.lowReg = reg;\r\n const version = this.lowReg.getConfig().getVersion();\r\n if (version === version_1.Version.v702 || version === version_1.Version.OpenABAP) {\r\n this.initHighReg();\r\n this.graph = new include_graph_1.IncludeGraph(reg);\r\n }\r\n return this;\r\n }\r\n run(lowObj) {\r\n var _a;\r\n const ret = [];\r\n this.counter = 1;\r\n const version = this.lowReg.getConfig().getVersion();\r\n if (version !== version_1.Version.v702 && version !== version_1.Version.OpenABAP) {\r\n return ret;\r\n }\r\n else if (!(lowObj instanceof _abap_object_1.ABAPObject)) {\r\n return ret;\r\n }\r\n const highObj = this.highReg.getObject(lowObj.getType(), lowObj.getName());\r\n if (highObj === undefined || !(highObj instanceof _abap_object_1.ABAPObject)) {\r\n return ret;\r\n }\r\n let highSyntaxObj = highObj;\r\n // for includes do the syntax check via a main program\r\n if (lowObj instanceof objects_1.Program && lowObj.isInclude()) {\r\n const mains = this.graph.listMainForInclude((_a = lowObj.getMainABAPFile()) === null || _a === void 0 ? void 0 : _a.getFilename());\r\n if (mains.length <= 0) {\r\n return [];\r\n }\r\n const f = this.highReg.getFileByName(mains[0]);\r\n if (f === undefined) {\r\n return [];\r\n }\r\n highSyntaxObj = this.highReg.findObjectForFile(f);\r\n }\r\n const highSyntax = new syntax_1.SyntaxLogic(this.highReg, highSyntaxObj).run();\r\n for (const lowFile of lowObj.getABAPFiles()) {\r\n const highFile = highObj.getABAPFileByName(lowFile.getFilename());\r\n if (highFile === undefined) {\r\n continue;\r\n }\r\n const lowStatements = lowFile.getStatements();\r\n const highStatements = highFile.getStatements();\r\n if (lowStatements.length !== highStatements.length) {\r\n // after applying a fix, there might be more statements in lowFile\r\n // should highReg be initialized again?\r\n /*\r\n const message = \"Internal Error: Statement lengths does not match\";\r\n ret.push(Issue.atStatement(lowFile, lowStatements[0], message, this.getMetadata().key));\r\n */\r\n continue;\r\n }\r\n for (let i = 0; i < lowStatements.length; i++) {\r\n const low = lowStatements[i];\r\n const high = highStatements[i];\r\n if ((low.get() instanceof _statement_1.Unknown && !(high.get() instanceof _statement_1.Unknown))\r\n || high.findFirstExpression(Expressions.InlineData)) {\r\n const issue = this.checkStatement(low, high, lowFile, highSyntax);\r\n if (issue) {\r\n ret.push(issue);\r\n }\r\n }\r\n }\r\n }\r\n return ret;\r\n }\r\n ////////////////////\r\n /** clones the orginal repository into highReg, and parses it with higher language version */\r\n initHighReg() {\r\n // use default configuration, ie. default target version\r\n const highConfig = config_1.Config.getDefault().get();\r\n const lowConfig = this.lowReg.getConfig().get();\r\n highConfig.syntax.errorNamespace = lowConfig.syntax.errorNamespace;\r\n highConfig.syntax.globalConstants = lowConfig.syntax.globalConstants;\r\n highConfig.syntax.globalMacros = lowConfig.syntax.globalMacros;\r\n this.highReg = new registry_1.Registry();\r\n for (const o of this.lowReg.getObjects()) {\r\n for (const f of o.getFiles()) {\r\n if (this.lowReg.isDependency(o) === true) {\r\n this.highReg.addDependency(f);\r\n }\r\n else {\r\n this.highReg.addFile(f);\r\n }\r\n }\r\n }\r\n this.highReg.parse();\r\n }\r\n /** applies one rule at a time, multiple iterations are required to transform complex statements */\r\n checkStatement(low, high, lowFile, highSyntax) {\r\n if (low.getFirstToken().getStart() instanceof position_1.VirtualPosition) {\r\n return undefined;\r\n }\r\n let found = this.partiallyImplemented(high, lowFile);\r\n if (found) {\r\n return found;\r\n }\r\n found = this.raiseException(high, lowFile, highSyntax);\r\n if (found) {\r\n return found;\r\n }\r\n found = this.emptyKey(high, lowFile);\r\n if (found) {\r\n return found;\r\n }\r\n found = this.stringTemplateAlpha(high, lowFile);\r\n if (found) {\r\n return found;\r\n }\r\n found = this.moveWithOperator(high, lowFile);\r\n if (found) {\r\n return found;\r\n }\r\n found = this.moveWithSimpleValue(high, lowFile);\r\n if (found) {\r\n return found;\r\n }\r\n found = this.downportSelectInline(low, high, lowFile, highSyntax);\r\n if (found) {\r\n return found;\r\n }\r\n found = this.downportSQLExtras(low, high, lowFile, highSyntax);\r\n if (found) {\r\n return found;\r\n }\r\n found = this.outlineLoopInput(high, lowFile, highSyntax);\r\n if (found) {\r\n return found;\r\n }\r\n found = this.outlineLoopTarget(high, lowFile, highSyntax);\r\n if (found) {\r\n return found;\r\n }\r\n found = this.outlineValue(high, lowFile, highSyntax);\r\n if (found) {\r\n return found;\r\n }\r\n found = this.outlineReduce(high, lowFile, highSyntax);\r\n if (found) {\r\n return found;\r\n }\r\n found = this.outlineSwitch(high, lowFile, highSyntax);\r\n if (found) {\r\n return found;\r\n }\r\n found = this.outlineCast(high, lowFile, highSyntax);\r\n if (found) {\r\n return found;\r\n }\r\n found = this.outlineConv(high, lowFile, highSyntax);\r\n if (found) {\r\n return found;\r\n }\r\n found = this.outlineCond(high, lowFile, highSyntax);\r\n if (found) {\r\n return found;\r\n }\r\n found = this.outlineCatchSimple(high, lowFile);\r\n if (found) {\r\n return found;\r\n }\r\n found = this.outlineDataSimple(high, lowFile);\r\n if (found) {\r\n return found;\r\n }\r\n found = this.outlineData(high, lowFile, highSyntax);\r\n if (found) {\r\n return found;\r\n }\r\n found = this.outlineFS(high, lowFile, highSyntax);\r\n if (found) {\r\n return found;\r\n }\r\n found = this.newToCreateObject(high, lowFile, highSyntax);\r\n if (found) {\r\n return found;\r\n }\r\n found = this.replaceXsdBool(high, lowFile, highSyntax);\r\n if (found) {\r\n return found;\r\n }\r\n found = this.replaceLineFunctions(high, lowFile, highSyntax);\r\n if (found) {\r\n return found;\r\n }\r\n found = this.replaceTableExpression(high, lowFile, highSyntax);\r\n if (found) {\r\n return found;\r\n }\r\n found = this.replaceAppendExpression(high, lowFile, highSyntax);\r\n if (found) {\r\n return found;\r\n }\r\n return undefined;\r\n }\r\n //////////////////////////////////////////\r\n downportSQLExtras(low, high, lowFile, _highSyntax) {\r\n if (!(low.get() instanceof _statement_1.Unknown)) {\r\n return undefined;\r\n }\r\n if (!(high.get() instanceof Statements.Select)\r\n && !(high.get() instanceof Statements.SelectLoop)\r\n && !(high.get() instanceof Statements.UpdateDatabase)\r\n && !(high.get() instanceof Statements.ModifyDatabase)\r\n && !(high.get() instanceof Statements.DeleteDatabase)\r\n && !(high.get() instanceof Statements.InsertDatabase)) {\r\n return undefined;\r\n }\r\n let fix = undefined;\r\n const addFix = (token) => {\r\n const add = edit_helper_1.EditHelper.deleteToken(lowFile, token);\r\n if (fix === undefined) {\r\n fix = add;\r\n }\r\n else {\r\n fix = edit_helper_1.EditHelper.merge(fix, add);\r\n }\r\n };\r\n const candidates = [high.findAllExpressionsRecursive(Expressions.SQLTarget),\r\n high.findAllExpressionsRecursive(Expressions.SQLSource),\r\n high.findAllExpressionsRecursive(Expressions.SQLSourceSimple)].flat();\r\n for (const c of candidates) {\r\n if (c.getFirstToken() instanceof tokens_1.WAt) {\r\n addFix(c.getFirstToken());\r\n }\r\n }\r\n for (const fieldList of high.findAllExpressionsMulti([Expressions.SQLFieldList, Expressions.SQLFieldListLoop], true)) {\r\n for (const token of fieldList.getDirectTokens()) {\r\n if (token.getStr() === \",\") {\r\n addFix(token);\r\n }\r\n }\r\n }\r\n if (fix === undefined) {\r\n return undefined;\r\n }\r\n else {\r\n return issue_1.Issue.atToken(lowFile, low.getFirstToken(), \"SQL, remove \\\" and ,\", this.getMetadata().key, this.conf.severity, fix);\r\n }\r\n }\r\n downportSelectInline(low, high, lowFile, highSyntax) {\r\n if (!(low.get() instanceof _statement_1.Unknown)) {\r\n return undefined;\r\n }\r\n else if (!(high.get() instanceof Statements.Select) && !(high.get() instanceof Statements.SelectLoop)) {\r\n return undefined;\r\n }\r\n // as first step outline the @DATA, note that void types are okay, as long the field names are specified\r\n let found = this.downportSelectSingleInline(low, high, lowFile, highSyntax);\r\n if (found) {\r\n return found;\r\n }\r\n found = this.downportSelectTableInline(low, high, lowFile, highSyntax);\r\n if (found) {\r\n return found;\r\n }\r\n return undefined;\r\n }\r\n downportSelectSingleInline(_low, high, lowFile, _highSyntax) {\r\n var _a, _b, _c, _d;\r\n const targets = ((_a = high.findFirstExpression(Expressions.SQLIntoStructure)) === null || _a === void 0 ? void 0 : _a.findDirectExpressions(Expressions.SQLTarget)) || [];\r\n if (targets.length !== 1) {\r\n return undefined;\r\n }\r\n const inlineData = targets[0].findFirstExpression(Expressions.InlineData);\r\n if (inlineData === undefined) {\r\n return undefined;\r\n }\r\n const sqlFrom = high.findAllExpressions(Expressions.SQLFromSource);\r\n if (sqlFrom.length !== 1) {\r\n return undefined;\r\n }\r\n const tableName = (_b = sqlFrom[0].findDirectExpression(Expressions.DatabaseTable)) === null || _b === void 0 ? void 0 : _b.concatTokens();\r\n if (tableName === undefined) {\r\n return undefined;\r\n }\r\n const indentation = \" \".repeat(high.getFirstToken().getStart().getCol() - 1);\r\n let fieldList = high.findFirstExpression(Expressions.SQLFieldList);\r\n if (fieldList === undefined) {\r\n fieldList = high.findFirstExpression(Expressions.SQLFieldListLoop);\r\n }\r\n if (fieldList === undefined) {\r\n return undefined;\r\n }\r\n let fieldDefinition = \"\";\r\n const fields = fieldList.findDirectExpressions(Expressions.SQLFieldName);\r\n const name = ((_c = inlineData.findFirstExpression(Expressions.TargetField)) === null || _c === void 0 ? void 0 : _c.concatTokens()) || \"error\";\r\n if (fields.length === 1) {\r\n fieldDefinition = `DATA ${name} TYPE ${tableName}-${fields[0].concatTokens()}.`;\r\n }\r\n else if (fieldList.concatTokens() === \"*\") {\r\n fieldDefinition = `DATA ${name} TYPE ${tableName}.`;\r\n }\r\n else if (fieldList.concatTokens().toUpperCase() === \"COUNT( * )\") {\r\n fieldDefinition = `DATA ${name} TYPE i.`;\r\n }\r\n else if (fieldList.getChildren().length === 1 && fieldList.getChildren()[0].get() instanceof Expressions.SQLAggregation) {\r\n const c = fieldList.getChildren()[0];\r\n if (c instanceof nodes_1.ExpressionNode) {\r\n const concat = (_d = c.findFirstExpression(Expressions.SQLArithmetics)) === null || _d === void 0 ? void 0 : _d.concatTokens();\r\n fieldDefinition = `DATA ${name} TYPE ${tableName}-${concat}.`;\r\n }\r\n }\r\n else {\r\n for (const f of fields) {\r\n const fieldName = f.concatTokens();\r\n fieldDefinition += indentation + \" \" + fieldName + \" TYPE \" + tableName + \"-\" + fieldName + \",\\n\";\r\n }\r\n fieldDefinition = `DATA: BEGIN OF ${name},\r\n${fieldDefinition}${indentation} END OF ${name}.`;\r\n }\r\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `${fieldDefinition}\r\n${indentation}`);\r\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, inlineData.getFirstToken().getStart(), inlineData.getLastToken().getEnd(), name);\r\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\r\n return issue_1.Issue.atToken(lowFile, inlineData.getFirstToken(), \"Outline SELECT @DATA\", this.getMetadata().key, this.conf.severity, fix);\r\n }\r\n downportSelectTableInline(_low, high, lowFile, highSyntax) {\r\n var _a, _b, _c;\r\n const targets = ((_a = high.findFirstExpression(Expressions.SQLIntoTable)) === null || _a === void 0 ? void 0 : _a.findDirectExpressions(Expressions.SQLTarget)) || [];\r\n if (targets.length !== 1) {\r\n return undefined;\r\n }\r\n const indentation = \" \".repeat(high.getFirstToken().getStart().getCol() - 1);\r\n const inlineData = targets[0].findFirstExpression(Expressions.InlineData);\r\n if (inlineData === undefined) {\r\n return undefined;\r\n }\r\n const sqlFrom = high.findAllExpressions(Expressions.SQLFromSource);\r\n if (sqlFrom.length === 0) {\r\n return issue_1.Issue.atToken(lowFile, high.getFirstToken(), \"Error outlining, sqlFrom not found\", this.getMetadata().key, this.conf.severity);\r\n }\r\n let tableName = (_b = sqlFrom[0].findDirectExpression(Expressions.DatabaseTable)) === null || _b === void 0 ? void 0 : _b.concatTokens();\r\n if (tableName === undefined) {\r\n return undefined;\r\n }\r\n const fieldList = high.findFirstExpression(Expressions.SQLFieldList);\r\n if (fieldList === undefined) {\r\n return undefined;\r\n }\r\n let fieldDefinitions = \"\";\r\n for (const f of fieldList.findDirectExpressions(Expressions.SQLFieldName)) {\r\n let fieldName = f.concatTokens();\r\n if (fieldName.includes(\"~\")) {\r\n const split = fieldName.split(\"~\");\r\n tableName = split[0];\r\n fieldName = split[1];\r\n }\r\n fieldDefinitions += indentation + \" \" + fieldName + \" TYPE \" + tableName + \"-\" + fieldName + \",\\n\";\r\n }\r\n const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);\r\n const name = ((_c = inlineData.findFirstExpression(Expressions.TargetField)) === null || _c === void 0 ? void 0 : _c.concatTokens()) || \"error\";\r\n let fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `TYPES: BEGIN OF ${uniqueName},\r\n${fieldDefinitions}${indentation} END OF ${uniqueName}.\r\n${indentation}DATA ${name} TYPE STANDARD TABLE OF ${uniqueName} WITH DEFAULT KEY.\r\n${indentation}`);\r\n if (fieldDefinitions === \"\") {\r\n fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `DATA ${name} TYPE STANDARD TABLE OF ${tableName} WITH DEFAULT KEY.\r\n${indentation}`);\r\n }\r\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, inlineData.getFirstToken().getStart(), inlineData.getLastToken().getEnd(), name);\r\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\r\n return issue_1.Issue.atToken(lowFile, inlineData.getFirstToken(), \"Outline SELECT @DATA\", this.getMetadata().key, this.conf.severity, fix);\r\n }\r\n replaceAppendExpression(high, lowFile, highSyntax) {\r\n if (!(high.get() instanceof Statements.Append)) {\r\n return undefined;\r\n }\r\n const children = high.getChildren();\r\n if (children[1].get() instanceof Expressions.Source) {\r\n const source = children[1];\r\n const target = high.findDirectExpression(Expressions.Target);\r\n if (target === undefined) {\r\n return undefined;\r\n }\r\n const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);\r\n const indentation = \" \".repeat(high.getFirstToken().getStart().getCol() - 1);\r\n const firstToken = high.getFirstToken();\r\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${target === null || target === void 0 ? void 0 : target.concatTokens()}.\r\n${indentation}${uniqueName} = ${source.concatTokens()}.\\n${indentation}`);\r\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, source.getFirstToken().getStart(), source.getLastToken().getEnd(), uniqueName);\r\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\r\n return issue_1.Issue.atToken(lowFile, high.getFirstToken(), \"Outline APPEND source expression\", this.getMetadata().key, this.conf.severity, fix);\r\n }\r\n return undefined;\r\n }\r\n replaceTableExpression(node, lowFile, highSyntax) {\r\n for (const fieldChain of node.findAllExpressionsRecursive(Expressions.FieldChain)) {\r\n const tableExpression = fieldChain.findDirectExpression(Expressions.TableExpression);\r\n if (tableExpression === undefined) {\r\n continue;\r\n }\r\n const concat = node.concatTokens().toUpperCase();\r\n if (concat.includes(\" LINE_EXISTS( \") || concat.includes(\" LINE_INDEX( \")) {\r\n // note: line_exists() must be replaced before handling table expressions\r\n continue;\r\n }\r\n let pre = \"\";\r\n let startToken = undefined;\r\n for (const child of fieldChain.getChildren()) {\r\n if (startToken === undefined) {\r\n startToken = child.getFirstToken();\r\n }\r\n else if (child === tableExpression) {\r\n break;\r\n }\r\n pre += child.concatTokens();\r\n }\r\n if (startToken === undefined) {\r\n continue;\r\n }\r\n let condition = \"\";\r\n for (const c of tableExpression.getChildren() || []) {\r\n if (c.getFirstToken().getStr() === \"[\" || c.getFirstToken().getStr() === \"]\") {\r\n continue;\r\n }\r\n else if (c.get() instanceof Expressions.ComponentChainSimple && condition === \"\") {\r\n condition = \"WITH KEY \";\r\n }\r\n else if (c.get() instanceof Expressions.Source && condition === \"\") {\r\n condition = \"INDEX \";\r\n }\r\n condition += c.concatTokens() + \" \";\r\n }\r\n const uniqueName = this.uniqueName(node.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);\r\n const indentation = \" \".repeat(node.getFirstToken().getStart().getCol() - 1);\r\n const firstToken = node.getFirstToken();\r\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${pre}.\r\n${indentation}READ TABLE ${pre} ${condition}INTO ${uniqueName}.\r\n${indentation}IF sy-subrc <> 0.\r\n${indentation} RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.\r\n${indentation}ENDIF.\r\n${indentation}`);\r\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, startToken.getStart(), tableExpression.getLastToken().getEnd(), uniqueName);\r\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\r\n return issue_1.Issue.atToken(lowFile, node.getFirstToken(), \"Outline table expression\", this.getMetadata().key, this.conf.severity, fix);\r\n }\r\n return undefined;\r\n }\r\n outlineCatchSimple(node, lowFile) {\r\n // outlines \"CATCH cx_bcs INTO DATA(lx_bcs_excep).\", note that this does not need to look at types\r\n var _a, _b;\r\n if (!(node.get() instanceof Statements.Catch)) {\r\n return undefined;\r\n }\r\n const target = node.findFirstExpression(Expressions.Target);\r\n if (!(((_a = target === null || target === void 0 ? void 0 : target.getFirstChild()) === null || _a === void 0 ? void 0 : _a.get()) instanceof Expressions.InlineData)) {\r\n return undefined;\r\n }\r\n const classNames = node.findDirectExpressions(Expressions.ClassName);\r\n if (classNames.length !== 1) {\r\n return undefined;\r\n }\r\n const className = classNames[0].concatTokens();\r\n const targetName = (_b = target.findFirstExpression(Expressions.TargetField)) === null || _b === void 0 ? void 0 : _b.concatTokens();\r\n const indentation = \" \".repeat(node.getFirstToken().getStart().getCol() - 1);\r\n const code = ` DATA ${targetName} TYPE REF TO ${className}.\r\n${indentation}CATCH ${className} INTO ${targetName}.`;\r\n const fix = edit_helper_1.EditHelper.replaceRange(lowFile, node.getStart(), node.getEnd(), code);\r\n return issue_1.Issue.atToken(lowFile, node.getFirstToken(), \"Outline DATA\", this.getMetadata().key, this.conf.severity, fix);\r\n }\r\n outlineDataSimple(node, lowFile) {\r\n // outlines \"DATA(ls_msg) = temp1.\", note that this does not need to look at types\r\n var _a, _b, _c;\r\n if (!(node.get() instanceof Statements.Move)) {\r\n return undefined;\r\n }\r\n const target = node.findFirstExpression(Expressions.Target);\r\n if (!(((_a = target === null || target === void 0 ? void 0 : target.getFirstChild()) === null || _a === void 0 ? void 0 : _a.get()) instanceof Expressions.InlineData)) {\r\n return undefined;\r\n }\r\n let type = \"\";\r\n const source = node.findFirstExpression(Expressions.Source);\r\n if (source === undefined) {\r\n return undefined;\r\n }\r\n else if (source.getChildren().length !== 1) {\r\n return undefined;\r\n }\r\n else if (!(((_b = source.getFirstChild()) === null || _b === void 0 ? void 0 : _b.get()) instanceof Expressions.FieldChain)) {\r\n return undefined;\r\n }\r\n else if (source.findFirstExpression(Expressions.FieldOffset)) {\r\n return undefined;\r\n }\r\n else if (source.findFirstExpression(Expressions.FieldLength)) {\r\n return undefined;\r\n }\r\n else if (source.findFirstExpression(Expressions.TableExpression)) {\r\n const chain = source.findDirectExpression(Expressions.FieldChain);\r\n if (chain !== undefined\r\n && chain.getChildren().length === 2\r\n && chain.getChildren()[0].get() instanceof Expressions.SourceField\r\n && chain.getChildren()[1].get() instanceof Expressions.TableExpression) {\r\n type = \"LINE OF \" + chain.getChildren()[0].concatTokens();\r\n }\r\n else {\r\n return undefined;\r\n }\r\n }\r\n else {\r\n type = source.concatTokens();\r\n }\r\n const targetName = (_c = target.findFirstExpression(Expressions.TargetField)) === null || _c === void 0 ? void 0 : _c.concatTokens();\r\n const indentation = \" \".repeat(node.getFirstToken().getStart().getCol() - 1);\r\n const firstToken = node.getFirstToken();\r\n const lastToken = node.getLastToken();\r\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${targetName} LIKE ${type}.\\n${indentation}`);\r\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, firstToken.getStart(), lastToken.getEnd(), `${targetName} = ${source.concatTokens()}.`);\r\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\r\n return issue_1.Issue.atToken(lowFile, node.getFirstToken(), \"Outline DATA\", this.getMetadata().key, this.conf.severity, fix);\r\n }\r\n partiallyImplemented(node, lowFile) {\r\n if (node.get() instanceof Statements.InterfaceDef) {\r\n const partially = node.findDirectTokenByText(\"PARTIALLY\");\r\n if (partially === undefined) {\r\n return undefined;\r\n }\r\n const implemented = node.findDirectTokenByText(\"IMPLEMENTED\");\r\n if (implemented === undefined) {\r\n return undefined;\r\n }\r\n const fix = edit_helper_1.EditHelper.deleteRange(lowFile, partially.getStart(), implemented.getEnd());\r\n return issue_1.Issue.atToken(lowFile, partially, \"Downport PARTIALLY IMPLEMENTED\", this.getMetadata().key, this.conf.severity, fix);\r\n }\r\n return undefined;\r\n }\r\n raiseException(node, lowFile, highSyntax) {\r\n /*\r\n Note: IF_T100_DYN_MSG does not exist in 702, so this rule is mostly relevant for the transpiler\r\n \r\n DATA foo LIKE if_t100_message=>t100key.\r\n foo-msgid = 'ZHVAM'.\r\n foo-msgno = '001'.\r\n foo-attr1 = 'IF_T100_DYN_MSG~MSGV1'.\r\n foo-attr2 = 'IF_T100_DYN_MSG~MSGV2'.\r\n foo-attr3 = 'IF_T100_DYN_MSG~MSGV3'.\r\n foo-attr4 = 'IF_T100_DYN_MSG~MSGV4'.\r\n DATA bar TYPE REF TO zcl_hvam_exception.\r\n CREATE OBJECT bar EXPORTING textid = foo.\r\n bar->if_t100_dyn_msg~msgty = 'E'.\r\n bar->if_t100_dyn_msg~msgv1 = 'abc'.\r\n bar->if_t100_dyn_msg~msgv2 = 'abc'.\r\n bar->if_t100_dyn_msg~msgv3 = 'abc'.\r\n bar->if_t100_dyn_msg~msgv4 = 'abc'.\r\n RAISE EXCEPTION bar.\r\n */\r\n var _a;\r\n if (node.get() instanceof Statements.Raise) {\r\n const startToken = node.findDirectTokenByText(\"ID\");\r\n if (startToken === undefined) {\r\n return undefined;\r\n }\r\n const sources = node.findDirectExpressions(Expressions.Source);\r\n const id = sources[0].concatTokens();\r\n const numberExpression = node.findExpressionAfterToken(\"NUMBER\");\r\n if (numberExpression === undefined) {\r\n throw \"downport raiseException, could not find number\";\r\n }\r\n let number = numberExpression.concatTokens();\r\n if (numberExpression.get() instanceof Expressions.MessageNumber) {\r\n number = \"'\" + number + \"'\";\r\n }\r\n const className = ((_a = node.findDirectExpression(Expressions.ClassName)) === null || _a === void 0 ? void 0 : _a.concatTokens()) || \"ERROR\";\r\n const uniqueName1 = this.uniqueName(node.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);\r\n const uniqueName2 = this.uniqueName(node.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);\r\n const indentation = \" \".repeat(node.getFirstToken().getStart().getCol() - 1);\r\n const abap = `DATA ${uniqueName1} LIKE if_t100_message=>t100key.\r\n${indentation}${uniqueName1}-msgid = ${id}.\r\n${indentation}${uniqueName1}-msgno = ${number}.\r\n${indentation}DATA ${uniqueName2} TYPE REF TO ${className}.\r\n${indentation}CREATE OBJECT ${uniqueName2} EXPORTING textid = ${uniqueName1}.\r\n${indentation}RAISE EXCEPTION ${uniqueName2}.`;\r\n const fix = edit_helper_1.EditHelper.replaceRange(lowFile, node.getStart(), node.getEnd(), abap);\r\n return issue_1.Issue.atToken(lowFile, startToken, \"Downport RAISE MESSAGE\", this.getMetadata().key, this.conf.severity, fix);\r\n }\r\n return undefined;\r\n }\r\n emptyKey(node, lowFile) {\r\n for (let i of node.findAllExpressions(Expressions.TypeTable)) {\r\n const key = i.findDirectExpression(Expressions.TypeTableKey);\r\n if (key === undefined) {\r\n continue;\r\n }\r\n i = key;\r\n const concat = i.concatTokens();\r\n if (concat.toUpperCase().includes(\"WITH EMPTY KEY\") === false) {\r\n continue;\r\n }\r\n const token = i.findDirectTokenByText(\"EMPTY\");\r\n if (token === undefined) {\r\n continue;\r\n }\r\n const fix = edit_helper_1.EditHelper.replaceToken(lowFile, token, \"DEFAULT\");\r\n return issue_1.Issue.atToken(lowFile, i.getFirstToken(), \"Downport EMPTY KEY\", this.getMetadata().key, this.conf.severity, fix);\r\n }\r\n return undefined;\r\n }\r\n moveWithSimpleValue(high, lowFile) {\r\n if (!(high.get() instanceof Statements.Move)\r\n || high.getChildren().length !== 4) {\r\n return undefined;\r\n }\r\n const target = high.findDirectExpression(Expressions.Target);\r\n if (target === undefined) {\r\n return undefined;\r\n }\r\n const source = high.findDirectExpression(Expressions.Source);\r\n if (source === undefined) {\r\n return undefined;\r\n }\r\n const field = target.findDirectExpression(Expressions.TargetField);\r\n if (field === undefined) {\r\n return;\r\n }\r\n const valueBody = source.findDirectExpression(Expressions.ValueBody);\r\n if (valueBody === undefined || valueBody.getChildren().length !== 1) {\r\n return;\r\n }\r\n const fieldAssignment = valueBody.findDirectExpression(Expressions.FieldAssignment);\r\n if (fieldAssignment === undefined) {\r\n return;\r\n }\r\n const indentation = \" \".repeat(high.getFirstToken().getStart().getCol() - 1);\r\n const code = `CLEAR ${target.concatTokens()}.\\n` + indentation + target.concatTokens() + \"-\" + fieldAssignment.concatTokens();\r\n const start = high.getFirstToken().getStart();\r\n const end = high.getLastToken().getStart();\r\n const fix = edit_helper_1.EditHelper.replaceRange(lowFile, start, end, code);\r\n return issue_1.Issue.atToken(lowFile, high.getFirstToken(), \"Downport, Reduce statement\", this.getMetadata().key, this.conf.severity, fix);\r\n }\r\n moveWithOperator(high, lowFile) {\r\n var _a, _b, _c;\r\n if (!(high.get() instanceof Statements.Move)) {\r\n return undefined;\r\n }\r\n const children = high.getChildren();\r\n const secondChild = children[1];\r\n if (secondChild === undefined) {\r\n return undefined;\r\n }\r\n const op = secondChild.getFirstToken();\r\n let operator = \"\";\r\n switch (op.getStr()) {\r\n case \"+\":\r\n operator = \" + \";\r\n break;\r\n case \"-\":\r\n operator = \" - \";\r\n break;\r\n case \"/=\":\r\n operator = \" / \";\r\n break;\r\n case \"*=\":\r\n operator = \" * \";\r\n break;\r\n case \"&&=\":\r\n operator = \" && \";\r\n break;\r\n default:\r\n return undefined;\r\n }\r\n const target = (_a = high.findDirectExpression(Expressions.Target)) === null || _a === void 0 ? void 0 : _a.concatTokens();\r\n if (target === undefined) {\r\n return;\r\n }\r\n const sourceStart = (_c = (_b = high.findDirectExpression(Expressions.Source)) === null || _b === void 0 ? void 0 : _b.getFirstChild()) === null || _c === void 0 ? void 0 : _c.getFirstToken().getStart();\r\n if (sourceStart === undefined) {\r\n return;\r\n }\r\n const fix = edit_helper_1.EditHelper.replaceRange(lowFile, op.getStart(), sourceStart, \"= \" + target + operator);\r\n return issue_1.Issue.atToken(lowFile, high.getFirstToken(), \"Expand operator\", this.getMetadata().key, this.conf.severity, fix);\r\n }\r\n // must be very simple string templates, like \"|{ ls_line-no ALPHA = IN }|\"\r\n stringTemplateAlpha(node, lowFile) {\r\n var _a, _b, _c;\r\n if (!(node.get() instanceof Statements.Move)) {\r\n return undefined;\r\n }\r\n const topSource = node.findDirectExpression(Expressions.Source);\r\n if (topSource === undefined || topSource.getChildren().length !== 1) {\r\n return undefined;\r\n }\r\n const child = topSource.getFirstChild();\r\n if (!(child.get() instanceof Expressions.StringTemplate)) {\r\n return undefined;\r\n }\r\n const templateTokens = child.getChildren();\r\n if (templateTokens.length !== 3\r\n || templateTokens[0].getFirstToken().getStr() !== \"|{\"\r\n || templateTokens[2].getFirstToken().getStr() !== \"}|\") {\r\n return undefined;\r\n }\r\n const templateSource = child.findDirectExpression(Expressions.StringTemplateSource);\r\n const formatting = (_a = templateSource === null || templateSource === void 0 ? void 0 : templateSource.findDirectExpression(Expressions.StringTemplateFormatting)) === null || _a === void 0 ? void 0 : _a.concatTokens();\r\n let functionName = \"\";\r\n switch (formatting) {\r\n case \"ALPHA = IN\":\r\n functionName = \"CONVERSION_EXIT_ALPHA_INPUT\";\r\n break;\r\n case \"ALPHA = OUT\":\r\n functionName = \"CONVERSION_EXIT_ALPHA_OUTPUT\";\r\n break;\r\n default:\r\n return undefined;\r\n }\r\n const indentation = \" \".repeat(node.getFirstToken().getStart().getCol() - 1);\r\n const source = (_b = templateSource === null || templateSource === void 0 ? void 0 : templateSource.findDirectExpression(Expressions.Source)) === null || _b === void 0 ? void 0 : _b.concatTokens();\r\n const topTarget = (_c = node.findDirectExpression(Expressions.Target)) === null || _c === void 0 ? void 0 : _c.concatTokens();\r\n const code = `CALL FUNCTION '${functionName}'\r\n${indentation} EXPORTING\r\n${indentation} input = ${source}\r\n${indentation} IMPORTING\r\n${indentation} output = ${topTarget}.`;\r\n const fix = edit_helper_1.EditHelper.replaceRange(lowFile, node.getFirstToken().getStart(), node.getLastToken().getEnd(), code);\r\n return issue_1.Issue.atToken(lowFile, node.getFirstToken(), \"Downport ALPHA\", this.getMetadata().key, this.conf.severity, fix);\r\n }\r\n outlineLoopInput(node, lowFile, highSyntax) {\r\n if (!(node.get() instanceof Statements.Loop)) {\r\n return undefined;\r\n }\r\n else if (node.findDirectExpression(Expressions.SimpleSource2)) {\r\n return undefined;\r\n }\r\n // the first Source must be outlined\r\n const s = node.findDirectExpression(Expressions.Source);\r\n if (s === undefined) {\r\n return undefined;\r\n }\r\n const uniqueName = this.uniqueName(node.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);\r\n const code = `DATA(${uniqueName}) = ${s.concatTokens()}.\\n` +\r\n \" \".repeat(node.getFirstToken().getStart().getCol() - 1);\r\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, node.getFirstToken().getStart(), code);\r\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, s.getFirstToken().getStart(), s.getLastToken().getEnd(), uniqueName);\r\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\r\n return issue_1.Issue.atToken(lowFile, node.getFirstToken(), \"Outline LOOP input\", this.getMetadata().key, this.conf.severity, fix);\r\n }\r\n outlineLoopTarget(node, lowFile, _highSyntax) {\r\n var _a, _b, _c, _d, _e;\r\n // also allows outlining of voided types\r\n if (!(node.get() instanceof Statements.Loop)) {\r\n return undefined;\r\n }\r\n const sourceName = (_a = node.findDirectExpression(Expressions.SimpleSource2)) === null || _a === void 0 ? void 0 : _a.concatTokens();\r\n if (sourceName === undefined) {\r\n return undefined;\r\n }\r\n const concat = node.concatTokens();\r\n if (concat.includes(\" REFERENCE INTO \")) {\r\n return undefined;\r\n }\r\n const indentation = \" \".repeat(node.getFirstToken().getStart().getCol() - 1);\r\n const dataTarget = (_b = node.findDirectExpression(Expressions.Target)) === null || _b === void 0 ? void 0 : _b.findDirectExpression(Expressions.InlineData);\r\n if (dataTarget) {\r\n const targetName = ((_c = dataTarget.findDirectExpression(Expressions.TargetField)) === null || _c === void 0 ? void 0 : _c.concatTokens()) || \"DOWNPORT_ERROR\";\r\n const code = `DATA ${targetName} LIKE LINE OF ${sourceName}.\\n${indentation}`;\r\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, node.getFirstToken().getStart(), code);\r\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, dataTarget.getFirstToken().getStart(), dataTarget.getLastToken().getEnd(), targetName);\r\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\r\n return issue_1.Issue.atToken(lowFile, node.getFirstToken(), \"Outline LOOP data target\", this.getMetadata().key, this.conf.severity, fix);\r\n }\r\n const fsTarget = (_d = node.findDirectExpression(Expressions.FSTarget)) === null || _d === void 0 ? void 0 : _d.findDirectExpression(Expressions.InlineFS);\r\n if (fsTarget) {\r\n const targetName = ((_e = fsTarget.findDirectExpression(Expressions.TargetFieldSymbol)) === null || _e === void 0 ? void 0 : _e.concatTokens()) || \"DOWNPORT_ERROR\";\r\n const code = `FIELD-SYMBOLS ${targetName} LIKE LINE OF ${sourceName}.\\n${indentation}`;\r\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, node.getFirstToken().getStart(), code);\r\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, fsTarget.getFirstToken().getStart(), fsTarget.getLastToken().getEnd(), targetName);\r\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\r\n return issue_1.Issue.atToken(lowFile, node.getFirstToken(), \"Outline LOOP fs target\", this.getMetadata().key, this.conf.severity, fix);\r\n }\r\n return undefined;\r\n }\r\n outlineFor(forLoop, indentation) {\r\n var _a, _b, _c, _d, _e, _f;\r\n let body = \"\";\r\n let end = \"\";\r\n const loopSource = (_a = forLoop.findFirstExpression(Expressions.Source)) === null || _a === void 0 ? void 0 : _a.concatTokens();\r\n const loopTargetField = (_b = forLoop.findFirstExpression(Expressions.TargetField)) === null || _b === void 0 ? void 0 : _b.concatTokens();\r\n if (forLoop.findDirectTokenByText(\"UNTIL\")) {\r\n const name = (_c = forLoop.findFirstExpression(Expressions.Field)) === null || _c === void 0 ? void 0 : _c.concatTokens();\r\n body += indentation + \"DATA \" + name + \" TYPE i.\\n\";\r\n const cond = forLoop.findFirstExpression(Expressions.Cond);\r\n body += indentation + `WHILE NOT ${cond === null || cond === void 0 ? void 0 : cond.concatTokens()}.\\n`;\r\n const field = (_e = (_d = forLoop.findDirectExpression(Expressions.InlineFieldDefinition)) === null || _d === void 0 ? void 0 : _d.findFirstExpression(Expressions.Field)) === null || _e === void 0 ? void 0 : _e.concatTokens();\r\n body += indentation + ` ${field} = ${field} + 1.\\n`;\r\n end = \"ENDWHILE\";\r\n }\r\n else if (loopTargetField) {\r\n body += indentation + `LOOP AT ${loopSource} INTO DATA(${loopTargetField}).\\n`;\r\n end = \"ENDLOOP\";\r\n }\r\n else if (loopTargetField === undefined) {\r\n const loopTargetFieldSymbol = (_f = forLoop.findFirstExpression(Expressions.TargetFieldSymbol)) === null || _f === void 0 ? void 0 : _f.concatTokens();\r\n body += indentation + `LOOP AT ${loopSource} ASSIGNING FIELD-SYMBOL(${loopTargetFieldSymbol}).\\n`;\r\n end = \"ENDLOOP\";\r\n }\r\n return { body, end };\r\n }\r\n outlineSwitch(node, lowFile, highSyntax) {\r\n var _a, _b;\r\n for (const i of node.findAllExpressionsRecursive(Expressions.Source)) {\r\n const firstToken = i.getFirstToken();\r\n if (firstToken.getStr().toUpperCase() !== \"SWITCH\") {\r\n continue;\r\n }\r\n const type = this.findType(i, lowFile, highSyntax);\r\n if (type === undefined) {\r\n continue;\r\n }\r\n const uniqueName = this.uniqueName(firstToken.getStart(), lowFile.getFilename(), highSyntax);\r\n const indentation = \" \".repeat(node.getFirstToken().getStart().getCol() - 1);\r\n let body = \"\";\r\n let name = \"\";\r\n const switchBody = i.findDirectExpression(Expressions.SwitchBody);\r\n if (switchBody === undefined) {\r\n continue;\r\n }\r\n for (const l of ((_a = switchBody === null || switchBody === void 0 ? void 0 : switchBody.findDirectExpression(Expressions.Let)) === null || _a === void 0 ? void 0 : _a.findDirectExpressions(Expressions.InlineFieldDefinition)) || []) {\r\n name = l.getFirstToken().getStr();\r\n body += indentation + `DATA(${name}) = ${(_b = switchBody.findFirstExpression(Expressions.Source)) === null || _b === void 0 ? void 0 : _b.concatTokens()}.\\n`;\r\n }\r\n body += `DATA ${uniqueName} TYPE ${type}.\\n`;\r\n let firstSource = false;\r\n let inWhen = false;\r\n for (const c of switchBody.getChildren()) {\r\n if (c.get() instanceof Expressions.Source && firstSource === false) {\r\n body += indentation + `CASE ${c.concatTokens()}.`;\r\n firstSource = true;\r\n }\r\n else if (c instanceof nodes_1.TokenNode && c.concatTokens().toUpperCase() === \"THEN\") {\r\n inWhen = true;\r\n body += \".\\n\";\r\n }\r\n else if (c instanceof nodes_1.TokenNode && c.concatTokens().toUpperCase() === \"WHEN\") {\r\n inWhen = false;\r\n body += `\\n${indentation} WHEN `;\r\n }\r\n else if (c instanceof nodes_1.TokenNode && c.concatTokens().toUpperCase() === \"OR\") {\r\n body += ` OR `;\r\n }\r\n else if (c instanceof nodes_1.TokenNode && c.concatTokens().toUpperCase() === \"ELSE\") {\r\n inWhen = true;\r\n body += `\\n${indentation} WHEN OTHERS.\\n`;\r\n }\r\n else if (inWhen === false) {\r\n body += c.concatTokens();\r\n }\r\n else {\r\n body += indentation + \" \" + uniqueName + \" = \" + c.concatTokens() + \".\";\r\n }\r\n }\r\n body += \"\\n\" + indentation + \"ENDCASE.\\n\" + indentation;\r\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, node.getFirstToken().getStart(), body);\r\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, firstToken.getStart(), i.getLastToken().getEnd(), uniqueName);\r\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\r\n return issue_1.Issue.atToken(lowFile, firstToken, \"Downport SWITCH\", this.getMetadata().key, this.conf.severity, fix);\r\n }\r\n return undefined;\r\n }\r\n outlineReduce(node, lowFile, highSyntax) {\r\n var _a;\r\n for (const i of node.findAllExpressionsRecursive(Expressions.Source)) {\r\n const firstToken = i.getFirstToken();\r\n if (firstToken.getStr().toUpperCase() !== \"REDUCE\") {\r\n continue;\r\n }\r\n const type = this.findType(i, lowFile, highSyntax);\r\n if (type === undefined) {\r\n continue;\r\n }\r\n const uniqueName = this.uniqueName(firstToken.getStart(), lowFile.getFilename(), highSyntax);\r\n const indentation = \" \".repeat(node.getFirstToken().getStart().getCol() - 1);\r\n let body = \"\";\r\n let name = \"\";\r\n const reduceBody = i.findDirectExpression(Expressions.ReduceBody);\r\n if (reduceBody === undefined) {\r\n continue;\r\n }\r\n for (const init of reduceBody.findDirectExpressions(Expressions.InlineFieldDefinition)) {\r\n name = init.getFirstToken().getStr();\r\n body += indentation + `DATA(${name}) = ${(_a = reduceBody.findFirstExpression(Expressions.Source)) === null || _a === void 0 ? void 0 : _a.concatTokens()}.\\n`;\r\n }\r\n const forLoop = reduceBody.findDirectExpression(Expressions.For);\r\n if (forLoop === undefined) {\r\n continue;\r\n }\r\n const outlineFor = this.outlineFor(forLoop, indentation);\r\n body += outlineFor.body;\r\n const next = reduceBody.findDirectExpression(Expressions.ReduceNext);\r\n if (next === undefined) {\r\n continue;\r\n }\r\n for (const n of next.getChildren()) {\r\n if (n.concatTokens().toUpperCase() === \"NEXT\") {\r\n continue;\r\n }\r\n else if (n.concatTokens() === \"=\") {\r\n body += \" = \";\r\n }\r\n else if (n.get() instanceof Expressions.Field) {\r\n body += indentation + \" \" + n.concatTokens();\r\n }\r\n else if (n.get() instanceof Expressions.Source) {\r\n body += n.concatTokens() + \".\\n\";\r\n }\r\n }\r\n body += indentation + outlineFor.end + `.\\n`;\r\n body += indentation + `${uniqueName} = ${name}.\\n`;\r\n const abap = `DATA ${uniqueName} TYPE ${type}.\\n` +\r\n body +\r\n indentation;\r\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, node.getFirstToken().getStart(), abap);\r\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, firstToken.getStart(), i.getLastToken().getEnd(), uniqueName);\r\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\r\n return issue_1.Issue.atToken(lowFile, firstToken, \"Downport REDUCE\", this.getMetadata().key, this.conf.severity, fix);\r\n }\r\n return undefined;\r\n }\r\n outlineValue(node, lowFile, highSyntax) {\r\n var _a;\r\n const allSources = node.findAllExpressionsRecursive(Expressions.Source);\r\n for (const s of allSources) {\r\n const firstToken = s.getFirstToken();\r\n if (firstToken.getStr().toUpperCase() !== \"VALUE\") {\r\n continue;\r\n }\r\n let type = this.findType(s, lowFile, highSyntax);\r\n if (type === undefined) {\r\n if (node.get() instanceof Statements.Move && node.findDirectExpression(Expressions.Source) === s) {\r\n type = \"LIKE \" + ((_a = node.findDirectExpression(Expressions.Target)) === null || _a === void 0 ? void 0 : _a.concatTokens());\r\n }\r\n if (type === undefined) {\r\n continue;\r\n }\r\n }\r\n else {\r\n type = \"TYPE \" + type;\r\n }\r\n const valueBody = s.findDirectExpression(Expressions.ValueBody);\r\n const uniqueName = this.uniqueName(firstToken.getStart(), lowFile.getFilename(), highSyntax);\r\n let indentation = \" \".repeat(node.getFirstToken().getStart().getCol() - 1);\r\n let body = \"\";\r\n const forLoop = valueBody === null || valueBody === void 0 ? void 0 : valueBody.findDirectExpression(Expressions.For);\r\n let outlineFor = { body: \"\", end: \"\" };\r\n if (forLoop !== undefined) {\r\n outlineFor = this.outlineFor(forLoop, indentation);\r\n body += outlineFor.body;\r\n indentation += \" \";\r\n }\r\n let structureName = uniqueName;\r\n let added = false;\r\n let data = \"\";\r\n for (const b of (valueBody === null || valueBody === void 0 ? void 0 : valueBody.getChildren()) || []) {\r\n if (b.concatTokens() === \"(\" && added === false) {\r\n structureName = this.uniqueName(firstToken.getStart(), lowFile.getFilename(), highSyntax);\r\n data = indentation + `DATA ${structureName} LIKE LINE OF ${uniqueName}.\\n`;\r\n }\r\n if (b.get() instanceof Expressions.FieldAssignment) {\r\n if (added === false) {\r\n body += data;\r\n added = true;\r\n }\r\n body += indentation + structureName + \"-\" + b.concatTokens() + \".\\n\";\r\n }\r\n else if (b.get() instanceof Expressions.Source) {\r\n structureName = b.concatTokens();\r\n }\r\n else if (b instanceof nodes_1.ExpressionNode && b.get() instanceof Expressions.Let) {\r\n body += this.outlineLet(b, indentation, highSyntax, lowFile);\r\n }\r\n else if (b.concatTokens() === \")\") {\r\n body += indentation + `APPEND ${structureName} TO ${uniqueName}.\\n`;\r\n }\r\n }\r\n if (forLoop !== undefined) {\r\n indentation = indentation.substring(2);\r\n body += indentation + outlineFor.end + `.\\n`;\r\n }\r\n const abap = `DATA ${uniqueName} ${type}.\\n` +\r\n body +\r\n indentation;\r\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, node.getFirstToken().getStart(), abap);\r\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, firstToken.getStart(), s.getLastToken().getEnd(), uniqueName);\r\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\r\n return issue_1.Issue.atToken(lowFile, firstToken, \"Downport VALUE\", this.getMetadata().key, this.conf.severity, fix);\r\n }\r\n return undefined;\r\n }\r\n outlineLet(node, indentation, highSyntax, lowFile) {\r\n var _a;\r\n let ret = \"\";\r\n for (const f of node.findDirectExpressions(Expressions.InlineFieldDefinition)) {\r\n const c = f.getFirstChild();\r\n if (c === undefined) {\r\n continue;\r\n }\r\n const name = c.concatTokens().toLowerCase();\r\n const spag = highSyntax.spaghetti.lookupPosition(c.getFirstToken().getStart(), lowFile.getFilename());\r\n if (spag === undefined) {\r\n continue;\r\n }\r\n const found = spag.findVariable(name);\r\n if (found === undefined) {\r\n continue;\r\n }\r\n const type = found.getType().getQualifiedName() ? (_a = found.getType().getQualifiedName()) === null || _a === void 0 ? void 0 : _a.toLowerCase() : found.getType().toABAP();\r\n ret += indentation + \"DATA \" + name + ` TYPE ${type}.\\n`;\r\n const source = f.findFirstExpression(Expressions.Source);\r\n if (source) {\r\n ret += indentation + name + ` = ${source.concatTokens()}.\\n`;\r\n }\r\n }\r\n return ret;\r\n }\r\n findType(i, lowFile, highSyntax) {\r\n var _a;\r\n const expr = i.findDirectExpression(Expressions.TypeNameOrInfer);\r\n if (expr === undefined) {\r\n return undefined;\r\n }\r\n const firstToken = expr.getFirstToken();\r\n const concat = expr.concatTokens().toLowerCase();\r\n if (concat !== \"#\") {\r\n return concat;\r\n }\r\n const spag = highSyntax.spaghetti.lookupPosition(firstToken.getStart(), lowFile.getFilename());\r\n if (spag === undefined) {\r\n return undefined;\r\n }\r\n let inferred = undefined;\r\n for (const r of (spag === null || spag === void 0 ? void 0 : spag.getData().references) || []) {\r\n if (r.referenceType === _reference_1.ReferenceType.InferredType\r\n && r.resolved\r\n && r.position.getStart().equals(firstToken.getStart())\r\n && r.resolved instanceof _typed_identifier_1.TypedIdentifier) {\r\n inferred = r.resolved;\r\n break;\r\n }\r\n }\r\n if (inferred === undefined) {\r\n return undefined;\r\n }\r\n return (_a = inferred.getType().getQualifiedName()) === null || _a === void 0 ? void 0 : _a.toLowerCase();\r\n }\r\n outlineFS(node, lowFile, highSyntax) {\r\n var _a, _b;\r\n for (const i of node.findAllExpressionsRecursive(Expressions.InlineFS)) {\r\n const nameToken = (_a = i.findDirectExpression(Expressions.TargetFieldSymbol)) === null || _a === void 0 ? void 0 : _a.getFirstToken();\r\n if (nameToken === undefined) {\r\n continue;\r\n }\r\n const name = nameToken.getStr();\r\n let type = \"\";\r\n if (node.concatTokens().toUpperCase().startsWith(\"APPEND INITIAL LINE TO \")) {\r\n type = \"LIKE LINE OF \" + ((_b = node.findFirstExpression(Expressions.Target)) === null || _b === void 0 ? void 0 : _b.concatTokens());\r\n }\r\n else {\r\n const spag = highSyntax.spaghetti.lookupPosition(nameToken.getStart(), lowFile.getFilename());\r\n if (spag === undefined) {\r\n continue;\r\n }\r\n const found = spag.findVariable(name);\r\n if (found === undefined) {\r\n continue;\r\n }\r\n else if (found.getType() instanceof basic_1.VoidType) {\r\n return issue_1.Issue.atToken(lowFile, i.getFirstToken(), \"Error outlining voided type\", this.getMetadata().key, this.conf.severity);\r\n }\r\n type = \"TYPE \";\r\n type += found.getType().getQualifiedName() ? found.getType().getQualifiedName().toLowerCase() : found.getType().toABAP();\r\n }\r\n const code = `FIELD-SYMBOLS ${name} ${type}.\\n` +\r\n \" \".repeat(node.getFirstToken().getStart().getCol() - 1);\r\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, node.getFirstToken().getStart(), code);\r\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, i.getFirstToken().getStart(), i.getLastToken().getEnd(), name);\r\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\r\n return issue_1.Issue.atToken(lowFile, i.getFirstToken(), \"Outline FIELD-SYMBOL\", this.getMetadata().key, this.conf.severity, fix);\r\n }\r\n return undefined;\r\n }\r\n outlineData(node, lowFile, highSyntax) {\r\n var _a, _b;\r\n for (const i of node.findAllExpressionsRecursive(Expressions.InlineData)) {\r\n const nameToken = (_a = i.findDirectExpression(Expressions.TargetField)) === null || _a === void 0 ? void 0 : _a.getFirstToken();\r\n if (nameToken === undefined) {\r\n continue;\r\n }\r\n const name = nameToken.getStr();\r\n const spag = highSyntax.spaghetti.lookupPosition(nameToken.getStart(), lowFile.getFilename());\r\n if (spag === undefined) {\r\n continue;\r\n }\r\n const found = spag.findVariable(name);\r\n if (found === undefined) {\r\n continue;\r\n }\r\n else if (found.getType() instanceof basic_1.VoidType && found.getType().getQualifiedName() === undefined) {\r\n continue;\r\n }\r\n const type = found.getType().getQualifiedName() ? (_b = found.getType().getQualifiedName()) === null || _b === void 0 ? void 0 : _b.toLowerCase() : found.getType().toABAP();\r\n const code = `DATA ${name} TYPE ${type}.\\n` +\r\n \" \".repeat(node.getFirstToken().getStart().getCol() - 1);\r\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, node.getFirstToken().getStart(), code);\r\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, i.getFirstToken().getStart(), i.getLastToken().getEnd(), name);\r\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\r\n return issue_1.Issue.atToken(lowFile, i.getFirstToken(), \"Outline DATA\", this.getMetadata().key, this.conf.severity, fix);\r\n }\r\n return undefined;\r\n }\r\n outlineCond(node, lowFile, highSyntax) {\r\n for (const i of node.findAllExpressionsRecursive(Expressions.Source)) {\r\n if (i.getFirstToken().getStr().toUpperCase() !== \"COND\") {\r\n continue;\r\n }\r\n const body = i.findDirectExpression(Expressions.CondBody);\r\n if (body === undefined) {\r\n continue;\r\n }\r\n const uniqueName = this.uniqueName(i.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);\r\n const type = this.findType(i, lowFile, highSyntax);\r\n const indent = \" \".repeat(node.getFirstToken().getStart().getCol() - 1);\r\n const bodyCode = this.buildCondBody(body, uniqueName, indent, lowFile, highSyntax);\r\n const abap = `DATA ${uniqueName} TYPE ${type}.\\n` + bodyCode;\r\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, node.getFirstToken().getStart(), abap);\r\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, i.getFirstToken().getStart(), i.getLastToken().getEnd(), uniqueName);\r\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\r\n return issue_1.Issue.atToken(lowFile, i.getFirstToken(), \"Downport COND\", this.getMetadata().key, this.conf.severity, fix);\r\n }\r\n return undefined;\r\n }\r\n buildCondBody(body, uniqueName, indent, lowFile, highSyntax) {\r\n let code = \"\";\r\n let first = true;\r\n for (const c of body.getChildren()) {\r\n if (c instanceof nodes_1.TokenNode) {\r\n switch (c.getFirstToken().getStr().toUpperCase()) {\r\n case \"WHEN\":\r\n if (first === true) {\r\n code += indent + \"IF \";\r\n first = false;\r\n }\r\n else {\r\n code += indent + \"ELSEIF \";\r\n }\r\n break;\r\n case \"THEN\":\r\n code += \".\\n\";\r\n break;\r\n case \"ELSE\":\r\n code += indent + \"ELSE.\\n\";\r\n break;\r\n default:\r\n throw \"buildCondBody, unexpected token\";\r\n }\r\n }\r\n else if (c.get() instanceof Expressions.Cond) {\r\n code += c.concatTokens();\r\n }\r\n else if (c.get() instanceof Expressions.Let) {\r\n code += this.outlineLet(c, indent, highSyntax, lowFile);\r\n }\r\n else if (c.get() instanceof Expressions.Source) {\r\n code += indent + \" \" + uniqueName + \" = \" + c.concatTokens() + \".\\n\";\r\n }\r\n else {\r\n throw \"buildCondBody, unexpected expression, \" + c.get().constructor.name;\r\n }\r\n }\r\n code += indent + \"ENDIF.\\n\";\r\n code += indent;\r\n return code;\r\n }\r\n outlineConv(node, lowFile, highSyntax) {\r\n var _a;\r\n for (const i of node.findAllExpressionsRecursive(Expressions.Source)) {\r\n if (i.getFirstToken().getStr().toUpperCase() !== \"CONV\") {\r\n continue;\r\n }\r\n const body = (_a = i.findDirectExpression(Expressions.ConvBody)) === null || _a === void 0 ? void 0 : _a.concatTokens();\r\n if (body === undefined) {\r\n continue;\r\n }\r\n const uniqueName = this.uniqueName(i.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);\r\n const type = this.findType(i, lowFile, highSyntax);\r\n const indent = \" \".repeat(node.getFirstToken().getStart().getCol() - 1);\r\n const abap = `DATA ${uniqueName} TYPE ${type}.\\n` +\r\n indent + `${uniqueName} = ${body}.\\n` +\r\n indent;\r\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, node.getFirstToken().getStart(), abap);\r\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, i.getFirstToken().getStart(), i.getLastToken().getEnd(), uniqueName);\r\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\r\n return issue_1.Issue.atToken(lowFile, i.getFirstToken(), \"Downport CONV\", this.getMetadata().key, this.conf.severity, fix);\r\n }\r\n return undefined;\r\n }\r\n // \"CAST\" to \"?=\"\r\n outlineCast(node, lowFile, highSyntax) {\r\n var _a;\r\n for (const i of node.findAllExpressionsRecursive(Expressions.Cast)) {\r\n const uniqueName = this.uniqueName(i.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);\r\n const type = this.findType(i, lowFile, highSyntax);\r\n const body = (_a = i.findDirectExpression(Expressions.Source)) === null || _a === void 0 ? void 0 : _a.concatTokens();\r\n const abap = `DATA ${uniqueName} TYPE REF TO ${type}.\\n` +\r\n \" \".repeat(node.getFirstToken().getStart().getCol() - 1) +\r\n `${uniqueName} ?= ${body}.\\n` +\r\n \" \".repeat(node.getFirstToken().getStart().getCol() - 1);\r\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, node.getFirstToken().getStart(), abap);\r\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, i.getFirstToken().getStart(), i.getLastToken().getEnd(), uniqueName);\r\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\r\n return issue_1.Issue.atToken(lowFile, i.getFirstToken(), \"Downport CAST\", this.getMetadata().key, this.conf.severity, fix);\r\n }\r\n return undefined;\r\n }\r\n uniqueName(position, filename, highSyntax) {\r\n const spag = highSyntax.spaghetti.lookupPosition(position, filename);\r\n if (spag === undefined) {\r\n const name = \"temprr\" + this.counter;\r\n this.counter++;\r\n return name;\r\n }\r\n while (true) {\r\n const name = \"temp\" + this.counter;\r\n const found = spag.findVariable(name);\r\n this.counter++;\r\n if (found === undefined) {\r\n return name;\r\n }\r\n }\r\n }\r\n replaceXsdBool(node, lowFile, highSyntax) {\r\n const spag = highSyntax.spaghetti.lookupPosition(node.getFirstToken().getStart(), lowFile.getFilename());\r\n for (const r of (spag === null || spag === void 0 ? void 0 : spag.getData().references) || []) {\r\n if (r.referenceType === _reference_1.ReferenceType.BuiltinMethodReference\r\n && r.position.getName().toUpperCase() === \"XSDBOOL\") {\r\n const token = r.position.getToken();\r\n const fix = edit_helper_1.EditHelper.replaceRange(lowFile, token.getStart(), token.getEnd(), \"boolc\");\r\n return issue_1.Issue.atToken(lowFile, token, \"Use BOOLC\", this.getMetadata().key, this.conf.severity, fix);\r\n }\r\n }\r\n return undefined;\r\n }\r\n findMethodCallExpression(node, token) {\r\n var _a;\r\n for (const m of node.findAllExpressions(Expressions.MethodCall)) {\r\n if ((_a = m.findDirectExpression(Expressions.MethodName)) === null || _a === void 0 ? void 0 : _a.getFirstToken().getStart().equals(token.getStart())) {\r\n return m;\r\n }\r\n }\r\n return undefined;\r\n }\r\n replaceLineFunctions(node, lowFile, highSyntax) {\r\n var _a, _b;\r\n const spag = highSyntax.spaghetti.lookupPosition(node.getFirstToken().getStart(), lowFile.getFilename());\r\n for (const r of (spag === null || spag === void 0 ? void 0 : spag.getData().references) || []) {\r\n if (r.referenceType !== _reference_1.ReferenceType.BuiltinMethodReference) {\r\n continue;\r\n }\r\n const func = r.position.getName().toUpperCase();\r\n if (func === \"LINE_EXISTS\" || func === \"LINE_INDEX\") {\r\n const token = r.position.getToken();\r\n const expression = this.findMethodCallExpression(node, token);\r\n if (expression === undefined) {\r\n continue;\r\n }\r\n let condition = \"\";\r\n for (const c of ((_a = expression === null || expression === void 0 ? void 0 : expression.findFirstExpression(Expressions.TableExpression)) === null || _a === void 0 ? void 0 : _a.getChildren()) || []) {\r\n if (c.getFirstToken().getStr() === \"[\" || c.getFirstToken().getStr() === \"]\") {\r\n continue;\r\n }\r\n else if (c.get() instanceof Expressions.ComponentChainSimple && condition === \"\") {\r\n condition = \"WITH KEY \";\r\n }\r\n else if (c.get() instanceof Expressions.Source && condition === \"\") {\r\n condition = \"INDEX \";\r\n }\r\n condition += c.concatTokens() + \" \";\r\n }\r\n const tableName = (_b = expression.findFirstExpression(Expressions.Source)) === null || _b === void 0 ? void 0 : _b.concatTokens().split(\"[\")[0];\r\n const uniqueName = this.uniqueName(node.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);\r\n const indentation = \" \".repeat(node.getFirstToken().getStart().getCol() - 1);\r\n const sy = func === \"LINE_EXISTS\" ? \"sy-subrc\" : \"sy-tabix\";\r\n const code = `DATA ${uniqueName} LIKE sy-subrc.\\n` +\r\n indentation + `READ TABLE ${tableName} ${condition}TRANSPORTING NO FIELDS.\\n` +\r\n indentation + uniqueName + ` = ${sy}.\\n` +\r\n indentation;\r\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, node.getFirstToken().getStart(), code);\r\n const start = expression.getFirstToken().getStart();\r\n const end = expression.getLastToken().getEnd();\r\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, start, end, uniqueName + (func === \"LINE_EXISTS\" ? \" = 0\" : \"\"));\r\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\r\n return issue_1.Issue.atToken(lowFile, token, \"Use BOOLC\", this.getMetadata().key, this.conf.severity, fix);\r\n }\r\n }\r\n return undefined;\r\n }\r\n newToCreateObject(node, lowFile, highSyntax) {\r\n const source = node.findDirectExpression(Expressions.Source);\r\n let fix = undefined;\r\n if (node.get() instanceof Statements.Move\r\n && source\r\n && source.getFirstToken().getStr().toUpperCase() === \"NEW\") {\r\n const target = node.findDirectExpression(Expressions.Target);\r\n const found = source === null || source === void 0 ? void 0 : source.findFirstExpression(Expressions.NewObject);\r\n // must be at top level of the source for quickfix to work(todo: handle more scenarios)\r\n // todo, assumption: the target is not an inline definition\r\n if (target && found && source.concatTokens() === found.concatTokens()) {\r\n const abap = this.newParameters(found, target.concatTokens(), highSyntax, lowFile);\r\n if (abap !== undefined) {\r\n fix = edit_helper_1.EditHelper.replaceRange(lowFile, node.getFirstToken().getStart(), node.getLastToken().getEnd(), abap);\r\n }\r\n }\r\n }\r\n if (fix === undefined && node.findAllExpressions(Expressions.NewObject)) {\r\n const found = node.findFirstExpression(Expressions.NewObject);\r\n if (found === undefined) {\r\n return undefined;\r\n }\r\n const name = this.uniqueName(found.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);\r\n const abap = this.newParameters(found, name, highSyntax, lowFile);\r\n if (abap === undefined) {\r\n return undefined;\r\n }\r\n const type = this.findType(found, lowFile, highSyntax);\r\n const indentation = \" \".repeat(node.getFirstToken().getStart().getCol() - 1);\r\n const data = `DATA ${name} TYPE REF TO ${type}.\\n` +\r\n indentation + abap + \"\\n\" +\r\n indentation;\r\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, node.getFirstToken().getStart(), data);\r\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, found.getFirstToken().getStart(), found.getLastToken().getEnd(), name);\r\n fix = edit_helper_1.EditHelper.merge(fix2, fix1);\r\n }\r\n if (fix) {\r\n return issue_1.Issue.atToken(lowFile, node.getFirstToken(), \"Use CREATE OBJECT instead of NEW\", this.getMetadata().key, this.conf.severity, fix);\r\n }\r\n else {\r\n return undefined;\r\n }\r\n }\r\n newParameters(found, name, highSyntax, lowFile) {\r\n var _a, _b, _c;\r\n const typeToken = (_a = found.findDirectExpression(Expressions.TypeNameOrInfer)) === null || _a === void 0 ? void 0 : _a.getFirstToken();\r\n let extra = (typeToken === null || typeToken === void 0 ? void 0 : typeToken.getStr()) === \"#\" ? \"\" : \" TYPE \" + (typeToken === null || typeToken === void 0 ? void 0 : typeToken.getStr());\r\n const parameters = found.findFirstExpression(Expressions.ParameterListS);\r\n if (parameters) {\r\n extra = parameters ? extra + \" EXPORTING \" + parameters.concatTokens() : extra;\r\n }\r\n else if (typeToken) {\r\n const source = (_b = found.findDirectExpression(Expressions.Source)) === null || _b === void 0 ? void 0 : _b.concatTokens();\r\n if (source) {\r\n // find the default parameter name for the constructor\r\n const spag = highSyntax.spaghetti.lookupPosition(typeToken === null || typeToken === void 0 ? void 0 : typeToken.getStart(), lowFile.getFilename());\r\n let cdef = undefined;\r\n for (const r of (spag === null || spag === void 0 ? void 0 : spag.getData().references) || []) {\r\n if ((r.referenceType === _reference_1.ReferenceType.InferredType\r\n || r.referenceType === _reference_1.ReferenceType.ObjectOrientedReference)\r\n && r.resolved && r.position.getStart().equals(typeToken.getStart())) {\r\n cdef = r.resolved;\r\n }\r\n }\r\n if (cdef && cdef.getMethodDefinitions === undefined) {\r\n return undefined; // something wrong\r\n }\r\n const importing = (_c = cdef === null || cdef === void 0 ? void 0 : cdef.getMethodDefinitions().getByName(\"CONSTRUCTOR\")) === null || _c === void 0 ? void 0 : _c.getParameters().getDefaultImporting();\r\n if (importing) {\r\n extra += \" EXPORTING \" + importing + \" = \" + source;\r\n }\r\n else if (spag === undefined) {\r\n extra += \" SpagUndefined\";\r\n }\r\n else if (cdef === undefined) {\r\n extra += \" ClassDefinitionNotFound\";\r\n }\r\n else {\r\n extra += \" SomeError\";\r\n }\r\n }\r\n }\r\n const abap = `CREATE OBJECT ${name}${extra}.`;\r\n return abap;\r\n }\r\n}\r\nexports.Downport = Downport;\r\n//# sourceMappingURL=downport.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/downport.js?");
|
|
11668
|
+
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.Downport = exports.DownportConf = void 0;\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nconst _statement_1 = __webpack_require__(/*! ../abap/2_statements/statements/_statement */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/_statement.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 Expressions = __webpack_require__(/*! ../abap/2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst edit_helper_1 = __webpack_require__(/*! ../edit_helper */ \"./node_modules/@abaplint/core/build/src/edit_helper.js\");\r\nconst position_1 = __webpack_require__(/*! ../position */ \"./node_modules/@abaplint/core/build/src/position.js\");\r\nconst _abap_object_1 = __webpack_require__(/*! ../objects/_abap_object */ \"./node_modules/@abaplint/core/build/src/objects/_abap_object.js\");\r\nconst version_1 = __webpack_require__(/*! ../version */ \"./node_modules/@abaplint/core/build/src/version.js\");\r\nconst registry_1 = __webpack_require__(/*! ../registry */ \"./node_modules/@abaplint/core/build/src/registry.js\");\r\nconst syntax_1 = __webpack_require__(/*! ../abap/5_syntax/syntax */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/syntax.js\");\r\nconst _reference_1 = __webpack_require__(/*! ../abap/5_syntax/_reference */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_reference.js\");\r\nconst _typed_identifier_1 = __webpack_require__(/*! ../abap/types/_typed_identifier */ \"./node_modules/@abaplint/core/build/src/abap/types/_typed_identifier.js\");\r\nconst basic_1 = __webpack_require__(/*! ../abap/types/basic */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/index.js\");\r\nconst config_1 = __webpack_require__(/*! ../config */ \"./node_modules/@abaplint/core/build/src/config.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 include_graph_1 = __webpack_require__(/*! ../utils/include_graph */ \"./node_modules/@abaplint/core/build/src/utils/include_graph.js\");\r\nconst objects_1 = __webpack_require__(/*! ../objects */ \"./node_modules/@abaplint/core/build/src/objects/index.js\");\r\n// todo: refactor each sub-rule to new classes?\r\n// todo: add configuration\r\nclass DownportConf extends _basic_rule_config_1.BasicRuleConfig {\r\n}\r\nexports.DownportConf = DownportConf;\r\nclass Downport {\r\n constructor() {\r\n this.conf = new DownportConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"downport\",\r\n title: \"Downport statement\",\r\n shortDescription: `Experimental downport functionality`,\r\n extendedInformation: `Much like the 'commented_code' rule this rule loops through unknown statements and tries parsing with\r\na higher level language version. If successful, various rules are applied to downport the statement.\r\nTarget downport version is always v702, thus rule is only enabled if target version is v702.\r\n\r\nCurrent rules:\r\n* NEW transformed to CREATE OBJECT, opposite of https://rules.abaplint.org/use_new/\r\n* DATA() definitions are outlined, opposite of https://rules.abaplint.org/prefer_inline/\r\n* FIELD-SYMBOL() definitions are outlined\r\n* CONV is outlined\r\n* COND is outlined\r\n* REDUCE is outlined\r\n* SWITCH is outlined\r\n* APPEND expression is outlined\r\n* EMPTY KEY is changed to DEFAULT KEY, opposite of DEFAULT KEY in https://rules.abaplint.org/avoid_use/\r\n* CAST changed to ?=\r\n* LOOP AT method_call( ) is outlined\r\n* VALUE # with structure fields\r\n* VALUE # with internal table lines\r\n* Table Expressions are outlined\r\n* SELECT INTO @DATA definitions are outlined\r\n* Some occurrences of string template formatting option ALPHA changed to function module call\r\n* SELECT/INSERT/MODIFY/DELETE/UPDATE \",\" in field list removed, \"@\" in source/targets removed\r\n* PARTIALLY IMPLEMENTED removed, it can be quick fixed via rule implement_methods\r\n* RAISE EXCEPTION ... MESSAGE\r\n* Moving with +=, -=, /=, *=, &&= is expanded\r\n* line_exists and line_index is downported to READ TABLE\r\n\r\nOnly one transformation is applied to a statement at a time, so multiple steps might be required to do the full downport.`,\r\n tags: [_irule_1.RuleTag.Experimental, _irule_1.RuleTag.Downport, _irule_1.RuleTag.Quickfix],\r\n };\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n initialize(reg) {\r\n this.lowReg = reg;\r\n const version = this.lowReg.getConfig().getVersion();\r\n if (version === version_1.Version.v702 || version === version_1.Version.OpenABAP) {\r\n this.initHighReg();\r\n this.graph = new include_graph_1.IncludeGraph(reg);\r\n }\r\n return this;\r\n }\r\n run(lowObj) {\r\n var _a;\r\n const ret = [];\r\n this.counter = 1;\r\n const version = this.lowReg.getConfig().getVersion();\r\n if (version !== version_1.Version.v702 && version !== version_1.Version.OpenABAP) {\r\n return ret;\r\n }\r\n else if (!(lowObj instanceof _abap_object_1.ABAPObject)) {\r\n return ret;\r\n }\r\n const highObj = this.highReg.getObject(lowObj.getType(), lowObj.getName());\r\n if (highObj === undefined || !(highObj instanceof _abap_object_1.ABAPObject)) {\r\n return ret;\r\n }\r\n let highSyntaxObj = highObj;\r\n // for includes do the syntax check via a main program\r\n if (lowObj instanceof objects_1.Program && lowObj.isInclude()) {\r\n const mains = this.graph.listMainForInclude((_a = lowObj.getMainABAPFile()) === null || _a === void 0 ? void 0 : _a.getFilename());\r\n if (mains.length <= 0) {\r\n return [];\r\n }\r\n const f = this.highReg.getFileByName(mains[0]);\r\n if (f === undefined) {\r\n return [];\r\n }\r\n highSyntaxObj = this.highReg.findObjectForFile(f);\r\n }\r\n const highSyntax = new syntax_1.SyntaxLogic(this.highReg, highSyntaxObj).run();\r\n for (const lowFile of lowObj.getABAPFiles()) {\r\n const highFile = highObj.getABAPFileByName(lowFile.getFilename());\r\n if (highFile === undefined) {\r\n continue;\r\n }\r\n const lowStatements = lowFile.getStatements();\r\n const highStatements = highFile.getStatements();\r\n if (lowStatements.length !== highStatements.length) {\r\n // after applying a fix, there might be more statements in lowFile\r\n // should highReg be initialized again?\r\n /*\r\n const message = \"Internal Error: Statement lengths does not match\";\r\n ret.push(Issue.atStatement(lowFile, lowStatements[0], message, this.getMetadata().key));\r\n */\r\n continue;\r\n }\r\n for (let i = 0; i < lowStatements.length; i++) {\r\n const low = lowStatements[i];\r\n const high = highStatements[i];\r\n if ((low.get() instanceof _statement_1.Unknown && !(high.get() instanceof _statement_1.Unknown))\r\n || high.findFirstExpression(Expressions.InlineData)) {\r\n const issue = this.checkStatement(low, high, lowFile, highSyntax);\r\n if (issue) {\r\n ret.push(issue);\r\n }\r\n }\r\n }\r\n }\r\n return ret;\r\n }\r\n ////////////////////\r\n /** clones the orginal repository into highReg, and parses it with higher language version */\r\n initHighReg() {\r\n // use default configuration, ie. default target version\r\n const highConfig = config_1.Config.getDefault().get();\r\n const lowConfig = this.lowReg.getConfig().get();\r\n highConfig.syntax.errorNamespace = lowConfig.syntax.errorNamespace;\r\n highConfig.syntax.globalConstants = lowConfig.syntax.globalConstants;\r\n highConfig.syntax.globalMacros = lowConfig.syntax.globalMacros;\r\n this.highReg = new registry_1.Registry();\r\n for (const o of this.lowReg.getObjects()) {\r\n for (const f of o.getFiles()) {\r\n if (this.lowReg.isDependency(o) === true) {\r\n this.highReg.addDependency(f);\r\n }\r\n else {\r\n this.highReg.addFile(f);\r\n }\r\n }\r\n }\r\n this.highReg.parse();\r\n }\r\n /** applies one rule at a time, multiple iterations are required to transform complex statements */\r\n checkStatement(low, high, lowFile, highSyntax) {\r\n if (low.getFirstToken().getStart() instanceof position_1.VirtualPosition) {\r\n return undefined;\r\n }\r\n let found = this.partiallyImplemented(high, lowFile);\r\n if (found) {\r\n return found;\r\n }\r\n found = this.raiseException(high, lowFile, highSyntax);\r\n if (found) {\r\n return found;\r\n }\r\n found = this.emptyKey(high, lowFile);\r\n if (found) {\r\n return found;\r\n }\r\n found = this.stringTemplateAlpha(high, lowFile);\r\n if (found) {\r\n return found;\r\n }\r\n found = this.moveWithOperator(high, lowFile);\r\n if (found) {\r\n return found;\r\n }\r\n found = this.moveWithSimpleValue(high, lowFile);\r\n if (found) {\r\n return found;\r\n }\r\n found = this.downportSelectInline(low, high, lowFile, highSyntax);\r\n if (found) {\r\n return found;\r\n }\r\n found = this.downportSQLExtras(low, high, lowFile, highSyntax);\r\n if (found) {\r\n return found;\r\n }\r\n found = this.outlineLoopInput(high, lowFile, highSyntax);\r\n if (found) {\r\n return found;\r\n }\r\n found = this.outlineLoopTarget(high, lowFile, highSyntax);\r\n if (found) {\r\n return found;\r\n }\r\n found = this.outlineValue(high, lowFile, highSyntax);\r\n if (found) {\r\n return found;\r\n }\r\n found = this.outlineReduce(high, lowFile, highSyntax);\r\n if (found) {\r\n return found;\r\n }\r\n found = this.outlineSwitch(high, lowFile, highSyntax);\r\n if (found) {\r\n return found;\r\n }\r\n found = this.outlineCast(high, lowFile, highSyntax);\r\n if (found) {\r\n return found;\r\n }\r\n found = this.outlineConv(high, lowFile, highSyntax);\r\n if (found) {\r\n return found;\r\n }\r\n found = this.outlineCond(high, lowFile, highSyntax);\r\n if (found) {\r\n return found;\r\n }\r\n found = this.outlineCatchSimple(high, lowFile);\r\n if (found) {\r\n return found;\r\n }\r\n found = this.outlineDataSimple(high, lowFile);\r\n if (found) {\r\n return found;\r\n }\r\n found = this.outlineData(high, lowFile, highSyntax);\r\n if (found) {\r\n return found;\r\n }\r\n found = this.outlineFS(high, lowFile, highSyntax);\r\n if (found) {\r\n return found;\r\n }\r\n found = this.newToCreateObject(high, lowFile, highSyntax);\r\n if (found) {\r\n return found;\r\n }\r\n found = this.replaceXsdBool(high, lowFile, highSyntax);\r\n if (found) {\r\n return found;\r\n }\r\n found = this.replaceLineFunctions(high, lowFile, highSyntax);\r\n if (found) {\r\n return found;\r\n }\r\n found = this.replaceTableExpression(high, lowFile, highSyntax);\r\n if (found) {\r\n return found;\r\n }\r\n found = this.replaceAppendExpression(high, lowFile, highSyntax);\r\n if (found) {\r\n return found;\r\n }\r\n return undefined;\r\n }\r\n //////////////////////////////////////////\r\n downportSQLExtras(low, high, lowFile, _highSyntax) {\r\n if (!(low.get() instanceof _statement_1.Unknown)) {\r\n return undefined;\r\n }\r\n if (!(high.get() instanceof Statements.Select)\r\n && !(high.get() instanceof Statements.SelectLoop)\r\n && !(high.get() instanceof Statements.UpdateDatabase)\r\n && !(high.get() instanceof Statements.ModifyDatabase)\r\n && !(high.get() instanceof Statements.DeleteDatabase)\r\n && !(high.get() instanceof Statements.InsertDatabase)) {\r\n return undefined;\r\n }\r\n let fix = undefined;\r\n const addFix = (token) => {\r\n const add = edit_helper_1.EditHelper.deleteToken(lowFile, token);\r\n if (fix === undefined) {\r\n fix = add;\r\n }\r\n else {\r\n fix = edit_helper_1.EditHelper.merge(fix, add);\r\n }\r\n };\r\n const candidates = [high.findAllExpressionsRecursive(Expressions.SQLTarget),\r\n high.findAllExpressionsRecursive(Expressions.SQLSource),\r\n high.findAllExpressionsRecursive(Expressions.SQLSourceSimple)].flat();\r\n for (const c of candidates) {\r\n if (c.getFirstToken() instanceof tokens_1.WAt) {\r\n addFix(c.getFirstToken());\r\n }\r\n }\r\n for (const fieldList of high.findAllExpressionsMulti([Expressions.SQLFieldList, Expressions.SQLFieldListLoop], true)) {\r\n for (const token of fieldList.getDirectTokens()) {\r\n if (token.getStr() === \",\") {\r\n addFix(token);\r\n }\r\n }\r\n }\r\n if (fix === undefined) {\r\n return undefined;\r\n }\r\n else {\r\n return issue_1.Issue.atToken(lowFile, low.getFirstToken(), \"SQL, remove \\\" and ,\", this.getMetadata().key, this.conf.severity, fix);\r\n }\r\n }\r\n downportSelectInline(low, high, lowFile, highSyntax) {\r\n if (!(low.get() instanceof _statement_1.Unknown)) {\r\n return undefined;\r\n }\r\n else if (!(high.get() instanceof Statements.Select) && !(high.get() instanceof Statements.SelectLoop)) {\r\n return undefined;\r\n }\r\n // as first step outline the @DATA, note that void types are okay, as long the field names are specified\r\n let found = this.downportSelectSingleInline(low, high, lowFile, highSyntax);\r\n if (found) {\r\n return found;\r\n }\r\n found = this.downportSelectTableInline(low, high, lowFile, highSyntax);\r\n if (found) {\r\n return found;\r\n }\r\n return undefined;\r\n }\r\n downportSelectSingleInline(_low, high, lowFile, _highSyntax) {\r\n var _a, _b, _c, _d;\r\n const targets = ((_a = high.findFirstExpression(Expressions.SQLIntoStructure)) === null || _a === void 0 ? void 0 : _a.findDirectExpressions(Expressions.SQLTarget)) || [];\r\n if (targets.length !== 1) {\r\n return undefined;\r\n }\r\n const inlineData = targets[0].findFirstExpression(Expressions.InlineData);\r\n if (inlineData === undefined) {\r\n return undefined;\r\n }\r\n const sqlFrom = high.findAllExpressions(Expressions.SQLFromSource);\r\n if (sqlFrom.length !== 1) {\r\n return undefined;\r\n }\r\n const tableName = (_b = sqlFrom[0].findDirectExpression(Expressions.DatabaseTable)) === null || _b === void 0 ? void 0 : _b.concatTokens();\r\n if (tableName === undefined) {\r\n return undefined;\r\n }\r\n const indentation = \" \".repeat(high.getFirstToken().getStart().getCol() - 1);\r\n let fieldList = high.findFirstExpression(Expressions.SQLFieldList);\r\n if (fieldList === undefined) {\r\n fieldList = high.findFirstExpression(Expressions.SQLFieldListLoop);\r\n }\r\n if (fieldList === undefined) {\r\n return undefined;\r\n }\r\n let fieldDefinition = \"\";\r\n const fields = fieldList.findDirectExpressions(Expressions.SQLFieldName);\r\n const name = ((_c = inlineData.findFirstExpression(Expressions.TargetField)) === null || _c === void 0 ? void 0 : _c.concatTokens()) || \"error\";\r\n if (fields.length === 1) {\r\n fieldDefinition = `DATA ${name} TYPE ${tableName}-${fields[0].concatTokens()}.`;\r\n }\r\n else if (fieldList.concatTokens() === \"*\") {\r\n fieldDefinition = `DATA ${name} TYPE ${tableName}.`;\r\n }\r\n else if (fieldList.concatTokens().toUpperCase() === \"COUNT( * )\") {\r\n fieldDefinition = `DATA ${name} TYPE i.`;\r\n }\r\n else if (fieldList.getChildren().length === 1 && fieldList.getChildren()[0].get() instanceof Expressions.SQLAggregation) {\r\n const c = fieldList.getChildren()[0];\r\n if (c instanceof nodes_1.ExpressionNode) {\r\n const concat = (_d = c.findFirstExpression(Expressions.SQLArithmetics)) === null || _d === void 0 ? void 0 : _d.concatTokens();\r\n fieldDefinition = `DATA ${name} TYPE ${tableName}-${concat}.`;\r\n }\r\n }\r\n else {\r\n for (const f of fields) {\r\n const fieldName = f.concatTokens();\r\n fieldDefinition += indentation + \" \" + fieldName + \" TYPE \" + tableName + \"-\" + fieldName + \",\\n\";\r\n }\r\n fieldDefinition = `DATA: BEGIN OF ${name},\r\n${fieldDefinition}${indentation} END OF ${name}.`;\r\n }\r\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `${fieldDefinition}\r\n${indentation}`);\r\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, inlineData.getFirstToken().getStart(), inlineData.getLastToken().getEnd(), name);\r\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\r\n return issue_1.Issue.atToken(lowFile, inlineData.getFirstToken(), \"Outline SELECT @DATA\", this.getMetadata().key, this.conf.severity, fix);\r\n }\r\n downportSelectTableInline(_low, high, lowFile, highSyntax) {\r\n var _a, _b, _c;\r\n const targets = ((_a = high.findFirstExpression(Expressions.SQLIntoTable)) === null || _a === void 0 ? void 0 : _a.findDirectExpressions(Expressions.SQLTarget)) || [];\r\n if (targets.length !== 1) {\r\n return undefined;\r\n }\r\n const indentation = \" \".repeat(high.getFirstToken().getStart().getCol() - 1);\r\n const inlineData = targets[0].findFirstExpression(Expressions.InlineData);\r\n if (inlineData === undefined) {\r\n return undefined;\r\n }\r\n const sqlFrom = high.findAllExpressions(Expressions.SQLFromSource);\r\n if (sqlFrom.length === 0) {\r\n return issue_1.Issue.atToken(lowFile, high.getFirstToken(), \"Error outlining, sqlFrom not found\", this.getMetadata().key, this.conf.severity);\r\n }\r\n let tableName = (_b = sqlFrom[0].findDirectExpression(Expressions.DatabaseTable)) === null || _b === void 0 ? void 0 : _b.concatTokens();\r\n if (tableName === undefined) {\r\n return undefined;\r\n }\r\n const fieldList = high.findFirstExpression(Expressions.SQLFieldList);\r\n if (fieldList === undefined) {\r\n return undefined;\r\n }\r\n let fieldDefinitions = \"\";\r\n for (const f of fieldList.findDirectExpressions(Expressions.SQLFieldName)) {\r\n let fieldName = f.concatTokens();\r\n if (fieldName.includes(\"~\")) {\r\n const split = fieldName.split(\"~\");\r\n tableName = split[0];\r\n fieldName = split[1];\r\n }\r\n fieldDefinitions += indentation + \" \" + fieldName + \" TYPE \" + tableName + \"-\" + fieldName + \",\\n\";\r\n }\r\n const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);\r\n const name = ((_c = inlineData.findFirstExpression(Expressions.TargetField)) === null || _c === void 0 ? void 0 : _c.concatTokens()) || \"error\";\r\n let fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `TYPES: BEGIN OF ${uniqueName},\r\n${fieldDefinitions}${indentation} END OF ${uniqueName}.\r\n${indentation}DATA ${name} TYPE STANDARD TABLE OF ${uniqueName} WITH DEFAULT KEY.\r\n${indentation}`);\r\n if (fieldDefinitions === \"\") {\r\n fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `DATA ${name} TYPE STANDARD TABLE OF ${tableName} WITH DEFAULT KEY.\r\n${indentation}`);\r\n }\r\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, inlineData.getFirstToken().getStart(), inlineData.getLastToken().getEnd(), name);\r\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\r\n return issue_1.Issue.atToken(lowFile, inlineData.getFirstToken(), \"Outline SELECT @DATA\", this.getMetadata().key, this.conf.severity, fix);\r\n }\r\n replaceAppendExpression(high, lowFile, highSyntax) {\r\n if (!(high.get() instanceof Statements.Append)) {\r\n return undefined;\r\n }\r\n const children = high.getChildren();\r\n if (children[1].get() instanceof Expressions.Source) {\r\n const source = children[1];\r\n const target = high.findDirectExpression(Expressions.Target);\r\n if (target === undefined) {\r\n return undefined;\r\n }\r\n const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);\r\n const indentation = \" \".repeat(high.getFirstToken().getStart().getCol() - 1);\r\n const firstToken = high.getFirstToken();\r\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${target === null || target === void 0 ? void 0 : target.concatTokens()}.\r\n${indentation}${uniqueName} = ${source.concatTokens()}.\\n${indentation}`);\r\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, source.getFirstToken().getStart(), source.getLastToken().getEnd(), uniqueName);\r\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\r\n return issue_1.Issue.atToken(lowFile, high.getFirstToken(), \"Outline APPEND source expression\", this.getMetadata().key, this.conf.severity, fix);\r\n }\r\n return undefined;\r\n }\r\n replaceTableExpression(node, lowFile, highSyntax) {\r\n for (const fieldChain of node.findAllExpressionsRecursive(Expressions.FieldChain)) {\r\n const tableExpression = fieldChain.findDirectExpression(Expressions.TableExpression);\r\n if (tableExpression === undefined) {\r\n continue;\r\n }\r\n const concat = node.concatTokens().toUpperCase();\r\n if (concat.includes(\" LINE_EXISTS( \") || concat.includes(\" LINE_INDEX( \")) {\r\n // note: line_exists() must be replaced before handling table expressions\r\n continue;\r\n }\r\n let pre = \"\";\r\n let startToken = undefined;\r\n for (const child of fieldChain.getChildren()) {\r\n if (startToken === undefined) {\r\n startToken = child.getFirstToken();\r\n }\r\n else if (child === tableExpression) {\r\n break;\r\n }\r\n pre += child.concatTokens();\r\n }\r\n if (startToken === undefined) {\r\n continue;\r\n }\r\n let condition = \"\";\r\n for (const c of tableExpression.getChildren() || []) {\r\n if (c.getFirstToken().getStr() === \"[\" || c.getFirstToken().getStr() === \"]\") {\r\n continue;\r\n }\r\n else if (c.get() instanceof Expressions.ComponentChainSimple && condition === \"\") {\r\n condition = \"WITH KEY \";\r\n }\r\n else if (c.get() instanceof Expressions.Source && condition === \"\") {\r\n condition = \"INDEX \";\r\n }\r\n condition += c.concatTokens() + \" \";\r\n }\r\n const uniqueName = this.uniqueName(node.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);\r\n const indentation = \" \".repeat(node.getFirstToken().getStart().getCol() - 1);\r\n const firstToken = node.getFirstToken();\r\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${pre}.\r\n${indentation}READ TABLE ${pre} ${condition}INTO ${uniqueName}.\r\n${indentation}IF sy-subrc <> 0.\r\n${indentation} RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.\r\n${indentation}ENDIF.\r\n${indentation}`);\r\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, startToken.getStart(), tableExpression.getLastToken().getEnd(), uniqueName);\r\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\r\n return issue_1.Issue.atToken(lowFile, node.getFirstToken(), \"Outline table expression\", this.getMetadata().key, this.conf.severity, fix);\r\n }\r\n return undefined;\r\n }\r\n outlineCatchSimple(node, lowFile) {\r\n // outlines \"CATCH cx_bcs INTO DATA(lx_bcs_excep).\", note that this does not need to look at types\r\n var _a, _b;\r\n if (!(node.get() instanceof Statements.Catch)) {\r\n return undefined;\r\n }\r\n const target = node.findFirstExpression(Expressions.Target);\r\n if (!(((_a = target === null || target === void 0 ? void 0 : target.getFirstChild()) === null || _a === void 0 ? void 0 : _a.get()) instanceof Expressions.InlineData)) {\r\n return undefined;\r\n }\r\n const classNames = node.findDirectExpressions(Expressions.ClassName);\r\n if (classNames.length !== 1) {\r\n return undefined;\r\n }\r\n const className = classNames[0].concatTokens();\r\n const targetName = (_b = target.findFirstExpression(Expressions.TargetField)) === null || _b === void 0 ? void 0 : _b.concatTokens();\r\n const indentation = \" \".repeat(node.getFirstToken().getStart().getCol() - 1);\r\n const code = ` DATA ${targetName} TYPE REF TO ${className}.\r\n${indentation}CATCH ${className} INTO ${targetName}.`;\r\n const fix = edit_helper_1.EditHelper.replaceRange(lowFile, node.getStart(), node.getEnd(), code);\r\n return issue_1.Issue.atToken(lowFile, node.getFirstToken(), \"Outline DATA\", this.getMetadata().key, this.conf.severity, fix);\r\n }\r\n outlineDataSimple(node, lowFile) {\r\n // outlines \"DATA(ls_msg) = temp1.\", note that this does not need to look at types\r\n var _a, _b, _c;\r\n if (!(node.get() instanceof Statements.Move)) {\r\n return undefined;\r\n }\r\n const target = node.findFirstExpression(Expressions.Target);\r\n if (!(((_a = target === null || target === void 0 ? void 0 : target.getFirstChild()) === null || _a === void 0 ? void 0 : _a.get()) instanceof Expressions.InlineData)) {\r\n return undefined;\r\n }\r\n let type = \"\";\r\n const source = node.findFirstExpression(Expressions.Source);\r\n if (source === undefined) {\r\n return undefined;\r\n }\r\n else if (source.getChildren().length !== 1) {\r\n return undefined;\r\n }\r\n else if (!(((_b = source.getFirstChild()) === null || _b === void 0 ? void 0 : _b.get()) instanceof Expressions.FieldChain)) {\r\n return undefined;\r\n }\r\n else if (source.findFirstExpression(Expressions.FieldOffset)) {\r\n return undefined;\r\n }\r\n else if (source.findFirstExpression(Expressions.FieldLength)) {\r\n return undefined;\r\n }\r\n else if (source.findFirstExpression(Expressions.TableExpression)) {\r\n const chain = source.findDirectExpression(Expressions.FieldChain);\r\n if (chain !== undefined\r\n && chain.getChildren().length === 2\r\n && chain.getChildren()[0].get() instanceof Expressions.SourceField\r\n && chain.getChildren()[1].get() instanceof Expressions.TableExpression) {\r\n type = \"LINE OF \" + chain.getChildren()[0].concatTokens();\r\n }\r\n else {\r\n return undefined;\r\n }\r\n }\r\n else {\r\n type = source.concatTokens();\r\n }\r\n const targetName = (_c = target.findFirstExpression(Expressions.TargetField)) === null || _c === void 0 ? void 0 : _c.concatTokens();\r\n const indentation = \" \".repeat(node.getFirstToken().getStart().getCol() - 1);\r\n const firstToken = node.getFirstToken();\r\n const lastToken = node.getLastToken();\r\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${targetName} LIKE ${type}.\\n${indentation}`);\r\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, firstToken.getStart(), lastToken.getEnd(), `${targetName} = ${source.concatTokens()}.`);\r\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\r\n return issue_1.Issue.atToken(lowFile, node.getFirstToken(), \"Outline DATA\", this.getMetadata().key, this.conf.severity, fix);\r\n }\r\n partiallyImplemented(node, lowFile) {\r\n if (node.get() instanceof Statements.InterfaceDef) {\r\n const partially = node.findDirectTokenByText(\"PARTIALLY\");\r\n if (partially === undefined) {\r\n return undefined;\r\n }\r\n const implemented = node.findDirectTokenByText(\"IMPLEMENTED\");\r\n if (implemented === undefined) {\r\n return undefined;\r\n }\r\n const fix = edit_helper_1.EditHelper.deleteRange(lowFile, partially.getStart(), implemented.getEnd());\r\n return issue_1.Issue.atToken(lowFile, partially, \"Downport PARTIALLY IMPLEMENTED\", this.getMetadata().key, this.conf.severity, fix);\r\n }\r\n return undefined;\r\n }\r\n raiseException(node, lowFile, highSyntax) {\r\n /*\r\n Note: IF_T100_DYN_MSG does not exist in 702, so this rule is mostly relevant for the transpiler\r\n \r\n DATA foo LIKE if_t100_message=>t100key.\r\n foo-msgid = 'ZHVAM'.\r\n foo-msgno = '001'.\r\n foo-attr1 = 'IF_T100_DYN_MSG~MSGV1'.\r\n foo-attr2 = 'IF_T100_DYN_MSG~MSGV2'.\r\n foo-attr3 = 'IF_T100_DYN_MSG~MSGV3'.\r\n foo-attr4 = 'IF_T100_DYN_MSG~MSGV4'.\r\n DATA bar TYPE REF TO zcl_hvam_exception.\r\n CREATE OBJECT bar EXPORTING textid = foo.\r\n bar->if_t100_dyn_msg~msgty = 'E'.\r\n bar->if_t100_dyn_msg~msgv1 = 'abc'.\r\n bar->if_t100_dyn_msg~msgv2 = 'abc'.\r\n bar->if_t100_dyn_msg~msgv3 = 'abc'.\r\n bar->if_t100_dyn_msg~msgv4 = 'abc'.\r\n RAISE EXCEPTION bar.\r\n */\r\n var _a;\r\n if (node.get() instanceof Statements.Raise) {\r\n const startToken = node.findDirectTokenByText(\"ID\");\r\n if (startToken === undefined) {\r\n return undefined;\r\n }\r\n const sources = node.findDirectExpressions(Expressions.Source);\r\n const id = sources[0].concatTokens();\r\n const numberExpression = node.findExpressionAfterToken(\"NUMBER\");\r\n if (numberExpression === undefined) {\r\n throw \"downport raiseException, could not find number\";\r\n }\r\n let number = numberExpression.concatTokens();\r\n if (numberExpression.get() instanceof Expressions.MessageNumber) {\r\n number = \"'\" + number + \"'\";\r\n }\r\n const className = ((_a = node.findDirectExpression(Expressions.ClassName)) === null || _a === void 0 ? void 0 : _a.concatTokens()) || \"ERROR\";\r\n const uniqueName1 = this.uniqueName(node.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);\r\n const uniqueName2 = this.uniqueName(node.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);\r\n const indentation = \" \".repeat(node.getFirstToken().getStart().getCol() - 1);\r\n const abap = `DATA ${uniqueName1} LIKE if_t100_message=>t100key.\r\n${indentation}${uniqueName1}-msgid = ${id}.\r\n${indentation}${uniqueName1}-msgno = ${number}.\r\n${indentation}DATA ${uniqueName2} TYPE REF TO ${className}.\r\n${indentation}CREATE OBJECT ${uniqueName2} EXPORTING textid = ${uniqueName1}.\r\n${indentation}RAISE EXCEPTION ${uniqueName2}.`;\r\n const fix = edit_helper_1.EditHelper.replaceRange(lowFile, node.getStart(), node.getEnd(), abap);\r\n return issue_1.Issue.atToken(lowFile, startToken, \"Downport RAISE MESSAGE\", this.getMetadata().key, this.conf.severity, fix);\r\n }\r\n return undefined;\r\n }\r\n emptyKey(node, lowFile) {\r\n for (let i of node.findAllExpressions(Expressions.TypeTable)) {\r\n const key = i.findDirectExpression(Expressions.TypeTableKey);\r\n if (key === undefined) {\r\n continue;\r\n }\r\n i = key;\r\n const concat = i.concatTokens();\r\n if (concat.toUpperCase().includes(\"WITH EMPTY KEY\") === false) {\r\n continue;\r\n }\r\n const token = i.findDirectTokenByText(\"EMPTY\");\r\n if (token === undefined) {\r\n continue;\r\n }\r\n const fix = edit_helper_1.EditHelper.replaceToken(lowFile, token, \"DEFAULT\");\r\n return issue_1.Issue.atToken(lowFile, i.getFirstToken(), \"Downport EMPTY KEY\", this.getMetadata().key, this.conf.severity, fix);\r\n }\r\n return undefined;\r\n }\r\n moveWithSimpleValue(high, lowFile) {\r\n if (!(high.get() instanceof Statements.Move)\r\n || high.getChildren().length !== 4) {\r\n return undefined;\r\n }\r\n const target = high.findDirectExpression(Expressions.Target);\r\n if (target === undefined) {\r\n return undefined;\r\n }\r\n const source = high.findDirectExpression(Expressions.Source);\r\n if (source === undefined) {\r\n return undefined;\r\n }\r\n const field = target.findDirectExpression(Expressions.TargetField);\r\n if (field === undefined) {\r\n return;\r\n }\r\n const valueBody = source.findDirectExpression(Expressions.ValueBody);\r\n if (valueBody === undefined || valueBody.getChildren().length !== 1) {\r\n return;\r\n }\r\n const fieldAssignment = valueBody.findDirectExpression(Expressions.FieldAssignment);\r\n if (fieldAssignment === undefined) {\r\n return;\r\n }\r\n const indentation = \" \".repeat(high.getFirstToken().getStart().getCol() - 1);\r\n const code = `CLEAR ${target.concatTokens()}.\\n` + indentation + target.concatTokens() + \"-\" + fieldAssignment.concatTokens();\r\n const start = high.getFirstToken().getStart();\r\n const end = high.getLastToken().getStart();\r\n const fix = edit_helper_1.EditHelper.replaceRange(lowFile, start, end, code);\r\n return issue_1.Issue.atToken(lowFile, high.getFirstToken(), \"Downport, Reduce statement\", this.getMetadata().key, this.conf.severity, fix);\r\n }\r\n moveWithOperator(high, lowFile) {\r\n var _a, _b, _c;\r\n if (!(high.get() instanceof Statements.Move)) {\r\n return undefined;\r\n }\r\n const children = high.getChildren();\r\n const secondChild = children[1];\r\n if (secondChild === undefined) {\r\n return undefined;\r\n }\r\n const op = secondChild.getFirstToken();\r\n let operator = \"\";\r\n switch (op.getStr()) {\r\n case \"+\":\r\n operator = \" + \";\r\n break;\r\n case \"-\":\r\n operator = \" - \";\r\n break;\r\n case \"/=\":\r\n operator = \" / \";\r\n break;\r\n case \"*=\":\r\n operator = \" * \";\r\n break;\r\n case \"&&=\":\r\n operator = \" && \";\r\n break;\r\n default:\r\n return undefined;\r\n }\r\n const target = (_a = high.findDirectExpression(Expressions.Target)) === null || _a === void 0 ? void 0 : _a.concatTokens();\r\n if (target === undefined) {\r\n return;\r\n }\r\n const sourceStart = (_c = (_b = high.findDirectExpression(Expressions.Source)) === null || _b === void 0 ? void 0 : _b.getFirstChild()) === null || _c === void 0 ? void 0 : _c.getFirstToken().getStart();\r\n if (sourceStart === undefined) {\r\n return;\r\n }\r\n const fix = edit_helper_1.EditHelper.replaceRange(lowFile, op.getStart(), sourceStart, \"= \" + target + operator);\r\n return issue_1.Issue.atToken(lowFile, high.getFirstToken(), \"Expand operator\", this.getMetadata().key, this.conf.severity, fix);\r\n }\r\n // must be very simple string templates, like \"|{ ls_line-no ALPHA = IN }|\"\r\n stringTemplateAlpha(node, lowFile) {\r\n var _a, _b, _c;\r\n if (!(node.get() instanceof Statements.Move)) {\r\n return undefined;\r\n }\r\n const topSource = node.findDirectExpression(Expressions.Source);\r\n if (topSource === undefined || topSource.getChildren().length !== 1) {\r\n return undefined;\r\n }\r\n const child = topSource.getFirstChild();\r\n if (!(child.get() instanceof Expressions.StringTemplate)) {\r\n return undefined;\r\n }\r\n const templateTokens = child.getChildren();\r\n if (templateTokens.length !== 3\r\n || templateTokens[0].getFirstToken().getStr() !== \"|{\"\r\n || templateTokens[2].getFirstToken().getStr() !== \"}|\") {\r\n return undefined;\r\n }\r\n const templateSource = child.findDirectExpression(Expressions.StringTemplateSource);\r\n const formatting = (_a = templateSource === null || templateSource === void 0 ? void 0 : templateSource.findDirectExpression(Expressions.StringTemplateFormatting)) === null || _a === void 0 ? void 0 : _a.concatTokens();\r\n let functionName = \"\";\r\n switch (formatting) {\r\n case \"ALPHA = IN\":\r\n functionName = \"CONVERSION_EXIT_ALPHA_INPUT\";\r\n break;\r\n case \"ALPHA = OUT\":\r\n functionName = \"CONVERSION_EXIT_ALPHA_OUTPUT\";\r\n break;\r\n default:\r\n return undefined;\r\n }\r\n const indentation = \" \".repeat(node.getFirstToken().getStart().getCol() - 1);\r\n const source = (_b = templateSource === null || templateSource === void 0 ? void 0 : templateSource.findDirectExpression(Expressions.Source)) === null || _b === void 0 ? void 0 : _b.concatTokens();\r\n const topTarget = (_c = node.findDirectExpression(Expressions.Target)) === null || _c === void 0 ? void 0 : _c.concatTokens();\r\n const code = `CALL FUNCTION '${functionName}'\r\n${indentation} EXPORTING\r\n${indentation} input = ${source}\r\n${indentation} IMPORTING\r\n${indentation} output = ${topTarget}.`;\r\n const fix = edit_helper_1.EditHelper.replaceRange(lowFile, node.getFirstToken().getStart(), node.getLastToken().getEnd(), code);\r\n return issue_1.Issue.atToken(lowFile, node.getFirstToken(), \"Downport ALPHA\", this.getMetadata().key, this.conf.severity, fix);\r\n }\r\n outlineLoopInput(node, lowFile, highSyntax) {\r\n if (!(node.get() instanceof Statements.Loop)) {\r\n return undefined;\r\n }\r\n else if (node.findDirectExpression(Expressions.SimpleSource2)) {\r\n return undefined;\r\n }\r\n // the first Source must be outlined\r\n const s = node.findDirectExpression(Expressions.Source);\r\n if (s === undefined) {\r\n return undefined;\r\n }\r\n const uniqueName = this.uniqueName(node.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);\r\n const code = `DATA(${uniqueName}) = ${s.concatTokens()}.\\n` +\r\n \" \".repeat(node.getFirstToken().getStart().getCol() - 1);\r\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, node.getFirstToken().getStart(), code);\r\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, s.getFirstToken().getStart(), s.getLastToken().getEnd(), uniqueName);\r\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\r\n return issue_1.Issue.atToken(lowFile, node.getFirstToken(), \"Outline LOOP input\", this.getMetadata().key, this.conf.severity, fix);\r\n }\r\n outlineLoopTarget(node, lowFile, _highSyntax) {\r\n var _a, _b, _c, _d, _e;\r\n // also allows outlining of voided types\r\n if (!(node.get() instanceof Statements.Loop)) {\r\n return undefined;\r\n }\r\n const sourceName = (_a = node.findDirectExpression(Expressions.SimpleSource2)) === null || _a === void 0 ? void 0 : _a.concatTokens();\r\n if (sourceName === undefined) {\r\n return undefined;\r\n }\r\n const concat = node.concatTokens();\r\n if (concat.includes(\" REFERENCE INTO \")) {\r\n return undefined;\r\n }\r\n const indentation = \" \".repeat(node.getFirstToken().getStart().getCol() - 1);\r\n const dataTarget = (_b = node.findDirectExpression(Expressions.Target)) === null || _b === void 0 ? void 0 : _b.findDirectExpression(Expressions.InlineData);\r\n if (dataTarget) {\r\n const targetName = ((_c = dataTarget.findDirectExpression(Expressions.TargetField)) === null || _c === void 0 ? void 0 : _c.concatTokens()) || \"DOWNPORT_ERROR\";\r\n const code = `DATA ${targetName} LIKE LINE OF ${sourceName}.\\n${indentation}`;\r\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, node.getFirstToken().getStart(), code);\r\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, dataTarget.getFirstToken().getStart(), dataTarget.getLastToken().getEnd(), targetName);\r\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\r\n return issue_1.Issue.atToken(lowFile, node.getFirstToken(), \"Outline LOOP data target\", this.getMetadata().key, this.conf.severity, fix);\r\n }\r\n const fsTarget = (_d = node.findDirectExpression(Expressions.FSTarget)) === null || _d === void 0 ? void 0 : _d.findDirectExpression(Expressions.InlineFS);\r\n if (fsTarget) {\r\n const targetName = ((_e = fsTarget.findDirectExpression(Expressions.TargetFieldSymbol)) === null || _e === void 0 ? void 0 : _e.concatTokens()) || \"DOWNPORT_ERROR\";\r\n const code = `FIELD-SYMBOLS ${targetName} LIKE LINE OF ${sourceName}.\\n${indentation}`;\r\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, node.getFirstToken().getStart(), code);\r\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, fsTarget.getFirstToken().getStart(), fsTarget.getLastToken().getEnd(), targetName);\r\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\r\n return issue_1.Issue.atToken(lowFile, node.getFirstToken(), \"Outline LOOP fs target\", this.getMetadata().key, this.conf.severity, fix);\r\n }\r\n return undefined;\r\n }\r\n outlineFor(forLoop, indentation) {\r\n var _a, _b, _c, _d, _e, _f, _g, _h, _j;\r\n let body = \"\";\r\n let end = \"\";\r\n const loopSource = (_a = forLoop.findFirstExpression(Expressions.Source)) === null || _a === void 0 ? void 0 : _a.concatTokens();\r\n const loopTargetField = (_b = forLoop.findFirstExpression(Expressions.TargetField)) === null || _b === void 0 ? void 0 : _b.concatTokens();\r\n if (forLoop.findDirectTokenByText(\"UNTIL\")) {\r\n const name = (_c = forLoop.findFirstExpression(Expressions.Field)) === null || _c === void 0 ? void 0 : _c.concatTokens();\r\n body += indentation + \"DATA \" + name + \" TYPE i.\\n\";\r\n const cond = forLoop.findFirstExpression(Expressions.Cond);\r\n body += indentation + `WHILE NOT ${cond === null || cond === void 0 ? void 0 : cond.concatTokens()}.\\n`;\r\n const field = (_e = (_d = forLoop.findDirectExpression(Expressions.InlineFieldDefinition)) === null || _d === void 0 ? void 0 : _d.findFirstExpression(Expressions.Field)) === null || _e === void 0 ? void 0 : _e.concatTokens();\r\n body += indentation + ` ${field} = ${field} + 1.\\n`;\r\n end = \"ENDWHILE\";\r\n }\r\n else if (forLoop.findDirectTokenByText(\"WHILE\")) {\r\n const name = (_f = forLoop.findFirstExpression(Expressions.Field)) === null || _f === void 0 ? void 0 : _f.concatTokens();\r\n body += indentation + \"DATA \" + name + \" TYPE i.\\n\";\r\n const cond = forLoop.findFirstExpression(Expressions.Cond);\r\n body += indentation + `WHILE ${cond === null || cond === void 0 ? void 0 : cond.concatTokens()}.\\n`;\r\n const field = (_h = (_g = forLoop.findDirectExpression(Expressions.InlineFieldDefinition)) === null || _g === void 0 ? void 0 : _g.findFirstExpression(Expressions.Field)) === null || _h === void 0 ? void 0 : _h.concatTokens();\r\n body += indentation + ` ${field} = ${field} + 1.\\n`;\r\n end = \"ENDWHILE\";\r\n }\r\n else if (loopTargetField) {\r\n body += indentation + `LOOP AT ${loopSource} INTO DATA(${loopTargetField}).\\n`;\r\n end = \"ENDLOOP\";\r\n }\r\n else if (loopTargetField === undefined) {\r\n const loopTargetFieldSymbol = (_j = forLoop.findFirstExpression(Expressions.TargetFieldSymbol)) === null || _j === void 0 ? void 0 : _j.concatTokens();\r\n body += indentation + `LOOP AT ${loopSource} ASSIGNING FIELD-SYMBOL(${loopTargetFieldSymbol}).\\n`;\r\n end = \"ENDLOOP\";\r\n }\r\n return { body, end };\r\n }\r\n outlineSwitch(node, lowFile, highSyntax) {\r\n var _a, _b;\r\n for (const i of node.findAllExpressionsRecursive(Expressions.Source)) {\r\n const firstToken = i.getFirstToken();\r\n if (firstToken.getStr().toUpperCase() !== \"SWITCH\") {\r\n continue;\r\n }\r\n const type = this.findType(i, lowFile, highSyntax);\r\n if (type === undefined) {\r\n continue;\r\n }\r\n const uniqueName = this.uniqueName(firstToken.getStart(), lowFile.getFilename(), highSyntax);\r\n const indentation = \" \".repeat(node.getFirstToken().getStart().getCol() - 1);\r\n let body = \"\";\r\n let name = \"\";\r\n const switchBody = i.findDirectExpression(Expressions.SwitchBody);\r\n if (switchBody === undefined) {\r\n continue;\r\n }\r\n for (const l of ((_a = switchBody === null || switchBody === void 0 ? void 0 : switchBody.findDirectExpression(Expressions.Let)) === null || _a === void 0 ? void 0 : _a.findDirectExpressions(Expressions.InlineFieldDefinition)) || []) {\r\n name = l.getFirstToken().getStr();\r\n body += indentation + `DATA(${name}) = ${(_b = switchBody.findFirstExpression(Expressions.Source)) === null || _b === void 0 ? void 0 : _b.concatTokens()}.\\n`;\r\n }\r\n body += `DATA ${uniqueName} TYPE ${type}.\\n`;\r\n let firstSource = false;\r\n let inWhen = false;\r\n for (const c of switchBody.getChildren()) {\r\n if (c.get() instanceof Expressions.Source && firstSource === false) {\r\n body += indentation + `CASE ${c.concatTokens()}.`;\r\n firstSource = true;\r\n }\r\n else if (c instanceof nodes_1.TokenNode && c.concatTokens().toUpperCase() === \"THEN\") {\r\n inWhen = true;\r\n body += \".\\n\";\r\n }\r\n else if (c instanceof nodes_1.TokenNode && c.concatTokens().toUpperCase() === \"WHEN\") {\r\n inWhen = false;\r\n body += `\\n${indentation} WHEN `;\r\n }\r\n else if (c instanceof nodes_1.TokenNode && c.concatTokens().toUpperCase() === \"OR\") {\r\n body += ` OR `;\r\n }\r\n else if (c instanceof nodes_1.TokenNode && c.concatTokens().toUpperCase() === \"ELSE\") {\r\n inWhen = true;\r\n body += `\\n${indentation} WHEN OTHERS.\\n`;\r\n }\r\n else if (inWhen === false) {\r\n body += c.concatTokens();\r\n }\r\n else {\r\n body += indentation + \" \" + uniqueName + \" = \" + c.concatTokens() + \".\";\r\n }\r\n }\r\n body += \"\\n\" + indentation + \"ENDCASE.\\n\" + indentation;\r\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, node.getFirstToken().getStart(), body);\r\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, firstToken.getStart(), i.getLastToken().getEnd(), uniqueName);\r\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\r\n return issue_1.Issue.atToken(lowFile, firstToken, \"Downport SWITCH\", this.getMetadata().key, this.conf.severity, fix);\r\n }\r\n return undefined;\r\n }\r\n outlineReduce(node, lowFile, highSyntax) {\r\n var _a;\r\n for (const i of node.findAllExpressionsRecursive(Expressions.Source)) {\r\n const firstToken = i.getFirstToken();\r\n if (firstToken.getStr().toUpperCase() !== \"REDUCE\") {\r\n continue;\r\n }\r\n const type = this.findType(i, lowFile, highSyntax);\r\n if (type === undefined) {\r\n continue;\r\n }\r\n const uniqueName = this.uniqueName(firstToken.getStart(), lowFile.getFilename(), highSyntax);\r\n const indentation = \" \".repeat(node.getFirstToken().getStart().getCol() - 1);\r\n let body = \"\";\r\n let name = \"\";\r\n const reduceBody = i.findDirectExpression(Expressions.ReduceBody);\r\n if (reduceBody === undefined) {\r\n continue;\r\n }\r\n for (const init of reduceBody.findDirectExpressions(Expressions.InlineFieldDefinition)) {\r\n name = init.getFirstToken().getStr();\r\n body += indentation + `DATA(${name}) = ${(_a = reduceBody.findFirstExpression(Expressions.Source)) === null || _a === void 0 ? void 0 : _a.concatTokens()}.\\n`;\r\n }\r\n const forLoop = reduceBody.findDirectExpression(Expressions.For);\r\n if (forLoop === undefined) {\r\n continue;\r\n }\r\n const outlineFor = this.outlineFor(forLoop, indentation);\r\n body += outlineFor.body;\r\n const next = reduceBody.findDirectExpression(Expressions.ReduceNext);\r\n if (next === undefined) {\r\n continue;\r\n }\r\n for (const n of next.getChildren()) {\r\n if (n.concatTokens().toUpperCase() === \"NEXT\") {\r\n continue;\r\n }\r\n else if (n.concatTokens() === \"=\") {\r\n body += \" = \";\r\n }\r\n else if (n.get() instanceof Expressions.Field) {\r\n body += indentation + \" \" + n.concatTokens();\r\n }\r\n else if (n.get() instanceof Expressions.Source) {\r\n body += n.concatTokens() + \".\\n\";\r\n }\r\n }\r\n body += indentation + outlineFor.end + `.\\n`;\r\n body += indentation + `${uniqueName} = ${name}.\\n`;\r\n const abap = `DATA ${uniqueName} TYPE ${type}.\\n` +\r\n body +\r\n indentation;\r\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, node.getFirstToken().getStart(), abap);\r\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, firstToken.getStart(), i.getLastToken().getEnd(), uniqueName);\r\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\r\n return issue_1.Issue.atToken(lowFile, firstToken, \"Downport REDUCE\", this.getMetadata().key, this.conf.severity, fix);\r\n }\r\n return undefined;\r\n }\r\n outlineValue(node, lowFile, highSyntax) {\r\n var _a;\r\n const allSources = node.findAllExpressionsRecursive(Expressions.Source);\r\n for (const s of allSources) {\r\n const firstToken = s.getFirstToken();\r\n if (firstToken.getStr().toUpperCase() !== \"VALUE\") {\r\n continue;\r\n }\r\n let type = this.findType(s, lowFile, highSyntax);\r\n if (type === undefined) {\r\n if (node.get() instanceof Statements.Move && node.findDirectExpression(Expressions.Source) === s) {\r\n type = \"LIKE \" + ((_a = node.findDirectExpression(Expressions.Target)) === null || _a === void 0 ? void 0 : _a.concatTokens());\r\n }\r\n if (type === undefined) {\r\n continue;\r\n }\r\n }\r\n else {\r\n type = \"TYPE \" + type;\r\n }\r\n const valueBody = s.findDirectExpression(Expressions.ValueBody);\r\n const uniqueName = this.uniqueName(firstToken.getStart(), lowFile.getFilename(), highSyntax);\r\n let indentation = \" \".repeat(node.getFirstToken().getStart().getCol() - 1);\r\n let body = \"\";\r\n const forLoop = valueBody === null || valueBody === void 0 ? void 0 : valueBody.findDirectExpression(Expressions.For);\r\n let outlineFor = { body: \"\", end: \"\" };\r\n if (forLoop !== undefined) {\r\n outlineFor = this.outlineFor(forLoop, indentation);\r\n body += outlineFor.body;\r\n indentation += \" \";\r\n }\r\n let structureName = uniqueName;\r\n let added = false;\r\n let data = \"\";\r\n for (const b of (valueBody === null || valueBody === void 0 ? void 0 : valueBody.getChildren()) || []) {\r\n if (b.concatTokens() === \"(\" && added === false) {\r\n structureName = this.uniqueName(firstToken.getStart(), lowFile.getFilename(), highSyntax);\r\n data = indentation + `DATA ${structureName} LIKE LINE OF ${uniqueName}.\\n`;\r\n }\r\n if (b.get() instanceof Expressions.FieldAssignment) {\r\n if (added === false) {\r\n body += data;\r\n added = true;\r\n }\r\n body += indentation + structureName + \"-\" + b.concatTokens() + \".\\n\";\r\n }\r\n else if (b.get() instanceof Expressions.Source) {\r\n structureName = b.concatTokens();\r\n }\r\n else if (b instanceof nodes_1.ExpressionNode && b.get() instanceof Expressions.Let) {\r\n body += this.outlineLet(b, indentation, highSyntax, lowFile);\r\n }\r\n else if (b.concatTokens() === \")\") {\r\n body += indentation + `APPEND ${structureName} TO ${uniqueName}.\\n`;\r\n }\r\n }\r\n if (forLoop !== undefined) {\r\n indentation = indentation.substring(2);\r\n body += indentation + outlineFor.end + `.\\n`;\r\n }\r\n const abap = `DATA ${uniqueName} ${type}.\\n` +\r\n body +\r\n indentation;\r\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, node.getFirstToken().getStart(), abap);\r\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, firstToken.getStart(), s.getLastToken().getEnd(), uniqueName);\r\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\r\n return issue_1.Issue.atToken(lowFile, firstToken, \"Downport VALUE\", this.getMetadata().key, this.conf.severity, fix);\r\n }\r\n return undefined;\r\n }\r\n outlineLet(node, indentation, highSyntax, lowFile) {\r\n var _a;\r\n let ret = \"\";\r\n for (const f of node.findDirectExpressions(Expressions.InlineFieldDefinition)) {\r\n const c = f.getFirstChild();\r\n if (c === undefined) {\r\n continue;\r\n }\r\n const name = c.concatTokens().toLowerCase();\r\n const spag = highSyntax.spaghetti.lookupPosition(c.getFirstToken().getStart(), lowFile.getFilename());\r\n if (spag === undefined) {\r\n continue;\r\n }\r\n const found = spag.findVariable(name);\r\n if (found === undefined) {\r\n continue;\r\n }\r\n const type = found.getType().getQualifiedName() ? (_a = found.getType().getQualifiedName()) === null || _a === void 0 ? void 0 : _a.toLowerCase() : found.getType().toABAP();\r\n ret += indentation + \"DATA \" + name + ` TYPE ${type}.\\n`;\r\n const source = f.findFirstExpression(Expressions.Source);\r\n if (source) {\r\n ret += indentation + name + ` = ${source.concatTokens()}.\\n`;\r\n }\r\n }\r\n return ret;\r\n }\r\n findType(i, lowFile, highSyntax) {\r\n var _a;\r\n const expr = i.findDirectExpression(Expressions.TypeNameOrInfer);\r\n if (expr === undefined) {\r\n return undefined;\r\n }\r\n const firstToken = expr.getFirstToken();\r\n const concat = expr.concatTokens().toLowerCase();\r\n if (concat !== \"#\") {\r\n return concat;\r\n }\r\n const spag = highSyntax.spaghetti.lookupPosition(firstToken.getStart(), lowFile.getFilename());\r\n if (spag === undefined) {\r\n return undefined;\r\n }\r\n let inferred = undefined;\r\n for (const r of (spag === null || spag === void 0 ? void 0 : spag.getData().references) || []) {\r\n if (r.referenceType === _reference_1.ReferenceType.InferredType\r\n && r.resolved\r\n && r.position.getStart().equals(firstToken.getStart())\r\n && r.resolved instanceof _typed_identifier_1.TypedIdentifier) {\r\n inferred = r.resolved;\r\n break;\r\n }\r\n }\r\n if (inferred === undefined) {\r\n return undefined;\r\n }\r\n return (_a = inferred.getType().getQualifiedName()) === null || _a === void 0 ? void 0 : _a.toLowerCase();\r\n }\r\n outlineFS(node, lowFile, highSyntax) {\r\n var _a, _b;\r\n for (const i of node.findAllExpressionsRecursive(Expressions.InlineFS)) {\r\n const nameToken = (_a = i.findDirectExpression(Expressions.TargetFieldSymbol)) === null || _a === void 0 ? void 0 : _a.getFirstToken();\r\n if (nameToken === undefined) {\r\n continue;\r\n }\r\n const name = nameToken.getStr();\r\n let type = \"\";\r\n if (node.concatTokens().toUpperCase().startsWith(\"APPEND INITIAL LINE TO \")) {\r\n type = \"LIKE LINE OF \" + ((_b = node.findFirstExpression(Expressions.Target)) === null || _b === void 0 ? void 0 : _b.concatTokens());\r\n }\r\n else {\r\n const spag = highSyntax.spaghetti.lookupPosition(nameToken.getStart(), lowFile.getFilename());\r\n if (spag === undefined) {\r\n continue;\r\n }\r\n const found = spag.findVariable(name);\r\n if (found === undefined) {\r\n continue;\r\n }\r\n else if (found.getType() instanceof basic_1.VoidType) {\r\n return issue_1.Issue.atToken(lowFile, i.getFirstToken(), \"Error outlining voided type\", this.getMetadata().key, this.conf.severity);\r\n }\r\n type = \"TYPE \";\r\n type += found.getType().getQualifiedName() ? found.getType().getQualifiedName().toLowerCase() : found.getType().toABAP();\r\n }\r\n const code = `FIELD-SYMBOLS ${name} ${type}.\\n` +\r\n \" \".repeat(node.getFirstToken().getStart().getCol() - 1);\r\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, node.getFirstToken().getStart(), code);\r\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, i.getFirstToken().getStart(), i.getLastToken().getEnd(), name);\r\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\r\n return issue_1.Issue.atToken(lowFile, i.getFirstToken(), \"Outline FIELD-SYMBOL\", this.getMetadata().key, this.conf.severity, fix);\r\n }\r\n return undefined;\r\n }\r\n outlineData(node, lowFile, highSyntax) {\r\n var _a, _b;\r\n for (const i of node.findAllExpressionsRecursive(Expressions.InlineData)) {\r\n const nameToken = (_a = i.findDirectExpression(Expressions.TargetField)) === null || _a === void 0 ? void 0 : _a.getFirstToken();\r\n if (nameToken === undefined) {\r\n continue;\r\n }\r\n const name = nameToken.getStr();\r\n const spag = highSyntax.spaghetti.lookupPosition(nameToken.getStart(), lowFile.getFilename());\r\n if (spag === undefined) {\r\n continue;\r\n }\r\n const found = spag.findVariable(name);\r\n if (found === undefined) {\r\n continue;\r\n }\r\n else if (found.getType() instanceof basic_1.VoidType && found.getType().getQualifiedName() === undefined) {\r\n continue;\r\n }\r\n const type = found.getType().getQualifiedName() ? (_b = found.getType().getQualifiedName()) === null || _b === void 0 ? void 0 : _b.toLowerCase() : found.getType().toABAP();\r\n const code = `DATA ${name} TYPE ${type}.\\n` +\r\n \" \".repeat(node.getFirstToken().getStart().getCol() - 1);\r\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, node.getFirstToken().getStart(), code);\r\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, i.getFirstToken().getStart(), i.getLastToken().getEnd(), name);\r\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\r\n return issue_1.Issue.atToken(lowFile, i.getFirstToken(), \"Outline DATA\", this.getMetadata().key, this.conf.severity, fix);\r\n }\r\n return undefined;\r\n }\r\n outlineCond(node, lowFile, highSyntax) {\r\n for (const i of node.findAllExpressionsRecursive(Expressions.Source)) {\r\n if (i.getFirstToken().getStr().toUpperCase() !== \"COND\") {\r\n continue;\r\n }\r\n const body = i.findDirectExpression(Expressions.CondBody);\r\n if (body === undefined) {\r\n continue;\r\n }\r\n const uniqueName = this.uniqueName(i.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);\r\n const type = this.findType(i, lowFile, highSyntax);\r\n const indent = \" \".repeat(node.getFirstToken().getStart().getCol() - 1);\r\n const bodyCode = this.buildCondBody(body, uniqueName, indent, lowFile, highSyntax);\r\n const abap = `DATA ${uniqueName} TYPE ${type}.\\n` + bodyCode;\r\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, node.getFirstToken().getStart(), abap);\r\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, i.getFirstToken().getStart(), i.getLastToken().getEnd(), uniqueName);\r\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\r\n return issue_1.Issue.atToken(lowFile, i.getFirstToken(), \"Downport COND\", this.getMetadata().key, this.conf.severity, fix);\r\n }\r\n return undefined;\r\n }\r\n buildCondBody(body, uniqueName, indent, lowFile, highSyntax) {\r\n let code = \"\";\r\n let first = true;\r\n for (const c of body.getChildren()) {\r\n if (c instanceof nodes_1.TokenNode) {\r\n switch (c.getFirstToken().getStr().toUpperCase()) {\r\n case \"WHEN\":\r\n if (first === true) {\r\n code += indent + \"IF \";\r\n first = false;\r\n }\r\n else {\r\n code += indent + \"ELSEIF \";\r\n }\r\n break;\r\n case \"THEN\":\r\n code += \".\\n\";\r\n break;\r\n case \"ELSE\":\r\n code += indent + \"ELSE.\\n\";\r\n break;\r\n default:\r\n throw \"buildCondBody, unexpected token\";\r\n }\r\n }\r\n else if (c.get() instanceof Expressions.Cond) {\r\n code += c.concatTokens();\r\n }\r\n else if (c.get() instanceof Expressions.Let) {\r\n code += this.outlineLet(c, indent, highSyntax, lowFile);\r\n }\r\n else if (c.get() instanceof Expressions.Source) {\r\n code += indent + \" \" + uniqueName + \" = \" + c.concatTokens() + \".\\n\";\r\n }\r\n else {\r\n throw \"buildCondBody, unexpected expression, \" + c.get().constructor.name;\r\n }\r\n }\r\n code += indent + \"ENDIF.\\n\";\r\n code += indent;\r\n return code;\r\n }\r\n outlineConv(node, lowFile, highSyntax) {\r\n var _a;\r\n for (const i of node.findAllExpressionsRecursive(Expressions.Source)) {\r\n if (i.getFirstToken().getStr().toUpperCase() !== \"CONV\") {\r\n continue;\r\n }\r\n const body = (_a = i.findDirectExpression(Expressions.ConvBody)) === null || _a === void 0 ? void 0 : _a.concatTokens();\r\n if (body === undefined) {\r\n continue;\r\n }\r\n const uniqueName = this.uniqueName(i.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);\r\n const type = this.findType(i, lowFile, highSyntax);\r\n const indent = \" \".repeat(node.getFirstToken().getStart().getCol() - 1);\r\n const abap = `DATA ${uniqueName} TYPE ${type}.\\n` +\r\n indent + `${uniqueName} = ${body}.\\n` +\r\n indent;\r\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, node.getFirstToken().getStart(), abap);\r\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, i.getFirstToken().getStart(), i.getLastToken().getEnd(), uniqueName);\r\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\r\n return issue_1.Issue.atToken(lowFile, i.getFirstToken(), \"Downport CONV\", this.getMetadata().key, this.conf.severity, fix);\r\n }\r\n return undefined;\r\n }\r\n // \"CAST\" to \"?=\"\r\n outlineCast(node, lowFile, highSyntax) {\r\n var _a;\r\n for (const i of node.findAllExpressionsRecursive(Expressions.Cast)) {\r\n const uniqueName = this.uniqueName(i.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);\r\n const type = this.findType(i, lowFile, highSyntax);\r\n const body = (_a = i.findDirectExpression(Expressions.Source)) === null || _a === void 0 ? void 0 : _a.concatTokens();\r\n const abap = `DATA ${uniqueName} TYPE REF TO ${type}.\\n` +\r\n \" \".repeat(node.getFirstToken().getStart().getCol() - 1) +\r\n `${uniqueName} ?= ${body}.\\n` +\r\n \" \".repeat(node.getFirstToken().getStart().getCol() - 1);\r\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, node.getFirstToken().getStart(), abap);\r\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, i.getFirstToken().getStart(), i.getLastToken().getEnd(), uniqueName);\r\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\r\n return issue_1.Issue.atToken(lowFile, i.getFirstToken(), \"Downport CAST\", this.getMetadata().key, this.conf.severity, fix);\r\n }\r\n return undefined;\r\n }\r\n uniqueName(position, filename, highSyntax) {\r\n const spag = highSyntax.spaghetti.lookupPosition(position, filename);\r\n if (spag === undefined) {\r\n const name = \"temprr\" + this.counter;\r\n this.counter++;\r\n return name;\r\n }\r\n while (true) {\r\n const name = \"temp\" + this.counter;\r\n const found = spag.findVariable(name);\r\n this.counter++;\r\n if (found === undefined) {\r\n return name;\r\n }\r\n }\r\n }\r\n replaceXsdBool(node, lowFile, highSyntax) {\r\n const spag = highSyntax.spaghetti.lookupPosition(node.getFirstToken().getStart(), lowFile.getFilename());\r\n for (const r of (spag === null || spag === void 0 ? void 0 : spag.getData().references) || []) {\r\n if (r.referenceType === _reference_1.ReferenceType.BuiltinMethodReference\r\n && r.position.getName().toUpperCase() === \"XSDBOOL\") {\r\n const token = r.position.getToken();\r\n const fix = edit_helper_1.EditHelper.replaceRange(lowFile, token.getStart(), token.getEnd(), \"boolc\");\r\n return issue_1.Issue.atToken(lowFile, token, \"Use BOOLC\", this.getMetadata().key, this.conf.severity, fix);\r\n }\r\n }\r\n return undefined;\r\n }\r\n findMethodCallExpression(node, token) {\r\n var _a;\r\n for (const m of node.findAllExpressions(Expressions.MethodCall)) {\r\n if ((_a = m.findDirectExpression(Expressions.MethodName)) === null || _a === void 0 ? void 0 : _a.getFirstToken().getStart().equals(token.getStart())) {\r\n return m;\r\n }\r\n }\r\n return undefined;\r\n }\r\n replaceLineFunctions(node, lowFile, highSyntax) {\r\n var _a, _b;\r\n const spag = highSyntax.spaghetti.lookupPosition(node.getFirstToken().getStart(), lowFile.getFilename());\r\n for (const r of (spag === null || spag === void 0 ? void 0 : spag.getData().references) || []) {\r\n if (r.referenceType !== _reference_1.ReferenceType.BuiltinMethodReference) {\r\n continue;\r\n }\r\n const func = r.position.getName().toUpperCase();\r\n if (func === \"LINE_EXISTS\" || func === \"LINE_INDEX\") {\r\n const token = r.position.getToken();\r\n const expression = this.findMethodCallExpression(node, token);\r\n if (expression === undefined) {\r\n continue;\r\n }\r\n let condition = \"\";\r\n for (const c of ((_a = expression === null || expression === void 0 ? void 0 : expression.findFirstExpression(Expressions.TableExpression)) === null || _a === void 0 ? void 0 : _a.getChildren()) || []) {\r\n if (c.getFirstToken().getStr() === \"[\" || c.getFirstToken().getStr() === \"]\") {\r\n continue;\r\n }\r\n else if (c.get() instanceof Expressions.ComponentChainSimple && condition === \"\") {\r\n condition = \"WITH KEY \";\r\n }\r\n else if (c.get() instanceof Expressions.Source && condition === \"\") {\r\n condition = \"INDEX \";\r\n }\r\n condition += c.concatTokens() + \" \";\r\n }\r\n const tableName = (_b = expression.findFirstExpression(Expressions.Source)) === null || _b === void 0 ? void 0 : _b.concatTokens().split(\"[\")[0];\r\n const uniqueName = this.uniqueName(node.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);\r\n const indentation = \" \".repeat(node.getFirstToken().getStart().getCol() - 1);\r\n const sy = func === \"LINE_EXISTS\" ? \"sy-subrc\" : \"sy-tabix\";\r\n const code = `DATA ${uniqueName} LIKE sy-subrc.\\n` +\r\n indentation + `READ TABLE ${tableName} ${condition}TRANSPORTING NO FIELDS.\\n` +\r\n indentation + uniqueName + ` = ${sy}.\\n` +\r\n indentation;\r\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, node.getFirstToken().getStart(), code);\r\n const start = expression.getFirstToken().getStart();\r\n const end = expression.getLastToken().getEnd();\r\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, start, end, uniqueName + (func === \"LINE_EXISTS\" ? \" = 0\" : \"\"));\r\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\r\n return issue_1.Issue.atToken(lowFile, token, \"Use BOOLC\", this.getMetadata().key, this.conf.severity, fix);\r\n }\r\n }\r\n return undefined;\r\n }\r\n newToCreateObject(node, lowFile, highSyntax) {\r\n const source = node.findDirectExpression(Expressions.Source);\r\n let fix = undefined;\r\n if (node.get() instanceof Statements.Move\r\n && source\r\n && source.getFirstToken().getStr().toUpperCase() === \"NEW\") {\r\n const target = node.findDirectExpression(Expressions.Target);\r\n const found = source === null || source === void 0 ? void 0 : source.findFirstExpression(Expressions.NewObject);\r\n // must be at top level of the source for quickfix to work(todo: handle more scenarios)\r\n // todo, assumption: the target is not an inline definition\r\n if (target && found && source.concatTokens() === found.concatTokens()) {\r\n const abap = this.newParameters(found, target.concatTokens(), highSyntax, lowFile);\r\n if (abap !== undefined) {\r\n fix = edit_helper_1.EditHelper.replaceRange(lowFile, node.getFirstToken().getStart(), node.getLastToken().getEnd(), abap);\r\n }\r\n }\r\n }\r\n if (fix === undefined && node.findAllExpressions(Expressions.NewObject)) {\r\n const found = node.findFirstExpression(Expressions.NewObject);\r\n if (found === undefined) {\r\n return undefined;\r\n }\r\n const name = this.uniqueName(found.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);\r\n const abap = this.newParameters(found, name, highSyntax, lowFile);\r\n if (abap === undefined) {\r\n return undefined;\r\n }\r\n const type = this.findType(found, lowFile, highSyntax);\r\n const indentation = \" \".repeat(node.getFirstToken().getStart().getCol() - 1);\r\n const data = `DATA ${name} TYPE REF TO ${type}.\\n` +\r\n indentation + abap + \"\\n\" +\r\n indentation;\r\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, node.getFirstToken().getStart(), data);\r\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, found.getFirstToken().getStart(), found.getLastToken().getEnd(), name);\r\n fix = edit_helper_1.EditHelper.merge(fix2, fix1);\r\n }\r\n if (fix) {\r\n return issue_1.Issue.atToken(lowFile, node.getFirstToken(), \"Use CREATE OBJECT instead of NEW\", this.getMetadata().key, this.conf.severity, fix);\r\n }\r\n else {\r\n return undefined;\r\n }\r\n }\r\n newParameters(found, name, highSyntax, lowFile) {\r\n var _a, _b, _c;\r\n const typeToken = (_a = found.findDirectExpression(Expressions.TypeNameOrInfer)) === null || _a === void 0 ? void 0 : _a.getFirstToken();\r\n let extra = (typeToken === null || typeToken === void 0 ? void 0 : typeToken.getStr()) === \"#\" ? \"\" : \" TYPE \" + (typeToken === null || typeToken === void 0 ? void 0 : typeToken.getStr());\r\n const parameters = found.findFirstExpression(Expressions.ParameterListS);\r\n if (parameters) {\r\n extra = parameters ? extra + \" EXPORTING \" + parameters.concatTokens() : extra;\r\n }\r\n else if (typeToken) {\r\n const source = (_b = found.findDirectExpression(Expressions.Source)) === null || _b === void 0 ? void 0 : _b.concatTokens();\r\n if (source) {\r\n // find the default parameter name for the constructor\r\n const spag = highSyntax.spaghetti.lookupPosition(typeToken === null || typeToken === void 0 ? void 0 : typeToken.getStart(), lowFile.getFilename());\r\n let cdef = undefined;\r\n for (const r of (spag === null || spag === void 0 ? void 0 : spag.getData().references) || []) {\r\n if ((r.referenceType === _reference_1.ReferenceType.InferredType\r\n || r.referenceType === _reference_1.ReferenceType.ObjectOrientedReference)\r\n && r.resolved && r.position.getStart().equals(typeToken.getStart())) {\r\n cdef = r.resolved;\r\n }\r\n }\r\n if (cdef && cdef.getMethodDefinitions === undefined) {\r\n return undefined; // something wrong\r\n }\r\n const importing = (_c = cdef === null || cdef === void 0 ? void 0 : cdef.getMethodDefinitions().getByName(\"CONSTRUCTOR\")) === null || _c === void 0 ? void 0 : _c.getParameters().getDefaultImporting();\r\n if (importing) {\r\n extra += \" EXPORTING \" + importing + \" = \" + source;\r\n }\r\n else if (spag === undefined) {\r\n extra += \" SpagUndefined\";\r\n }\r\n else if (cdef === undefined) {\r\n extra += \" ClassDefinitionNotFound\";\r\n }\r\n else {\r\n extra += \" SomeError\";\r\n }\r\n }\r\n }\r\n const abap = `CREATE OBJECT ${name}${extra}.`;\r\n return abap;\r\n }\r\n}\r\nexports.Downport = Downport;\r\n//# sourceMappingURL=downport.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/downport.js?");
|
|
11636
11669
|
|
|
11637
11670
|
/***/ }),
|
|
11638
11671
|
|
|
@@ -12193,7 +12226,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
|
|
|
12193
12226
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
12194
12227
|
|
|
12195
12228
|
"use strict";
|
|
12196
|
-
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.NoPublicAttributes = exports.NoPublicAttributesConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.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 _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst visibility_1 = __webpack_require__(/*! ../abap/4_file_information/visibility */ \"./node_modules/@abaplint/core/build/src/abap/4_file_information/visibility.js\");\r\nconst _abap_file_information_1 = __webpack_require__(/*! ../abap/4_file_information/_abap_file_information */ \"./node_modules/@abaplint/core/build/src/abap/4_file_information/_abap_file_information.js\");\r\nconst ddic_1 = __webpack_require__(/*! ../ddic */ \"./node_modules/@abaplint/core/build/src/ddic.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nclass NoPublicAttributesConf extends _basic_rule_config_1.BasicRuleConfig {\r\n constructor() {\r\n super(...arguments);\r\n /** Allows public attributes, if they are declared as READ-ONLY. */\r\n this.allowReadOnly = false;\r\n }\r\n}\r\nexports.NoPublicAttributesConf = NoPublicAttributesConf;\r\nclass NoPublicAttributes extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new NoPublicAttributesConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"no_public_attributes\",\r\n title: \"No public attributes\",\r\n shortDescription: `Checks that classes and interfaces don't contain any public attributes.\r\nExceptions are excluded from this rule.`,\r\n extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#members-private-by-default-protected-only-if-needed`,\r\n tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],\r\n };\r\n }\r\n getDescription(name) {\r\n return \"Public attributes are not allowed, attribute \\\"\" + name + \"\\\"\";\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 this.file = file;\r\n const attributes = this.getAllPublicAttributes(obj);\r\n return this.findAllIssues(attributes);\r\n }\r\n getAllPublicAttributes(obj) {\r\n let attributes = [];\r\n attributes = attributes.concat(this.getAllPublicClassAttributes(obj));\r\n attributes = attributes.concat(this.getAllPublicInterfaceAttributes());\r\n return attributes;\r\n }\r\n getAllPublicClassAttributes(obj) {\r\n let attributes = [];\r\n const ddic = new ddic_1.DDIC(this.reg);\r\n for (const classDef of this.file.getInfo().listClassDefinitions()) {\r\n if (ddic.isException(classDef, obj)) {\r\n continue;\r\n }\r\n attributes = attributes.concat(classDef.attributes.filter(a => a.visibility === visibility_1.Visibility.Public));\r\n }\r\n return attributes;\r\n }\r\n getAllPublicInterfaceAttributes() {\r\n let attributes = [];\r\n for (const interfaceDef of this.file.getInfo().listInterfaceDefinitions()) {\r\n attributes = attributes.concat(interfaceDef.attributes.filter(a => a.visibility === visibility_1.Visibility.Public));\r\n }\r\n return attributes;\r\n }\r\n findAllIssues(attributes) {\r\n const issues = [];\r\n for (const attr of attributes) {\r\n if (this.conf.allowReadOnly === true && attr.readOnly) {\r\n continue;\r\n }\r\n else if (attr.level === _abap_file_information_1.AttributeLevel.Constant) {\r\n continue;\r\n }\r\n const issue = issue_1.Issue.atIdentifier(attr.identifier, this.getDescription(attr.name), this.getMetadata().key, this.conf.severity);\r\n issues.push(issue);\r\n }\r\n return issues;\r\n }\r\n}\r\nexports.NoPublicAttributes = NoPublicAttributes;\r\n//# sourceMappingURL=no_public_attributes.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/no_public_attributes.js?");
|
|
12229
|
+
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.NoPublicAttributes = exports.NoPublicAttributesConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.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 _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst visibility_1 = __webpack_require__(/*! ../abap/4_file_information/visibility */ \"./node_modules/@abaplint/core/build/src/abap/4_file_information/visibility.js\");\r\nconst _abap_file_information_1 = __webpack_require__(/*! ../abap/4_file_information/_abap_file_information */ \"./node_modules/@abaplint/core/build/src/abap/4_file_information/_abap_file_information.js\");\r\nconst ddic_1 = __webpack_require__(/*! ../ddic */ \"./node_modules/@abaplint/core/build/src/ddic.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nclass NoPublicAttributesConf extends _basic_rule_config_1.BasicRuleConfig {\r\n constructor() {\r\n super(...arguments);\r\n /** Allows public attributes, if they are declared as READ-ONLY. */\r\n this.allowReadOnly = false;\r\n /** Option to ignore test classes for this check. */\r\n this.ignoreTestClasses = false;\r\n }\r\n}\r\nexports.NoPublicAttributesConf = NoPublicAttributesConf;\r\nclass NoPublicAttributes extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new NoPublicAttributesConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"no_public_attributes\",\r\n title: \"No public attributes\",\r\n shortDescription: `Checks that classes and interfaces don't contain any public attributes.\r\nExceptions are excluded from this rule.`,\r\n extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#members-private-by-default-protected-only-if-needed`,\r\n tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],\r\n };\r\n }\r\n getDescription(name) {\r\n return \"Public attributes are not allowed, attribute \\\"\" + name + \"\\\"\";\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 this.file = file;\r\n const attributes = this.getAllPublicAttributes(obj);\r\n return this.findAllIssues(attributes);\r\n }\r\n getAllPublicAttributes(obj) {\r\n let attributes = [];\r\n attributes = attributes.concat(this.getAllPublicClassAttributes(obj));\r\n attributes = attributes.concat(this.getAllPublicInterfaceAttributes());\r\n return attributes;\r\n }\r\n getAllPublicClassAttributes(obj) {\r\n let attributes = [];\r\n const ddic = new ddic_1.DDIC(this.reg);\r\n for (const classDef of this.file.getInfo().listClassDefinitions()) {\r\n if (ddic.isException(classDef, obj)) {\r\n continue;\r\n }\r\n attributes = attributes.concat(classDef.attributes.filter(a => a.visibility === visibility_1.Visibility.Public));\r\n }\r\n return attributes;\r\n }\r\n getAllPublicInterfaceAttributes() {\r\n let attributes = [];\r\n for (const interfaceDef of this.file.getInfo().listInterfaceDefinitions()) {\r\n attributes = attributes.concat(interfaceDef.attributes.filter(a => a.visibility === visibility_1.Visibility.Public));\r\n }\r\n return attributes;\r\n }\r\n findAllIssues(attributes) {\r\n const issues = [];\r\n for (const attr of attributes) {\r\n if (this.conf.allowReadOnly === true && attr.readOnly) {\r\n continue;\r\n }\r\n else if (attr.level === _abap_file_information_1.AttributeLevel.Constant) {\r\n continue;\r\n }\r\n else if ((this.conf.ignoreTestClasses === true)\r\n && this.file.getFilename().includes(\".testclasses.\")) {\r\n continue;\r\n }\r\n const issue = issue_1.Issue.atIdentifier(attr.identifier, this.getDescription(attr.name), this.getMetadata().key, this.conf.severity);\r\n issues.push(issue);\r\n }\r\n return issues;\r\n }\r\n}\r\nexports.NoPublicAttributes = NoPublicAttributes;\r\n//# sourceMappingURL=no_public_attributes.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/no_public_attributes.js?");
|
|
12197
12230
|
|
|
12198
12231
|
/***/ }),
|
|
12199
12232
|
|
|
@@ -12446,7 +12479,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
|
|
|
12446
12479
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
12447
12480
|
|
|
12448
12481
|
"use strict";
|
|
12449
|
-
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.SelectAddOrderBy = exports.SelectAddOrderByConf = void 0;\r\nconst Expressions = __webpack_require__(/*! ../abap/2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/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 _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nconst syntax_1 = __webpack_require__(/*! ../abap/5_syntax/syntax */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/syntax.js\");\r\nconst _abap_object_1 = __webpack_require__(/*! ../objects/_abap_object */ \"./node_modules/@abaplint/core/build/src/objects/_abap_object.js\");\r\nconst basic_1 = __webpack_require__(/*! ../abap/types/basic */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/index.js\");\r\nclass SelectAddOrderByConf extends _basic_rule_config_1.BasicRuleConfig {\r\n}\r\nexports.SelectAddOrderByConf = SelectAddOrderByConf;\r\nclass SelectAddOrderBy {\r\n constructor() {\r\n this.conf = new SelectAddOrderByConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"select_add_order_by\",\r\n title: \"SELECT add ORDER BY\",\r\n shortDescription: `SELECTs add ORDER BY clause`,\r\n extendedInformation: `\r\nThis will make sure that the SELECT statement returns results in the same sequence on different databases\r\n\r\nadd ORDER BY PRIMARY KEY if in doubt\r\n\r\nIf the target is a sorted/hashed table, no issue is reported`,\r\n tags: [_irule_1.RuleTag.SingleFile],\r\n };\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n initialize(reg) {\r\n this.reg = reg;\r\n return this;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n run(obj) {\r\n var _a;\r\n const issues = [];\r\n if (!(obj instanceof _abap_object_1.ABAPObject) || obj.getType() === \"INTF\") {\r\n return [];\r\n }\r\n const spaghetti = new syntax_1.SyntaxLogic(this.reg, obj).run().spaghetti;\r\n for (const file of obj.getABAPFiles()) {\r\n const stru = file.getStructure();\r\n if (stru === undefined) {\r\n return issues;\r\n }\r\n const selects = stru.findAllStatements(Statements.Select);\r\n selects.push(...stru.findAllStatements(Statements.SelectLoop));\r\n for (const s of selects) {\r\n const c = s.concatTokens();\r\n if (c.startsWith(\"SELECT SINGLE \")) {\r\n continue;\r\n }\r\n // skip COUNT(*)\r\n const list = s.findFirstExpression(Expressions.SQLFieldList);\r\n if ((list === null || list === void 0 ? void 0 : list.getChildren().length) === 1 && ((_a = list.getFirstChild()) === null || _a === void 0 ? void 0 : _a.get()) instanceof Expressions.SQLAggregation) {\r\n continue;\r\n }\r\n else if (s.findFirstExpression(Expressions.SQLOrderBy)) {\r\n continue;\r\n }\r\n if (this.isTargetSortedOrHashed(s, spaghetti, file)) {\r\n continue;\r\n }\r\n issues.push(issue_1.Issue.atStatement(file, s, \"Add ORDER BY\", this.getMetadata().key, this.conf.severity));\r\n }\r\n }\r\n return issues;\r\n }\r\n isTargetSortedOrHashed(s, spaghetti, file) {\r\n var _a, _b;\r\n const target = (_a = s.findFirstExpression(Expressions.SQLIntoTable)) === null || _a === void 0 ? void 0 : _a.findFirstExpression(Expressions.Target);\r\n if (target) {\r\n const start = target.getFirstToken().getStart();\r\n const scope = spaghetti.lookupPosition(start, file.getFilename());\r\n let type = (_b = scope === null || scope === void 0 ? void 0 : scope.findWriteReference(start)) === null || _b === void 0 ? void 0 : _b.getType();\r\n const children = target.getChildren();\r\n if (type instanceof basic_1.StructureType && children.length >= 3 && children[1].concatTokens() === \"-\") {\r\n const found = type.getComponentByName(children[2].concatTokens());\r\n if (found === undefined) {\r\n return false;\r\n }\r\n type = found;\r\n }\r\n if (type instanceof basic_1.TableType\r\n && ((type === null || type === void 0 ? void 0 : type.getAccessType()) === basic_1.TableAccessType.sorted || (type === null || type === void 0 ? void 0 : type.getAccessType()) === basic_1.TableAccessType.hashed)) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n}\r\nexports.SelectAddOrderBy = SelectAddOrderBy;\r\n//# sourceMappingURL=select_add_order_by.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/select_add_order_by.js?");
|
|
12482
|
+
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.SelectAddOrderBy = exports.SelectAddOrderByConf = void 0;\r\nconst Expressions = __webpack_require__(/*! ../abap/2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/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 _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nconst syntax_1 = __webpack_require__(/*! ../abap/5_syntax/syntax */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/syntax.js\");\r\nconst _abap_object_1 = __webpack_require__(/*! ../objects/_abap_object */ \"./node_modules/@abaplint/core/build/src/objects/_abap_object.js\");\r\nconst basic_1 = __webpack_require__(/*! ../abap/types/basic */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/index.js\");\r\nclass SelectAddOrderByConf extends _basic_rule_config_1.BasicRuleConfig {\r\n}\r\nexports.SelectAddOrderByConf = SelectAddOrderByConf;\r\nclass SelectAddOrderBy {\r\n constructor() {\r\n this.conf = new SelectAddOrderByConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"select_add_order_by\",\r\n title: \"SELECT add ORDER BY\",\r\n shortDescription: `SELECTs add ORDER BY clause`,\r\n extendedInformation: `\r\nThis will make sure that the SELECT statement returns results in the same sequence on different databases\r\n\r\nadd ORDER BY PRIMARY KEY if in doubt\r\n\r\nIf the target is a sorted/hashed table, no issue is reported`,\r\n tags: [_irule_1.RuleTag.SingleFile],\r\n };\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n initialize(reg) {\r\n this.reg = reg;\r\n return this;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n run(obj) {\r\n var _a;\r\n const issues = [];\r\n if (!(obj instanceof _abap_object_1.ABAPObject) || obj.getType() === \"INTF\") {\r\n return [];\r\n }\r\n const spaghetti = new syntax_1.SyntaxLogic(this.reg, obj).run().spaghetti;\r\n for (const file of obj.getABAPFiles()) {\r\n const stru = file.getStructure();\r\n if (stru === undefined) {\r\n return issues;\r\n }\r\n const selects = stru.findAllStatements(Statements.Select);\r\n selects.push(...stru.findAllStatements(Statements.SelectLoop));\r\n for (const s of selects) {\r\n const c = s.concatTokens().toUpperCase();\r\n if (c.startsWith(\"SELECT SINGLE \")) {\r\n continue;\r\n }\r\n // skip COUNT(*)\r\n const list = s.findFirstExpression(Expressions.SQLFieldList);\r\n if ((list === null || list === void 0 ? void 0 : list.getChildren().length) === 1 && ((_a = list.getFirstChild()) === null || _a === void 0 ? void 0 : _a.get()) instanceof Expressions.SQLAggregation) {\r\n continue;\r\n }\r\n else if (s.findFirstExpression(Expressions.SQLOrderBy)) {\r\n continue;\r\n }\r\n if (this.isTargetSortedOrHashed(s, spaghetti, file)) {\r\n continue;\r\n }\r\n issues.push(issue_1.Issue.atStatement(file, s, \"Add ORDER BY\", this.getMetadata().key, this.conf.severity));\r\n }\r\n }\r\n return issues;\r\n }\r\n isTargetSortedOrHashed(s, spaghetti, file) {\r\n var _a, _b;\r\n const target = (_a = s.findFirstExpression(Expressions.SQLIntoTable)) === null || _a === void 0 ? void 0 : _a.findFirstExpression(Expressions.Target);\r\n if (target) {\r\n const start = target.getFirstToken().getStart();\r\n const scope = spaghetti.lookupPosition(start, file.getFilename());\r\n let type = (_b = scope === null || scope === void 0 ? void 0 : scope.findWriteReference(start)) === null || _b === void 0 ? void 0 : _b.getType();\r\n const children = target.getChildren();\r\n if (type instanceof basic_1.StructureType && children.length >= 3 && children[1].concatTokens() === \"-\") {\r\n const found = type.getComponentByName(children[2].concatTokens());\r\n if (found === undefined) {\r\n return false;\r\n }\r\n type = found;\r\n }\r\n if (type instanceof basic_1.TableType\r\n && ((type === null || type === void 0 ? void 0 : type.getAccessType()) === basic_1.TableAccessType.sorted || (type === null || type === void 0 ? void 0 : type.getAccessType()) === basic_1.TableAccessType.hashed)) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n}\r\nexports.SelectAddOrderBy = SelectAddOrderBy;\r\n//# sourceMappingURL=select_add_order_by.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/select_add_order_by.js?");
|
|
12450
12483
|
|
|
12451
12484
|
/***/ }),
|
|
12452
12485
|
|
|
@@ -12765,7 +12798,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
|
|
|
12765
12798
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
12766
12799
|
|
|
12767
12800
|
"use strict";
|
|
12768
|
-
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.UseNew = exports.UseNewConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst Statements = __webpack_require__(/*! ../abap/2_statements/statements */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js\");\r\nconst Expressions = __webpack_require__(/*! ../abap/2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/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 expressions_1 = __webpack_require__(/*! ../abap/2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst version_1 = __webpack_require__(/*! ../version */ \"./node_modules/@abaplint/core/build/src/version.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nconst edit_helper_1 = __webpack_require__(/*! ../edit_helper */ \"./node_modules/@abaplint/core/build/src/edit_helper.js\");\r\nclass UseNewConf extends _basic_rule_config_1.BasicRuleConfig {\r\n}\r\nexports.UseNewConf = UseNewConf;\r\nclass UseNew extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new UseNewConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"use_new\",\r\n title: \"Use NEW\",\r\n shortDescription: `Checks for deprecated CREATE OBJECT statements.`,\r\n extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-new-to-create-object\r\n\r\nIf the target variable is referenced in the CREATE OBJECT statement, no errors are issued\r\n\r\nApplicable from v740sp02 and up`,\r\n badExample: `CREATE OBJECT ref.`,\r\n goodExample: `ref = NEW #( ).`,\r\n tags: [_irule_1.RuleTag.Upport, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],\r\n };\r\n }\r\n getMessage() {\r\n return \"Use NEW #( ) to instantiate object.\";\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n runParsed(file, obj) {\r\n var _a;\r\n const issues = [];\r\n if (obj.getType() === \"INTF\") {\r\n return [];\r\n }\r\n if (this.reg.getConfig().getVersion() < version_1.Version.v740sp02 && this.reg.getConfig().getVersion() !== version_1.Version.Cloud) {\r\n return [];\r\n }\r\n for (const statement of file.getStatements()) {\r\n if (statement.get() instanceof Statements.CreateObject) {\r\n if (statement.findFirstExpression(expressions_1.Dynamic)) {\r\n continue;\r\n }\r\n else if (statement.findDirectExpression(expressions_1.ParameterListExceptions)) {\r\n continue;\r\n }\r\n const target = ((_a = statement.findDirectExpression(expressions_1.Target)) === null || _a === void 0 ? void 0 : _a.concatTokens()) + \"->\";\r\n if (statement.concatTokens().includes(target)) {\r\n continue;\r\n }\r\n const fix = this.buildFix(file, statement);\r\n const issue = issue_1.Issue.atPosition(file, statement.getStart(), this.getMessage(), this.getMetadata().key, this.conf.severity, fix);\r\n issues.push(issue);\r\n }\r\n }\r\n return issues;\r\n }\r\n buildFix(file, statement) {\r\n var _a, _b;\r\n const target = (_a = statement.findDirectExpression(Expressions.Target)) === null || _a === void 0 ? void 0 : _a.concatTokens();\r\n if (target === undefined) {\r\n return undefined;\r\n }\r\n const parameters = statement.findDirectExpression(Expressions.ParameterListS);\r\n const param = parameters ? parameters.concatTokens() + \" \" : \"\";\r\n let type = (_b = statement.findDirectExpression(Expressions.ClassName)) === null || _b === void 0 ? void 0 : _b.getFirstToken().getStr();\r\n if (type === undefined) {\r\n type = \"#\";\r\n }\r\n const string = `${target} = NEW ${type}( ${param}).`;\r\n return edit_helper_1.EditHelper.replaceRange(file, statement.getStart(), statement.getEnd(), string);\r\n }\r\n}\r\nexports.UseNew = UseNew;\r\n//# sourceMappingURL=use_new.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/use_new.js?");
|
|
12801
|
+
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.UseNew = exports.UseNewConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst Statements = __webpack_require__(/*! ../abap/2_statements/statements */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js\");\r\nconst Expressions = __webpack_require__(/*! ../abap/2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/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 expressions_1 = __webpack_require__(/*! ../abap/2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst version_1 = __webpack_require__(/*! ../version */ \"./node_modules/@abaplint/core/build/src/version.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nconst edit_helper_1 = __webpack_require__(/*! ../edit_helper */ \"./node_modules/@abaplint/core/build/src/edit_helper.js\");\r\nclass UseNewConf extends _basic_rule_config_1.BasicRuleConfig {\r\n}\r\nexports.UseNewConf = UseNewConf;\r\nclass UseNew extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new UseNewConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"use_new\",\r\n title: \"Use NEW\",\r\n shortDescription: `Checks for deprecated CREATE OBJECT statements.`,\r\n extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-new-to-create-object\r\n\r\nIf the target variable is referenced in the CREATE OBJECT statement, no errors are issued\r\n\r\nApplicable from v740sp02 and up`,\r\n badExample: `CREATE OBJECT ref.`,\r\n goodExample: `ref = NEW #( ).`,\r\n tags: [_irule_1.RuleTag.Upport, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],\r\n };\r\n }\r\n getMessage() {\r\n return \"Use NEW #( ) to instantiate object.\";\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n runParsed(file, obj) {\r\n var _a;\r\n const issues = [];\r\n if (obj.getType() === \"INTF\") {\r\n return [];\r\n }\r\n if (this.reg.getConfig().getVersion() < version_1.Version.v740sp02 && this.reg.getConfig().getVersion() !== version_1.Version.Cloud) {\r\n return [];\r\n }\r\n for (const statement of file.getStatements()) {\r\n if (statement.get() instanceof Statements.CreateObject) {\r\n if (statement.findFirstExpression(expressions_1.Dynamic)) {\r\n continue;\r\n }\r\n else if (statement.findDirectExpression(expressions_1.ParameterListExceptions)) {\r\n continue;\r\n }\r\n else if (statement.findDirectTokenByText(\"AREA\")) {\r\n continue;\r\n }\r\n const target = ((_a = statement.findDirectExpression(expressions_1.Target)) === null || _a === void 0 ? void 0 : _a.concatTokens()) + \"->\";\r\n if (statement.concatTokens().includes(target)) {\r\n continue;\r\n }\r\n const fix = this.buildFix(file, statement);\r\n const issue = issue_1.Issue.atPosition(file, statement.getStart(), this.getMessage(), this.getMetadata().key, this.conf.severity, fix);\r\n issues.push(issue);\r\n }\r\n }\r\n return issues;\r\n }\r\n buildFix(file, statement) {\r\n var _a, _b;\r\n const target = (_a = statement.findDirectExpression(Expressions.Target)) === null || _a === void 0 ? void 0 : _a.concatTokens();\r\n if (target === undefined) {\r\n return undefined;\r\n }\r\n const parameters = statement.findDirectExpression(Expressions.ParameterListS);\r\n const param = parameters ? parameters.concatTokens() + \" \" : \"\";\r\n let type = (_b = statement.findDirectExpression(Expressions.ClassName)) === null || _b === void 0 ? void 0 : _b.getFirstToken().getStr();\r\n if (type === undefined) {\r\n type = \"#\";\r\n }\r\n const string = `${target} = NEW ${type}( ${param}).`;\r\n return edit_helper_1.EditHelper.replaceRange(file, statement.getStart(), statement.getEnd(), string);\r\n }\r\n}\r\nexports.UseNew = UseNew;\r\n//# sourceMappingURL=use_new.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/use_new.js?");
|
|
12769
12802
|
|
|
12770
12803
|
/***/ }),
|
|
12771
12804
|
|
|
@@ -12864,7 +12897,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
|
|
|
12864
12897
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
12865
12898
|
|
|
12866
12899
|
"use strict";
|
|
12867
|
-
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.IncludeGraph = void 0;\r\nconst statements_1 = __webpack_require__(/*! ../abap/2_statements/statements */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js\");\r\nconst expressions_1 = __webpack_require__(/*! ../abap/2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst objects_1 = __webpack_require__(/*! ../objects */ \"./node_modules/@abaplint/core/build/src/objects/index.js\");\r\nconst check_include_1 = __webpack_require__(/*! ../rules/check_include */ \"./node_modules/@abaplint/core/build/src/rules/check_include.js\");\r\nconst position_1 = __webpack_require__(/*! ../position */ \"./node_modules/@abaplint/core/build/src/position.js\");\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst _abap_object_1 = __webpack_require__(/*! ../objects/_abap_object */ \"./node_modules/@abaplint/core/build/src/objects/_abap_object.js\");\r\nconst severity_1 = __webpack_require__(/*! ../severity */ \"./node_modules/@abaplint/core/build/src/severity.js\");\r\n// todo, check for cycles/circular dependencies, method findTop\r\n// todo, add configurable error for multiple use includes\r\nfunction getABAPObjects(reg) {\r\n const ret = [];\r\n for (const o of reg.getObjects()) {\r\n if (o instanceof _abap_object_1.ABAPObject) {\r\n ret.push(o);\r\n }\r\n }\r\n return ret;\r\n}\r\nclass Graph {\r\n constructor() {\r\n this.vertices = [];\r\n this.edges = [];\r\n }\r\n addVertex(vertex) {\r\n this.vertices.push(vertex);\r\n }\r\n findInclude(includeName) {\r\n for (const v of this.vertices) {\r\n if (v.includeName.toUpperCase() === includeName.toUpperCase()) {\r\n return v;\r\n }\r\n }\r\n return undefined;\r\n }\r\n findVertex(filename) {\r\n for (const v of this.vertices) {\r\n if (v.filename.toUpperCase() === filename.toUpperCase()) {\r\n return v;\r\n }\r\n }\r\n return undefined;\r\n }\r\n addEdge(from, toFilename) {\r\n this.edges.push({ from: from.filename, to: toFilename });\r\n }\r\n findTop(filename) {\r\n const ret = [];\r\n for (const e of this.edges) {\r\n if (e.from === filename) {\r\n ret.push(...this.findTop(e.to));\r\n }\r\n }\r\n if (ret.length === 0) {\r\n const found = this.findVertex(filename);\r\n if (found !== undefined) {\r\n ret.push(found);\r\n }\r\n }\r\n return ret;\r\n }\r\n}\r\nclass IncludeGraph {\r\n constructor(reg) {\r\n this.reg = reg;\r\n this.issues = [];\r\n this.graph = new Graph();\r\n this.build();\r\n }\r\n getIssues() {\r\n return this.issues;\r\n }\r\n listMainForInclude(filename) {\r\n const ret = [];\r\n if (filename === undefined) {\r\n return [];\r\n }\r\n for (const f of this.graph.findTop(filename)) {\r\n if (f.include === false) {\r\n ret.push(f.filename);\r\n }\r\n }\r\n return ret;\r\n }\r\n getIssuesFile(file) {\r\n const ret = [];\r\n for (const i of this.issues) {\r\n if (i.getFilename() === file.getFilename()) {\r\n ret.push(i);\r\n }\r\n }\r\n return ret;\r\n }\r\n ///////////////////////////////\r\n build() {\r\n this.addVertices();\r\n for (const o of getABAPObjects(this.reg)) {\r\n for (const f of o.getABAPFiles()) {\r\n for (const s of f.getStatements()) {\r\n if (s.get() instanceof statements_1.Include) {\r\n const ifFound = s.concatTokens().toUpperCase().includes(\"IF FOUND\");\r\n const iexp = s.findFirstExpression(expressions_1.IncludeName);\r\n if (iexp === undefined) {\r\n throw new Error(\"unexpected Include node\");\r\n }\r\n const name = iexp.getFirstToken().getStr().toUpperCase();\r\n if (name.match(/^(\\/\\w+\\/)?L.+XX$/)) { // function module XX includes, possibily namespaced\r\n continue;\r\n }\r\n const found = this.graph.findInclude(name);\r\n if (found === undefined) {\r\n if (ifFound === false) {\r\n const issue = issue_1.Issue.atStatement(f, s, \"Include \" + name + \" not found\", new check_include_1.CheckInclude().getMetadata().key, severity_1.Severity.Error);\r\n this.issues.push(issue);\r\n }\r\n }\r\n else if (found.include === false) {\r\n const issue = issue_1.Issue.atStatement(f, s, \"Not possible to INCLUDE a main program\", new check_include_1.CheckInclude().getMetadata().key, severity_1.Severity.Error);\r\n this.issues.push(issue);\r\n }\r\n else {\r\n this.graph.addEdge(found, f.getFilename());\r\n }\r\n }\r\n }\r\n }\r\n }\r\n this.findUnusedIncludes();\r\n }\r\n findUnusedIncludes() {\r\n for (const v of this.graph.vertices) {\r\n if (v.include === true) {\r\n if (this.listMainForInclude(v.filename).length === 0) {\r\n const f = this.reg.getFileByName(v.filename);\r\n if (f === undefined) {\r\n throw new Error(\"findUnusedIncludes internal error\");\r\n }\r\n const issue = issue_1.Issue.atPosition(f, new position_1.Position(1, 1), \"INCLUDE not used anywhere\", new check_include_1.CheckInclude().getMetadata().key, severity_1.Severity.Error);\r\n this.issues.push(issue);\r\n }\r\n }\r\n }\r\n }\r\n addVertices() {\r\n for (const o of getABAPObjects(this.reg)) {\r\n if (o instanceof objects_1.Program) {\r\n const file = o.getMainABAPFile();\r\n if (file) {\r\n this.graph.addVertex({\r\n filename: file.getFilename(),\r\n includeName: o.getName(),\r\n include: o.isInclude()\r\n });\r\n }\r\n }\r\n else if (o instanceof objects_1.Class) {\r\n for (const f of o.getSequencedFiles()) {\r\n this.graph.addVertex({\r\n filename: f.getFilename(),\r\n includeName: o.getName(),\r\n include: false\r\n });\r\n }\r\n }\r\n else if (o instanceof objects_1.FunctionGroup) {\r\n for (const i of o.getIncludeFiles()) {\r\n this.graph.addVertex({\r\n filename: i.file.getFilename(),\r\n includeName: i.name,\r\n include: true\r\n });\r\n }\r\n const file = o.getMainABAPFile();\r\n if (file) {\r\n this.graph.addVertex({\r\n filename: file.getFilename(),\r\n includeName: o.getName(),\r\n include: false\r\n });\r\n }\r\n }\r\n }\r\n }\r\n}\r\nexports.IncludeGraph = IncludeGraph;\r\n//# sourceMappingURL=include_graph.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/utils/include_graph.js?");
|
|
12900
|
+
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.IncludeGraph = void 0;\r\nconst statements_1 = __webpack_require__(/*! ../abap/2_statements/statements */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js\");\r\nconst expressions_1 = __webpack_require__(/*! ../abap/2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst objects_1 = __webpack_require__(/*! ../objects */ \"./node_modules/@abaplint/core/build/src/objects/index.js\");\r\nconst check_include_1 = __webpack_require__(/*! ../rules/check_include */ \"./node_modules/@abaplint/core/build/src/rules/check_include.js\");\r\nconst position_1 = __webpack_require__(/*! ../position */ \"./node_modules/@abaplint/core/build/src/position.js\");\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst _abap_object_1 = __webpack_require__(/*! ../objects/_abap_object */ \"./node_modules/@abaplint/core/build/src/objects/_abap_object.js\");\r\nconst severity_1 = __webpack_require__(/*! ../severity */ \"./node_modules/@abaplint/core/build/src/severity.js\");\r\n// todo, check for cycles/circular dependencies, method findTop\r\n// todo, add configurable error for multiple use includes\r\nfunction getABAPObjects(reg) {\r\n const ret = [];\r\n for (const o of reg.getObjects()) {\r\n if (o instanceof _abap_object_1.ABAPObject) {\r\n ret.push(o);\r\n }\r\n }\r\n return ret;\r\n}\r\nclass Graph {\r\n constructor() {\r\n this.vertices = [];\r\n this.edges = [];\r\n }\r\n addVertex(vertex) {\r\n this.vertices.push(vertex);\r\n }\r\n findInclude(includeName) {\r\n for (const v of this.vertices) {\r\n if (v.includeName.toUpperCase() === includeName.toUpperCase()) {\r\n return v;\r\n }\r\n }\r\n return undefined;\r\n }\r\n findVertex(filename) {\r\n for (const v of this.vertices) {\r\n if (v.filename.toUpperCase() === filename.toUpperCase()) {\r\n return v;\r\n }\r\n }\r\n return undefined;\r\n }\r\n addEdge(from, toFilename) {\r\n this.edges.push({ from: from.filename, to: toFilename });\r\n }\r\n findTop(filename) {\r\n const ret = [];\r\n for (const e of this.edges) {\r\n if (e.from === filename) {\r\n ret.push(...this.findTop(e.to));\r\n }\r\n }\r\n if (ret.length === 0) {\r\n const found = this.findVertex(filename);\r\n if (found !== undefined) {\r\n ret.push(found);\r\n }\r\n }\r\n return ret;\r\n }\r\n}\r\nclass IncludeGraph {\r\n constructor(reg) {\r\n this.reg = reg;\r\n this.issues = [];\r\n this.graph = new Graph();\r\n this.build();\r\n }\r\n getIssues() {\r\n return this.issues;\r\n }\r\n listMainForInclude(filename) {\r\n const ret = [];\r\n if (filename === undefined) {\r\n return [];\r\n }\r\n for (const f of this.graph.findTop(filename)) {\r\n if (f.include === false) {\r\n ret.push(f.filename);\r\n }\r\n }\r\n return ret;\r\n }\r\n getIssuesFile(file) {\r\n const ret = [];\r\n for (const i of this.issues) {\r\n if (i.getFilename() === file.getFilename()) {\r\n ret.push(i);\r\n }\r\n }\r\n return ret;\r\n }\r\n ///////////////////////////////\r\n build() {\r\n this.addVertices();\r\n for (const o of getABAPObjects(this.reg)) {\r\n for (const f of o.getABAPFiles()) {\r\n for (const s of f.getStatements()) {\r\n if (s.get() instanceof statements_1.Include) {\r\n const ifFound = s.concatTokens().toUpperCase().includes(\"IF FOUND\");\r\n const iexp = s.findFirstExpression(expressions_1.IncludeName);\r\n if (iexp === undefined) {\r\n throw new Error(\"unexpected Include node\");\r\n }\r\n const name = iexp.getFirstToken().getStr().toUpperCase();\r\n if (name.match(/^(\\/\\w+\\/)?L.+XX$/)) { // function module XX includes, possibily namespaced\r\n continue;\r\n }\r\n const found = this.graph.findInclude(name);\r\n if (found === undefined) {\r\n if (ifFound === false) {\r\n const issue = issue_1.Issue.atStatement(f, s, \"Include \" + name + \" not found\", new check_include_1.CheckInclude().getMetadata().key, severity_1.Severity.Error);\r\n this.issues.push(issue);\r\n }\r\n }\r\n else if (found.include === false) {\r\n const issue = issue_1.Issue.atStatement(f, s, \"Not possible to INCLUDE a main program\", new check_include_1.CheckInclude().getMetadata().key, severity_1.Severity.Error);\r\n this.issues.push(issue);\r\n }\r\n else {\r\n this.graph.addEdge(found, f.getFilename());\r\n }\r\n }\r\n }\r\n }\r\n }\r\n this.findUnusedIncludes();\r\n }\r\n findUnusedIncludes() {\r\n for (const v of this.graph.vertices) {\r\n if (v.include === true) {\r\n if (this.listMainForInclude(v.filename).length === 0) {\r\n const f = this.reg.getFileByName(v.filename);\r\n if (f === undefined) {\r\n throw new Error(\"findUnusedIncludes internal error\");\r\n }\r\n const issue = issue_1.Issue.atPosition(f, new position_1.Position(1, 1), \"INCLUDE not used anywhere\", new check_include_1.CheckInclude().getMetadata().key, severity_1.Severity.Error);\r\n this.issues.push(issue);\r\n }\r\n }\r\n }\r\n }\r\n addVertices() {\r\n for (const o of getABAPObjects(this.reg)) {\r\n if (o instanceof objects_1.Program) {\r\n const file = o.getMainABAPFile();\r\n if (file) {\r\n this.graph.addVertex({\r\n filename: file.getFilename(),\r\n includeName: o.getName(),\r\n include: o.isInclude()\r\n });\r\n }\r\n }\r\n else if (o instanceof objects_1.TypePool) {\r\n const file = o.getMainABAPFile();\r\n if (file) {\r\n this.graph.addVertex({\r\n filename: file.getFilename(),\r\n includeName: o.getName(),\r\n include: false\r\n });\r\n }\r\n }\r\n else if (o instanceof objects_1.Class) {\r\n for (const f of o.getSequencedFiles()) {\r\n this.graph.addVertex({\r\n filename: f.getFilename(),\r\n includeName: o.getName(),\r\n include: false\r\n });\r\n }\r\n }\r\n else if (o instanceof objects_1.FunctionGroup) {\r\n for (const i of o.getIncludeFiles()) {\r\n this.graph.addVertex({\r\n filename: i.file.getFilename(),\r\n includeName: i.name,\r\n include: true\r\n });\r\n }\r\n const file = o.getMainABAPFile();\r\n if (file) {\r\n this.graph.addVertex({\r\n filename: file.getFilename(),\r\n includeName: o.getName(),\r\n include: false\r\n });\r\n }\r\n }\r\n }\r\n }\r\n}\r\nexports.IncludeGraph = IncludeGraph;\r\n//# sourceMappingURL=include_graph.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/utils/include_graph.js?");
|
|
12868
12901
|
|
|
12869
12902
|
/***/ }),
|
|
12870
12903
|
|
|
@@ -12912,17 +12945,6 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
|
|
|
12912
12945
|
|
|
12913
12946
|
/***/ }),
|
|
12914
12947
|
|
|
12915
|
-
/***/ "./node_modules/ansi-styles/index.js":
|
|
12916
|
-
/*!*******************************************!*\
|
|
12917
|
-
!*** ./node_modules/ansi-styles/index.js ***!
|
|
12918
|
-
\*******************************************/
|
|
12919
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
12920
|
-
|
|
12921
|
-
"use strict";
|
|
12922
|
-
eval("/* module decorator */ module = __webpack_require__.nmd(module);\n\n\nconst wrapAnsi16 = (fn, offset) => (...args) => {\n\tconst code = fn(...args);\n\treturn `\\u001B[${code + offset}m`;\n};\n\nconst wrapAnsi256 = (fn, offset) => (...args) => {\n\tconst code = fn(...args);\n\treturn `\\u001B[${38 + offset};5;${code}m`;\n};\n\nconst wrapAnsi16m = (fn, offset) => (...args) => {\n\tconst rgb = fn(...args);\n\treturn `\\u001B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`;\n};\n\nconst ansi2ansi = n => n;\nconst rgb2rgb = (r, g, b) => [r, g, b];\n\nconst setLazyProperty = (object, property, get) => {\n\tObject.defineProperty(object, property, {\n\t\tget: () => {\n\t\t\tconst value = get();\n\n\t\t\tObject.defineProperty(object, property, {\n\t\t\t\tvalue,\n\t\t\t\tenumerable: true,\n\t\t\t\tconfigurable: true\n\t\t\t});\n\n\t\t\treturn value;\n\t\t},\n\t\tenumerable: true,\n\t\tconfigurable: true\n\t});\n};\n\n/** @type {typeof import('color-convert')} */\nlet colorConvert;\nconst makeDynamicStyles = (wrap, targetSpace, identity, isBackground) => {\n\tif (colorConvert === undefined) {\n\t\tcolorConvert = __webpack_require__(/*! color-convert */ \"./node_modules/color-convert/index.js\");\n\t}\n\n\tconst offset = isBackground ? 10 : 0;\n\tconst styles = {};\n\n\tfor (const [sourceSpace, suite] of Object.entries(colorConvert)) {\n\t\tconst name = sourceSpace === 'ansi16' ? 'ansi' : sourceSpace;\n\t\tif (sourceSpace === targetSpace) {\n\t\t\tstyles[name] = wrap(identity, offset);\n\t\t} else if (typeof suite === 'object') {\n\t\t\tstyles[name] = wrap(suite[targetSpace], offset);\n\t\t}\n\t}\n\n\treturn styles;\n};\n\nfunction assembleStyles() {\n\tconst codes = new Map();\n\tconst styles = {\n\t\tmodifier: {\n\t\t\treset: [0, 0],\n\t\t\t// 21 isn't widely supported and 22 does the same thing\n\t\t\tbold: [1, 22],\n\t\t\tdim: [2, 22],\n\t\t\titalic: [3, 23],\n\t\t\tunderline: [4, 24],\n\t\t\tinverse: [7, 27],\n\t\t\thidden: [8, 28],\n\t\t\tstrikethrough: [9, 29]\n\t\t},\n\t\tcolor: {\n\t\t\tblack: [30, 39],\n\t\t\tred: [31, 39],\n\t\t\tgreen: [32, 39],\n\t\t\tyellow: [33, 39],\n\t\t\tblue: [34, 39],\n\t\t\tmagenta: [35, 39],\n\t\t\tcyan: [36, 39],\n\t\t\twhite: [37, 39],\n\n\t\t\t// Bright color\n\t\t\tblackBright: [90, 39],\n\t\t\tredBright: [91, 39],\n\t\t\tgreenBright: [92, 39],\n\t\t\tyellowBright: [93, 39],\n\t\t\tblueBright: [94, 39],\n\t\t\tmagentaBright: [95, 39],\n\t\t\tcyanBright: [96, 39],\n\t\t\twhiteBright: [97, 39]\n\t\t},\n\t\tbgColor: {\n\t\t\tbgBlack: [40, 49],\n\t\t\tbgRed: [41, 49],\n\t\t\tbgGreen: [42, 49],\n\t\t\tbgYellow: [43, 49],\n\t\t\tbgBlue: [44, 49],\n\t\t\tbgMagenta: [45, 49],\n\t\t\tbgCyan: [46, 49],\n\t\t\tbgWhite: [47, 49],\n\n\t\t\t// Bright color\n\t\t\tbgBlackBright: [100, 49],\n\t\t\tbgRedBright: [101, 49],\n\t\t\tbgGreenBright: [102, 49],\n\t\t\tbgYellowBright: [103, 49],\n\t\t\tbgBlueBright: [104, 49],\n\t\t\tbgMagentaBright: [105, 49],\n\t\t\tbgCyanBright: [106, 49],\n\t\t\tbgWhiteBright: [107, 49]\n\t\t}\n\t};\n\n\t// Alias bright black as gray (and grey)\n\tstyles.color.gray = styles.color.blackBright;\n\tstyles.bgColor.bgGray = styles.bgColor.bgBlackBright;\n\tstyles.color.grey = styles.color.blackBright;\n\tstyles.bgColor.bgGrey = styles.bgColor.bgBlackBright;\n\n\tfor (const [groupName, group] of Object.entries(styles)) {\n\t\tfor (const [styleName, style] of Object.entries(group)) {\n\t\t\tstyles[styleName] = {\n\t\t\t\topen: `\\u001B[${style[0]}m`,\n\t\t\t\tclose: `\\u001B[${style[1]}m`\n\t\t\t};\n\n\t\t\tgroup[styleName] = styles[styleName];\n\n\t\t\tcodes.set(style[0], style[1]);\n\t\t}\n\n\t\tObject.defineProperty(styles, groupName, {\n\t\t\tvalue: group,\n\t\t\tenumerable: false\n\t\t});\n\t}\n\n\tObject.defineProperty(styles, 'codes', {\n\t\tvalue: codes,\n\t\tenumerable: false\n\t});\n\n\tstyles.color.close = '\\u001B[39m';\n\tstyles.bgColor.close = '\\u001B[49m';\n\n\tsetLazyProperty(styles.color, 'ansi', () => makeDynamicStyles(wrapAnsi16, 'ansi16', ansi2ansi, false));\n\tsetLazyProperty(styles.color, 'ansi256', () => makeDynamicStyles(wrapAnsi256, 'ansi256', ansi2ansi, false));\n\tsetLazyProperty(styles.color, 'ansi16m', () => makeDynamicStyles(wrapAnsi16m, 'rgb', rgb2rgb, false));\n\tsetLazyProperty(styles.bgColor, 'ansi', () => makeDynamicStyles(wrapAnsi16, 'ansi16', ansi2ansi, true));\n\tsetLazyProperty(styles.bgColor, 'ansi256', () => makeDynamicStyles(wrapAnsi256, 'ansi256', ansi2ansi, true));\n\tsetLazyProperty(styles.bgColor, 'ansi16m', () => makeDynamicStyles(wrapAnsi16m, 'rgb', rgb2rgb, true));\n\n\treturn styles;\n}\n\n// Make the export immutable\nObject.defineProperty(module, 'exports', {\n\tenumerable: true,\n\tget: assembleStyles\n});\n\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/ansi-styles/index.js?");
|
|
12923
|
-
|
|
12924
|
-
/***/ }),
|
|
12925
|
-
|
|
12926
12948
|
/***/ "./node_modules/balanced-match/index.js":
|
|
12927
12949
|
/*!**********************************************!*\
|
|
12928
12950
|
!*** ./node_modules/balanced-match/index.js ***!
|
|
@@ -12944,80 +12966,6 @@ eval("var concatMap = __webpack_require__(/*! concat-map */ \"./node_modules/con
|
|
|
12944
12966
|
|
|
12945
12967
|
/***/ }),
|
|
12946
12968
|
|
|
12947
|
-
/***/ "./node_modules/chalk/source/index.js":
|
|
12948
|
-
/*!********************************************!*\
|
|
12949
|
-
!*** ./node_modules/chalk/source/index.js ***!
|
|
12950
|
-
\********************************************/
|
|
12951
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
12952
|
-
|
|
12953
|
-
"use strict";
|
|
12954
|
-
eval("\nconst ansiStyles = __webpack_require__(/*! ansi-styles */ \"./node_modules/ansi-styles/index.js\");\nconst {stdout: stdoutColor, stderr: stderrColor} = __webpack_require__(/*! supports-color */ \"./node_modules/supports-color/index.js\");\nconst {\n\tstringReplaceAll,\n\tstringEncaseCRLFWithFirstIndex\n} = __webpack_require__(/*! ./util */ \"./node_modules/chalk/source/util.js\");\n\nconst {isArray} = Array;\n\n// `supportsColor.level` → `ansiStyles.color[name]` mapping\nconst levelMapping = [\n\t'ansi',\n\t'ansi',\n\t'ansi256',\n\t'ansi16m'\n];\n\nconst styles = Object.create(null);\n\nconst applyOptions = (object, options = {}) => {\n\tif (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) {\n\t\tthrow new Error('The `level` option should be an integer from 0 to 3');\n\t}\n\n\t// Detect level if not set manually\n\tconst colorLevel = stdoutColor ? stdoutColor.level : 0;\n\tobject.level = options.level === undefined ? colorLevel : options.level;\n};\n\nclass ChalkClass {\n\tconstructor(options) {\n\t\t// eslint-disable-next-line no-constructor-return\n\t\treturn chalkFactory(options);\n\t}\n}\n\nconst chalkFactory = options => {\n\tconst chalk = {};\n\tapplyOptions(chalk, options);\n\n\tchalk.template = (...arguments_) => chalkTag(chalk.template, ...arguments_);\n\n\tObject.setPrototypeOf(chalk, Chalk.prototype);\n\tObject.setPrototypeOf(chalk.template, chalk);\n\n\tchalk.template.constructor = () => {\n\t\tthrow new Error('`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.');\n\t};\n\n\tchalk.template.Instance = ChalkClass;\n\n\treturn chalk.template;\n};\n\nfunction Chalk(options) {\n\treturn chalkFactory(options);\n}\n\nfor (const [styleName, style] of Object.entries(ansiStyles)) {\n\tstyles[styleName] = {\n\t\tget() {\n\t\t\tconst builder = createBuilder(this, createStyler(style.open, style.close, this._styler), this._isEmpty);\n\t\t\tObject.defineProperty(this, styleName, {value: builder});\n\t\t\treturn builder;\n\t\t}\n\t};\n}\n\nstyles.visible = {\n\tget() {\n\t\tconst builder = createBuilder(this, this._styler, true);\n\t\tObject.defineProperty(this, 'visible', {value: builder});\n\t\treturn builder;\n\t}\n};\n\nconst usedModels = ['rgb', 'hex', 'keyword', 'hsl', 'hsv', 'hwb', 'ansi', 'ansi256'];\n\nfor (const model of usedModels) {\n\tstyles[model] = {\n\t\tget() {\n\t\t\tconst {level} = this;\n\t\t\treturn function (...arguments_) {\n\t\t\t\tconst styler = createStyler(ansiStyles.color[levelMapping[level]][model](...arguments_), ansiStyles.color.close, this._styler);\n\t\t\t\treturn createBuilder(this, styler, this._isEmpty);\n\t\t\t};\n\t\t}\n\t};\n}\n\nfor (const model of usedModels) {\n\tconst bgModel = 'bg' + model[0].toUpperCase() + model.slice(1);\n\tstyles[bgModel] = {\n\t\tget() {\n\t\t\tconst {level} = this;\n\t\t\treturn function (...arguments_) {\n\t\t\t\tconst styler = createStyler(ansiStyles.bgColor[levelMapping[level]][model](...arguments_), ansiStyles.bgColor.close, this._styler);\n\t\t\t\treturn createBuilder(this, styler, this._isEmpty);\n\t\t\t};\n\t\t}\n\t};\n}\n\nconst proto = Object.defineProperties(() => {}, {\n\t...styles,\n\tlevel: {\n\t\tenumerable: true,\n\t\tget() {\n\t\t\treturn this._generator.level;\n\t\t},\n\t\tset(level) {\n\t\t\tthis._generator.level = level;\n\t\t}\n\t}\n});\n\nconst createStyler = (open, close, parent) => {\n\tlet openAll;\n\tlet closeAll;\n\tif (parent === undefined) {\n\t\topenAll = open;\n\t\tcloseAll = close;\n\t} else {\n\t\topenAll = parent.openAll + open;\n\t\tcloseAll = close + parent.closeAll;\n\t}\n\n\treturn {\n\t\topen,\n\t\tclose,\n\t\topenAll,\n\t\tcloseAll,\n\t\tparent\n\t};\n};\n\nconst createBuilder = (self, _styler, _isEmpty) => {\n\tconst builder = (...arguments_) => {\n\t\tif (isArray(arguments_[0]) && isArray(arguments_[0].raw)) {\n\t\t\t// Called as a template literal, for example: chalk.red`2 + 3 = {bold ${2+3}}`\n\t\t\treturn applyStyle(builder, chalkTag(builder, ...arguments_));\n\t\t}\n\n\t\t// Single argument is hot path, implicit coercion is faster than anything\n\t\t// eslint-disable-next-line no-implicit-coercion\n\t\treturn applyStyle(builder, (arguments_.length === 1) ? ('' + arguments_[0]) : arguments_.join(' '));\n\t};\n\n\t// We alter the prototype because we must return a function, but there is\n\t// no way to create a function with a different prototype\n\tObject.setPrototypeOf(builder, proto);\n\n\tbuilder._generator = self;\n\tbuilder._styler = _styler;\n\tbuilder._isEmpty = _isEmpty;\n\n\treturn builder;\n};\n\nconst applyStyle = (self, string) => {\n\tif (self.level <= 0 || !string) {\n\t\treturn self._isEmpty ? '' : string;\n\t}\n\n\tlet styler = self._styler;\n\n\tif (styler === undefined) {\n\t\treturn string;\n\t}\n\n\tconst {openAll, closeAll} = styler;\n\tif (string.indexOf('\\u001B') !== -1) {\n\t\twhile (styler !== undefined) {\n\t\t\t// Replace any instances already present with a re-opening code\n\t\t\t// otherwise only the part of the string until said closing code\n\t\t\t// will be colored, and the rest will simply be 'plain'.\n\t\t\tstring = stringReplaceAll(string, styler.close, styler.open);\n\n\t\t\tstyler = styler.parent;\n\t\t}\n\t}\n\n\t// We can move both next actions out of loop, because remaining actions in loop won't have\n\t// any/visible effect on parts we add here. Close the styling before a linebreak and reopen\n\t// after next line to fix a bleed issue on macOS: https://github.com/chalk/chalk/pull/92\n\tconst lfIndex = string.indexOf('\\n');\n\tif (lfIndex !== -1) {\n\t\tstring = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex);\n\t}\n\n\treturn openAll + string + closeAll;\n};\n\nlet template;\nconst chalkTag = (chalk, ...strings) => {\n\tconst [firstString] = strings;\n\n\tif (!isArray(firstString) || !isArray(firstString.raw)) {\n\t\t// If chalk() was called by itself or with a string,\n\t\t// return the string itself as a string.\n\t\treturn strings.join(' ');\n\t}\n\n\tconst arguments_ = strings.slice(1);\n\tconst parts = [firstString.raw[0]];\n\n\tfor (let i = 1; i < firstString.length; i++) {\n\t\tparts.push(\n\t\t\tString(arguments_[i - 1]).replace(/[{}\\\\]/g, '\\\\$&'),\n\t\t\tString(firstString.raw[i])\n\t\t);\n\t}\n\n\tif (template === undefined) {\n\t\ttemplate = __webpack_require__(/*! ./templates */ \"./node_modules/chalk/source/templates.js\");\n\t}\n\n\treturn template(chalk, parts.join(''));\n};\n\nObject.defineProperties(Chalk.prototype, styles);\n\nconst chalk = Chalk(); // eslint-disable-line new-cap\nchalk.supportsColor = stdoutColor;\nchalk.stderr = Chalk({level: stderrColor ? stderrColor.level : 0}); // eslint-disable-line new-cap\nchalk.stderr.supportsColor = stderrColor;\n\nmodule.exports = chalk;\n\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/chalk/source/index.js?");
|
|
12955
|
-
|
|
12956
|
-
/***/ }),
|
|
12957
|
-
|
|
12958
|
-
/***/ "./node_modules/chalk/source/templates.js":
|
|
12959
|
-
/*!************************************************!*\
|
|
12960
|
-
!*** ./node_modules/chalk/source/templates.js ***!
|
|
12961
|
-
\************************************************/
|
|
12962
|
-
/***/ ((module) => {
|
|
12963
|
-
|
|
12964
|
-
"use strict";
|
|
12965
|
-
eval("\nconst TEMPLATE_REGEX = /(?:\\\\(u(?:[a-f\\d]{4}|\\{[a-f\\d]{1,6}\\})|x[a-f\\d]{2}|.))|(?:\\{(~)?(\\w+(?:\\([^)]*\\))?(?:\\.\\w+(?:\\([^)]*\\))?)*)(?:[ \\t]|(?=\\r?\\n)))|(\\})|((?:.|[\\r\\n\\f])+?)/gi;\nconst STYLE_REGEX = /(?:^|\\.)(\\w+)(?:\\(([^)]*)\\))?/g;\nconst STRING_REGEX = /^(['\"])((?:\\\\.|(?!\\1)[^\\\\])*)\\1$/;\nconst ESCAPE_REGEX = /\\\\(u(?:[a-f\\d]{4}|{[a-f\\d]{1,6}})|x[a-f\\d]{2}|.)|([^\\\\])/gi;\n\nconst ESCAPES = new Map([\n\t['n', '\\n'],\n\t['r', '\\r'],\n\t['t', '\\t'],\n\t['b', '\\b'],\n\t['f', '\\f'],\n\t['v', '\\v'],\n\t['0', '\\0'],\n\t['\\\\', '\\\\'],\n\t['e', '\\u001B'],\n\t['a', '\\u0007']\n]);\n\nfunction unescape(c) {\n\tconst u = c[0] === 'u';\n\tconst bracket = c[1] === '{';\n\n\tif ((u && !bracket && c.length === 5) || (c[0] === 'x' && c.length === 3)) {\n\t\treturn String.fromCharCode(parseInt(c.slice(1), 16));\n\t}\n\n\tif (u && bracket) {\n\t\treturn String.fromCodePoint(parseInt(c.slice(2, -1), 16));\n\t}\n\n\treturn ESCAPES.get(c) || c;\n}\n\nfunction parseArguments(name, arguments_) {\n\tconst results = [];\n\tconst chunks = arguments_.trim().split(/\\s*,\\s*/g);\n\tlet matches;\n\n\tfor (const chunk of chunks) {\n\t\tconst number = Number(chunk);\n\t\tif (!Number.isNaN(number)) {\n\t\t\tresults.push(number);\n\t\t} else if ((matches = chunk.match(STRING_REGEX))) {\n\t\t\tresults.push(matches[2].replace(ESCAPE_REGEX, (m, escape, character) => escape ? unescape(escape) : character));\n\t\t} else {\n\t\t\tthrow new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name}')`);\n\t\t}\n\t}\n\n\treturn results;\n}\n\nfunction parseStyle(style) {\n\tSTYLE_REGEX.lastIndex = 0;\n\n\tconst results = [];\n\tlet matches;\n\n\twhile ((matches = STYLE_REGEX.exec(style)) !== null) {\n\t\tconst name = matches[1];\n\n\t\tif (matches[2]) {\n\t\t\tconst args = parseArguments(name, matches[2]);\n\t\t\tresults.push([name].concat(args));\n\t\t} else {\n\t\t\tresults.push([name]);\n\t\t}\n\t}\n\n\treturn results;\n}\n\nfunction buildStyle(chalk, styles) {\n\tconst enabled = {};\n\n\tfor (const layer of styles) {\n\t\tfor (const style of layer.styles) {\n\t\t\tenabled[style[0]] = layer.inverse ? null : style.slice(1);\n\t\t}\n\t}\n\n\tlet current = chalk;\n\tfor (const [styleName, styles] of Object.entries(enabled)) {\n\t\tif (!Array.isArray(styles)) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (!(styleName in current)) {\n\t\t\tthrow new Error(`Unknown Chalk style: ${styleName}`);\n\t\t}\n\n\t\tcurrent = styles.length > 0 ? current[styleName](...styles) : current[styleName];\n\t}\n\n\treturn current;\n}\n\nmodule.exports = (chalk, temporary) => {\n\tconst styles = [];\n\tconst chunks = [];\n\tlet chunk = [];\n\n\t// eslint-disable-next-line max-params\n\ttemporary.replace(TEMPLATE_REGEX, (m, escapeCharacter, inverse, style, close, character) => {\n\t\tif (escapeCharacter) {\n\t\t\tchunk.push(unescape(escapeCharacter));\n\t\t} else if (style) {\n\t\t\tconst string = chunk.join('');\n\t\t\tchunk = [];\n\t\t\tchunks.push(styles.length === 0 ? string : buildStyle(chalk, styles)(string));\n\t\t\tstyles.push({inverse, styles: parseStyle(style)});\n\t\t} else if (close) {\n\t\t\tif (styles.length === 0) {\n\t\t\t\tthrow new Error('Found extraneous } in Chalk template literal');\n\t\t\t}\n\n\t\t\tchunks.push(buildStyle(chalk, styles)(chunk.join('')));\n\t\t\tchunk = [];\n\t\t\tstyles.pop();\n\t\t} else {\n\t\t\tchunk.push(character);\n\t\t}\n\t});\n\n\tchunks.push(chunk.join(''));\n\n\tif (styles.length > 0) {\n\t\tconst errMessage = `Chalk template literal is missing ${styles.length} closing bracket${styles.length === 1 ? '' : 's'} (\\`}\\`)`;\n\t\tthrow new Error(errMessage);\n\t}\n\n\treturn chunks.join('');\n};\n\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/chalk/source/templates.js?");
|
|
12966
|
-
|
|
12967
|
-
/***/ }),
|
|
12968
|
-
|
|
12969
|
-
/***/ "./node_modules/chalk/source/util.js":
|
|
12970
|
-
/*!*******************************************!*\
|
|
12971
|
-
!*** ./node_modules/chalk/source/util.js ***!
|
|
12972
|
-
\*******************************************/
|
|
12973
|
-
/***/ ((module) => {
|
|
12974
|
-
|
|
12975
|
-
"use strict";
|
|
12976
|
-
eval("\n\nconst stringReplaceAll = (string, substring, replacer) => {\n\tlet index = string.indexOf(substring);\n\tif (index === -1) {\n\t\treturn string;\n\t}\n\n\tconst substringLength = substring.length;\n\tlet endIndex = 0;\n\tlet returnValue = '';\n\tdo {\n\t\treturnValue += string.substr(endIndex, index - endIndex) + substring + replacer;\n\t\tendIndex = index + substringLength;\n\t\tindex = string.indexOf(substring, endIndex);\n\t} while (index !== -1);\n\n\treturnValue += string.substr(endIndex);\n\treturn returnValue;\n};\n\nconst stringEncaseCRLFWithFirstIndex = (string, prefix, postfix, index) => {\n\tlet endIndex = 0;\n\tlet returnValue = '';\n\tdo {\n\t\tconst gotCR = string[index - 1] === '\\r';\n\t\treturnValue += string.substr(endIndex, (gotCR ? index - 1 : index) - endIndex) + prefix + (gotCR ? '\\r\\n' : '\\n') + postfix;\n\t\tendIndex = index + 1;\n\t\tindex = string.indexOf('\\n', endIndex);\n\t} while (index !== -1);\n\n\treturnValue += string.substr(endIndex);\n\treturn returnValue;\n};\n\nmodule.exports = {\n\tstringReplaceAll,\n\tstringEncaseCRLFWithFirstIndex\n};\n\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/chalk/source/util.js?");
|
|
12977
|
-
|
|
12978
|
-
/***/ }),
|
|
12979
|
-
|
|
12980
|
-
/***/ "./node_modules/color-convert/conversions.js":
|
|
12981
|
-
/*!***************************************************!*\
|
|
12982
|
-
!*** ./node_modules/color-convert/conversions.js ***!
|
|
12983
|
-
\***************************************************/
|
|
12984
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
12985
|
-
|
|
12986
|
-
eval("/* MIT license */\n/* eslint-disable no-mixed-operators */\nconst cssKeywords = __webpack_require__(/*! color-name */ \"./node_modules/color-name/index.js\");\n\n// NOTE: conversions should only return primitive values (i.e. arrays, or\n// values that give correct `typeof` results).\n// do not use box values types (i.e. Number(), String(), etc.)\n\nconst reverseKeywords = {};\nfor (const key of Object.keys(cssKeywords)) {\n\treverseKeywords[cssKeywords[key]] = key;\n}\n\nconst convert = {\n\trgb: {channels: 3, labels: 'rgb'},\n\thsl: {channels: 3, labels: 'hsl'},\n\thsv: {channels: 3, labels: 'hsv'},\n\thwb: {channels: 3, labels: 'hwb'},\n\tcmyk: {channels: 4, labels: 'cmyk'},\n\txyz: {channels: 3, labels: 'xyz'},\n\tlab: {channels: 3, labels: 'lab'},\n\tlch: {channels: 3, labels: 'lch'},\n\thex: {channels: 1, labels: ['hex']},\n\tkeyword: {channels: 1, labels: ['keyword']},\n\tansi16: {channels: 1, labels: ['ansi16']},\n\tansi256: {channels: 1, labels: ['ansi256']},\n\thcg: {channels: 3, labels: ['h', 'c', 'g']},\n\tapple: {channels: 3, labels: ['r16', 'g16', 'b16']},\n\tgray: {channels: 1, labels: ['gray']}\n};\n\nmodule.exports = convert;\n\n// Hide .channels and .labels properties\nfor (const model of Object.keys(convert)) {\n\tif (!('channels' in convert[model])) {\n\t\tthrow new Error('missing channels property: ' + model);\n\t}\n\n\tif (!('labels' in convert[model])) {\n\t\tthrow new Error('missing channel labels property: ' + model);\n\t}\n\n\tif (convert[model].labels.length !== convert[model].channels) {\n\t\tthrow new Error('channel and label counts mismatch: ' + model);\n\t}\n\n\tconst {channels, labels} = convert[model];\n\tdelete convert[model].channels;\n\tdelete convert[model].labels;\n\tObject.defineProperty(convert[model], 'channels', {value: channels});\n\tObject.defineProperty(convert[model], 'labels', {value: labels});\n}\n\nconvert.rgb.hsl = function (rgb) {\n\tconst r = rgb[0] / 255;\n\tconst g = rgb[1] / 255;\n\tconst b = rgb[2] / 255;\n\tconst min = Math.min(r, g, b);\n\tconst max = Math.max(r, g, b);\n\tconst delta = max - min;\n\tlet h;\n\tlet s;\n\n\tif (max === min) {\n\t\th = 0;\n\t} else if (r === max) {\n\t\th = (g - b) / delta;\n\t} else if (g === max) {\n\t\th = 2 + (b - r) / delta;\n\t} else if (b === max) {\n\t\th = 4 + (r - g) / delta;\n\t}\n\n\th = Math.min(h * 60, 360);\n\n\tif (h < 0) {\n\t\th += 360;\n\t}\n\n\tconst l = (min + max) / 2;\n\n\tif (max === min) {\n\t\ts = 0;\n\t} else if (l <= 0.5) {\n\t\ts = delta / (max + min);\n\t} else {\n\t\ts = delta / (2 - max - min);\n\t}\n\n\treturn [h, s * 100, l * 100];\n};\n\nconvert.rgb.hsv = function (rgb) {\n\tlet rdif;\n\tlet gdif;\n\tlet bdif;\n\tlet h;\n\tlet s;\n\n\tconst r = rgb[0] / 255;\n\tconst g = rgb[1] / 255;\n\tconst b = rgb[2] / 255;\n\tconst v = Math.max(r, g, b);\n\tconst diff = v - Math.min(r, g, b);\n\tconst diffc = function (c) {\n\t\treturn (v - c) / 6 / diff + 1 / 2;\n\t};\n\n\tif (diff === 0) {\n\t\th = 0;\n\t\ts = 0;\n\t} else {\n\t\ts = diff / v;\n\t\trdif = diffc(r);\n\t\tgdif = diffc(g);\n\t\tbdif = diffc(b);\n\n\t\tif (r === v) {\n\t\t\th = bdif - gdif;\n\t\t} else if (g === v) {\n\t\t\th = (1 / 3) + rdif - bdif;\n\t\t} else if (b === v) {\n\t\t\th = (2 / 3) + gdif - rdif;\n\t\t}\n\n\t\tif (h < 0) {\n\t\t\th += 1;\n\t\t} else if (h > 1) {\n\t\t\th -= 1;\n\t\t}\n\t}\n\n\treturn [\n\t\th * 360,\n\t\ts * 100,\n\t\tv * 100\n\t];\n};\n\nconvert.rgb.hwb = function (rgb) {\n\tconst r = rgb[0];\n\tconst g = rgb[1];\n\tlet b = rgb[2];\n\tconst h = convert.rgb.hsl(rgb)[0];\n\tconst w = 1 / 255 * Math.min(r, Math.min(g, b));\n\n\tb = 1 - 1 / 255 * Math.max(r, Math.max(g, b));\n\n\treturn [h, w * 100, b * 100];\n};\n\nconvert.rgb.cmyk = function (rgb) {\n\tconst r = rgb[0] / 255;\n\tconst g = rgb[1] / 255;\n\tconst b = rgb[2] / 255;\n\n\tconst k = Math.min(1 - r, 1 - g, 1 - b);\n\tconst c = (1 - r - k) / (1 - k) || 0;\n\tconst m = (1 - g - k) / (1 - k) || 0;\n\tconst y = (1 - b - k) / (1 - k) || 0;\n\n\treturn [c * 100, m * 100, y * 100, k * 100];\n};\n\nfunction comparativeDistance(x, y) {\n\t/*\n\t\tSee https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance\n\t*/\n\treturn (\n\t\t((x[0] - y[0]) ** 2) +\n\t\t((x[1] - y[1]) ** 2) +\n\t\t((x[2] - y[2]) ** 2)\n\t);\n}\n\nconvert.rgb.keyword = function (rgb) {\n\tconst reversed = reverseKeywords[rgb];\n\tif (reversed) {\n\t\treturn reversed;\n\t}\n\n\tlet currentClosestDistance = Infinity;\n\tlet currentClosestKeyword;\n\n\tfor (const keyword of Object.keys(cssKeywords)) {\n\t\tconst value = cssKeywords[keyword];\n\n\t\t// Compute comparative distance\n\t\tconst distance = comparativeDistance(rgb, value);\n\n\t\t// Check if its less, if so set as closest\n\t\tif (distance < currentClosestDistance) {\n\t\t\tcurrentClosestDistance = distance;\n\t\t\tcurrentClosestKeyword = keyword;\n\t\t}\n\t}\n\n\treturn currentClosestKeyword;\n};\n\nconvert.keyword.rgb = function (keyword) {\n\treturn cssKeywords[keyword];\n};\n\nconvert.rgb.xyz = function (rgb) {\n\tlet r = rgb[0] / 255;\n\tlet g = rgb[1] / 255;\n\tlet b = rgb[2] / 255;\n\n\t// Assume sRGB\n\tr = r > 0.04045 ? (((r + 0.055) / 1.055) ** 2.4) : (r / 12.92);\n\tg = g > 0.04045 ? (((g + 0.055) / 1.055) ** 2.4) : (g / 12.92);\n\tb = b > 0.04045 ? (((b + 0.055) / 1.055) ** 2.4) : (b / 12.92);\n\n\tconst x = (r * 0.4124) + (g * 0.3576) + (b * 0.1805);\n\tconst y = (r * 0.2126) + (g * 0.7152) + (b * 0.0722);\n\tconst z = (r * 0.0193) + (g * 0.1192) + (b * 0.9505);\n\n\treturn [x * 100, y * 100, z * 100];\n};\n\nconvert.rgb.lab = function (rgb) {\n\tconst xyz = convert.rgb.xyz(rgb);\n\tlet x = xyz[0];\n\tlet y = xyz[1];\n\tlet z = xyz[2];\n\n\tx /= 95.047;\n\ty /= 100;\n\tz /= 108.883;\n\n\tx = x > 0.008856 ? (x ** (1 / 3)) : (7.787 * x) + (16 / 116);\n\ty = y > 0.008856 ? (y ** (1 / 3)) : (7.787 * y) + (16 / 116);\n\tz = z > 0.008856 ? (z ** (1 / 3)) : (7.787 * z) + (16 / 116);\n\n\tconst l = (116 * y) - 16;\n\tconst a = 500 * (x - y);\n\tconst b = 200 * (y - z);\n\n\treturn [l, a, b];\n};\n\nconvert.hsl.rgb = function (hsl) {\n\tconst h = hsl[0] / 360;\n\tconst s = hsl[1] / 100;\n\tconst l = hsl[2] / 100;\n\tlet t2;\n\tlet t3;\n\tlet val;\n\n\tif (s === 0) {\n\t\tval = l * 255;\n\t\treturn [val, val, val];\n\t}\n\n\tif (l < 0.5) {\n\t\tt2 = l * (1 + s);\n\t} else {\n\t\tt2 = l + s - l * s;\n\t}\n\n\tconst t1 = 2 * l - t2;\n\n\tconst rgb = [0, 0, 0];\n\tfor (let i = 0; i < 3; i++) {\n\t\tt3 = h + 1 / 3 * -(i - 1);\n\t\tif (t3 < 0) {\n\t\t\tt3++;\n\t\t}\n\n\t\tif (t3 > 1) {\n\t\t\tt3--;\n\t\t}\n\n\t\tif (6 * t3 < 1) {\n\t\t\tval = t1 + (t2 - t1) * 6 * t3;\n\t\t} else if (2 * t3 < 1) {\n\t\t\tval = t2;\n\t\t} else if (3 * t3 < 2) {\n\t\t\tval = t1 + (t2 - t1) * (2 / 3 - t3) * 6;\n\t\t} else {\n\t\t\tval = t1;\n\t\t}\n\n\t\trgb[i] = val * 255;\n\t}\n\n\treturn rgb;\n};\n\nconvert.hsl.hsv = function (hsl) {\n\tconst h = hsl[0];\n\tlet s = hsl[1] / 100;\n\tlet l = hsl[2] / 100;\n\tlet smin = s;\n\tconst lmin = Math.max(l, 0.01);\n\n\tl *= 2;\n\ts *= (l <= 1) ? l : 2 - l;\n\tsmin *= lmin <= 1 ? lmin : 2 - lmin;\n\tconst v = (l + s) / 2;\n\tconst sv = l === 0 ? (2 * smin) / (lmin + smin) : (2 * s) / (l + s);\n\n\treturn [h, sv * 100, v * 100];\n};\n\nconvert.hsv.rgb = function (hsv) {\n\tconst h = hsv[0] / 60;\n\tconst s = hsv[1] / 100;\n\tlet v = hsv[2] / 100;\n\tconst hi = Math.floor(h) % 6;\n\n\tconst f = h - Math.floor(h);\n\tconst p = 255 * v * (1 - s);\n\tconst q = 255 * v * (1 - (s * f));\n\tconst t = 255 * v * (1 - (s * (1 - f)));\n\tv *= 255;\n\n\tswitch (hi) {\n\t\tcase 0:\n\t\t\treturn [v, t, p];\n\t\tcase 1:\n\t\t\treturn [q, v, p];\n\t\tcase 2:\n\t\t\treturn [p, v, t];\n\t\tcase 3:\n\t\t\treturn [p, q, v];\n\t\tcase 4:\n\t\t\treturn [t, p, v];\n\t\tcase 5:\n\t\t\treturn [v, p, q];\n\t}\n};\n\nconvert.hsv.hsl = function (hsv) {\n\tconst h = hsv[0];\n\tconst s = hsv[1] / 100;\n\tconst v = hsv[2] / 100;\n\tconst vmin = Math.max(v, 0.01);\n\tlet sl;\n\tlet l;\n\n\tl = (2 - s) * v;\n\tconst lmin = (2 - s) * vmin;\n\tsl = s * vmin;\n\tsl /= (lmin <= 1) ? lmin : 2 - lmin;\n\tsl = sl || 0;\n\tl /= 2;\n\n\treturn [h, sl * 100, l * 100];\n};\n\n// http://dev.w3.org/csswg/css-color/#hwb-to-rgb\nconvert.hwb.rgb = function (hwb) {\n\tconst h = hwb[0] / 360;\n\tlet wh = hwb[1] / 100;\n\tlet bl = hwb[2] / 100;\n\tconst ratio = wh + bl;\n\tlet f;\n\n\t// Wh + bl cant be > 1\n\tif (ratio > 1) {\n\t\twh /= ratio;\n\t\tbl /= ratio;\n\t}\n\n\tconst i = Math.floor(6 * h);\n\tconst v = 1 - bl;\n\tf = 6 * h - i;\n\n\tif ((i & 0x01) !== 0) {\n\t\tf = 1 - f;\n\t}\n\n\tconst n = wh + f * (v - wh); // Linear interpolation\n\n\tlet r;\n\tlet g;\n\tlet b;\n\t/* eslint-disable max-statements-per-line,no-multi-spaces */\n\tswitch (i) {\n\t\tdefault:\n\t\tcase 6:\n\t\tcase 0: r = v; g = n; b = wh; break;\n\t\tcase 1: r = n; g = v; b = wh; break;\n\t\tcase 2: r = wh; g = v; b = n; break;\n\t\tcase 3: r = wh; g = n; b = v; break;\n\t\tcase 4: r = n; g = wh; b = v; break;\n\t\tcase 5: r = v; g = wh; b = n; break;\n\t}\n\t/* eslint-enable max-statements-per-line,no-multi-spaces */\n\n\treturn [r * 255, g * 255, b * 255];\n};\n\nconvert.cmyk.rgb = function (cmyk) {\n\tconst c = cmyk[0] / 100;\n\tconst m = cmyk[1] / 100;\n\tconst y = cmyk[2] / 100;\n\tconst k = cmyk[3] / 100;\n\n\tconst r = 1 - Math.min(1, c * (1 - k) + k);\n\tconst g = 1 - Math.min(1, m * (1 - k) + k);\n\tconst b = 1 - Math.min(1, y * (1 - k) + k);\n\n\treturn [r * 255, g * 255, b * 255];\n};\n\nconvert.xyz.rgb = function (xyz) {\n\tconst x = xyz[0] / 100;\n\tconst y = xyz[1] / 100;\n\tconst z = xyz[2] / 100;\n\tlet r;\n\tlet g;\n\tlet b;\n\n\tr = (x * 3.2406) + (y * -1.5372) + (z * -0.4986);\n\tg = (x * -0.9689) + (y * 1.8758) + (z * 0.0415);\n\tb = (x * 0.0557) + (y * -0.2040) + (z * 1.0570);\n\n\t// Assume sRGB\n\tr = r > 0.0031308\n\t\t? ((1.055 * (r ** (1.0 / 2.4))) - 0.055)\n\t\t: r * 12.92;\n\n\tg = g > 0.0031308\n\t\t? ((1.055 * (g ** (1.0 / 2.4))) - 0.055)\n\t\t: g * 12.92;\n\n\tb = b > 0.0031308\n\t\t? ((1.055 * (b ** (1.0 / 2.4))) - 0.055)\n\t\t: b * 12.92;\n\n\tr = Math.min(Math.max(0, r), 1);\n\tg = Math.min(Math.max(0, g), 1);\n\tb = Math.min(Math.max(0, b), 1);\n\n\treturn [r * 255, g * 255, b * 255];\n};\n\nconvert.xyz.lab = function (xyz) {\n\tlet x = xyz[0];\n\tlet y = xyz[1];\n\tlet z = xyz[2];\n\n\tx /= 95.047;\n\ty /= 100;\n\tz /= 108.883;\n\n\tx = x > 0.008856 ? (x ** (1 / 3)) : (7.787 * x) + (16 / 116);\n\ty = y > 0.008856 ? (y ** (1 / 3)) : (7.787 * y) + (16 / 116);\n\tz = z > 0.008856 ? (z ** (1 / 3)) : (7.787 * z) + (16 / 116);\n\n\tconst l = (116 * y) - 16;\n\tconst a = 500 * (x - y);\n\tconst b = 200 * (y - z);\n\n\treturn [l, a, b];\n};\n\nconvert.lab.xyz = function (lab) {\n\tconst l = lab[0];\n\tconst a = lab[1];\n\tconst b = lab[2];\n\tlet x;\n\tlet y;\n\tlet z;\n\n\ty = (l + 16) / 116;\n\tx = a / 500 + y;\n\tz = y - b / 200;\n\n\tconst y2 = y ** 3;\n\tconst x2 = x ** 3;\n\tconst z2 = z ** 3;\n\ty = y2 > 0.008856 ? y2 : (y - 16 / 116) / 7.787;\n\tx = x2 > 0.008856 ? x2 : (x - 16 / 116) / 7.787;\n\tz = z2 > 0.008856 ? z2 : (z - 16 / 116) / 7.787;\n\n\tx *= 95.047;\n\ty *= 100;\n\tz *= 108.883;\n\n\treturn [x, y, z];\n};\n\nconvert.lab.lch = function (lab) {\n\tconst l = lab[0];\n\tconst a = lab[1];\n\tconst b = lab[2];\n\tlet h;\n\n\tconst hr = Math.atan2(b, a);\n\th = hr * 360 / 2 / Math.PI;\n\n\tif (h < 0) {\n\t\th += 360;\n\t}\n\n\tconst c = Math.sqrt(a * a + b * b);\n\n\treturn [l, c, h];\n};\n\nconvert.lch.lab = function (lch) {\n\tconst l = lch[0];\n\tconst c = lch[1];\n\tconst h = lch[2];\n\n\tconst hr = h / 360 * 2 * Math.PI;\n\tconst a = c * Math.cos(hr);\n\tconst b = c * Math.sin(hr);\n\n\treturn [l, a, b];\n};\n\nconvert.rgb.ansi16 = function (args, saturation = null) {\n\tconst [r, g, b] = args;\n\tlet value = saturation === null ? convert.rgb.hsv(args)[2] : saturation; // Hsv -> ansi16 optimization\n\n\tvalue = Math.round(value / 50);\n\n\tif (value === 0) {\n\t\treturn 30;\n\t}\n\n\tlet ansi = 30\n\t\t+ ((Math.round(b / 255) << 2)\n\t\t| (Math.round(g / 255) << 1)\n\t\t| Math.round(r / 255));\n\n\tif (value === 2) {\n\t\tansi += 60;\n\t}\n\n\treturn ansi;\n};\n\nconvert.hsv.ansi16 = function (args) {\n\t// Optimization here; we already know the value and don't need to get\n\t// it converted for us.\n\treturn convert.rgb.ansi16(convert.hsv.rgb(args), args[2]);\n};\n\nconvert.rgb.ansi256 = function (args) {\n\tconst r = args[0];\n\tconst g = args[1];\n\tconst b = args[2];\n\n\t// We use the extended greyscale palette here, with the exception of\n\t// black and white. normal palette only has 4 greyscale shades.\n\tif (r === g && g === b) {\n\t\tif (r < 8) {\n\t\t\treturn 16;\n\t\t}\n\n\t\tif (r > 248) {\n\t\t\treturn 231;\n\t\t}\n\n\t\treturn Math.round(((r - 8) / 247) * 24) + 232;\n\t}\n\n\tconst ansi = 16\n\t\t+ (36 * Math.round(r / 255 * 5))\n\t\t+ (6 * Math.round(g / 255 * 5))\n\t\t+ Math.round(b / 255 * 5);\n\n\treturn ansi;\n};\n\nconvert.ansi16.rgb = function (args) {\n\tlet color = args % 10;\n\n\t// Handle greyscale\n\tif (color === 0 || color === 7) {\n\t\tif (args > 50) {\n\t\t\tcolor += 3.5;\n\t\t}\n\n\t\tcolor = color / 10.5 * 255;\n\n\t\treturn [color, color, color];\n\t}\n\n\tconst mult = (~~(args > 50) + 1) * 0.5;\n\tconst r = ((color & 1) * mult) * 255;\n\tconst g = (((color >> 1) & 1) * mult) * 255;\n\tconst b = (((color >> 2) & 1) * mult) * 255;\n\n\treturn [r, g, b];\n};\n\nconvert.ansi256.rgb = function (args) {\n\t// Handle greyscale\n\tif (args >= 232) {\n\t\tconst c = (args - 232) * 10 + 8;\n\t\treturn [c, c, c];\n\t}\n\n\targs -= 16;\n\n\tlet rem;\n\tconst r = Math.floor(args / 36) / 5 * 255;\n\tconst g = Math.floor((rem = args % 36) / 6) / 5 * 255;\n\tconst b = (rem % 6) / 5 * 255;\n\n\treturn [r, g, b];\n};\n\nconvert.rgb.hex = function (args) {\n\tconst integer = ((Math.round(args[0]) & 0xFF) << 16)\n\t\t+ ((Math.round(args[1]) & 0xFF) << 8)\n\t\t+ (Math.round(args[2]) & 0xFF);\n\n\tconst string = integer.toString(16).toUpperCase();\n\treturn '000000'.substring(string.length) + string;\n};\n\nconvert.hex.rgb = function (args) {\n\tconst match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);\n\tif (!match) {\n\t\treturn [0, 0, 0];\n\t}\n\n\tlet colorString = match[0];\n\n\tif (match[0].length === 3) {\n\t\tcolorString = colorString.split('').map(char => {\n\t\t\treturn char + char;\n\t\t}).join('');\n\t}\n\n\tconst integer = parseInt(colorString, 16);\n\tconst r = (integer >> 16) & 0xFF;\n\tconst g = (integer >> 8) & 0xFF;\n\tconst b = integer & 0xFF;\n\n\treturn [r, g, b];\n};\n\nconvert.rgb.hcg = function (rgb) {\n\tconst r = rgb[0] / 255;\n\tconst g = rgb[1] / 255;\n\tconst b = rgb[2] / 255;\n\tconst max = Math.max(Math.max(r, g), b);\n\tconst min = Math.min(Math.min(r, g), b);\n\tconst chroma = (max - min);\n\tlet grayscale;\n\tlet hue;\n\n\tif (chroma < 1) {\n\t\tgrayscale = min / (1 - chroma);\n\t} else {\n\t\tgrayscale = 0;\n\t}\n\n\tif (chroma <= 0) {\n\t\thue = 0;\n\t} else\n\tif (max === r) {\n\t\thue = ((g - b) / chroma) % 6;\n\t} else\n\tif (max === g) {\n\t\thue = 2 + (b - r) / chroma;\n\t} else {\n\t\thue = 4 + (r - g) / chroma;\n\t}\n\n\thue /= 6;\n\thue %= 1;\n\n\treturn [hue * 360, chroma * 100, grayscale * 100];\n};\n\nconvert.hsl.hcg = function (hsl) {\n\tconst s = hsl[1] / 100;\n\tconst l = hsl[2] / 100;\n\n\tconst c = l < 0.5 ? (2.0 * s * l) : (2.0 * s * (1.0 - l));\n\n\tlet f = 0;\n\tif (c < 1.0) {\n\t\tf = (l - 0.5 * c) / (1.0 - c);\n\t}\n\n\treturn [hsl[0], c * 100, f * 100];\n};\n\nconvert.hsv.hcg = function (hsv) {\n\tconst s = hsv[1] / 100;\n\tconst v = hsv[2] / 100;\n\n\tconst c = s * v;\n\tlet f = 0;\n\n\tif (c < 1.0) {\n\t\tf = (v - c) / (1 - c);\n\t}\n\n\treturn [hsv[0], c * 100, f * 100];\n};\n\nconvert.hcg.rgb = function (hcg) {\n\tconst h = hcg[0] / 360;\n\tconst c = hcg[1] / 100;\n\tconst g = hcg[2] / 100;\n\n\tif (c === 0.0) {\n\t\treturn [g * 255, g * 255, g * 255];\n\t}\n\n\tconst pure = [0, 0, 0];\n\tconst hi = (h % 1) * 6;\n\tconst v = hi % 1;\n\tconst w = 1 - v;\n\tlet mg = 0;\n\n\t/* eslint-disable max-statements-per-line */\n\tswitch (Math.floor(hi)) {\n\t\tcase 0:\n\t\t\tpure[0] = 1; pure[1] = v; pure[2] = 0; break;\n\t\tcase 1:\n\t\t\tpure[0] = w; pure[1] = 1; pure[2] = 0; break;\n\t\tcase 2:\n\t\t\tpure[0] = 0; pure[1] = 1; pure[2] = v; break;\n\t\tcase 3:\n\t\t\tpure[0] = 0; pure[1] = w; pure[2] = 1; break;\n\t\tcase 4:\n\t\t\tpure[0] = v; pure[1] = 0; pure[2] = 1; break;\n\t\tdefault:\n\t\t\tpure[0] = 1; pure[1] = 0; pure[2] = w;\n\t}\n\t/* eslint-enable max-statements-per-line */\n\n\tmg = (1.0 - c) * g;\n\n\treturn [\n\t\t(c * pure[0] + mg) * 255,\n\t\t(c * pure[1] + mg) * 255,\n\t\t(c * pure[2] + mg) * 255\n\t];\n};\n\nconvert.hcg.hsv = function (hcg) {\n\tconst c = hcg[1] / 100;\n\tconst g = hcg[2] / 100;\n\n\tconst v = c + g * (1.0 - c);\n\tlet f = 0;\n\n\tif (v > 0.0) {\n\t\tf = c / v;\n\t}\n\n\treturn [hcg[0], f * 100, v * 100];\n};\n\nconvert.hcg.hsl = function (hcg) {\n\tconst c = hcg[1] / 100;\n\tconst g = hcg[2] / 100;\n\n\tconst l = g * (1.0 - c) + 0.5 * c;\n\tlet s = 0;\n\n\tif (l > 0.0 && l < 0.5) {\n\t\ts = c / (2 * l);\n\t} else\n\tif (l >= 0.5 && l < 1.0) {\n\t\ts = c / (2 * (1 - l));\n\t}\n\n\treturn [hcg[0], s * 100, l * 100];\n};\n\nconvert.hcg.hwb = function (hcg) {\n\tconst c = hcg[1] / 100;\n\tconst g = hcg[2] / 100;\n\tconst v = c + g * (1.0 - c);\n\treturn [hcg[0], (v - c) * 100, (1 - v) * 100];\n};\n\nconvert.hwb.hcg = function (hwb) {\n\tconst w = hwb[1] / 100;\n\tconst b = hwb[2] / 100;\n\tconst v = 1 - b;\n\tconst c = v - w;\n\tlet g = 0;\n\n\tif (c < 1) {\n\t\tg = (v - c) / (1 - c);\n\t}\n\n\treturn [hwb[0], c * 100, g * 100];\n};\n\nconvert.apple.rgb = function (apple) {\n\treturn [(apple[0] / 65535) * 255, (apple[1] / 65535) * 255, (apple[2] / 65535) * 255];\n};\n\nconvert.rgb.apple = function (rgb) {\n\treturn [(rgb[0] / 255) * 65535, (rgb[1] / 255) * 65535, (rgb[2] / 255) * 65535];\n};\n\nconvert.gray.rgb = function (args) {\n\treturn [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255];\n};\n\nconvert.gray.hsl = function (args) {\n\treturn [0, 0, args[0]];\n};\n\nconvert.gray.hsv = convert.gray.hsl;\n\nconvert.gray.hwb = function (gray) {\n\treturn [0, 100, gray[0]];\n};\n\nconvert.gray.cmyk = function (gray) {\n\treturn [0, 0, 0, gray[0]];\n};\n\nconvert.gray.lab = function (gray) {\n\treturn [gray[0], 0, 0];\n};\n\nconvert.gray.hex = function (gray) {\n\tconst val = Math.round(gray[0] / 100 * 255) & 0xFF;\n\tconst integer = (val << 16) + (val << 8) + val;\n\n\tconst string = integer.toString(16).toUpperCase();\n\treturn '000000'.substring(string.length) + string;\n};\n\nconvert.rgb.gray = function (rgb) {\n\tconst val = (rgb[0] + rgb[1] + rgb[2]) / 3;\n\treturn [val / 255 * 100];\n};\n\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/color-convert/conversions.js?");
|
|
12987
|
-
|
|
12988
|
-
/***/ }),
|
|
12989
|
-
|
|
12990
|
-
/***/ "./node_modules/color-convert/index.js":
|
|
12991
|
-
/*!*********************************************!*\
|
|
12992
|
-
!*** ./node_modules/color-convert/index.js ***!
|
|
12993
|
-
\*********************************************/
|
|
12994
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
12995
|
-
|
|
12996
|
-
eval("const conversions = __webpack_require__(/*! ./conversions */ \"./node_modules/color-convert/conversions.js\");\nconst route = __webpack_require__(/*! ./route */ \"./node_modules/color-convert/route.js\");\n\nconst convert = {};\n\nconst models = Object.keys(conversions);\n\nfunction wrapRaw(fn) {\n\tconst wrappedFn = function (...args) {\n\t\tconst arg0 = args[0];\n\t\tif (arg0 === undefined || arg0 === null) {\n\t\t\treturn arg0;\n\t\t}\n\n\t\tif (arg0.length > 1) {\n\t\t\targs = arg0;\n\t\t}\n\n\t\treturn fn(args);\n\t};\n\n\t// Preserve .conversion property if there is one\n\tif ('conversion' in fn) {\n\t\twrappedFn.conversion = fn.conversion;\n\t}\n\n\treturn wrappedFn;\n}\n\nfunction wrapRounded(fn) {\n\tconst wrappedFn = function (...args) {\n\t\tconst arg0 = args[0];\n\n\t\tif (arg0 === undefined || arg0 === null) {\n\t\t\treturn arg0;\n\t\t}\n\n\t\tif (arg0.length > 1) {\n\t\t\targs = arg0;\n\t\t}\n\n\t\tconst result = fn(args);\n\n\t\t// We're assuming the result is an array here.\n\t\t// see notice in conversions.js; don't use box types\n\t\t// in conversion functions.\n\t\tif (typeof result === 'object') {\n\t\t\tfor (let len = result.length, i = 0; i < len; i++) {\n\t\t\t\tresult[i] = Math.round(result[i]);\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t};\n\n\t// Preserve .conversion property if there is one\n\tif ('conversion' in fn) {\n\t\twrappedFn.conversion = fn.conversion;\n\t}\n\n\treturn wrappedFn;\n}\n\nmodels.forEach(fromModel => {\n\tconvert[fromModel] = {};\n\n\tObject.defineProperty(convert[fromModel], 'channels', {value: conversions[fromModel].channels});\n\tObject.defineProperty(convert[fromModel], 'labels', {value: conversions[fromModel].labels});\n\n\tconst routes = route(fromModel);\n\tconst routeModels = Object.keys(routes);\n\n\trouteModels.forEach(toModel => {\n\t\tconst fn = routes[toModel];\n\n\t\tconvert[fromModel][toModel] = wrapRounded(fn);\n\t\tconvert[fromModel][toModel].raw = wrapRaw(fn);\n\t});\n});\n\nmodule.exports = convert;\n\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/color-convert/index.js?");
|
|
12997
|
-
|
|
12998
|
-
/***/ }),
|
|
12999
|
-
|
|
13000
|
-
/***/ "./node_modules/color-convert/route.js":
|
|
13001
|
-
/*!*********************************************!*\
|
|
13002
|
-
!*** ./node_modules/color-convert/route.js ***!
|
|
13003
|
-
\*********************************************/
|
|
13004
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
13005
|
-
|
|
13006
|
-
eval("const conversions = __webpack_require__(/*! ./conversions */ \"./node_modules/color-convert/conversions.js\");\n\n/*\n\tThis function routes a model to all other models.\n\n\tall functions that are routed have a property `.conversion` attached\n\tto the returned synthetic function. This property is an array\n\tof strings, each with the steps in between the 'from' and 'to'\n\tcolor models (inclusive).\n\n\tconversions that are not possible simply are not included.\n*/\n\nfunction buildGraph() {\n\tconst graph = {};\n\t// https://jsperf.com/object-keys-vs-for-in-with-closure/3\n\tconst models = Object.keys(conversions);\n\n\tfor (let len = models.length, i = 0; i < len; i++) {\n\t\tgraph[models[i]] = {\n\t\t\t// http://jsperf.com/1-vs-infinity\n\t\t\t// micro-opt, but this is simple.\n\t\t\tdistance: -1,\n\t\t\tparent: null\n\t\t};\n\t}\n\n\treturn graph;\n}\n\n// https://en.wikipedia.org/wiki/Breadth-first_search\nfunction deriveBFS(fromModel) {\n\tconst graph = buildGraph();\n\tconst queue = [fromModel]; // Unshift -> queue -> pop\n\n\tgraph[fromModel].distance = 0;\n\n\twhile (queue.length) {\n\t\tconst current = queue.pop();\n\t\tconst adjacents = Object.keys(conversions[current]);\n\n\t\tfor (let len = adjacents.length, i = 0; i < len; i++) {\n\t\t\tconst adjacent = adjacents[i];\n\t\t\tconst node = graph[adjacent];\n\n\t\t\tif (node.distance === -1) {\n\t\t\t\tnode.distance = graph[current].distance + 1;\n\t\t\t\tnode.parent = current;\n\t\t\t\tqueue.unshift(adjacent);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn graph;\n}\n\nfunction link(from, to) {\n\treturn function (args) {\n\t\treturn to(from(args));\n\t};\n}\n\nfunction wrapConversion(toModel, graph) {\n\tconst path = [graph[toModel].parent, toModel];\n\tlet fn = conversions[graph[toModel].parent][toModel];\n\n\tlet cur = graph[toModel].parent;\n\twhile (graph[cur].parent) {\n\t\tpath.unshift(graph[cur].parent);\n\t\tfn = link(conversions[graph[cur].parent][cur], fn);\n\t\tcur = graph[cur].parent;\n\t}\n\n\tfn.conversion = path;\n\treturn fn;\n}\n\nmodule.exports = function (fromModel) {\n\tconst graph = deriveBFS(fromModel);\n\tconst conversion = {};\n\n\tconst models = Object.keys(graph);\n\tfor (let len = models.length, i = 0; i < len; i++) {\n\t\tconst toModel = models[i];\n\t\tconst node = graph[toModel];\n\n\t\tif (node.parent === null) {\n\t\t\t// No possible conversion, or this node is the source model.\n\t\t\tcontinue;\n\t\t}\n\n\t\tconversion[toModel] = wrapConversion(toModel, graph);\n\t}\n\n\treturn conversion;\n};\n\n\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/color-convert/route.js?");
|
|
13007
|
-
|
|
13008
|
-
/***/ }),
|
|
13009
|
-
|
|
13010
|
-
/***/ "./node_modules/color-name/index.js":
|
|
13011
|
-
/*!******************************************!*\
|
|
13012
|
-
!*** ./node_modules/color-name/index.js ***!
|
|
13013
|
-
\******************************************/
|
|
13014
|
-
/***/ ((module) => {
|
|
13015
|
-
|
|
13016
|
-
"use strict";
|
|
13017
|
-
eval("\r\n\r\nmodule.exports = {\r\n\t\"aliceblue\": [240, 248, 255],\r\n\t\"antiquewhite\": [250, 235, 215],\r\n\t\"aqua\": [0, 255, 255],\r\n\t\"aquamarine\": [127, 255, 212],\r\n\t\"azure\": [240, 255, 255],\r\n\t\"beige\": [245, 245, 220],\r\n\t\"bisque\": [255, 228, 196],\r\n\t\"black\": [0, 0, 0],\r\n\t\"blanchedalmond\": [255, 235, 205],\r\n\t\"blue\": [0, 0, 255],\r\n\t\"blueviolet\": [138, 43, 226],\r\n\t\"brown\": [165, 42, 42],\r\n\t\"burlywood\": [222, 184, 135],\r\n\t\"cadetblue\": [95, 158, 160],\r\n\t\"chartreuse\": [127, 255, 0],\r\n\t\"chocolate\": [210, 105, 30],\r\n\t\"coral\": [255, 127, 80],\r\n\t\"cornflowerblue\": [100, 149, 237],\r\n\t\"cornsilk\": [255, 248, 220],\r\n\t\"crimson\": [220, 20, 60],\r\n\t\"cyan\": [0, 255, 255],\r\n\t\"darkblue\": [0, 0, 139],\r\n\t\"darkcyan\": [0, 139, 139],\r\n\t\"darkgoldenrod\": [184, 134, 11],\r\n\t\"darkgray\": [169, 169, 169],\r\n\t\"darkgreen\": [0, 100, 0],\r\n\t\"darkgrey\": [169, 169, 169],\r\n\t\"darkkhaki\": [189, 183, 107],\r\n\t\"darkmagenta\": [139, 0, 139],\r\n\t\"darkolivegreen\": [85, 107, 47],\r\n\t\"darkorange\": [255, 140, 0],\r\n\t\"darkorchid\": [153, 50, 204],\r\n\t\"darkred\": [139, 0, 0],\r\n\t\"darksalmon\": [233, 150, 122],\r\n\t\"darkseagreen\": [143, 188, 143],\r\n\t\"darkslateblue\": [72, 61, 139],\r\n\t\"darkslategray\": [47, 79, 79],\r\n\t\"darkslategrey\": [47, 79, 79],\r\n\t\"darkturquoise\": [0, 206, 209],\r\n\t\"darkviolet\": [148, 0, 211],\r\n\t\"deeppink\": [255, 20, 147],\r\n\t\"deepskyblue\": [0, 191, 255],\r\n\t\"dimgray\": [105, 105, 105],\r\n\t\"dimgrey\": [105, 105, 105],\r\n\t\"dodgerblue\": [30, 144, 255],\r\n\t\"firebrick\": [178, 34, 34],\r\n\t\"floralwhite\": [255, 250, 240],\r\n\t\"forestgreen\": [34, 139, 34],\r\n\t\"fuchsia\": [255, 0, 255],\r\n\t\"gainsboro\": [220, 220, 220],\r\n\t\"ghostwhite\": [248, 248, 255],\r\n\t\"gold\": [255, 215, 0],\r\n\t\"goldenrod\": [218, 165, 32],\r\n\t\"gray\": [128, 128, 128],\r\n\t\"green\": [0, 128, 0],\r\n\t\"greenyellow\": [173, 255, 47],\r\n\t\"grey\": [128, 128, 128],\r\n\t\"honeydew\": [240, 255, 240],\r\n\t\"hotpink\": [255, 105, 180],\r\n\t\"indianred\": [205, 92, 92],\r\n\t\"indigo\": [75, 0, 130],\r\n\t\"ivory\": [255, 255, 240],\r\n\t\"khaki\": [240, 230, 140],\r\n\t\"lavender\": [230, 230, 250],\r\n\t\"lavenderblush\": [255, 240, 245],\r\n\t\"lawngreen\": [124, 252, 0],\r\n\t\"lemonchiffon\": [255, 250, 205],\r\n\t\"lightblue\": [173, 216, 230],\r\n\t\"lightcoral\": [240, 128, 128],\r\n\t\"lightcyan\": [224, 255, 255],\r\n\t\"lightgoldenrodyellow\": [250, 250, 210],\r\n\t\"lightgray\": [211, 211, 211],\r\n\t\"lightgreen\": [144, 238, 144],\r\n\t\"lightgrey\": [211, 211, 211],\r\n\t\"lightpink\": [255, 182, 193],\r\n\t\"lightsalmon\": [255, 160, 122],\r\n\t\"lightseagreen\": [32, 178, 170],\r\n\t\"lightskyblue\": [135, 206, 250],\r\n\t\"lightslategray\": [119, 136, 153],\r\n\t\"lightslategrey\": [119, 136, 153],\r\n\t\"lightsteelblue\": [176, 196, 222],\r\n\t\"lightyellow\": [255, 255, 224],\r\n\t\"lime\": [0, 255, 0],\r\n\t\"limegreen\": [50, 205, 50],\r\n\t\"linen\": [250, 240, 230],\r\n\t\"magenta\": [255, 0, 255],\r\n\t\"maroon\": [128, 0, 0],\r\n\t\"mediumaquamarine\": [102, 205, 170],\r\n\t\"mediumblue\": [0, 0, 205],\r\n\t\"mediumorchid\": [186, 85, 211],\r\n\t\"mediumpurple\": [147, 112, 219],\r\n\t\"mediumseagreen\": [60, 179, 113],\r\n\t\"mediumslateblue\": [123, 104, 238],\r\n\t\"mediumspringgreen\": [0, 250, 154],\r\n\t\"mediumturquoise\": [72, 209, 204],\r\n\t\"mediumvioletred\": [199, 21, 133],\r\n\t\"midnightblue\": [25, 25, 112],\r\n\t\"mintcream\": [245, 255, 250],\r\n\t\"mistyrose\": [255, 228, 225],\r\n\t\"moccasin\": [255, 228, 181],\r\n\t\"navajowhite\": [255, 222, 173],\r\n\t\"navy\": [0, 0, 128],\r\n\t\"oldlace\": [253, 245, 230],\r\n\t\"olive\": [128, 128, 0],\r\n\t\"olivedrab\": [107, 142, 35],\r\n\t\"orange\": [255, 165, 0],\r\n\t\"orangered\": [255, 69, 0],\r\n\t\"orchid\": [218, 112, 214],\r\n\t\"palegoldenrod\": [238, 232, 170],\r\n\t\"palegreen\": [152, 251, 152],\r\n\t\"paleturquoise\": [175, 238, 238],\r\n\t\"palevioletred\": [219, 112, 147],\r\n\t\"papayawhip\": [255, 239, 213],\r\n\t\"peachpuff\": [255, 218, 185],\r\n\t\"peru\": [205, 133, 63],\r\n\t\"pink\": [255, 192, 203],\r\n\t\"plum\": [221, 160, 221],\r\n\t\"powderblue\": [176, 224, 230],\r\n\t\"purple\": [128, 0, 128],\r\n\t\"rebeccapurple\": [102, 51, 153],\r\n\t\"red\": [255, 0, 0],\r\n\t\"rosybrown\": [188, 143, 143],\r\n\t\"royalblue\": [65, 105, 225],\r\n\t\"saddlebrown\": [139, 69, 19],\r\n\t\"salmon\": [250, 128, 114],\r\n\t\"sandybrown\": [244, 164, 96],\r\n\t\"seagreen\": [46, 139, 87],\r\n\t\"seashell\": [255, 245, 238],\r\n\t\"sienna\": [160, 82, 45],\r\n\t\"silver\": [192, 192, 192],\r\n\t\"skyblue\": [135, 206, 235],\r\n\t\"slateblue\": [106, 90, 205],\r\n\t\"slategray\": [112, 128, 144],\r\n\t\"slategrey\": [112, 128, 144],\r\n\t\"snow\": [255, 250, 250],\r\n\t\"springgreen\": [0, 255, 127],\r\n\t\"steelblue\": [70, 130, 180],\r\n\t\"tan\": [210, 180, 140],\r\n\t\"teal\": [0, 128, 128],\r\n\t\"thistle\": [216, 191, 216],\r\n\t\"tomato\": [255, 99, 71],\r\n\t\"turquoise\": [64, 224, 208],\r\n\t\"violet\": [238, 130, 238],\r\n\t\"wheat\": [245, 222, 179],\r\n\t\"white\": [255, 255, 255],\r\n\t\"whitesmoke\": [245, 245, 245],\r\n\t\"yellow\": [255, 255, 0],\r\n\t\"yellowgreen\": [154, 205, 50]\r\n};\r\n\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/color-name/index.js?");
|
|
13018
|
-
|
|
13019
|
-
/***/ }),
|
|
13020
|
-
|
|
13021
12969
|
/***/ "./node_modules/concat-map/index.js":
|
|
13022
12970
|
/*!******************************************!*\
|
|
13023
12971
|
!*** ./node_modules/concat-map/index.js ***!
|
|
@@ -13068,7 +13016,7 @@ eval("\n\nconst util = __webpack_require__(/*! ./util */ \"./node_modules/fast-x
|
|
|
13068
13016
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
13069
13017
|
|
|
13070
13018
|
"use strict";
|
|
13071
|
-
eval("\n//parse Empty Node as self closing node\nconst buildFromOrderedJs = __webpack_require__(/*! ./orderedJs2Xml */ \"./node_modules/fast-xml-parser/src/xmlbuilder/orderedJs2Xml.js\");\n\nconst defaultOptions = {\n attributeNamePrefix: '@_',\n attributesGroupName: false,\n textNodeName: '#text',\n ignoreAttributes: true,\n cdataPropName: false,\n format: false,\n indentBy: ' ',\n suppressEmptyNode: false,\n suppressUnpairedNode: true,\n suppressBooleanAttributes: true,\n tagValueProcessor: function(key, a) {\n return a;\n },\n attributeValueProcessor: function(attrName, a) {\n return a;\n },\n preserveOrder: false,\n commentPropName: false,\n unpairedTags: [],\n entities: [\n { regex: new RegExp(\"&\", \"g\"), val: \"&\" },//it must be on top\n { regex: new RegExp(\">\", \"g\"), val: \">\" },\n { regex: new RegExp(\"<\", \"g\"), val: \"<\" },\n { regex: new RegExp(\"\\'\", \"g\"), val: \"'\" },\n { regex: new RegExp(\"\\\"\", \"g\"), val: \""\" }\n ],\n processEntities: true,\n stopNodes: []\n};\n\nfunction Builder(options) {\n this.options = Object.assign({}, defaultOptions, options);\n if (this.options.ignoreAttributes || this.options.attributesGroupName) {\n this.isAttribute = function(/*a*/) {\n return false;\n };\n } else {\n this.attrPrefixLen = this.options.attributeNamePrefix.length;\n this.isAttribute = isAttribute;\n }\n\n this.processTextOrObjNode = processTextOrObjNode\n\n if (this.options.format) {\n this.indentate = indentate;\n this.tagEndChar = '>\\n';\n this.newLine = '\\n';\n } else {\n this.indentate = function() {\n return '';\n };\n this.tagEndChar = '>';\n this.newLine = '';\n }\n\n if (this.options.suppressEmptyNode) {\n this.buildTextNode = buildEmptyTextNode;\n this.buildObjNode = buildEmptyObjNode;\n } else {\n this.buildTextNode = buildTextValNode;\n this.buildObjNode = buildObjectNode;\n }\n\n this.buildTextValNode = buildTextValNode;\n this.buildObjectNode = buildObjectNode;\n\n this.replaceEntitiesValue = replaceEntitiesValue;\n this.buildAttrPairStr = buildAttrPairStr;\n}\n\nBuilder.prototype.build = function(jObj) {\n if(this.options.preserveOrder){\n return buildFromOrderedJs(jObj, this.options);\n }else {\n if(Array.isArray(jObj) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1){\n jObj = {\n [this.options.arrayNodeName] : jObj\n }\n }\n return this.j2x(jObj, 0).val;\n }\n};\n\nBuilder.prototype.j2x = function(jObj, level) {\n let attrStr = '';\n let val = '';\n for (let key in jObj) {\n if (typeof jObj[key] === 'undefined') {\n // supress undefined node\n } else if (jObj[key] === null) {\n if(key[0] === \"?\") val += this.indentate(level) + '<' + key + '?' + this.tagEndChar;\n else val += this.indentate(level) + '<' + key + '/' + this.tagEndChar;\n // val += this.indentate(level) + '<' + key + '/' + this.tagEndChar;\n } else if (jObj[key] instanceof Date) {\n val += this.buildTextNode(jObj[key], key, '', level);\n } else if (typeof jObj[key] !== 'object') {\n //premitive type\n const attr = this.isAttribute(key);\n if (attr) {\n attrStr += this.buildAttrPairStr(attr, '' + jObj[key]);\n }else {\n //tag value\n if (key === this.options.textNodeName) {\n let newval = this.options.tagValueProcessor(key, '' + jObj[key]);\n val += this.replaceEntitiesValue(newval);\n } else {\n val += this.buildTextNode(jObj[key], key, '', level);\n }\n }\n } else if (Array.isArray(jObj[key])) {\n //repeated nodes\n const arrLen = jObj[key].length;\n for (let j = 0; j < arrLen; j++) {\n const item = jObj[key][j];\n if (typeof item === 'undefined') {\n // supress undefined node\n } else if (item === null) {\n if(key[0] === \"?\") val += this.indentate(level) + '<' + key + '?' + this.tagEndChar;\n else val += this.indentate(level) + '<' + key + '/' + this.tagEndChar;\n // val += this.indentate(level) + '<' + key + '/' + this.tagEndChar;\n } else if (typeof item === 'object') {\n val += this.processTextOrObjNode(item, key, level)\n } else {\n val += this.buildTextNode(item, key, '', level);\n }\n }\n } else {\n //nested node\n if (this.options.attributesGroupName && key === this.options.attributesGroupName) {\n const Ks = Object.keys(jObj[key]);\n const L = Ks.length;\n for (let j = 0; j < L; j++) {\n attrStr += this.buildAttrPairStr(Ks[j], '' + jObj[key][Ks[j]]);\n }\n } else {\n val += this.processTextOrObjNode(jObj[key], key, level)\n }\n }\n }\n return {attrStr: attrStr, val: val};\n};\n\nfunction buildAttrPairStr(attrName, val){\n val = this.options.attributeValueProcessor(attrName, '' + val);\n val = this.replaceEntitiesValue(val);\n if (this.options.suppressBooleanAttributes && val === \"true\") {\n return ' ' + attrName;\n } else return ' ' + attrName + '=\"' + val + '\"';\n}\n\nfunction processTextOrObjNode (object, key, level) {\n const result = this.j2x(object, level + 1);\n if (object[this.options.textNodeName] !== undefined && Object.keys(object).length === 1) {\n return this.buildTextNode(
|
|
13019
|
+
eval("\n//parse Empty Node as self closing node\nconst buildFromOrderedJs = __webpack_require__(/*! ./orderedJs2Xml */ \"./node_modules/fast-xml-parser/src/xmlbuilder/orderedJs2Xml.js\");\n\nconst defaultOptions = {\n attributeNamePrefix: '@_',\n attributesGroupName: false,\n textNodeName: '#text',\n ignoreAttributes: true,\n cdataPropName: false,\n format: false,\n indentBy: ' ',\n suppressEmptyNode: false,\n suppressUnpairedNode: true,\n suppressBooleanAttributes: true,\n tagValueProcessor: function(key, a) {\n return a;\n },\n attributeValueProcessor: function(attrName, a) {\n return a;\n },\n preserveOrder: false,\n commentPropName: false,\n unpairedTags: [],\n entities: [\n { regex: new RegExp(\"&\", \"g\"), val: \"&\" },//it must be on top\n { regex: new RegExp(\">\", \"g\"), val: \">\" },\n { regex: new RegExp(\"<\", \"g\"), val: \"<\" },\n { regex: new RegExp(\"\\'\", \"g\"), val: \"'\" },\n { regex: new RegExp(\"\\\"\", \"g\"), val: \""\" }\n ],\n processEntities: true,\n stopNodes: []\n};\n\nfunction Builder(options) {\n this.options = Object.assign({}, defaultOptions, options);\n if (this.options.ignoreAttributes || this.options.attributesGroupName) {\n this.isAttribute = function(/*a*/) {\n return false;\n };\n } else {\n this.attrPrefixLen = this.options.attributeNamePrefix.length;\n this.isAttribute = isAttribute;\n }\n\n this.processTextOrObjNode = processTextOrObjNode\n\n if (this.options.format) {\n this.indentate = indentate;\n this.tagEndChar = '>\\n';\n this.newLine = '\\n';\n } else {\n this.indentate = function() {\n return '';\n };\n this.tagEndChar = '>';\n this.newLine = '';\n }\n\n if (this.options.suppressEmptyNode) {\n this.buildTextNode = buildEmptyTextNode;\n this.buildObjNode = buildEmptyObjNode;\n } else {\n this.buildTextNode = buildTextValNode;\n this.buildObjNode = buildObjectNode;\n }\n\n this.buildTextValNode = buildTextValNode;\n this.buildObjectNode = buildObjectNode;\n\n this.replaceEntitiesValue = replaceEntitiesValue;\n this.buildAttrPairStr = buildAttrPairStr;\n}\n\nBuilder.prototype.build = function(jObj) {\n if(this.options.preserveOrder){\n return buildFromOrderedJs(jObj, this.options);\n }else {\n if(Array.isArray(jObj) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1){\n jObj = {\n [this.options.arrayNodeName] : jObj\n }\n }\n return this.j2x(jObj, 0).val;\n }\n};\n\nBuilder.prototype.j2x = function(jObj, level) {\n let attrStr = '';\n let val = '';\n for (let key in jObj) {\n if (typeof jObj[key] === 'undefined') {\n // supress undefined node\n } else if (jObj[key] === null) {\n if(key[0] === \"?\") val += this.indentate(level) + '<' + key + '?' + this.tagEndChar;\n else val += this.indentate(level) + '<' + key + '/' + this.tagEndChar;\n // val += this.indentate(level) + '<' + key + '/' + this.tagEndChar;\n } else if (jObj[key] instanceof Date) {\n val += this.buildTextNode(jObj[key], key, '', level);\n } else if (typeof jObj[key] !== 'object') {\n //premitive type\n const attr = this.isAttribute(key);\n if (attr) {\n attrStr += this.buildAttrPairStr(attr, '' + jObj[key]);\n }else {\n //tag value\n if (key === this.options.textNodeName) {\n let newval = this.options.tagValueProcessor(key, '' + jObj[key]);\n val += this.replaceEntitiesValue(newval);\n } else {\n val += this.buildTextNode(jObj[key], key, '', level);\n }\n }\n } else if (Array.isArray(jObj[key])) {\n //repeated nodes\n const arrLen = jObj[key].length;\n for (let j = 0; j < arrLen; j++) {\n const item = jObj[key][j];\n if (typeof item === 'undefined') {\n // supress undefined node\n } else if (item === null) {\n if(key[0] === \"?\") val += this.indentate(level) + '<' + key + '?' + this.tagEndChar;\n else val += this.indentate(level) + '<' + key + '/' + this.tagEndChar;\n // val += this.indentate(level) + '<' + key + '/' + this.tagEndChar;\n } else if (typeof item === 'object') {\n val += this.processTextOrObjNode(item, key, level)\n } else {\n val += this.buildTextNode(item, key, '', level);\n }\n }\n } else {\n //nested node\n if (this.options.attributesGroupName && key === this.options.attributesGroupName) {\n const Ks = Object.keys(jObj[key]);\n const L = Ks.length;\n for (let j = 0; j < L; j++) {\n attrStr += this.buildAttrPairStr(Ks[j], '' + jObj[key][Ks[j]]);\n }\n } else {\n val += this.processTextOrObjNode(jObj[key], key, level)\n }\n }\n }\n return {attrStr: attrStr, val: val};\n};\n\nfunction buildAttrPairStr(attrName, val){\n val = this.options.attributeValueProcessor(attrName, '' + val);\n val = this.replaceEntitiesValue(val);\n if (this.options.suppressBooleanAttributes && val === \"true\") {\n return ' ' + attrName;\n } else return ' ' + attrName + '=\"' + val + '\"';\n}\n\nfunction processTextOrObjNode (object, key, level) {\n const result = this.j2x(object, level + 1);\n if (object[this.options.textNodeName] !== undefined && Object.keys(object).length === 1) {\n return this.buildTextNode(object[this.options.textNodeName], key, result.attrStr, level);\n } else {\n return this.buildObjNode(result.val, key, result.attrStr, level);\n }\n}\n\nfunction buildObjectNode(val, key, attrStr, level) {\n let tagEndExp = '</' + key + this.tagEndChar;\n let piClosingChar = \"\";\n \n if(key[0] === \"?\") {\n piClosingChar = \"?\";\n tagEndExp = \"\";\n }\n\n if (attrStr && val.indexOf('<') === -1) {\n return (\n this.indentate(level) + '<' + key + attrStr + piClosingChar + '>' +\n val +\n tagEndExp );\n } else {\n return (\n this.indentate(level) + '<' + key + attrStr + piClosingChar + this.tagEndChar +\n val +\n this.indentate(level) + tagEndExp );\n }\n}\n\nfunction buildEmptyObjNode(val, key, attrStr, level) {\n if (val !== '') {\n return this.buildObjectNode(val, key, attrStr, level);\n } else {\n if(key[0] === \"?\") return this.indentate(level) + '<' + key + attrStr+ '?' + this.tagEndChar;\n else return this.indentate(level) + '<' + key + attrStr + '/' + this.tagEndChar;\n }\n}\n\nfunction buildTextValNode(val, key, attrStr, level) {\n let textValue = this.options.tagValueProcessor(key, val);\n textValue = this.replaceEntitiesValue(textValue);\n\n if( textValue === '' && this.options.unpairedTags.indexOf(key) !== -1){ //unpaired\n if(this.options.suppressUnpairedNode){\n return this.indentate(level) + '<' + key + this.tagEndChar;\n }else{\n return this.indentate(level) + '<' + key + \"/\" + this.tagEndChar;\n }\n }else{\n return (\n this.indentate(level) + '<' + key + attrStr + '>' +\n textValue +\n '</' + key + this.tagEndChar );\n }\n}\n\nfunction replaceEntitiesValue(textValue){\n if(textValue && textValue.length > 0 && this.options.processEntities){\n for (let i=0; i<this.options.entities.length; i++) {\n const entity = this.options.entities[i];\n textValue = textValue.replace(entity.regex, entity.val);\n }\n }\n return textValue;\n}\n\nfunction buildEmptyTextNode(val, key, attrStr, level) {\n if( val === '' && this.options.unpairedTags.indexOf(key) !== -1){ //unpaired\n if(this.options.suppressUnpairedNode){\n return this.indentate(level) + '<' + key + this.tagEndChar;\n }else{\n return this.indentate(level) + '<' + key + \"/\" + this.tagEndChar;\n }\n }else if (val !== '') { //empty\n return this.buildTextValNode(val, key, attrStr, level);\n } else {\n if(key[0] === \"?\") return this.indentate(level) + '<' + key + attrStr+ '?' + this.tagEndChar; //PI tag\n else return this.indentate(level) + '<' + key + attrStr + '/' + this.tagEndChar; //normal\n }\n}\n\nfunction indentate(level) {\n return this.options.indentBy.repeat(level);\n}\n\nfunction isAttribute(name /*, options*/) {\n if (name.startsWith(this.options.attributeNamePrefix)) {\n return name.substr(this.attrPrefixLen);\n } else {\n return false;\n }\n}\n\nmodule.exports = Builder;\n\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/fast-xml-parser/src/xmlbuilder/json2xml.js?");
|
|
13072
13020
|
|
|
13073
13021
|
/***/ }),
|
|
13074
13022
|
|
|
@@ -13195,17 +13143,6 @@ eval("module.exports = globSync\nglobSync.GlobSync = GlobSync\n\nvar rp = __webp
|
|
|
13195
13143
|
|
|
13196
13144
|
/***/ }),
|
|
13197
13145
|
|
|
13198
|
-
/***/ "./node_modules/has-flag/index.js":
|
|
13199
|
-
/*!****************************************!*\
|
|
13200
|
-
!*** ./node_modules/has-flag/index.js ***!
|
|
13201
|
-
\****************************************/
|
|
13202
|
-
/***/ ((module) => {
|
|
13203
|
-
|
|
13204
|
-
"use strict";
|
|
13205
|
-
eval("\n\nmodule.exports = (flag, argv = process.argv) => {\n\tconst prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--');\n\tconst position = argv.indexOf(prefix + flag);\n\tconst terminatorPosition = argv.indexOf('--');\n\treturn position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);\n};\n\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/has-flag/index.js?");
|
|
13206
|
-
|
|
13207
|
-
/***/ }),
|
|
13208
|
-
|
|
13209
13146
|
/***/ "./node_modules/inflight/inflight.js":
|
|
13210
13147
|
/*!*******************************************!*\
|
|
13211
13148
|
!*** ./node_modules/inflight/inflight.js ***!
|
|
@@ -13317,17 +13254,6 @@ eval("const hexRegex = /^[-+]?0x[a-fA-F0-9]+$/;\nconst numRegex = /^([\\-\\+])?(
|
|
|
13317
13254
|
|
|
13318
13255
|
/***/ }),
|
|
13319
13256
|
|
|
13320
|
-
/***/ "./node_modules/supports-color/index.js":
|
|
13321
|
-
/*!**********************************************!*\
|
|
13322
|
-
!*** ./node_modules/supports-color/index.js ***!
|
|
13323
|
-
\**********************************************/
|
|
13324
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
13325
|
-
|
|
13326
|
-
"use strict";
|
|
13327
|
-
eval("\nconst os = __webpack_require__(/*! os */ \"os\");\nconst tty = __webpack_require__(/*! tty */ \"tty\");\nconst hasFlag = __webpack_require__(/*! has-flag */ \"./node_modules/has-flag/index.js\");\n\nconst {env} = process;\n\nlet forceColor;\nif (hasFlag('no-color') ||\n\thasFlag('no-colors') ||\n\thasFlag('color=false') ||\n\thasFlag('color=never')) {\n\tforceColor = 0;\n} else if (hasFlag('color') ||\n\thasFlag('colors') ||\n\thasFlag('color=true') ||\n\thasFlag('color=always')) {\n\tforceColor = 1;\n}\n\nif ('FORCE_COLOR' in env) {\n\tif (env.FORCE_COLOR === 'true') {\n\t\tforceColor = 1;\n\t} else if (env.FORCE_COLOR === 'false') {\n\t\tforceColor = 0;\n\t} else {\n\t\tforceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3);\n\t}\n}\n\nfunction translateLevel(level) {\n\tif (level === 0) {\n\t\treturn false;\n\t}\n\n\treturn {\n\t\tlevel,\n\t\thasBasic: true,\n\t\thas256: level >= 2,\n\t\thas16m: level >= 3\n\t};\n}\n\nfunction supportsColor(haveStream, streamIsTTY) {\n\tif (forceColor === 0) {\n\t\treturn 0;\n\t}\n\n\tif (hasFlag('color=16m') ||\n\t\thasFlag('color=full') ||\n\t\thasFlag('color=truecolor')) {\n\t\treturn 3;\n\t}\n\n\tif (hasFlag('color=256')) {\n\t\treturn 2;\n\t}\n\n\tif (haveStream && !streamIsTTY && forceColor === undefined) {\n\t\treturn 0;\n\t}\n\n\tconst min = forceColor || 0;\n\n\tif (env.TERM === 'dumb') {\n\t\treturn min;\n\t}\n\n\tif (process.platform === 'win32') {\n\t\t// Windows 10 build 10586 is the first Windows release that supports 256 colors.\n\t\t// Windows 10 build 14931 is the first release that supports 16m/TrueColor.\n\t\tconst osRelease = os.release().split('.');\n\t\tif (\n\t\t\tNumber(osRelease[0]) >= 10 &&\n\t\t\tNumber(osRelease[2]) >= 10586\n\t\t) {\n\t\t\treturn Number(osRelease[2]) >= 14931 ? 3 : 2;\n\t\t}\n\n\t\treturn 1;\n\t}\n\n\tif ('CI' in env) {\n\t\tif (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI', 'GITHUB_ACTIONS', 'BUILDKITE'].some(sign => sign in env) || env.CI_NAME === 'codeship') {\n\t\t\treturn 1;\n\t\t}\n\n\t\treturn min;\n\t}\n\n\tif ('TEAMCITY_VERSION' in env) {\n\t\treturn /^(9\\.(0*[1-9]\\d*)\\.|\\d{2,}\\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;\n\t}\n\n\tif (env.COLORTERM === 'truecolor') {\n\t\treturn 3;\n\t}\n\n\tif ('TERM_PROGRAM' in env) {\n\t\tconst version = parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10);\n\n\t\tswitch (env.TERM_PROGRAM) {\n\t\t\tcase 'iTerm.app':\n\t\t\t\treturn version >= 3 ? 3 : 2;\n\t\t\tcase 'Apple_Terminal':\n\t\t\t\treturn 2;\n\t\t\t// No default\n\t\t}\n\t}\n\n\tif (/-256(color)?$/i.test(env.TERM)) {\n\t\treturn 2;\n\t}\n\n\tif (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {\n\t\treturn 1;\n\t}\n\n\tif ('COLORTERM' in env) {\n\t\treturn 1;\n\t}\n\n\treturn min;\n}\n\nfunction getSupportLevel(stream) {\n\tconst level = supportsColor(stream, stream && stream.isTTY);\n\treturn translateLevel(level);\n}\n\nmodule.exports = {\n\tsupportsColor: getSupportLevel,\n\tstdout: translateLevel(supportsColor(true, tty.isatty(1))),\n\tstderr: translateLevel(supportsColor(true, tty.isatty(2)))\n};\n\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/supports-color/index.js?");
|
|
13328
|
-
|
|
13329
|
-
/***/ }),
|
|
13330
|
-
|
|
13331
13257
|
/***/ "./node_modules/vscode-jsonrpc/lib/common/api.js":
|
|
13332
13258
|
/*!*******************************************************!*\
|
|
13333
13259
|
!*** ./node_modules/vscode-jsonrpc/lib/common/api.js ***!
|
|
@@ -13672,6 +13598,39 @@ module.exports = require("net");
|
|
|
13672
13598
|
|
|
13673
13599
|
/***/ }),
|
|
13674
13600
|
|
|
13601
|
+
/***/ "node:os":
|
|
13602
|
+
/*!**************************!*\
|
|
13603
|
+
!*** external "node:os" ***!
|
|
13604
|
+
\**************************/
|
|
13605
|
+
/***/ ((module) => {
|
|
13606
|
+
|
|
13607
|
+
"use strict";
|
|
13608
|
+
module.exports = require("node:os");
|
|
13609
|
+
|
|
13610
|
+
/***/ }),
|
|
13611
|
+
|
|
13612
|
+
/***/ "node:process":
|
|
13613
|
+
/*!*******************************!*\
|
|
13614
|
+
!*** external "node:process" ***!
|
|
13615
|
+
\*******************************/
|
|
13616
|
+
/***/ ((module) => {
|
|
13617
|
+
|
|
13618
|
+
"use strict";
|
|
13619
|
+
module.exports = require("node:process");
|
|
13620
|
+
|
|
13621
|
+
/***/ }),
|
|
13622
|
+
|
|
13623
|
+
/***/ "node:tty":
|
|
13624
|
+
/*!***************************!*\
|
|
13625
|
+
!*** external "node:tty" ***!
|
|
13626
|
+
\***************************/
|
|
13627
|
+
/***/ ((module) => {
|
|
13628
|
+
|
|
13629
|
+
"use strict";
|
|
13630
|
+
module.exports = require("node:tty");
|
|
13631
|
+
|
|
13632
|
+
/***/ }),
|
|
13633
|
+
|
|
13675
13634
|
/***/ "os":
|
|
13676
13635
|
/*!*********************!*\
|
|
13677
13636
|
!*** external "os" ***!
|
|
@@ -13716,17 +13675,6 @@ module.exports = require("string_decoder");
|
|
|
13716
13675
|
|
|
13717
13676
|
/***/ }),
|
|
13718
13677
|
|
|
13719
|
-
/***/ "tty":
|
|
13720
|
-
/*!**********************!*\
|
|
13721
|
-
!*** external "tty" ***!
|
|
13722
|
-
\**********************/
|
|
13723
|
-
/***/ ((module) => {
|
|
13724
|
-
|
|
13725
|
-
"use strict";
|
|
13726
|
-
module.exports = require("tty");
|
|
13727
|
-
|
|
13728
|
-
/***/ }),
|
|
13729
|
-
|
|
13730
13678
|
/***/ "util":
|
|
13731
13679
|
/*!***********************!*\
|
|
13732
13680
|
!*** external "util" ***!
|
|
@@ -13749,6 +13697,50 @@ module.exports = require("zlib");
|
|
|
13749
13697
|
|
|
13750
13698
|
/***/ }),
|
|
13751
13699
|
|
|
13700
|
+
/***/ "./node_modules/chalk/source/index.js":
|
|
13701
|
+
/*!********************************************!*\
|
|
13702
|
+
!*** ./node_modules/chalk/source/index.js ***!
|
|
13703
|
+
\********************************************/
|
|
13704
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
13705
|
+
|
|
13706
|
+
"use strict";
|
|
13707
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"Chalk\": () => (/* binding */ Chalk),\n/* harmony export */ \"chalkStderr\": () => (/* binding */ chalkStderr),\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */ \"supportsColor\": () => (/* binding */ stdoutColor),\n/* harmony export */ \"supportsColorStderr\": () => (/* binding */ stderrColor)\n/* harmony export */ });\n/* harmony import */ var _ansi_styles__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! #ansi-styles */ \"./node_modules/chalk/source/vendor/ansi-styles/index.js\");\n/* harmony import */ var _supports_color__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! #supports-color */ \"./node_modules/chalk/source/vendor/supports-color/index.js\");\n/* harmony import */ var _utilities_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utilities.js */ \"./node_modules/chalk/source/utilities.js\");\n\n\n\n\nconst {stdout: stdoutColor, stderr: stderrColor} = _supports_color__WEBPACK_IMPORTED_MODULE_1__[\"default\"];\n\nconst GENERATOR = Symbol('GENERATOR');\nconst STYLER = Symbol('STYLER');\nconst IS_EMPTY = Symbol('IS_EMPTY');\n\n// `supportsColor.level` → `ansiStyles.color[name]` mapping\nconst levelMapping = [\n\t'ansi',\n\t'ansi',\n\t'ansi256',\n\t'ansi16m',\n];\n\nconst styles = Object.create(null);\n\nconst applyOptions = (object, options = {}) => {\n\tif (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) {\n\t\tthrow new Error('The `level` option should be an integer from 0 to 3');\n\t}\n\n\t// Detect level if not set manually\n\tconst colorLevel = stdoutColor ? stdoutColor.level : 0;\n\tobject.level = options.level === undefined ? colorLevel : options.level;\n};\n\nclass Chalk {\n\tconstructor(options) {\n\t\t// eslint-disable-next-line no-constructor-return\n\t\treturn chalkFactory(options);\n\t}\n}\n\nconst chalkFactory = options => {\n\tconst chalk = (...strings) => strings.join(' ');\n\tapplyOptions(chalk, options);\n\n\tObject.setPrototypeOf(chalk, createChalk.prototype);\n\n\treturn chalk;\n};\n\nfunction createChalk(options) {\n\treturn chalkFactory(options);\n}\n\nObject.setPrototypeOf(createChalk.prototype, Function.prototype);\n\nfor (const [styleName, style] of Object.entries(_ansi_styles__WEBPACK_IMPORTED_MODULE_0__[\"default\"])) {\n\tstyles[styleName] = {\n\t\tget() {\n\t\t\tconst builder = createBuilder(this, createStyler(style.open, style.close, this[STYLER]), this[IS_EMPTY]);\n\t\t\tObject.defineProperty(this, styleName, {value: builder});\n\t\t\treturn builder;\n\t\t},\n\t};\n}\n\nstyles.visible = {\n\tget() {\n\t\tconst builder = createBuilder(this, this[STYLER], true);\n\t\tObject.defineProperty(this, 'visible', {value: builder});\n\t\treturn builder;\n\t},\n};\n\nconst getModelAnsi = (model, level, type, ...arguments_) => {\n\tif (model === 'rgb') {\n\t\tif (level === 'ansi16m') {\n\t\t\treturn _ansi_styles__WEBPACK_IMPORTED_MODULE_0__[\"default\"][type].ansi16m(...arguments_);\n\t\t}\n\n\t\tif (level === 'ansi256') {\n\t\t\treturn _ansi_styles__WEBPACK_IMPORTED_MODULE_0__[\"default\"][type].ansi256(_ansi_styles__WEBPACK_IMPORTED_MODULE_0__[\"default\"].rgbToAnsi256(...arguments_));\n\t\t}\n\n\t\treturn _ansi_styles__WEBPACK_IMPORTED_MODULE_0__[\"default\"][type].ansi(_ansi_styles__WEBPACK_IMPORTED_MODULE_0__[\"default\"].rgbToAnsi(...arguments_));\n\t}\n\n\tif (model === 'hex') {\n\t\treturn getModelAnsi('rgb', level, type, ..._ansi_styles__WEBPACK_IMPORTED_MODULE_0__[\"default\"].hexToRgb(...arguments_));\n\t}\n\n\treturn _ansi_styles__WEBPACK_IMPORTED_MODULE_0__[\"default\"][type][model](...arguments_);\n};\n\nconst usedModels = ['rgb', 'hex', 'ansi256'];\n\nfor (const model of usedModels) {\n\tstyles[model] = {\n\t\tget() {\n\t\t\tconst {level} = this;\n\t\t\treturn function (...arguments_) {\n\t\t\t\tconst styler = createStyler(getModelAnsi(model, levelMapping[level], 'color', ...arguments_), _ansi_styles__WEBPACK_IMPORTED_MODULE_0__[\"default\"].color.close, this[STYLER]);\n\t\t\t\treturn createBuilder(this, styler, this[IS_EMPTY]);\n\t\t\t};\n\t\t},\n\t};\n\n\tconst bgModel = 'bg' + model[0].toUpperCase() + model.slice(1);\n\tstyles[bgModel] = {\n\t\tget() {\n\t\t\tconst {level} = this;\n\t\t\treturn function (...arguments_) {\n\t\t\t\tconst styler = createStyler(getModelAnsi(model, levelMapping[level], 'bgColor', ...arguments_), _ansi_styles__WEBPACK_IMPORTED_MODULE_0__[\"default\"].bgColor.close, this[STYLER]);\n\t\t\t\treturn createBuilder(this, styler, this[IS_EMPTY]);\n\t\t\t};\n\t\t},\n\t};\n}\n\nconst proto = Object.defineProperties(() => {}, {\n\t...styles,\n\tlevel: {\n\t\tenumerable: true,\n\t\tget() {\n\t\t\treturn this[GENERATOR].level;\n\t\t},\n\t\tset(level) {\n\t\t\tthis[GENERATOR].level = level;\n\t\t},\n\t},\n});\n\nconst createStyler = (open, close, parent) => {\n\tlet openAll;\n\tlet closeAll;\n\tif (parent === undefined) {\n\t\topenAll = open;\n\t\tcloseAll = close;\n\t} else {\n\t\topenAll = parent.openAll + open;\n\t\tcloseAll = close + parent.closeAll;\n\t}\n\n\treturn {\n\t\topen,\n\t\tclose,\n\t\topenAll,\n\t\tcloseAll,\n\t\tparent,\n\t};\n};\n\nconst createBuilder = (self, _styler, _isEmpty) => {\n\t// Single argument is hot path, implicit coercion is faster than anything\n\t// eslint-disable-next-line no-implicit-coercion\n\tconst builder = (...arguments_) => applyStyle(builder, (arguments_.length === 1) ? ('' + arguments_[0]) : arguments_.join(' '));\n\n\t// We alter the prototype because we must return a function, but there is\n\t// no way to create a function with a different prototype\n\tObject.setPrototypeOf(builder, proto);\n\n\tbuilder[GENERATOR] = self;\n\tbuilder[STYLER] = _styler;\n\tbuilder[IS_EMPTY] = _isEmpty;\n\n\treturn builder;\n};\n\nconst applyStyle = (self, string) => {\n\tif (self.level <= 0 || !string) {\n\t\treturn self[IS_EMPTY] ? '' : string;\n\t}\n\n\tlet styler = self[STYLER];\n\n\tif (styler === undefined) {\n\t\treturn string;\n\t}\n\n\tconst {openAll, closeAll} = styler;\n\tif (string.includes('\\u001B')) {\n\t\twhile (styler !== undefined) {\n\t\t\t// Replace any instances already present with a re-opening code\n\t\t\t// otherwise only the part of the string until said closing code\n\t\t\t// will be colored, and the rest will simply be 'plain'.\n\t\t\tstring = (0,_utilities_js__WEBPACK_IMPORTED_MODULE_2__.stringReplaceAll)(string, styler.close, styler.open);\n\n\t\t\tstyler = styler.parent;\n\t\t}\n\t}\n\n\t// We can move both next actions out of loop, because remaining actions in loop won't have\n\t// any/visible effect on parts we add here. Close the styling before a linebreak and reopen\n\t// after next line to fix a bleed issue on macOS: https://github.com/chalk/chalk/pull/92\n\tconst lfIndex = string.indexOf('\\n');\n\tif (lfIndex !== -1) {\n\t\tstring = (0,_utilities_js__WEBPACK_IMPORTED_MODULE_2__.stringEncaseCRLFWithFirstIndex)(string, closeAll, openAll, lfIndex);\n\t}\n\n\treturn openAll + string + closeAll;\n};\n\nObject.defineProperties(createChalk.prototype, styles);\n\nconst chalk = createChalk();\nconst chalkStderr = createChalk({level: stderrColor ? stderrColor.level : 0});\n\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (chalk);\n\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/chalk/source/index.js?");
|
|
13708
|
+
|
|
13709
|
+
/***/ }),
|
|
13710
|
+
|
|
13711
|
+
/***/ "./node_modules/chalk/source/utilities.js":
|
|
13712
|
+
/*!************************************************!*\
|
|
13713
|
+
!*** ./node_modules/chalk/source/utilities.js ***!
|
|
13714
|
+
\************************************************/
|
|
13715
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
13716
|
+
|
|
13717
|
+
"use strict";
|
|
13718
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"stringEncaseCRLFWithFirstIndex\": () => (/* binding */ stringEncaseCRLFWithFirstIndex),\n/* harmony export */ \"stringReplaceAll\": () => (/* binding */ stringReplaceAll)\n/* harmony export */ });\n// TODO: When targeting Node.js 16, use `String.prototype.replaceAll`.\nfunction stringReplaceAll(string, substring, replacer) {\n\tlet index = string.indexOf(substring);\n\tif (index === -1) {\n\t\treturn string;\n\t}\n\n\tconst substringLength = substring.length;\n\tlet endIndex = 0;\n\tlet returnValue = '';\n\tdo {\n\t\treturnValue += string.substr(endIndex, index - endIndex) + substring + replacer;\n\t\tendIndex = index + substringLength;\n\t\tindex = string.indexOf(substring, endIndex);\n\t} while (index !== -1);\n\n\treturnValue += string.slice(endIndex);\n\treturn returnValue;\n}\n\nfunction stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index) {\n\tlet endIndex = 0;\n\tlet returnValue = '';\n\tdo {\n\t\tconst gotCR = string[index - 1] === '\\r';\n\t\treturnValue += string.substr(endIndex, (gotCR ? index - 1 : index) - endIndex) + prefix + (gotCR ? '\\r\\n' : '\\n') + postfix;\n\t\tendIndex = index + 1;\n\t\tindex = string.indexOf('\\n', endIndex);\n\t} while (index !== -1);\n\n\treturnValue += string.slice(endIndex);\n\treturn returnValue;\n}\n\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/chalk/source/utilities.js?");
|
|
13719
|
+
|
|
13720
|
+
/***/ }),
|
|
13721
|
+
|
|
13722
|
+
/***/ "./node_modules/chalk/source/vendor/ansi-styles/index.js":
|
|
13723
|
+
/*!***************************************************************!*\
|
|
13724
|
+
!*** ./node_modules/chalk/source/vendor/ansi-styles/index.js ***!
|
|
13725
|
+
\***************************************************************/
|
|
13726
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
13727
|
+
|
|
13728
|
+
"use strict";
|
|
13729
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\nconst ANSI_BACKGROUND_OFFSET = 10;\n\nconst wrapAnsi16 = (offset = 0) => code => `\\u001B[${code + offset}m`;\n\nconst wrapAnsi256 = (offset = 0) => code => `\\u001B[${38 + offset};5;${code}m`;\n\nconst wrapAnsi16m = (offset = 0) => (red, green, blue) => `\\u001B[${38 + offset};2;${red};${green};${blue}m`;\n\nfunction assembleStyles() {\n\tconst codes = new Map();\n\tconst styles = {\n\t\tmodifier: {\n\t\t\treset: [0, 0],\n\t\t\t// 21 isn't widely supported and 22 does the same thing\n\t\t\tbold: [1, 22],\n\t\t\tdim: [2, 22],\n\t\t\titalic: [3, 23],\n\t\t\tunderline: [4, 24],\n\t\t\toverline: [53, 55],\n\t\t\tinverse: [7, 27],\n\t\t\thidden: [8, 28],\n\t\t\tstrikethrough: [9, 29],\n\t\t},\n\t\tcolor: {\n\t\t\tblack: [30, 39],\n\t\t\tred: [31, 39],\n\t\t\tgreen: [32, 39],\n\t\t\tyellow: [33, 39],\n\t\t\tblue: [34, 39],\n\t\t\tmagenta: [35, 39],\n\t\t\tcyan: [36, 39],\n\t\t\twhite: [37, 39],\n\n\t\t\t// Bright color\n\t\t\tblackBright: [90, 39],\n\t\t\tredBright: [91, 39],\n\t\t\tgreenBright: [92, 39],\n\t\t\tyellowBright: [93, 39],\n\t\t\tblueBright: [94, 39],\n\t\t\tmagentaBright: [95, 39],\n\t\t\tcyanBright: [96, 39],\n\t\t\twhiteBright: [97, 39],\n\t\t},\n\t\tbgColor: {\n\t\t\tbgBlack: [40, 49],\n\t\t\tbgRed: [41, 49],\n\t\t\tbgGreen: [42, 49],\n\t\t\tbgYellow: [43, 49],\n\t\t\tbgBlue: [44, 49],\n\t\t\tbgMagenta: [45, 49],\n\t\t\tbgCyan: [46, 49],\n\t\t\tbgWhite: [47, 49],\n\n\t\t\t// Bright color\n\t\t\tbgBlackBright: [100, 49],\n\t\t\tbgRedBright: [101, 49],\n\t\t\tbgGreenBright: [102, 49],\n\t\t\tbgYellowBright: [103, 49],\n\t\t\tbgBlueBright: [104, 49],\n\t\t\tbgMagentaBright: [105, 49],\n\t\t\tbgCyanBright: [106, 49],\n\t\t\tbgWhiteBright: [107, 49],\n\t\t},\n\t};\n\n\t// Alias bright black as gray (and grey)\n\tstyles.color.gray = styles.color.blackBright;\n\tstyles.bgColor.bgGray = styles.bgColor.bgBlackBright;\n\tstyles.color.grey = styles.color.blackBright;\n\tstyles.bgColor.bgGrey = styles.bgColor.bgBlackBright;\n\n\tfor (const [groupName, group] of Object.entries(styles)) {\n\t\tfor (const [styleName, style] of Object.entries(group)) {\n\t\t\tstyles[styleName] = {\n\t\t\t\topen: `\\u001B[${style[0]}m`,\n\t\t\t\tclose: `\\u001B[${style[1]}m`,\n\t\t\t};\n\n\t\t\tgroup[styleName] = styles[styleName];\n\n\t\t\tcodes.set(style[0], style[1]);\n\t\t}\n\n\t\tObject.defineProperty(styles, groupName, {\n\t\t\tvalue: group,\n\t\t\tenumerable: false,\n\t\t});\n\t}\n\n\tObject.defineProperty(styles, 'codes', {\n\t\tvalue: codes,\n\t\tenumerable: false,\n\t});\n\n\tstyles.color.close = '\\u001B[39m';\n\tstyles.bgColor.close = '\\u001B[49m';\n\n\tstyles.color.ansi = wrapAnsi16();\n\tstyles.color.ansi256 = wrapAnsi256();\n\tstyles.color.ansi16m = wrapAnsi16m();\n\tstyles.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET);\n\tstyles.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);\n\tstyles.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);\n\n\t// From https://github.com/Qix-/color-convert/blob/3f0e0d4e92e235796ccb17f6e85c72094a651f49/conversions.js\n\tObject.defineProperties(styles, {\n\t\trgbToAnsi256: {\n\t\t\tvalue: (red, green, blue) => {\n\t\t\t\t// We use the extended greyscale palette here, with the exception of\n\t\t\t\t// black and white. normal palette only has 4 greyscale shades.\n\t\t\t\tif (red === green && green === blue) {\n\t\t\t\t\tif (red < 8) {\n\t\t\t\t\t\treturn 16;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (red > 248) {\n\t\t\t\t\t\treturn 231;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn Math.round(((red - 8) / 247) * 24) + 232;\n\t\t\t\t}\n\n\t\t\t\treturn 16\n\t\t\t\t\t+ (36 * Math.round(red / 255 * 5))\n\t\t\t\t\t+ (6 * Math.round(green / 255 * 5))\n\t\t\t\t\t+ Math.round(blue / 255 * 5);\n\t\t\t},\n\t\t\tenumerable: false,\n\t\t},\n\t\thexToRgb: {\n\t\t\tvalue: hex => {\n\t\t\t\tconst matches = /(?<colorString>[a-f\\d]{6}|[a-f\\d]{3})/i.exec(hex.toString(16));\n\t\t\t\tif (!matches) {\n\t\t\t\t\treturn [0, 0, 0];\n\t\t\t\t}\n\n\t\t\t\tlet {colorString} = matches.groups;\n\n\t\t\t\tif (colorString.length === 3) {\n\t\t\t\t\tcolorString = [...colorString].map(character => character + character).join('');\n\t\t\t\t}\n\n\t\t\t\tconst integer = Number.parseInt(colorString, 16);\n\n\t\t\t\treturn [\n\t\t\t\t\t/* eslint-disable no-bitwise */\n\t\t\t\t\t(integer >> 16) & 0xFF,\n\t\t\t\t\t(integer >> 8) & 0xFF,\n\t\t\t\t\tinteger & 0xFF,\n\t\t\t\t\t/* eslint-enable no-bitwise */\n\t\t\t\t];\n\t\t\t},\n\t\t\tenumerable: false,\n\t\t},\n\t\thexToAnsi256: {\n\t\t\tvalue: hex => styles.rgbToAnsi256(...styles.hexToRgb(hex)),\n\t\t\tenumerable: false,\n\t\t},\n\t\tansi256ToAnsi: {\n\t\t\tvalue: code => {\n\t\t\t\tif (code < 8) {\n\t\t\t\t\treturn 30 + code;\n\t\t\t\t}\n\n\t\t\t\tif (code < 16) {\n\t\t\t\t\treturn 90 + (code - 8);\n\t\t\t\t}\n\n\t\t\t\tlet red;\n\t\t\t\tlet green;\n\t\t\t\tlet blue;\n\n\t\t\t\tif (code >= 232) {\n\t\t\t\t\tred = (((code - 232) * 10) + 8) / 255;\n\t\t\t\t\tgreen = red;\n\t\t\t\t\tblue = red;\n\t\t\t\t} else {\n\t\t\t\t\tcode -= 16;\n\n\t\t\t\t\tconst remainder = code % 36;\n\n\t\t\t\t\tred = Math.floor(code / 36) / 5;\n\t\t\t\t\tgreen = Math.floor(remainder / 6) / 5;\n\t\t\t\t\tblue = (remainder % 6) / 5;\n\t\t\t\t}\n\n\t\t\t\tconst value = Math.max(red, green, blue) * 2;\n\n\t\t\t\tif (value === 0) {\n\t\t\t\t\treturn 30;\n\t\t\t\t}\n\n\t\t\t\t// eslint-disable-next-line no-bitwise\n\t\t\t\tlet result = 30 + ((Math.round(blue) << 2) | (Math.round(green) << 1) | Math.round(red));\n\n\t\t\t\tif (value === 2) {\n\t\t\t\t\tresult += 60;\n\t\t\t\t}\n\n\t\t\t\treturn result;\n\t\t\t},\n\t\t\tenumerable: false,\n\t\t},\n\t\trgbToAnsi: {\n\t\t\tvalue: (red, green, blue) => styles.ansi256ToAnsi(styles.rgbToAnsi256(red, green, blue)),\n\t\t\tenumerable: false,\n\t\t},\n\t\thexToAnsi: {\n\t\t\tvalue: hex => styles.ansi256ToAnsi(styles.hexToAnsi256(hex)),\n\t\t\tenumerable: false,\n\t\t},\n\t});\n\n\treturn styles;\n}\n\nconst ansiStyles = assembleStyles();\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ansiStyles);\n\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/chalk/source/vendor/ansi-styles/index.js?");
|
|
13730
|
+
|
|
13731
|
+
/***/ }),
|
|
13732
|
+
|
|
13733
|
+
/***/ "./node_modules/chalk/source/vendor/supports-color/index.js":
|
|
13734
|
+
/*!******************************************************************!*\
|
|
13735
|
+
!*** ./node_modules/chalk/source/vendor/supports-color/index.js ***!
|
|
13736
|
+
\******************************************************************/
|
|
13737
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
13738
|
+
|
|
13739
|
+
"use strict";
|
|
13740
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"createSupportsColor\": () => (/* binding */ createSupportsColor),\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var node_process__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! node:process */ \"node:process\");\n/* harmony import */ var node_os__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! node:os */ \"node:os\");\n/* harmony import */ var node_tty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! node:tty */ \"node:tty\");\n\n\n\n\n// From: https://github.com/sindresorhus/has-flag/blob/main/index.js\nfunction hasFlag(flag, argv = node_process__WEBPACK_IMPORTED_MODULE_0__.argv) {\n\tconst prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--');\n\tconst position = argv.indexOf(prefix + flag);\n\tconst terminatorPosition = argv.indexOf('--');\n\treturn position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);\n}\n\nconst {env} = node_process__WEBPACK_IMPORTED_MODULE_0__;\n\nlet flagForceColor;\nif (\n\thasFlag('no-color')\n\t|| hasFlag('no-colors')\n\t|| hasFlag('color=false')\n\t|| hasFlag('color=never')\n) {\n\tflagForceColor = 0;\n} else if (\n\thasFlag('color')\n\t|| hasFlag('colors')\n\t|| hasFlag('color=true')\n\t|| hasFlag('color=always')\n) {\n\tflagForceColor = 1;\n}\n\nfunction envForceColor() {\n\tif ('FORCE_COLOR' in env) {\n\t\tif (env.FORCE_COLOR === 'true') {\n\t\t\treturn 1;\n\t\t}\n\n\t\tif (env.FORCE_COLOR === 'false') {\n\t\t\treturn 0;\n\t\t}\n\n\t\treturn env.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3);\n\t}\n}\n\nfunction translateLevel(level) {\n\tif (level === 0) {\n\t\treturn false;\n\t}\n\n\treturn {\n\t\tlevel,\n\t\thasBasic: true,\n\t\thas256: level >= 2,\n\t\thas16m: level >= 3,\n\t};\n}\n\nfunction _supportsColor(haveStream, {streamIsTTY, sniffFlags = true} = {}) {\n\tconst noFlagForceColor = envForceColor();\n\tif (noFlagForceColor !== undefined) {\n\t\tflagForceColor = noFlagForceColor;\n\t}\n\n\tconst forceColor = sniffFlags ? flagForceColor : noFlagForceColor;\n\n\tif (forceColor === 0) {\n\t\treturn 0;\n\t}\n\n\tif (sniffFlags) {\n\t\tif (hasFlag('color=16m')\n\t\t\t|| hasFlag('color=full')\n\t\t\t|| hasFlag('color=truecolor')) {\n\t\t\treturn 3;\n\t\t}\n\n\t\tif (hasFlag('color=256')) {\n\t\t\treturn 2;\n\t\t}\n\t}\n\n\tif (haveStream && !streamIsTTY && forceColor === undefined) {\n\t\treturn 0;\n\t}\n\n\tconst min = forceColor || 0;\n\n\tif (env.TERM === 'dumb') {\n\t\treturn min;\n\t}\n\n\tif (node_process__WEBPACK_IMPORTED_MODULE_0__.platform === 'win32') {\n\t\t// Windows 10 build 10586 is the first Windows release that supports 256 colors.\n\t\t// Windows 10 build 14931 is the first release that supports 16m/TrueColor.\n\t\tconst osRelease = node_os__WEBPACK_IMPORTED_MODULE_1__.release().split('.');\n\t\tif (\n\t\t\tNumber(osRelease[0]) >= 10\n\t\t\t&& Number(osRelease[2]) >= 10_586\n\t\t) {\n\t\t\treturn Number(osRelease[2]) >= 14_931 ? 3 : 2;\n\t\t}\n\n\t\treturn 1;\n\t}\n\n\tif ('CI' in env) {\n\t\tif (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI', 'GITHUB_ACTIONS', 'BUILDKITE', 'DRONE'].some(sign => sign in env) || env.CI_NAME === 'codeship') {\n\t\t\treturn 1;\n\t\t}\n\n\t\treturn min;\n\t}\n\n\tif ('TEAMCITY_VERSION' in env) {\n\t\treturn /^(9\\.(0*[1-9]\\d*)\\.|\\d{2,}\\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;\n\t}\n\n\t// Check for Azure DevOps pipelines\n\tif ('TF_BUILD' in env && 'AGENT_NAME' in env) {\n\t\treturn 1;\n\t}\n\n\tif (env.COLORTERM === 'truecolor') {\n\t\treturn 3;\n\t}\n\n\tif ('TERM_PROGRAM' in env) {\n\t\tconst version = Number.parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10);\n\n\t\tswitch (env.TERM_PROGRAM) {\n\t\t\tcase 'iTerm.app':\n\t\t\t\treturn version >= 3 ? 3 : 2;\n\t\t\tcase 'Apple_Terminal':\n\t\t\t\treturn 2;\n\t\t\t// No default\n\t\t}\n\t}\n\n\tif (/-256(color)?$/i.test(env.TERM)) {\n\t\treturn 2;\n\t}\n\n\tif (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {\n\t\treturn 1;\n\t}\n\n\tif ('COLORTERM' in env) {\n\t\treturn 1;\n\t}\n\n\treturn min;\n}\n\nfunction createSupportsColor(stream, options = {}) {\n\tconst level = _supportsColor(stream, {\n\t\tstreamIsTTY: stream && stream.isTTY,\n\t\t...options,\n\t});\n\n\treturn translateLevel(level);\n}\n\nconst supportsColor = {\n\tstdout: createSupportsColor({isTTY: node_tty__WEBPACK_IMPORTED_MODULE_2__.isatty(1)}),\n\tstderr: createSupportsColor({isTTY: node_tty__WEBPACK_IMPORTED_MODULE_2__.isatty(2)}),\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (supportsColor);\n\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/chalk/source/vendor/supports-color/index.js?");
|
|
13741
|
+
|
|
13742
|
+
/***/ }),
|
|
13743
|
+
|
|
13752
13744
|
/***/ "./node_modules/json5/dist/index.mjs":
|
|
13753
13745
|
/*!*******************************************!*\
|
|
13754
13746
|
!*** ./node_modules/json5/dist/index.mjs ***!
|
|
@@ -13774,17 +13766,14 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
13774
13766
|
/******/ }
|
|
13775
13767
|
/******/ // Create a new module (and put it into the cache)
|
|
13776
13768
|
/******/ var module = __webpack_module_cache__[moduleId] = {
|
|
13777
|
-
/******/ id
|
|
13778
|
-
/******/ loaded
|
|
13769
|
+
/******/ // no module.id needed
|
|
13770
|
+
/******/ // no module.loaded needed
|
|
13779
13771
|
/******/ exports: {}
|
|
13780
13772
|
/******/ };
|
|
13781
13773
|
/******/
|
|
13782
13774
|
/******/ // Execute the module function
|
|
13783
13775
|
/******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
|
13784
13776
|
/******/
|
|
13785
|
-
/******/ // Flag the module as loaded
|
|
13786
|
-
/******/ module.loaded = true;
|
|
13787
|
-
/******/
|
|
13788
13777
|
/******/ // Return the exports of the module
|
|
13789
13778
|
/******/ return module.exports;
|
|
13790
13779
|
/******/ }
|
|
@@ -13818,15 +13807,6 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
13818
13807
|
/******/ };
|
|
13819
13808
|
/******/ })();
|
|
13820
13809
|
/******/
|
|
13821
|
-
/******/ /* webpack/runtime/node module decorator */
|
|
13822
|
-
/******/ (() => {
|
|
13823
|
-
/******/ __webpack_require__.nmd = (module) => {
|
|
13824
|
-
/******/ module.paths = [];
|
|
13825
|
-
/******/ if (!module.children) module.children = [];
|
|
13826
|
-
/******/ return module;
|
|
13827
|
-
/******/ };
|
|
13828
|
-
/******/ })();
|
|
13829
|
-
/******/
|
|
13830
13810
|
/************************************************************************/
|
|
13831
13811
|
/******/
|
|
13832
13812
|
/******/ // startup
|