@abaplint/cli 2.82.11 → 2.82.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/build/cli.js +12 -12
  2. package/package.json +5 -5
package/build/cli.js CHANGED
@@ -6451,7 +6451,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
6451
6451
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
6452
6452
 
6453
6453
  "use strict";
6454
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.ObjectOriented = void 0;\r\nconst Statements = __webpack_require__(/*! ../2_statements/statements */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js\");\r\nconst Expressions = __webpack_require__(/*! ../2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst visibility_1 = __webpack_require__(/*! ../4_file_information/visibility */ \"./node_modules/@abaplint/core/build/src/abap/4_file_information/visibility.js\");\r\n// todo, think some of the public methods can be made private\r\nclass ObjectOriented {\r\n constructor(scope) {\r\n this.scope = scope;\r\n }\r\n fromInterfaceByName(name, ignore) {\r\n const idef = this.scope.findInterfaceDefinition(name);\r\n if (idef === undefined || ignore.includes(name.toUpperCase())) {\r\n return [];\r\n }\r\n const ret = [name.toUpperCase()];\r\n for (const t of idef.getTypeDefinitions().getAll()) {\r\n const n = name + \"~\" + t.type.getName();\r\n this.scope.addTypeNamed(n, t.type);\r\n }\r\n this.scope.addListPrefix(idef.getAttributes().getConstants(), name + \"~\");\r\n this.scope.addListPrefix(idef.getAttributes().getStatic(), name + \"~\");\r\n this.scope.addListPrefix(idef.getAttributes().getInstance(), name + \"~\");\r\n for (const i of idef.getImplementing()) {\r\n if (ignore.includes(i.name.toUpperCase())) {\r\n continue;\r\n }\r\n ret.push(...this.fromInterfaceByName(i.name, ignore));\r\n ignore.push(i.name.toUpperCase());\r\n ret.push(i.name.toUpperCase());\r\n }\r\n return ret;\r\n }\r\n addAliasedAttributes(classDefinition) {\r\n for (const alias of classDefinition.getAliases().getAll()) {\r\n const comp = alias.getComponent();\r\n const idef = this.scope.findInterfaceDefinition(comp.split(\"~\")[0]);\r\n if (idef) {\r\n const found = idef.getAttributes().findByName(comp.split(\"~\")[1]);\r\n if (found) {\r\n this.scope.addNamedIdentifier(alias.getName(), found);\r\n }\r\n }\r\n }\r\n }\r\n findMethodInInterface(interfaceName, methodName) {\r\n const idef = this.scope.findInterfaceDefinition(interfaceName);\r\n if (idef) {\r\n const methods = idef.getMethodDefinitions().getAll();\r\n for (const method of methods) {\r\n if (method.getName().toUpperCase() === methodName.toUpperCase()) {\r\n return { method, def: idef };\r\n }\r\n }\r\n return this.findMethodViaAlias(methodName, idef);\r\n }\r\n return undefined;\r\n }\r\n findMethodViaAlias(methodName, def) {\r\n for (const a of def.getAliases().getAll()) {\r\n if (a.getName().toUpperCase() === methodName.toUpperCase()) {\r\n const comp = a.getComponent();\r\n const res = this.findMethodInInterface(comp.split(\"~\")[0], comp.split(\"~\")[1]);\r\n if (res) {\r\n return res;\r\n }\r\n }\r\n }\r\n return undefined;\r\n }\r\n findClassName(node) {\r\n if (!(node.get() instanceof Statements.ClassImplementation\r\n || node.get() instanceof Statements.ClassDefinition)) {\r\n throw new Error(\"findClassName, unexpected node type\");\r\n }\r\n const className = node.findFirstExpression(Expressions.ClassName);\r\n if (className === undefined) {\r\n throw new Error(\"findClassName, unexpected node type\");\r\n }\r\n return className.getFirstToken().getStr();\r\n }\r\n findInterfaces(cd) {\r\n var _a;\r\n const ret = [...cd.getImplementing()];\r\n for (const r of ret) {\r\n const nested = (_a = this.scope.findInterfaceDefinition(r.name)) === null || _a === void 0 ? void 0 : _a.getImplementing();\r\n if (nested) {\r\n ret.push(...nested);\r\n }\r\n }\r\n const sup = cd.getSuperClass();\r\n if (sup) {\r\n try {\r\n ret.push(...this.findInterfaces(this.findSuperDefinition(sup)));\r\n }\r\n catch (_b) {\r\n // ignore errors, they will show up as variable not found anyhow\r\n }\r\n }\r\n return ret;\r\n }\r\n searchEvent(def, name) {\r\n var _a;\r\n if (def === undefined || name === undefined) {\r\n return undefined;\r\n }\r\n const found = def.getEvents().find(e => e.getName().toUpperCase() === (name === null || name === void 0 ? void 0 : name.toUpperCase()));\r\n if (found) {\r\n return found;\r\n }\r\n for (const a of ((_a = def.getAliases()) === null || _a === void 0 ? void 0 : _a.getAll()) || []) {\r\n if (a.getName().toUpperCase() === name.toUpperCase()) {\r\n const comp = a.getComponent();\r\n const res = this.searchEvent(this.scope.findObjectDefinition(comp.split(\"~\")[0]), comp.split(\"~\")[1]);\r\n if (res) {\r\n return res;\r\n }\r\n }\r\n }\r\n const sup = def.getSuperClass();\r\n if (sup) {\r\n return this.searchEvent(this.findSuperDefinition(sup), name);\r\n }\r\n return undefined;\r\n }\r\n // search in via super class, interfaces and aliases\r\n searchAttributeName(def, name) {\r\n var _a;\r\n if (def === undefined || name === undefined) {\r\n return undefined;\r\n }\r\n const upper = name.toUpperCase();\r\n for (const a of def.getAttributes().getAll()) {\r\n if (a.getName().toUpperCase() === upper) {\r\n return a;\r\n }\r\n }\r\n for (const a of ((_a = def.getAliases()) === null || _a === void 0 ? void 0 : _a.getAll()) || []) {\r\n if (a.getName().toUpperCase() === upper) {\r\n const comp = a.getComponent();\r\n const res = this.searchAttributeName(this.scope.findObjectDefinition(comp.split(\"~\")[0]), comp.split(\"~\")[1]);\r\n if (res) {\r\n return res;\r\n }\r\n }\r\n }\r\n if (name.includes(\"~\")) {\r\n const interfaceName = upper.split(\"~\")[0];\r\n if (def.getImplementing().some((a) => a.name.toUpperCase() === interfaceName)) {\r\n return this.searchAttributeName(this.scope.findInterfaceDefinition(interfaceName), name.split(\"~\")[1]);\r\n }\r\n }\r\n const sup = def.getSuperClass();\r\n if (sup) {\r\n return this.searchAttributeName(this.findSuperDefinition(sup), name);\r\n }\r\n return undefined;\r\n }\r\n // search in via super class, interfaces and aliases\r\n searchTypeName(def, name) {\r\n if (def === undefined || name === undefined) {\r\n return undefined;\r\n }\r\n const search = def.getTypeDefinitions().getByName(name);\r\n if (search) {\r\n return search;\r\n }\r\n if (name.includes(\"~\")) {\r\n const interfaceName = name.split(\"~\")[0];\r\n if (def.getImplementing().some((a) => a.name.toUpperCase() === interfaceName.toUpperCase())) {\r\n return this.searchTypeName(this.scope.findInterfaceDefinition(interfaceName), name.split(\"~\")[1]);\r\n }\r\n }\r\n const sup = def.getSuperClass();\r\n if (sup) {\r\n return this.searchTypeName(this.findSuperDefinition(sup), name);\r\n }\r\n return undefined;\r\n }\r\n // search in via super class, interfaces and aliases\r\n searchConstantName(def, name) {\r\n if (def === undefined || name === undefined) {\r\n return undefined;\r\n }\r\n for (const a of def.getAttributes().getConstants()) {\r\n if (a.getName().toUpperCase() === name.toUpperCase()) {\r\n return a;\r\n }\r\n }\r\n for (const a of def.getAliases().getAll()) {\r\n if (a.getName().toUpperCase() === name.toUpperCase()) {\r\n const comp = a.getComponent();\r\n const res = this.searchConstantName(this.scope.findObjectDefinition(comp.split(\"~\")[0]), comp.split(\"~\")[1]);\r\n if (res) {\r\n return res;\r\n }\r\n }\r\n }\r\n const sup = def.getSuperClass();\r\n if (sup) {\r\n return this.searchConstantName(this.findSuperDefinition(sup), name);\r\n }\r\n return undefined;\r\n }\r\n // search in via super class, interfaces and aliases\r\n searchMethodName(def, name) {\r\n if (def === undefined || name === undefined) {\r\n return { method: undefined, def: undefined };\r\n }\r\n const methodDefinition = this.findMethod(def, name);\r\n if (methodDefinition) {\r\n return { method: methodDefinition, def };\r\n }\r\n let interfaceName = undefined;\r\n if (name.includes(\"~\")) {\r\n interfaceName = name.split(\"~\")[0];\r\n if (interfaceName && this.findInterfaces(def).some(i => i.name.toUpperCase() === (interfaceName === null || interfaceName === void 0 ? void 0 : interfaceName.toUpperCase())) === false) {\r\n return { method: undefined, def: undefined };\r\n }\r\n }\r\n // todo, this is not completely correct? hmm, why? visibility?\r\n if (methodDefinition === undefined && interfaceName) {\r\n name = name.split(\"~\")[1];\r\n const found = this.findMethodInInterface(interfaceName, name);\r\n if (found) {\r\n return found;\r\n }\r\n }\r\n else if (methodDefinition === undefined) {\r\n const found = this.findMethodViaAlias(name, def);\r\n if (found) {\r\n return found;\r\n }\r\n }\r\n const sup = def.getSuperClass();\r\n if (methodDefinition === undefined && sup) {\r\n return this.searchMethodName(this.findSuperDefinition(sup), name);\r\n }\r\n return { method: undefined, def: undefined };\r\n }\r\n findMethod(def, methodName) {\r\n for (const method of def.getMethodDefinitions().getAll()) {\r\n if (method.getName().toUpperCase() === methodName.toUpperCase()) {\r\n if (method.isRedefinition()) {\r\n return this.findMethodInSuper(def, methodName);\r\n }\r\n else {\r\n return method;\r\n }\r\n }\r\n }\r\n return undefined;\r\n }\r\n findMethodInSuper(child, methodName) {\r\n let sup = child.getSuperClass();\r\n while (sup !== undefined) {\r\n const cdef = this.findSuperDefinition(sup);\r\n const found = this.findMethod(cdef, methodName);\r\n if (found) {\r\n return found;\r\n }\r\n sup = cdef.getSuperClass();\r\n }\r\n return undefined;\r\n }\r\n findSuperDefinition(name) {\r\n const csup = this.scope.findClassDefinition(name);\r\n if (csup === undefined) {\r\n throw new Error(\"Super class \\\"\" + name + \"\\\" not found or contains errors\");\r\n }\r\n return csup;\r\n }\r\n fromSuperClassesAndInterfaces(child) {\r\n const implemented = this.fromSuperClasses(child);\r\n this.fromInterfaces(child, implemented);\r\n }\r\n // returns list of interfaces implemented\r\n fromSuperClasses(child) {\r\n let sup = child.getSuperClass();\r\n const ignore = [];\r\n while (sup !== undefined) {\r\n const cdef = this.findSuperDefinition(sup);\r\n for (const a of cdef.getAttributes().getAll()) {\r\n if (a.getVisibility() !== visibility_1.Visibility.Private) {\r\n this.scope.addIdentifier(a);\r\n // todo, handle scope and instance vs static\r\n }\r\n }\r\n for (const c of cdef.getAttributes().getConstants()) {\r\n if (c.getVisibility() !== visibility_1.Visibility.Private) {\r\n this.scope.addIdentifier(c);\r\n }\r\n }\r\n for (const t of cdef.getTypeDefinitions().getAll()) {\r\n if (t.visibility !== visibility_1.Visibility.Private) {\r\n this.scope.addType(t.type);\r\n }\r\n }\r\n ignore.push(...this.fromInterfaces(cdef, ignore));\r\n sup = cdef.getSuperClass();\r\n }\r\n return ignore;\r\n }\r\n // returns list of interfaces implemented\r\n fromInterfaces(classDefinition, skip) {\r\n const ignore = [];\r\n for (const i of classDefinition.getImplementing()) {\r\n ignore.push(...this.fromInterfaceByName(i.name, ignore.concat(skip || [])));\r\n }\r\n return ignore;\r\n }\r\n}\r\nexports.ObjectOriented = ObjectOriented;\r\n//# sourceMappingURL=_object_oriented.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/5_syntax/_object_oriented.js?");
6454
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.ObjectOriented = void 0;\r\nconst Statements = __webpack_require__(/*! ../2_statements/statements */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js\");\r\nconst Expressions = __webpack_require__(/*! ../2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst visibility_1 = __webpack_require__(/*! ../4_file_information/visibility */ \"./node_modules/@abaplint/core/build/src/abap/4_file_information/visibility.js\");\r\n// todo, think some of the public methods can be made private\r\nclass ObjectOriented {\r\n constructor(scope) {\r\n this.scope = scope;\r\n }\r\n fromInterfaceByName(name, ignore) {\r\n const idef = this.scope.findInterfaceDefinition(name);\r\n if (idef === undefined || ignore.includes(name.toUpperCase())) {\r\n return [];\r\n }\r\n const ret = [name.toUpperCase()];\r\n for (const t of idef.getTypeDefinitions().getAll()) {\r\n const n = name + \"~\" + t.type.getName();\r\n this.scope.addTypeNamed(n, t.type);\r\n }\r\n this.scope.addListPrefix(idef.getAttributes().getConstants(), name + \"~\");\r\n this.scope.addListPrefix(idef.getAttributes().getStatic(), name + \"~\");\r\n this.scope.addListPrefix(idef.getAttributes().getInstance(), name + \"~\");\r\n for (const i of idef.getImplementing()) {\r\n if (ignore.includes(i.name.toUpperCase())) {\r\n continue;\r\n }\r\n ret.push(...this.fromInterfaceByName(i.name, ignore));\r\n ignore.push(i.name.toUpperCase());\r\n ret.push(i.name.toUpperCase());\r\n }\r\n return ret;\r\n }\r\n addAliasedAttributes(classDefinition) {\r\n for (const alias of classDefinition.getAliases().getAll()) {\r\n const comp = alias.getComponent();\r\n const idef = this.scope.findInterfaceDefinition(comp.split(\"~\")[0]);\r\n if (idef) {\r\n const found = idef.getAttributes().findByName(comp.split(\"~\")[1]);\r\n if (found) {\r\n this.scope.addNamedIdentifier(alias.getName(), found);\r\n }\r\n }\r\n }\r\n }\r\n addAliasedTypes(aliases) {\r\n for (const alias of aliases.getAll()) {\r\n const comp = alias.getComponent();\r\n const idef = this.scope.findInterfaceDefinition(comp.split(\"~\")[0]);\r\n if (idef) {\r\n const found = idef.getTypeDefinitions().getByName(comp.split(\"~\")[1]);\r\n if (found) {\r\n this.scope.addTypeNamed(alias.getName(), found);\r\n }\r\n }\r\n }\r\n }\r\n findMethodInInterface(interfaceName, methodName) {\r\n const idef = this.scope.findInterfaceDefinition(interfaceName);\r\n if (idef) {\r\n const methods = idef.getMethodDefinitions().getAll();\r\n for (const method of methods) {\r\n if (method.getName().toUpperCase() === methodName.toUpperCase()) {\r\n return { method, def: idef };\r\n }\r\n }\r\n return this.findMethodViaAlias(methodName, idef);\r\n }\r\n return undefined;\r\n }\r\n findMethodViaAlias(methodName, def) {\r\n for (const a of def.getAliases().getAll()) {\r\n if (a.getName().toUpperCase() === methodName.toUpperCase()) {\r\n const comp = a.getComponent();\r\n const res = this.findMethodInInterface(comp.split(\"~\")[0], comp.split(\"~\")[1]);\r\n if (res) {\r\n return res;\r\n }\r\n }\r\n }\r\n return undefined;\r\n }\r\n findClassName(node) {\r\n if (!(node.get() instanceof Statements.ClassImplementation\r\n || node.get() instanceof Statements.ClassDefinition)) {\r\n throw new Error(\"findClassName, unexpected node type\");\r\n }\r\n const className = node.findFirstExpression(Expressions.ClassName);\r\n if (className === undefined) {\r\n throw new Error(\"findClassName, unexpected node type\");\r\n }\r\n return className.getFirstToken().getStr();\r\n }\r\n findInterfaces(cd) {\r\n var _a;\r\n const ret = [...cd.getImplementing()];\r\n for (const r of ret) {\r\n const nested = (_a = this.scope.findInterfaceDefinition(r.name)) === null || _a === void 0 ? void 0 : _a.getImplementing();\r\n if (nested) {\r\n ret.push(...nested);\r\n }\r\n }\r\n const sup = cd.getSuperClass();\r\n if (sup) {\r\n try {\r\n ret.push(...this.findInterfaces(this.findSuperDefinition(sup)));\r\n }\r\n catch (_b) {\r\n // ignore errors, they will show up as variable not found anyhow\r\n }\r\n }\r\n return ret;\r\n }\r\n searchEvent(def, name) {\r\n var _a;\r\n if (def === undefined || name === undefined) {\r\n return undefined;\r\n }\r\n const found = def.getEvents().find(e => e.getName().toUpperCase() === (name === null || name === void 0 ? void 0 : name.toUpperCase()));\r\n if (found) {\r\n return found;\r\n }\r\n for (const a of ((_a = def.getAliases()) === null || _a === void 0 ? void 0 : _a.getAll()) || []) {\r\n if (a.getName().toUpperCase() === name.toUpperCase()) {\r\n const comp = a.getComponent();\r\n const res = this.searchEvent(this.scope.findObjectDefinition(comp.split(\"~\")[0]), comp.split(\"~\")[1]);\r\n if (res) {\r\n return res;\r\n }\r\n }\r\n }\r\n const sup = def.getSuperClass();\r\n if (sup) {\r\n return this.searchEvent(this.findSuperDefinition(sup), name);\r\n }\r\n return undefined;\r\n }\r\n // search in via super class, interfaces and aliases\r\n searchAttributeName(def, name) {\r\n var _a;\r\n if (def === undefined || name === undefined) {\r\n return undefined;\r\n }\r\n const upper = name.toUpperCase();\r\n for (const a of def.getAttributes().getAll()) {\r\n if (a.getName().toUpperCase() === upper) {\r\n return a;\r\n }\r\n }\r\n for (const a of ((_a = def.getAliases()) === null || _a === void 0 ? void 0 : _a.getAll()) || []) {\r\n if (a.getName().toUpperCase() === upper) {\r\n const comp = a.getComponent();\r\n const res = this.searchAttributeName(this.scope.findObjectDefinition(comp.split(\"~\")[0]), comp.split(\"~\")[1]);\r\n if (res) {\r\n return res;\r\n }\r\n }\r\n }\r\n if (name.includes(\"~\")) {\r\n const interfaceName = upper.split(\"~\")[0];\r\n if (def.getImplementing().some((a) => a.name.toUpperCase() === interfaceName)) {\r\n return this.searchAttributeName(this.scope.findInterfaceDefinition(interfaceName), name.split(\"~\")[1]);\r\n }\r\n }\r\n const sup = def.getSuperClass();\r\n if (sup) {\r\n return this.searchAttributeName(this.findSuperDefinition(sup), name);\r\n }\r\n return undefined;\r\n }\r\n // search in via super class, interfaces and aliases\r\n searchTypeName(def, name) {\r\n if (def === undefined || name === undefined) {\r\n return undefined;\r\n }\r\n const search = def.getTypeDefinitions().getByName(name);\r\n if (search) {\r\n return search;\r\n }\r\n if (name.includes(\"~\")) {\r\n const interfaceName = name.split(\"~\")[0];\r\n if (def.getImplementing().some((a) => a.name.toUpperCase() === interfaceName.toUpperCase())) {\r\n return this.searchTypeName(this.scope.findInterfaceDefinition(interfaceName), name.split(\"~\")[1]);\r\n }\r\n }\r\n const sup = def.getSuperClass();\r\n if (sup) {\r\n return this.searchTypeName(this.findSuperDefinition(sup), name);\r\n }\r\n return undefined;\r\n }\r\n // search in via super class, interfaces and aliases\r\n searchConstantName(def, name) {\r\n if (def === undefined || name === undefined) {\r\n return undefined;\r\n }\r\n for (const a of def.getAttributes().getConstants()) {\r\n if (a.getName().toUpperCase() === name.toUpperCase()) {\r\n return a;\r\n }\r\n }\r\n for (const a of def.getAliases().getAll()) {\r\n if (a.getName().toUpperCase() === name.toUpperCase()) {\r\n const comp = a.getComponent();\r\n const res = this.searchConstantName(this.scope.findObjectDefinition(comp.split(\"~\")[0]), comp.split(\"~\")[1]);\r\n if (res) {\r\n return res;\r\n }\r\n }\r\n }\r\n const sup = def.getSuperClass();\r\n if (sup) {\r\n return this.searchConstantName(this.findSuperDefinition(sup), name);\r\n }\r\n return undefined;\r\n }\r\n // search in via super class, interfaces and aliases\r\n searchMethodName(def, name) {\r\n if (def === undefined || name === undefined) {\r\n return { method: undefined, def: undefined };\r\n }\r\n const methodDefinition = this.findMethod(def, name);\r\n if (methodDefinition) {\r\n return { method: methodDefinition, def };\r\n }\r\n let interfaceName = undefined;\r\n if (name.includes(\"~\")) {\r\n interfaceName = name.split(\"~\")[0];\r\n if (interfaceName && this.findInterfaces(def).some(i => i.name.toUpperCase() === (interfaceName === null || interfaceName === void 0 ? void 0 : interfaceName.toUpperCase())) === false) {\r\n return { method: undefined, def: undefined };\r\n }\r\n }\r\n // todo, this is not completely correct? hmm, why? visibility?\r\n if (methodDefinition === undefined && interfaceName) {\r\n name = name.split(\"~\")[1];\r\n const found = this.findMethodInInterface(interfaceName, name);\r\n if (found) {\r\n return found;\r\n }\r\n }\r\n else if (methodDefinition === undefined) {\r\n const found = this.findMethodViaAlias(name, def);\r\n if (found) {\r\n return found;\r\n }\r\n }\r\n const sup = def.getSuperClass();\r\n if (methodDefinition === undefined && sup) {\r\n return this.searchMethodName(this.findSuperDefinition(sup), name);\r\n }\r\n return { method: undefined, def: undefined };\r\n }\r\n findMethod(def, methodName) {\r\n for (const method of def.getMethodDefinitions().getAll()) {\r\n if (method.getName().toUpperCase() === methodName.toUpperCase()) {\r\n if (method.isRedefinition()) {\r\n return this.findMethodInSuper(def, methodName);\r\n }\r\n else {\r\n return method;\r\n }\r\n }\r\n }\r\n return undefined;\r\n }\r\n findMethodInSuper(child, methodName) {\r\n let sup = child.getSuperClass();\r\n while (sup !== undefined) {\r\n const cdef = this.findSuperDefinition(sup);\r\n const found = this.findMethod(cdef, methodName);\r\n if (found) {\r\n return found;\r\n }\r\n sup = cdef.getSuperClass();\r\n }\r\n return undefined;\r\n }\r\n findSuperDefinition(name) {\r\n const csup = this.scope.findClassDefinition(name);\r\n if (csup === undefined) {\r\n throw new Error(\"Super class \\\"\" + name + \"\\\" not found or contains errors\");\r\n }\r\n return csup;\r\n }\r\n fromSuperClassesAndInterfaces(child) {\r\n const implemented = this.fromSuperClasses(child);\r\n this.fromInterfaces(child, implemented);\r\n }\r\n // returns list of interfaces implemented\r\n fromSuperClasses(child) {\r\n let sup = child.getSuperClass();\r\n const ignore = [];\r\n while (sup !== undefined) {\r\n const cdef = this.findSuperDefinition(sup);\r\n for (const a of cdef.getAttributes().getAll()) {\r\n if (a.getVisibility() !== visibility_1.Visibility.Private) {\r\n this.scope.addIdentifier(a);\r\n // todo, handle scope and instance vs static\r\n }\r\n }\r\n for (const c of cdef.getAttributes().getConstants()) {\r\n if (c.getVisibility() !== visibility_1.Visibility.Private) {\r\n this.scope.addIdentifier(c);\r\n }\r\n }\r\n for (const t of cdef.getTypeDefinitions().getAll()) {\r\n if (t.visibility !== visibility_1.Visibility.Private) {\r\n this.scope.addType(t.type);\r\n }\r\n }\r\n ignore.push(...this.fromInterfaces(cdef, ignore));\r\n sup = cdef.getSuperClass();\r\n }\r\n return ignore;\r\n }\r\n // returns list of interfaces implemented\r\n fromInterfaces(classDefinition, skip) {\r\n const ignore = [];\r\n for (const i of classDefinition.getImplementing()) {\r\n ignore.push(...this.fromInterfaceByName(i.name, ignore.concat(skip || [])));\r\n }\r\n return ignore;\r\n }\r\n}\r\nexports.ObjectOriented = ObjectOriented;\r\n//# sourceMappingURL=_object_oriented.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/5_syntax/_object_oriented.js?");
6455
6455
 
6456
6456
  /***/ }),
6457
6457
 
@@ -7606,7 +7606,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
7606
7606
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
7607
7607
 
7608
7608
  "use strict";
7609
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.GetBadi = void 0;\r\nconst Expressions = __webpack_require__(/*! ../../2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst source_1 = __webpack_require__(/*! ../expressions/source */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/source.js\");\r\nconst target_1 = __webpack_require__(/*! ../expressions/target */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/target.js\");\r\nconst dynamic_1 = __webpack_require__(/*! ../expressions/dynamic */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/dynamic.js\");\r\nclass GetBadi {\r\n runSyntax(node, scope, filename) {\r\n for (const s of node.findDirectExpressions(Expressions.Source)) {\r\n new source_1.Source().runSyntax(s, scope, filename);\r\n }\r\n for (const t of node.findDirectExpressions(Expressions.Target)) {\r\n new target_1.Target().runSyntax(t, scope, filename);\r\n }\r\n for (const d of node.findDirectExpressions(Expressions.Dynamic)) {\r\n new dynamic_1.Dynamic().runSyntax(d, scope, filename);\r\n }\r\n }\r\n}\r\nexports.GetBadi = GetBadi;\r\n//# sourceMappingURL=get_badi.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/get_badi.js?");
7609
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.GetBadi = void 0;\r\nconst Expressions = __webpack_require__(/*! ../../2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst source_1 = __webpack_require__(/*! ../expressions/source */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/source.js\");\r\nconst target_1 = __webpack_require__(/*! ../expressions/target */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/target.js\");\r\nconst dynamic_1 = __webpack_require__(/*! ../expressions/dynamic */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/dynamic.js\");\r\nclass GetBadi {\r\n runSyntax(node, scope, filename) {\r\n for (const s of node.findAllExpressions(Expressions.Source)) {\r\n new source_1.Source().runSyntax(s, scope, filename);\r\n }\r\n for (const t of node.findDirectExpressions(Expressions.Target)) {\r\n new target_1.Target().runSyntax(t, scope, filename);\r\n }\r\n for (const d of node.findDirectExpressions(Expressions.Dynamic)) {\r\n new dynamic_1.Dynamic().runSyntax(d, scope, filename);\r\n }\r\n }\r\n}\r\nexports.GetBadi = GetBadi;\r\n//# sourceMappingURL=get_badi.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/get_badi.js?");
7610
7610
 
7611
7611
  /***/ }),
7612
7612
 
@@ -8431,7 +8431,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
8431
8431
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
8432
8432
 
8433
8433
  "use strict";
8434
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.TypeEnum = void 0;\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 Structures = __webpack_require__(/*! ../../3_structures/structures */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/index.js\");\r\nconst basic_1 = __webpack_require__(/*! ../../types/basic */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/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 _reference_1 = __webpack_require__(/*! ../_reference */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_reference.js\");\r\nconst enum_type_1 = __webpack_require__(/*! ../../types/basic/enum_type */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/enum_type.js\");\r\nclass TypeEnum {\r\n runSyntax(node, scope, filename) {\r\n var _a;\r\n const values = [];\r\n const types = [];\r\n if (!(node.get() instanceof Structures.TypeEnum)) {\r\n throw new Error(\"TypeEnum, unexpected type\");\r\n }\r\n const begin = node.findDirectStatement(Statements.TypeEnumBegin);\r\n if (begin === undefined) {\r\n throw new Error(\"TypeEnum, unexpected type, begin\");\r\n }\r\n for (const type of node.findDirectStatements(Statements.Type)) {\r\n const expr = type.findFirstExpression(Expressions.NamespaceSimpleName);\r\n if (expr === undefined) {\r\n continue;\r\n }\r\n const token = expr.getFirstToken();\r\n // integer is default if BASE TYPE is not specified\r\n values.push(new _typed_identifier_1.TypedIdentifier(token, filename, new basic_1.IntegerType()));\r\n }\r\n for (const type of node.findDirectStatements(Statements.TypeEnum)) {\r\n const expr = type.findFirstExpression(Expressions.NamespaceSimpleName);\r\n if (expr === undefined) {\r\n continue;\r\n }\r\n const token = expr.getFirstToken();\r\n // integer is default if BASE TYPE is not specified\r\n values.push(new _typed_identifier_1.TypedIdentifier(token, filename, new basic_1.IntegerType()));\r\n }\r\n const baseType = (_a = begin.findExpressionAfterToken(\"TYPE\")) === null || _a === void 0 ? void 0 : _a.getFirstToken();\r\n const baseName = baseType === null || baseType === void 0 ? void 0 : baseType.getStr();\r\n if (baseType && baseName) {\r\n const found = scope.findType(baseName);\r\n if (found) {\r\n scope.addReference(baseType, found, _reference_1.ReferenceType.TypeReference, filename);\r\n }\r\n }\r\n const name = begin.findFirstExpression(Expressions.NamespaceSimpleName);\r\n if (name) {\r\n const id = new _typed_identifier_1.TypedIdentifier(name.getFirstToken(), filename, new enum_type_1.EnumType(), [\"enum\" /* Enum */]);\r\n scope.addType(id);\r\n types.push(id);\r\n }\r\n const stru = begin.findExpressionAfterToken(\"STRUCTURE\");\r\n if (stru) {\r\n const components = [];\r\n for (const r of values) {\r\n components.push({\r\n name: r.getName(),\r\n type: r.getType(),\r\n });\r\n }\r\n const id = new _typed_identifier_1.TypedIdentifier(stru.getFirstToken(), filename, new basic_1.StructureType(components), [\"enum\" /* Enum */]);\r\n values.push(id);\r\n }\r\n return { values, types };\r\n }\r\n}\r\nexports.TypeEnum = TypeEnum;\r\n//# sourceMappingURL=type_enum.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/5_syntax/structures/type_enum.js?");
8434
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.TypeEnum = void 0;\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 Structures = __webpack_require__(/*! ../../3_structures/structures */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/index.js\");\r\nconst basic_1 = __webpack_require__(/*! ../../types/basic */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/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 _reference_1 = __webpack_require__(/*! ../_reference */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_reference.js\");\r\nconst enum_type_1 = __webpack_require__(/*! ../../types/basic/enum_type */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/enum_type.js\");\r\nclass TypeEnum {\r\n runSyntax(node, scope, filename) {\r\n var _a;\r\n let values = [];\r\n const types = [];\r\n if (!(node.get() instanceof Structures.TypeEnum)) {\r\n throw new Error(\"TypeEnum, unexpected type\");\r\n }\r\n const begin = node.findDirectStatement(Statements.TypeEnumBegin);\r\n if (begin === undefined) {\r\n throw new Error(\"TypeEnum, unexpected type, begin\");\r\n }\r\n for (const type of node.findDirectStatements(Statements.Type)) {\r\n const expr = type.findFirstExpression(Expressions.NamespaceSimpleName);\r\n if (expr === undefined) {\r\n continue;\r\n }\r\n const token = expr.getFirstToken();\r\n // integer is default if BASE TYPE is not specified\r\n values.push(new _typed_identifier_1.TypedIdentifier(token, filename, new basic_1.IntegerType()));\r\n }\r\n for (const type of node.findDirectStatements(Statements.TypeEnum)) {\r\n const expr = type.findFirstExpression(Expressions.NamespaceSimpleName);\r\n if (expr === undefined) {\r\n continue;\r\n }\r\n const token = expr.getFirstToken();\r\n // integer is default if BASE TYPE is not specified\r\n values.push(new _typed_identifier_1.TypedIdentifier(token, filename, new basic_1.IntegerType()));\r\n }\r\n const baseType = (_a = begin.findExpressionAfterToken(\"TYPE\")) === null || _a === void 0 ? void 0 : _a.getFirstToken();\r\n const baseName = baseType === null || baseType === void 0 ? void 0 : baseType.getStr();\r\n if (baseType && baseName) {\r\n const found = scope.findType(baseName);\r\n if (found) {\r\n scope.addReference(baseType, found, _reference_1.ReferenceType.TypeReference, filename);\r\n }\r\n }\r\n const name = begin.findFirstExpression(Expressions.NamespaceSimpleName);\r\n if (name) {\r\n const id = new _typed_identifier_1.TypedIdentifier(name.getFirstToken(), filename, new enum_type_1.EnumType(), [\"enum\" /* Enum */]);\r\n scope.addType(id);\r\n types.push(id);\r\n }\r\n const stru = begin.findExpressionAfterToken(\"STRUCTURE\");\r\n if (stru) {\r\n const components = [];\r\n for (const r of values) {\r\n components.push({\r\n name: r.getName(),\r\n type: r.getType(),\r\n });\r\n }\r\n values = [];\r\n const id = new _typed_identifier_1.TypedIdentifier(stru.getFirstToken(), filename, new basic_1.StructureType(components), [\"enum\" /* Enum */]);\r\n values.push(id);\r\n }\r\n return { values, types };\r\n }\r\n}\r\nexports.TypeEnum = TypeEnum;\r\n//# sourceMappingURL=type_enum.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/5_syntax/structures/type_enum.js?");
8435
8435
 
8436
8436
  /***/ }),
8437
8437
 
@@ -8992,7 +8992,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
8992
8992
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
8993
8993
 
8994
8994
  "use strict";
8995
- 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 this.attributes = new class_attributes_1.Attributes(this.node, this.filename, scope);\r\n this.types = this.attributes.getTypes();\r\n this.methodDefs = new method_definitions_1.MethodDefinitions(this.node, this.filename, scope);\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 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?");
8995
+ 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 this.methodDefs = new method_definitions_1.MethodDefinitions(this.node, this.filename, scope);\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 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?");
8996
8996
 
8997
8997
  /***/ }),
8998
8998
 
@@ -9256,7 +9256,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
9256
9256
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
9257
9257
 
9258
9258
  "use strict";
9259
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.Issue = void 0;\r\nconst position_1 = __webpack_require__(/*! ./position */ \"./node_modules/@abaplint/core/build/src/position.js\");\r\nconst severity_1 = __webpack_require__(/*! ./severity */ \"./node_modules/@abaplint/core/build/src/severity.js\");\r\nclass Issue {\r\n constructor(data) {\r\n this.data = data;\r\n if (this.data.start instanceof position_1.VirtualPosition) {\r\n // no quick fixes inside macros\r\n this.data.fix = undefined;\r\n }\r\n if (this.data.start.getCol() < 1) {\r\n throw new Error(\"issue, start col < 1\");\r\n }\r\n else if (this.data.end.getCol() < 1) {\r\n throw new Error(\"issue, end col < 1\");\r\n }\r\n }\r\n //////////////////////////\r\n static atRow(file, row, message, key, severity) {\r\n const start = new position_1.Position(row, 1);\r\n const end = new position_1.Position(row, file.getRawRows()[row - 1].length + 1);\r\n severity = severity !== null && severity !== void 0 ? severity : severity_1.Severity.Error;\r\n return new Issue({\r\n filename: file.getFilename(),\r\n message,\r\n key,\r\n start,\r\n end,\r\n severity,\r\n });\r\n }\r\n static atStatement(file, statement, message, key, severity, fix) {\r\n return this.atRange(file, statement.getStart(), statement.getEnd(), message, key, severity, fix);\r\n }\r\n static atPosition(file, start, message, key, severity, fix) {\r\n const row = start.getRow();\r\n const end = new position_1.Position(row, file.getRawRows()[row - 1].length + 1);\r\n severity = severity !== null && severity !== void 0 ? severity : severity_1.Severity.Error;\r\n return new Issue({\r\n filename: file.getFilename(),\r\n message,\r\n key,\r\n start,\r\n end,\r\n fix,\r\n severity,\r\n });\r\n }\r\n static atRowRange(file, row, startCol, endCol, message, key, severity) {\r\n const start = new position_1.Position(row, startCol);\r\n const end = new position_1.Position(row, endCol);\r\n severity = severity !== null && severity !== void 0 ? severity : severity_1.Severity.Error;\r\n return new Issue({\r\n filename: file.getFilename(),\r\n message,\r\n key,\r\n start,\r\n end,\r\n severity,\r\n });\r\n }\r\n static atRange(file, start, end, message, key, severity, fix) {\r\n severity = severity !== null && severity !== void 0 ? severity : severity_1.Severity.Error;\r\n return new Issue({\r\n filename: file.getFilename(),\r\n message,\r\n key,\r\n start,\r\n end,\r\n fix,\r\n severity,\r\n });\r\n }\r\n static atToken(file, token, message, key, severity, fix) {\r\n severity = severity !== null && severity !== void 0 ? severity : severity_1.Severity.Error;\r\n return new Issue({\r\n filename: file.getFilename(),\r\n message,\r\n key,\r\n start: token.getStart(),\r\n end: token.getEnd(),\r\n severity,\r\n fix,\r\n });\r\n }\r\n static atIdentifier(identifier, message, key, severity, fix) {\r\n severity = severity !== null && severity !== void 0 ? severity : severity_1.Severity.Error;\r\n return new Issue({\r\n filename: identifier.getFilename(),\r\n message,\r\n key,\r\n start: identifier.getStart(),\r\n end: identifier.getEnd(),\r\n severity,\r\n fix,\r\n });\r\n }\r\n getData() {\r\n return this.data;\r\n }\r\n getMessage() {\r\n return this.data.message;\r\n }\r\n getKey() {\r\n return this.data.key;\r\n }\r\n getStart() {\r\n return this.data.start;\r\n }\r\n getEnd() {\r\n return this.data.end;\r\n }\r\n getFilename() {\r\n return this.data.filename;\r\n }\r\n getFix() {\r\n return this.data.fix;\r\n }\r\n getSeverity() {\r\n return this.data.severity;\r\n }\r\n}\r\nexports.Issue = Issue;\r\n//# sourceMappingURL=issue.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/issue.js?");
9259
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.Issue = void 0;\r\nconst position_1 = __webpack_require__(/*! ./position */ \"./node_modules/@abaplint/core/build/src/position.js\");\r\nconst severity_1 = __webpack_require__(/*! ./severity */ \"./node_modules/@abaplint/core/build/src/severity.js\");\r\nclass Issue {\r\n constructor(data) {\r\n this.data = data;\r\n if (this.data.start instanceof position_1.VirtualPosition) {\r\n // no quick fixes inside macros\r\n this.data.fix = undefined;\r\n }\r\n if (this.data.start.getCol() < 1) {\r\n throw new Error(\"issue, start col < 1\");\r\n }\r\n else if (this.data.end.getCol() < 1) {\r\n throw new Error(\"issue, end col < 1\");\r\n }\r\n }\r\n //////////////////////////\r\n static atRow(file, row, message, key, severity) {\r\n const start = new position_1.Position(row, 1);\r\n const end = new position_1.Position(row, file.getRawRows()[row - 1].length + 1);\r\n severity = severity !== null && severity !== void 0 ? severity : severity_1.Severity.Error;\r\n return new Issue({\r\n filename: file.getFilename(),\r\n message,\r\n key,\r\n start,\r\n end,\r\n severity,\r\n });\r\n }\r\n static atStatement(file, statement, message, key, severity, fix) {\r\n return this.atRange(file, statement.getStart(), statement.getEnd(), message, key, severity, fix);\r\n }\r\n static atPosition(file, start, message, key, severity, fix) {\r\n const row = start.getRow();\r\n const end = new position_1.Position(row, file.getRawRows()[row - 1].length + 1);\r\n severity = severity !== null && severity !== void 0 ? severity : severity_1.Severity.Error;\r\n return new Issue({\r\n filename: file.getFilename(),\r\n message,\r\n key,\r\n start,\r\n end,\r\n fix,\r\n severity,\r\n });\r\n }\r\n static atRowRange(file, row, startCol, endCol, message, key, severity, fix) {\r\n const start = new position_1.Position(row, startCol);\r\n const end = new position_1.Position(row, endCol);\r\n severity = severity !== null && severity !== void 0 ? severity : severity_1.Severity.Error;\r\n return new Issue({\r\n filename: file.getFilename(),\r\n message,\r\n key,\r\n start,\r\n end,\r\n fix,\r\n severity,\r\n });\r\n }\r\n static atRange(file, start, end, message, key, severity, fix) {\r\n severity = severity !== null && severity !== void 0 ? severity : severity_1.Severity.Error;\r\n return new Issue({\r\n filename: file.getFilename(),\r\n message,\r\n key,\r\n start,\r\n end,\r\n fix,\r\n severity,\r\n });\r\n }\r\n static atToken(file, token, message, key, severity, fix) {\r\n severity = severity !== null && severity !== void 0 ? severity : severity_1.Severity.Error;\r\n return new Issue({\r\n filename: file.getFilename(),\r\n message,\r\n key,\r\n start: token.getStart(),\r\n end: token.getEnd(),\r\n severity,\r\n fix,\r\n });\r\n }\r\n static atIdentifier(identifier, message, key, severity, fix) {\r\n severity = severity !== null && severity !== void 0 ? severity : severity_1.Severity.Error;\r\n return new Issue({\r\n filename: identifier.getFilename(),\r\n message,\r\n key,\r\n start: identifier.getStart(),\r\n end: identifier.getEnd(),\r\n severity,\r\n fix,\r\n });\r\n }\r\n getData() {\r\n return this.data;\r\n }\r\n getMessage() {\r\n return this.data.message;\r\n }\r\n getKey() {\r\n return this.data.key;\r\n }\r\n getStart() {\r\n return this.data.start;\r\n }\r\n getEnd() {\r\n return this.data.end;\r\n }\r\n getFilename() {\r\n return this.data.filename;\r\n }\r\n getFix() {\r\n return this.data.fix;\r\n }\r\n getSeverity() {\r\n return this.data.severity;\r\n }\r\n}\r\nexports.Issue = Issue;\r\n//# sourceMappingURL=issue.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/issue.js?");
9260
9260
 
9261
9261
  /***/ }),
9262
9262
 
@@ -9718,7 +9718,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
9718
9718
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
9719
9719
 
9720
9720
  "use strict";
9721
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.ConceptsOfPackage = void 0;\r\nconst _abstract_object_1 = __webpack_require__(/*! ./_abstract_object */ \"./node_modules/@abaplint/core/build/src/objects/_abstract_object.js\");\r\nclass ConceptsOfPackage extends _abstract_object_1.AbstractObject {\r\n getType() {\r\n return \"SOTS\";\r\n }\r\n getAllowedNaming() {\r\n return {\r\n maxLength: 30,\r\n allowNamespace: true,\r\n };\r\n }\r\n getDescription() {\r\n // todo\r\n return undefined;\r\n }\r\n}\r\nexports.ConceptsOfPackage = ConceptsOfPackage;\r\n//# sourceMappingURL=concepts_of_package.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/objects/concepts_of_package.js?");
9721
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.ConceptsOfPackage = void 0;\r\nconst _abstract_object_1 = __webpack_require__(/*! ./_abstract_object */ \"./node_modules/@abaplint/core/build/src/objects/_abstract_object.js\");\r\nclass ConceptsOfPackage extends _abstract_object_1.AbstractObject {\r\n getType() {\r\n return \"SOTS\";\r\n }\r\n getAllowedNaming() {\r\n return {\r\n maxLength: 30,\r\n allowNamespace: true,\r\n customRegex: new RegExp(/^(\\/[A-Z_\\d]{3,8}\\/)?[A-Z_-\\d<> ]+$/i),\r\n };\r\n }\r\n getDescription() {\r\n // todo\r\n return undefined;\r\n }\r\n}\r\nexports.ConceptsOfPackage = ConceptsOfPackage;\r\n//# sourceMappingURL=concepts_of_package.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/objects/concepts_of_package.js?");
9722
9722
 
9723
9723
  /***/ }),
9724
9724
 
@@ -10224,7 +10224,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
10224
10224
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
10225
10225
 
10226
10226
  "use strict";
10227
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.Namespace = void 0;\r\nconst _abstract_object_1 = __webpack_require__(/*! ./_abstract_object */ \"./node_modules/@abaplint/core/build/src/objects/_abstract_object.js\");\r\nclass Namespace extends _abstract_object_1.AbstractObject {\r\n getType() {\r\n return \"NSPC\";\r\n }\r\n getAllowedNaming() {\r\n return {\r\n maxLength: 10,\r\n allowNamespace: true,\r\n };\r\n }\r\n getDescription() {\r\n // todo\r\n return undefined;\r\n }\r\n}\r\nexports.Namespace = Namespace;\r\n//# sourceMappingURL=namespace.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/objects/namespace.js?");
10227
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.Namespace = void 0;\r\nconst _abstract_object_1 = __webpack_require__(/*! ./_abstract_object */ \"./node_modules/@abaplint/core/build/src/objects/_abstract_object.js\");\r\nclass Namespace extends _abstract_object_1.AbstractObject {\r\n getType() {\r\n return \"NSPC\";\r\n }\r\n getAllowedNaming() {\r\n return {\r\n maxLength: 10,\r\n allowNamespace: true,\r\n customRegex: new RegExp(/^\\/[A-Z_\\d]{3,8}\\/$/i),\r\n };\r\n }\r\n getDescription() {\r\n // todo\r\n return undefined;\r\n }\r\n}\r\nexports.Namespace = Namespace;\r\n//# sourceMappingURL=namespace.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/objects/namespace.js?");
10228
10228
 
10229
10229
  /***/ }),
10230
10230
 
@@ -10708,7 +10708,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
10708
10708
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
10709
10709
 
10710
10710
  "use strict";
10711
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.WebMIME = void 0;\r\nconst _abstract_object_1 = __webpack_require__(/*! ./_abstract_object */ \"./node_modules/@abaplint/core/build/src/objects/_abstract_object.js\");\r\nclass WebMIME extends _abstract_object_1.AbstractObject {\r\n getType() {\r\n return \"W3MI\";\r\n }\r\n getAllowedNaming() {\r\n return {\r\n maxLength: 40,\r\n allowNamespace: true,\r\n };\r\n }\r\n getDescription() {\r\n // todo\r\n return undefined;\r\n }\r\n}\r\nexports.WebMIME = WebMIME;\r\n//# sourceMappingURL=web_mime.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/objects/web_mime.js?");
10711
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.WebMIME = void 0;\r\nconst _abstract_object_1 = __webpack_require__(/*! ./_abstract_object */ \"./node_modules/@abaplint/core/build/src/objects/_abstract_object.js\");\r\nclass WebMIME extends _abstract_object_1.AbstractObject {\r\n getType() {\r\n return \"W3MI\";\r\n }\r\n getAllowedNaming() {\r\n return {\r\n maxLength: 40,\r\n allowNamespace: true,\r\n customRegex: new RegExp(/^[A-Z_-\\d/<> ]+$/i),\r\n };\r\n }\r\n getDescription() {\r\n // todo\r\n return undefined;\r\n }\r\n}\r\nexports.WebMIME = WebMIME;\r\n//# sourceMappingURL=web_mime.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/objects/web_mime.js?");
10712
10712
 
10713
10713
  /***/ }),
10714
10714
 
@@ -10774,7 +10774,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
10774
10774
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
10775
10775
 
10776
10776
  "use strict";
10777
- 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.82.11\";\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);\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 // 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 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?");
10777
+ 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.82.15\";\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);\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 // 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 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?");
10778
10778
 
10779
10779
  /***/ }),
10780
10780
 
@@ -10862,7 +10862,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
10862
10862
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
10863
10863
 
10864
10864
  "use strict";
10865
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.AllowedObjectNaming = exports.AllowedObjectNamingConf = void 0;\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 _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nclass AllowedObjectNamingConf extends _basic_rule_config_1.BasicRuleConfig {\r\n}\r\nexports.AllowedObjectNamingConf = AllowedObjectNamingConf;\r\nclass AllowedObjectNaming {\r\n constructor() {\r\n this.conf = new AllowedObjectNamingConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"allowed_object_naming\",\r\n title: \"Allowed object naming\",\r\n shortDescription: `Enforces basic name length and namespace restrictions, see note SAP 104010`,\r\n tags: [_irule_1.RuleTag.Naming, _irule_1.RuleTag.SingleFile],\r\n };\r\n }\r\n initialize(_reg) {\r\n return this;\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 run(obj) {\r\n const allowed = obj.getAllowedNaming();\r\n let message = \"\";\r\n if (obj.getName().length > allowed.maxLength) {\r\n message = \"Name exceeds max length\";\r\n }\r\n else if (allowed.allowNamespace === false && obj.getName().indexOf(\"/\") >= 0) {\r\n message = \"Namespace not allowed for object type\";\r\n }\r\n else if (obj.getType() === \"NSPC\") {\r\n if (obj.getName().match(/^\\/[A-Z_\\d]{3,8}\\/$/i) === null) {\r\n message = \"Name not allowed\";\r\n }\r\n }\r\n else if (obj.getName().match(/^(\\/[A-Z_\\d]{3,8}\\/)?[A-Z_-\\d<> ]+$/i) === null) {\r\n message = \"Name not allowed\";\r\n }\r\n if (message.length > 0) {\r\n return [issue_1.Issue.atRow(obj.getFiles()[0], 1, message, this.getMetadata().key, this.conf.severity)];\r\n }\r\n return [];\r\n }\r\n}\r\nexports.AllowedObjectNaming = AllowedObjectNaming;\r\n//# sourceMappingURL=allowed_object_naming.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/allowed_object_naming.js?");
10865
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.AllowedObjectNaming = exports.AllowedObjectNamingConf = void 0;\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 _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nclass AllowedObjectNamingConf extends _basic_rule_config_1.BasicRuleConfig {\r\n}\r\nexports.AllowedObjectNamingConf = AllowedObjectNamingConf;\r\nclass AllowedObjectNaming {\r\n constructor() {\r\n this.conf = new AllowedObjectNamingConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"allowed_object_naming\",\r\n title: \"Allowed object naming\",\r\n shortDescription: `Enforces basic name length and namespace restrictions, see note SAP 104010`,\r\n tags: [_irule_1.RuleTag.Naming, _irule_1.RuleTag.SingleFile],\r\n };\r\n }\r\n initialize(_reg) {\r\n return this;\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 run(obj) {\r\n const allowed = obj.getAllowedNaming();\r\n const name = obj.getName();\r\n let message = \"\";\r\n if (name.length > allowed.maxLength) {\r\n message = \"Name exceeds max length\";\r\n }\r\n else if (allowed.allowNamespace === false && name.indexOf(\"/\") >= 0) {\r\n message = \"Namespace not allowed for object type\";\r\n }\r\n else if (allowed.customRegex !== undefined) {\r\n if (name.match(allowed.customRegex) === null) {\r\n message = \"Name not allowed\";\r\n }\r\n }\r\n else if (name.match(/^(\\/[A-Z_\\d]{3,8}\\/)?[A-Z_\\d<> ]+$/i) === null) {\r\n message = \"Name not allowed\";\r\n }\r\n if (message.length > 0) {\r\n return [issue_1.Issue.atRow(obj.getFiles()[0], 1, message, this.getMetadata().key, this.conf.severity)];\r\n }\r\n return [];\r\n }\r\n}\r\nexports.AllowedObjectNaming = AllowedObjectNaming;\r\n//# sourceMappingURL=allowed_object_naming.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/allowed_object_naming.js?");
10866
10866
 
10867
10867
  /***/ }),
10868
10868
 
@@ -12050,7 +12050,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
12050
12050
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
12051
12051
 
12052
12052
  "use strict";
12053
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.SpaceBeforeColon = exports.SpaceBeforeColonConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nclass SpaceBeforeColonConf extends _basic_rule_config_1.BasicRuleConfig {\r\n}\r\nexports.SpaceBeforeColonConf = SpaceBeforeColonConf;\r\nclass SpaceBeforeColon extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new SpaceBeforeColonConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"space_before_colon\",\r\n title: \"Space before colon\",\r\n shortDescription: `Checks that there are no spaces in front of colons in chained statements.`,\r\n extendedInformation: `https://docs.abapopenchecks.org/checks/80/`,\r\n tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.SingleFile],\r\n badExample: `DATA : foo TYPE string.`,\r\n goodExample: `DATA: foo TYPE string.`,\r\n };\r\n }\r\n getMessage() {\r\n return \"Remove space before colon\";\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n runParsed(file) {\r\n const issues = [];\r\n let prev = file.getTokens()[0];\r\n for (const token of file.getTokens()) {\r\n if (token.getStr() === \":\" && !prev) {\r\n const issue = issue_1.Issue.atToken(file, token, this.getMessage(), this.getMetadata().key, this.conf.severity);\r\n issues.push(issue);\r\n }\r\n else if (token.getStr() === \":\"\r\n && prev.getRow() === token.getRow()\r\n && prev.getCol() + prev.getStr().length < token.getCol()) {\r\n const issue = issue_1.Issue.atRowRange(file, token.getRow(), prev.getEnd().getCol(), token.getStart().getCol(), this.getMessage(), this.getMetadata().key, this.conf.severity);\r\n // const issue = Issue.atToken(file, token, this.getMessage(), this.getMetadata().key);\r\n issues.push(issue);\r\n }\r\n prev = token;\r\n }\r\n return issues;\r\n }\r\n}\r\nexports.SpaceBeforeColon = SpaceBeforeColon;\r\n//# sourceMappingURL=space_before_colon.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/space_before_colon.js?");
12053
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.SpaceBeforeColon = exports.SpaceBeforeColonConf = void 0;\r\nconst position_1 = __webpack_require__(/*! ../position */ \"./node_modules/@abaplint/core/build/src/position.js\");\r\nconst edit_helper_1 = __webpack_require__(/*! ../edit_helper */ \"./node_modules/@abaplint/core/build/src/edit_helper.js\");\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nclass SpaceBeforeColonConf extends _basic_rule_config_1.BasicRuleConfig {\r\n}\r\nexports.SpaceBeforeColonConf = SpaceBeforeColonConf;\r\nclass SpaceBeforeColon extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new SpaceBeforeColonConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"space_before_colon\",\r\n title: \"Space before colon\",\r\n shortDescription: `Checks that there are no spaces in front of colons in chained statements.`,\r\n extendedInformation: `https://docs.abapopenchecks.org/checks/80/`,\r\n tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],\r\n badExample: `DATA : foo TYPE string.`,\r\n goodExample: `DATA: foo TYPE string.`,\r\n };\r\n }\r\n getMessage() {\r\n return \"Remove space before colon\";\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n runParsed(file) {\r\n const issues = [];\r\n let prev = file.getTokens()[0];\r\n for (const token of file.getTokens()) {\r\n if (token.getStr() === \":\" && !prev) {\r\n const issue = issue_1.Issue.atToken(file, token, this.getMessage(), this.getMetadata().key, this.conf.severity);\r\n issues.push(issue);\r\n }\r\n else if (token.getStr() === \":\"\r\n && prev.getRow() === token.getRow()\r\n && prev.getCol() + prev.getStr().length < token.getCol()) {\r\n const start = new position_1.Position(token.getRow(), prev.getEnd().getCol());\r\n const end = new position_1.Position(token.getRow(), token.getStart().getCol());\r\n const fix = edit_helper_1.EditHelper.deleteRange(file, start, end);\r\n const issue = issue_1.Issue.atRowRange(file, start.getRow(), start.getCol(), end.getCol(), this.getMessage(), this.getMetadata().key, this.conf.severity, fix);\r\n issues.push(issue);\r\n }\r\n prev = token;\r\n }\r\n return issues;\r\n }\r\n}\r\nexports.SpaceBeforeColon = SpaceBeforeColon;\r\n//# sourceMappingURL=space_before_colon.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/space_before_colon.js?");
12054
12054
 
12055
12055
  /***/ }),
12056
12056
 
@@ -12193,7 +12193,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
12193
12193
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
12194
12194
 
12195
12195
  "use strict";
12196
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.UnnecessaryChaining = exports.UnnecessaryChainingConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nclass UnnecessaryChainingConf extends _basic_rule_config_1.BasicRuleConfig {\r\n}\r\nexports.UnnecessaryChainingConf = UnnecessaryChainingConf;\r\nclass UnnecessaryChaining extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new UnnecessaryChainingConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"unnecessary_chaining\",\r\n title: \"Unnecessary Chaining\",\r\n shortDescription: `Find unnecessary chaining, all statements are checked`,\r\n extendedInformation: ``,\r\n tags: [_irule_1.RuleTag.SingleFile],\r\n badExample: `WRITE: bar.`,\r\n goodExample: `WRITE bar.`,\r\n };\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n runParsed(file) {\r\n var _a, _b;\r\n const issues = [];\r\n const statements = file.getStatements();\r\n for (let i = 0; i < statements.length; i++) {\r\n const colon = statements[i].getColon();\r\n if (colon === undefined) {\r\n continue;\r\n }\r\n const next = (_a = statements[i + 1]) === null || _a === void 0 ? void 0 : _a.getColon();\r\n const prev = (_b = statements[i - 1]) === null || _b === void 0 ? void 0 : _b.getColon();\r\n if (next !== undefined && colon.getStart().equals(next.getStart())) {\r\n continue;\r\n }\r\n else if (prev !== undefined && colon.getStart().equals(prev.getStart())) {\r\n continue;\r\n }\r\n const message = \"Unnecessary chaining\";\r\n const issue = issue_1.Issue.atStatement(file, statements[i], message, this.getMetadata().key);\r\n issues.push(issue);\r\n }\r\n return issues;\r\n }\r\n}\r\nexports.UnnecessaryChaining = UnnecessaryChaining;\r\n//# sourceMappingURL=unnecessary_chaining.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/unnecessary_chaining.js?");
12196
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.UnnecessaryChaining = exports.UnnecessaryChainingConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nconst edit_helper_1 = __webpack_require__(/*! ../edit_helper */ \"./node_modules/@abaplint/core/build/src/edit_helper.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\nclass UnnecessaryChainingConf extends _basic_rule_config_1.BasicRuleConfig {\r\n}\r\nexports.UnnecessaryChainingConf = UnnecessaryChainingConf;\r\nclass UnnecessaryChaining extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new UnnecessaryChainingConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"unnecessary_chaining\",\r\n title: \"Unnecessary Chaining\",\r\n shortDescription: `Find unnecessary chaining, all statements are checked`,\r\n extendedInformation: ``,\r\n tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],\r\n badExample: `WRITE: bar.`,\r\n goodExample: `WRITE bar.`,\r\n };\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n runParsed(file) {\r\n var _a;\r\n const issues = [];\r\n const statements = file.getStatements();\r\n for (let i = 0; i < statements.length; i++) {\r\n const colon = statements[i].getColon();\r\n if (colon === undefined) {\r\n continue;\r\n }\r\n // find the next non Comment statement\r\n let j = 1;\r\n let nextStatement = statements[i + j];\r\n while ((nextStatement === null || nextStatement === void 0 ? void 0 : nextStatement.get()) instanceof _statement_1.Comment) {\r\n j++;\r\n nextStatement = statements[i + j];\r\n }\r\n const next = nextStatement === null || nextStatement === void 0 ? void 0 : nextStatement.getColon();\r\n const prev = (_a = statements[i - 1]) === null || _a === void 0 ? void 0 : _a.getColon();\r\n if (next !== undefined && colon.getStart().equals(next.getStart())) {\r\n continue;\r\n }\r\n else if (prev !== undefined && colon.getStart().equals(prev.getStart())) {\r\n continue;\r\n }\r\n const fix = edit_helper_1.EditHelper.deleteRange(file, colon.getStart(), colon.getEnd());\r\n const message = \"Unnecessary chaining\";\r\n const issue = issue_1.Issue.atStatement(file, statements[i], message, this.getMetadata().key, this.conf.severity, fix);\r\n issues.push(issue);\r\n }\r\n return issues;\r\n }\r\n}\r\nexports.UnnecessaryChaining = UnnecessaryChaining;\r\n//# sourceMappingURL=unnecessary_chaining.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/unnecessary_chaining.js?");
12197
12197
 
12198
12198
  /***/ }),
12199
12199
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/cli",
3
- "version": "2.82.11",
3
+ "version": "2.82.15",
4
4
  "description": "abaplint - Command Line Interface",
5
5
  "bin": {
6
6
  "abaplint": "./abaplint"
@@ -39,16 +39,16 @@
39
39
  },
40
40
  "homepage": "https://abaplint.org",
41
41
  "devDependencies": {
42
- "@abaplint/core": "^2.82.11",
42
+ "@abaplint/core": "^2.82.15",
43
43
  "@types/chai": "^4.2.22",
44
44
  "@types/glob": "^7.2.0",
45
45
  "@types/minimist": "^1.2.2",
46
46
  "@types/mocha": "^9.0.0",
47
- "@types/node": "^16.11.11",
47
+ "@types/node": "^16.11.12",
48
48
  "@types/progress": "^2.0.5",
49
49
  "chai": "^4.3.4",
50
50
  "chalk": "=4.1.2",
51
- "eslint": "^8.3.0",
51
+ "eslint": "^8.4.1",
52
52
  "glob": "^7.2.0",
53
53
  "json5": "^2.2.0",
54
54
  "memfs": "^3.4.0",
@@ -56,7 +56,7 @@
56
56
  "mocha": "^9.1.3",
57
57
  "progress": "^2.0.3",
58
58
  "typescript": "^4.5.2",
59
- "webpack": "^5.64.4",
59
+ "webpack": "^5.65.0",
60
60
  "webpack-cli": "^4.9.1",
61
61
  "xml-js": "^1.6.11"
62
62
  },