@abaplint/cli 2.93.61 → 2.93.63

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 +31 -9
  2. package/package.json +2 -2
package/build/cli.js CHANGED
@@ -4603,7 +4603,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
4603
4603
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
4604
4604
 
4605
4605
  "use strict";
4606
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.MethodDef = void 0;\r\nconst version_1 = __webpack_require__(/*! ../../../version */ \"./node_modules/@abaplint/core/build/src/version.js\");\r\nconst combi_1 = __webpack_require__(/*! ../combi */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js\");\r\nconst expressions_1 = __webpack_require__(/*! ../expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nclass MethodDef {\r\n getMatcher() {\r\n const def = (0, combi_1.ver)(version_1.Version.v740sp08, (0, combi_1.seq)(\"DEFAULT\", (0, combi_1.altPrio)(\"FAIL\", \"IGNORE\")));\r\n const parameters = (0, combi_1.seq)((0, combi_1.optPrio)((0, combi_1.altPrio)(\"FINAL\", def, expressions_1.Abstract)), (0, combi_1.optPrio)(expressions_1.MethodDefImporting), (0, combi_1.optPrio)(expressions_1.MethodDefExporting), (0, combi_1.optPrio)(expressions_1.MethodDefChanging), (0, combi_1.optPrio)(expressions_1.MethodDefReturning), (0, combi_1.optPrio)((0, combi_1.altPrio)(expressions_1.MethodDefRaising, expressions_1.MethodDefExceptions)));\r\n const testing = (0, combi_1.seq)((0, combi_1.optPrio)(expressions_1.Abstract), \"FOR TESTING\", (0, combi_1.optPrio)((0, combi_1.altPrio)(expressions_1.MethodDefRaising, expressions_1.MethodDefExceptions)));\r\n // todo, this is only from version something\r\n const tableFunction = (0, combi_1.seq)(\"TABLE FUNCTION\", (0, combi_1.regex)(/^\\w+?$/));\r\n // todo, this is only from version something\r\n const ddl = \"DDL OBJECT OPTIONS CDS SESSION CLIENT REQUIRED\";\r\n const result = (0, combi_1.seq)(\"RESULT\", expressions_1.MethodParamName);\r\n const link = (0, combi_1.seq)(\"LINK\", expressions_1.MethodParamName);\r\n const full = (0, combi_1.seq)(\"FULL\", expressions_1.MethodParamName);\r\n const behavior = (0, combi_1.altPrio)((0, combi_1.seq)(\"VALIDATE ON SAVE IMPORTING\", expressions_1.MethodParamName, \"FOR\", expressions_1.TypeName), (0, combi_1.seq)(\"MODIFY IMPORTING\", expressions_1.MethodParamName, \"FOR ACTION\", expressions_1.TypeName, result), (0, combi_1.seq)(\"MODIFY IMPORTING\", expressions_1.MethodParamName, \"FOR CREATE\", (0, combi_1.alt)(expressions_1.TypeName, expressions_1.EntityAssociation)), (0, combi_1.seq)(\"MODIFY IMPORTING\", expressions_1.MethodParamName, \"FOR DELETE\", expressions_1.TypeName), (0, combi_1.seq)(\"MODIFY IMPORTING\", expressions_1.MethodParamName, \"FOR UPDATE\", expressions_1.TypeName), (0, combi_1.seq)(\"READ IMPORTING\", expressions_1.MethodParamName, \"FOR READ\", (0, combi_1.alt)(expressions_1.TypeName, expressions_1.EntityAssociation), (0, combi_1.optPrio)(full), result, (0, combi_1.optPrio)(link)), (0, combi_1.seq)(\"FEATURES IMPORTING\", expressions_1.MethodParamName, \"REQUEST\", expressions_1.NamespaceSimpleName, \"FOR\", expressions_1.NamespaceSimpleName, result), (0, combi_1.seq)(\"DETERMINE ON MODIFY IMPORTING\", expressions_1.MethodParamName, \"FOR\", expressions_1.TypeName), (0, combi_1.seq)(\"DETERMINE ON SAVE IMPORTING\", expressions_1.MethodParamName, \"FOR\", expressions_1.TypeName));\r\n // todo, this is only from version something\r\n const amdp = (0, combi_1.seq)(\"AMDP OPTIONS CDS SESSION CLIENT CURRENT\", (0, combi_1.optPrio)(expressions_1.MethodDefImporting), (0, combi_1.optPrio)(expressions_1.MethodDefExporting), (0, combi_1.optPrio)(expressions_1.MethodDefRaising));\r\n const ret = (0, combi_1.seq)((0, combi_1.altPrio)(\"CLASS-METHODS\", \"METHODS\"), expressions_1.MethodName, (0, combi_1.alt)((0, combi_1.seq)((0, combi_1.optPrio)(expressions_1.Abstract), expressions_1.EventHandler), parameters, testing, (0, combi_1.seq)(\"FOR\", (0, combi_1.alt)(tableFunction, ddl, behavior)), amdp, \"NOT AT END OF MODE\", (0, combi_1.optPrio)(expressions_1.Redefinition)));\r\n return ret;\r\n }\r\n}\r\nexports.MethodDef = MethodDef;\r\n//# sourceMappingURL=method_def.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/2_statements/statements/method_def.js?");
4606
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.MethodDef = void 0;\r\nconst version_1 = __webpack_require__(/*! ../../../version */ \"./node_modules/@abaplint/core/build/src/version.js\");\r\nconst combi_1 = __webpack_require__(/*! ../combi */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js\");\r\nconst expressions_1 = __webpack_require__(/*! ../expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nclass MethodDef {\r\n getMatcher() {\r\n const def = (0, combi_1.ver)(version_1.Version.v740sp08, (0, combi_1.seq)(\"DEFAULT\", (0, combi_1.altPrio)(\"FAIL\", \"IGNORE\")));\r\n const parameters = (0, combi_1.seq)((0, combi_1.optPrio)((0, combi_1.altPrio)(\"FINAL\", def, expressions_1.Abstract)), (0, combi_1.optPrio)(expressions_1.MethodDefImporting), (0, combi_1.optPrio)(expressions_1.MethodDefExporting), (0, combi_1.optPrio)(expressions_1.MethodDefChanging), (0, combi_1.optPrio)(expressions_1.MethodDefReturning), (0, combi_1.optPrio)((0, combi_1.altPrio)(expressions_1.MethodDefRaising, expressions_1.MethodDefExceptions)));\r\n const testing = (0, combi_1.seq)((0, combi_1.optPrio)(expressions_1.Abstract), \"FOR TESTING\", (0, combi_1.optPrio)((0, combi_1.altPrio)(expressions_1.MethodDefRaising, expressions_1.MethodDefExceptions)));\r\n // todo, this is only from version something\r\n const tableFunction = (0, combi_1.seq)(\"TABLE FUNCTION\", (0, combi_1.regex)(/^\\w+?$/));\r\n // todo, this is only from version something\r\n const ddl = \"DDL OBJECT OPTIONS CDS SESSION CLIENT REQUIRED\";\r\n const result = (0, combi_1.seq)(\"RESULT\", expressions_1.MethodParamName);\r\n const link = (0, combi_1.seq)(\"LINK\", expressions_1.MethodParamName);\r\n const full = (0, combi_1.seq)(\"FULL\", expressions_1.MethodParamName);\r\n const modify = (0, combi_1.alt)((0, combi_1.seq)(\"FOR ACTION\", expressions_1.TypeName, result), (0, combi_1.seq)(\"FOR CREATE\", (0, combi_1.alt)(expressions_1.TypeName, expressions_1.EntityAssociation)), (0, combi_1.seq)(\"FOR DELETE\", expressions_1.TypeName), (0, combi_1.seq)(\"FOR UPDATE\", expressions_1.TypeName));\r\n const behavior = (0, combi_1.altPrio)((0, combi_1.seq)(\"VALIDATE ON SAVE IMPORTING\", expressions_1.MethodParamName, \"FOR\", expressions_1.TypeName), (0, combi_1.seq)(\"MODIFY IMPORTING\", expressions_1.MethodParamName, modify), (0, combi_1.seq)(\"READ IMPORTING\", expressions_1.MethodParamName, \"FOR READ\", (0, combi_1.alt)(expressions_1.TypeName, expressions_1.EntityAssociation), (0, combi_1.optPrio)(full), result, (0, combi_1.optPrio)(link)), (0, combi_1.seq)(\"FEATURES IMPORTING\", expressions_1.MethodParamName, \"REQUEST\", expressions_1.NamespaceSimpleName, \"FOR\", expressions_1.NamespaceSimpleName, result), (0, combi_1.seq)(\"DETERMINE\", (0, combi_1.alt)(\"ON MODIFY\", \"ON SAVE\"), \"IMPORTING\", expressions_1.MethodParamName, \"FOR\", expressions_1.TypeName));\r\n // todo, this is only from version something\r\n const amdp = (0, combi_1.seq)(\"AMDP OPTIONS CDS SESSION CLIENT CURRENT\", (0, combi_1.optPrio)(expressions_1.MethodDefImporting), (0, combi_1.optPrio)(expressions_1.MethodDefExporting), (0, combi_1.optPrio)(expressions_1.MethodDefRaising));\r\n const ret = (0, combi_1.seq)((0, combi_1.altPrio)(\"CLASS-METHODS\", \"METHODS\"), expressions_1.MethodName, (0, combi_1.alt)((0, combi_1.seq)((0, combi_1.optPrio)(expressions_1.Abstract), expressions_1.EventHandler), parameters, testing, (0, combi_1.seq)(\"FOR\", (0, combi_1.alt)(tableFunction, ddl, behavior)), amdp, \"NOT AT END OF MODE\", (0, combi_1.optPrio)(expressions_1.Redefinition)));\r\n return ret;\r\n }\r\n}\r\nexports.MethodDef = MethodDef;\r\n//# sourceMappingURL=method_def.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/2_statements/statements/method_def.js?");
4607
4607
 
4608
4608
  /***/ }),
4609
4609
 
@@ -6704,7 +6704,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
6704
6704
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
6705
6705
 
6706
6706
  "use strict";
6707
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.BasicTypes = void 0;\r\n/* eslint-disable default-case */\r\nconst _typed_identifier_1 = __webpack_require__(/*! ../types/_typed_identifier */ \"./node_modules/@abaplint/core/build/src/abap/types/_typed_identifier.js\");\r\nconst Expressions = __webpack_require__(/*! ../2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst Statements = __webpack_require__(/*! ../2_statements/statements */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js\");\r\nconst Types = __webpack_require__(/*! ../types/basic */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/index.js\");\r\nconst _scope_type_1 = __webpack_require__(/*! ./_scope_type */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_scope_type.js\");\r\nconst _object_oriented_1 = __webpack_require__(/*! ./_object_oriented */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_object_oriented.js\");\r\nconst class_constant_1 = __webpack_require__(/*! ../types/class_constant */ \"./node_modules/@abaplint/core/build/src/abap/types/class_constant.js\");\r\nconst identifier_1 = __webpack_require__(/*! ../1_lexer/tokens/identifier */ \"./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/identifier.js\");\r\nconst _reference_1 = __webpack_require__(/*! ./_reference */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_reference.js\");\r\nconst basic_1 = __webpack_require__(/*! ../types/basic */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/index.js\");\r\nconst field_chain_1 = __webpack_require__(/*! ./expressions/field_chain */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/field_chain.js\");\r\nconst types_1 = __webpack_require__(/*! ../types */ \"./node_modules/@abaplint/core/build/src/abap/types/index.js\");\r\nconst expressions_1 = __webpack_require__(/*! ../2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst _builtin_1 = __webpack_require__(/*! ./_builtin */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_builtin.js\");\r\nconst position_1 = __webpack_require__(/*! ../../position */ \"./node_modules/@abaplint/core/build/src/position.js\");\r\nclass BasicTypes {\r\n constructor(filename, scope) {\r\n this.filename = filename;\r\n this.scope = scope;\r\n }\r\n lookupQualifiedName(name) {\r\n var _a;\r\n // argh, todo, rewrite this entire method, more argh\r\n if (name === undefined) {\r\n return undefined;\r\n }\r\n const found = this.scope.findType(name);\r\n if (found) {\r\n return found;\r\n }\r\n if (name.includes(\"=>\")) {\r\n const split = name.split(\"=>\");\r\n const ooName = split[0];\r\n const typeName = split[1];\r\n const oo = this.scope.findObjectDefinition(ooName);\r\n if (oo) {\r\n if (typeName.includes(\"-\")) {\r\n const split = typeName.split(\"-\");\r\n const subTypeName = split[0];\r\n const fieldName = split[1];\r\n const stru = oo.getTypeDefinitions().getByName(subTypeName);\r\n const struType = stru === null || stru === void 0 ? void 0 : stru.getType();\r\n if (stru && struType instanceof basic_1.StructureType) {\r\n const f = struType.getComponentByName(fieldName);\r\n if (f) {\r\n return new _typed_identifier_1.TypedIdentifier(stru.getToken(), stru.getFilename(), f);\r\n }\r\n }\r\n }\r\n else {\r\n const f = oo.getTypeDefinitions().getByName(typeName);\r\n if (f) {\r\n return f;\r\n }\r\n }\r\n }\r\n }\r\n else if (name.includes(\"-\")) {\r\n const split = name.split(\"-\");\r\n const typeName = split[0];\r\n const fieldName = split[1];\r\n const type = this.scope.findType(typeName);\r\n if (type) {\r\n const stru = type.getType();\r\n if (stru instanceof basic_1.StructureType) {\r\n const f = stru.getComponentByName(fieldName);\r\n if (f) {\r\n return new _typed_identifier_1.TypedIdentifier(type.getToken(), type.getFilename(), f);\r\n }\r\n }\r\n }\r\n }\r\n const lookup = this.scope.getDDIC().lookupNoVoid(name);\r\n const id = (_a = lookup === null || lookup === void 0 ? void 0 : lookup.object) === null || _a === void 0 ? void 0 : _a.getIdentifier();\r\n if (id && (lookup === null || lookup === void 0 ? void 0 : lookup.type)) {\r\n return new _typed_identifier_1.TypedIdentifier(id.getToken(), id.getFilename(), lookup.type);\r\n }\r\n const builtin = this.scope.getDDIC().lookupBuiltinType(name);\r\n if (builtin) {\r\n return new _typed_identifier_1.TypedIdentifier(new identifier_1.Identifier(new position_1.Position(1, 1), name), _builtin_1.BuiltIn.filename, builtin);\r\n }\r\n const type = this.scope.findTypePoolType(name);\r\n if (type) {\r\n return type;\r\n }\r\n return undefined;\r\n }\r\n resolveLikeName(node, headerLogic = true) {\r\n var _a;\r\n if (node === undefined) {\r\n return undefined;\r\n }\r\n let chain = node.findFirstExpression(Expressions.FieldChain);\r\n if (chain === undefined) {\r\n chain = node.findFirstExpression(Expressions.TypeName);\r\n }\r\n if (chain === undefined) {\r\n chain = node.findFirstExpression(Expressions.FieldSub);\r\n }\r\n if (chain === undefined) {\r\n chain = node.findFirstExpression(Expressions.SimpleFieldChain);\r\n }\r\n if (chain === undefined) {\r\n throw new Error(\"resolveLikeName, chain undefined\");\r\n }\r\n const fullName = chain.concatTokens();\r\n const children = [...chain.getChildren()];\r\n if (children.length === 0) {\r\n return new Types.UnknownType(\"Type error, could not resolve \\\"\" + fullName + \"\\\", resolveLikeName1\");\r\n }\r\n let type = undefined;\r\n if (children[1] && (children[1].getFirstToken().getStr() === \"=>\" || children[1].getFirstToken().getStr() === \"->\")) {\r\n type = new field_chain_1.FieldChain().runSyntax(chain, this.scope, this.filename, _reference_1.ReferenceType.TypeReference);\r\n }\r\n else {\r\n const name = children.shift().getFirstToken().getStr();\r\n let found = this.scope.findVariable(name);\r\n type = found === null || found === void 0 ? void 0 : found.getType();\r\n if (found === undefined) {\r\n found = this.scope.findExtraLikeType(name);\r\n type = found === null || found === void 0 ? void 0 : found.getType();\r\n }\r\n if (found) {\r\n this.scope.addReference(chain === null || chain === void 0 ? void 0 : chain.getFirstToken(), found, _reference_1.ReferenceType.TypeReference, this.filename);\r\n }\r\n if (type === undefined) {\r\n type = (_a = this.scope.getDDIC().lookupNoVoid(name)) === null || _a === void 0 ? void 0 : _a.type;\r\n }\r\n if (type === undefined && this.scope.isOO() === false && this.scope.getDDIC().inErrorNamespace(name) === false) {\r\n this.scope.addReference(chain.getChildren()[0].getFirstToken(), undefined, _reference_1.ReferenceType.VoidType, this.filename);\r\n return new Types.VoidType(name);\r\n }\r\n while (children.length > 0) {\r\n const child = children.shift();\r\n if (child.getFirstToken().getStr() === \"-\") {\r\n if (type instanceof Types.VoidType) {\r\n return type;\r\n }\r\n }\r\n else if (child.concatTokens() === \"[]\") {\r\n if (type instanceof Types.TableType) {\r\n type = new basic_1.TableType(type.getRowType(), { withHeader: false });\r\n }\r\n }\r\n else { // field name\r\n let sub = undefined;\r\n if (type instanceof Types.TableType) {\r\n type = type.getRowType();\r\n }\r\n if (type instanceof Types.StructureType) {\r\n sub = type.getComponentByName(child.getFirstToken().getStr());\r\n }\r\n if (sub === undefined) {\r\n return new Types.UnknownType(\"Type error, field not part of structure \" + fullName);\r\n }\r\n type = sub;\r\n }\r\n }\r\n if (type instanceof Types.VoidType) {\r\n return type;\r\n }\r\n else if (type instanceof basic_1.TableType\r\n && type.isWithHeader()\r\n && headerLogic === true) {\r\n type = type.getRowType();\r\n }\r\n else if (type instanceof Types.TableType\r\n && type.isWithHeader() === true\r\n && type.getRowType() instanceof Types.VoidType) {\r\n return type.getRowType();\r\n }\r\n }\r\n if (!type) {\r\n return new Types.UnknownType(\"Type error, could not resolve \\\"\" + fullName + \"\\\", resolveLikeName2\");\r\n }\r\n return type;\r\n }\r\n resolveTypeName(typeName, length, decimals, qualifiedName) {\r\n var _a;\r\n if (typeName === undefined) {\r\n return undefined;\r\n }\r\n let chain = this.resolveTypeChain(typeName);\r\n if (chain) {\r\n if (chain instanceof basic_1.CharacterType && qualifiedName) {\r\n chain = chain.cloneType(qualifiedName);\r\n }\r\n return chain;\r\n }\r\n const chainText = typeName.concatTokens().toUpperCase();\r\n const f = this.scope.getDDIC().lookupBuiltinType(chainText, length, decimals, qualifiedName);\r\n if (f !== undefined) {\r\n return f;\r\n }\r\n const typ = this.scope.findType(chainText);\r\n if (typ) {\r\n const token = typeName.getFirstToken();\r\n if (chainText.includes(\"~\")) {\r\n const name = chainText.split(\"~\")[0];\r\n const idef = this.scope.findInterfaceDefinition(name);\r\n if (idef) {\r\n this.scope.addReference(token, idef, _reference_1.ReferenceType.ObjectOrientedReference, this.filename, { ooType: \"INTF\", ooName: name });\r\n }\r\n }\r\n this.scope.addReference(token, typ, _reference_1.ReferenceType.TypeReference, this.filename);\r\n return typ.getType();\r\n }\r\n const type = (_a = this.scope.findTypePoolType(chainText)) === null || _a === void 0 ? void 0 : _a.getType();\r\n if (type) {\r\n // this.scope.addReference(typeName.getFirstToken(), type, ReferenceType.TypeReference, this.filename);\r\n return type;\r\n }\r\n const ddic = this.scope.getDDIC().lookup(chainText);\r\n if (ddic) {\r\n this.scope.getDDICReferences().addUsing(this.scope.getParentObj(), { object: ddic.object, token: typeName.getFirstToken(), filename: this.filename });\r\n if (ddic.type instanceof _typed_identifier_1.TypedIdentifier) {\r\n this.scope.addReference(typeName.getFirstToken(), ddic.type, _reference_1.ReferenceType.TypeReference, this.filename);\r\n }\r\n else if (ddic.type instanceof basic_1.VoidType) {\r\n this.scope.addReference(typeName.getFirstToken(), undefined, _reference_1.ReferenceType.VoidType, this.filename);\r\n }\r\n return ddic.type;\r\n }\r\n return undefined;\r\n }\r\n simpleType(node, qualifiedNamePrefix) {\r\n let nameExpr = node.findFirstExpression(Expressions.NamespaceSimpleName);\r\n if (nameExpr === undefined) {\r\n nameExpr = node.findFirstExpression(Expressions.DefinitionName);\r\n }\r\n if (nameExpr === undefined) {\r\n return undefined;\r\n }\r\n let name = nameExpr.getFirstToken();\r\n if (nameExpr.countTokens() > 1) { // workaround for names with dashes\r\n name = new identifier_1.Identifier(name.getStart(), nameExpr.concatTokens());\r\n }\r\n let qualifiedName = undefined;\r\n if (node.get() instanceof Statements.Type) {\r\n if (this.scope.isTypePool() === true) {\r\n qualifiedName = name.getStr();\r\n }\r\n else {\r\n qualifiedName = (qualifiedNamePrefix || \"\") + name.getStr();\r\n if (this.scope.getType() === _scope_type_1.ScopeType.ClassDefinition\r\n || this.scope.getType() === _scope_type_1.ScopeType.Interface) {\r\n qualifiedName = this.scope.getName() + \"=>\" + qualifiedName;\r\n }\r\n }\r\n }\r\n else if (qualifiedNamePrefix) {\r\n qualifiedName = qualifiedNamePrefix + qualifiedName;\r\n }\r\n const found = this.parseType(node, qualifiedName);\r\n if (found) {\r\n return new _typed_identifier_1.TypedIdentifier(name, this.filename, found);\r\n }\r\n return undefined;\r\n }\r\n parseTable(node, name) {\r\n var _a;\r\n const typename = node.findFirstExpression(Expressions.TypeName);\r\n const text = (_a = node.findFirstExpression(Expressions.TypeTable)) === null || _a === void 0 ? void 0 : _a.concatTokens().toUpperCase();\r\n if (text === undefined) {\r\n return undefined;\r\n }\r\n let type = undefined;\r\n if (text.includes(\" STANDARD TABLE \")) {\r\n type = basic_1.TableAccessType.standard;\r\n }\r\n else if (text.includes(\" SORTED TABLE \")) {\r\n type = basic_1.TableAccessType.sorted;\r\n }\r\n else if (text.includes(\" HASHED TABLE \")) {\r\n type = basic_1.TableAccessType.hashed;\r\n }\r\n const keyFields = [];\r\n if (type) {\r\n const keys = node.findFirstExpression(expressions_1.TypeTableKey);\r\n for (const k of (keys === null || keys === void 0 ? void 0 : keys.findDirectExpressions(expressions_1.FieldSub)) || []) {\r\n keyFields.push(k.concatTokens().toUpperCase());\r\n }\r\n }\r\n const options = {\r\n withHeader: text.includes(\" WITH HEADER LINE\"),\r\n type: type,\r\n isUnique: text.includes(\" WITH UNIQUE\"),\r\n keyFields: keyFields,\r\n };\r\n let found = undefined;\r\n if (text.startsWith(\"TYPE TABLE OF REF TO \")\r\n || text.startsWith(\"TYPE STANDARD TABLE OF REF TO \")\r\n || text.startsWith(\"TYPE SORTED TABLE OF REF TO \")\r\n || text.startsWith(\"TYPE HASHED TABLE OF REF TO \")) {\r\n found = this.resolveTypeRef(typename);\r\n if (found) {\r\n return new Types.TableType(found, options, name);\r\n }\r\n }\r\n else if (text.startsWith(\"TYPE TABLE OF \")\r\n || text.startsWith(\"TYPE STANDARD TABLE OF \")\r\n || text.startsWith(\"TYPE SORTED TABLE OF \")\r\n || text.startsWith(\"TYPE HASHED TABLE OF \")) {\r\n found = this.resolveTypeName(typename);\r\n if (found) {\r\n return new Types.TableType(found, options, name);\r\n }\r\n }\r\n else if (text.startsWith(\"LIKE TABLE OF \")\r\n || text.startsWith(\"LIKE STANDARD TABLE OF \")\r\n || text.startsWith(\"LIKE SORTED TABLE OF \")\r\n || text.startsWith(\"LIKE HASHED TABLE OF \")) {\r\n found = this.resolveLikeName(node);\r\n if (found) {\r\n return new Types.TableType(found, options, name);\r\n }\r\n }\r\n else if (text === \"TYPE STANDARD TABLE\"\r\n || text === \"TYPE SORTED TABLE\"\r\n || text === \"TYPE HASHED TABLE\"\r\n || text === \"TYPE INDEX TABLE\"\r\n || text === \"TYPE ANY TABLE\") {\r\n return new Types.TableType(new Types.AnyType(), options);\r\n }\r\n else if (text.startsWith(\"TYPE RANGE OF \")) {\r\n const sub = node.findFirstExpression(Expressions.TypeName);\r\n found = this.resolveTypeName(sub);\r\n if (found === undefined) {\r\n return new Types.UnknownType(\"TYPE RANGE OF, could not resolve type\");\r\n }\r\n const structure = new Types.StructureType([\r\n { name: \"sign\", type: new Types.CharacterType(1) },\r\n { name: \"option\", type: new Types.CharacterType(2) },\r\n { name: \"low\", type: found },\r\n { name: \"high\", type: found },\r\n ]);\r\n return new Types.TableType(structure, options, name);\r\n }\r\n else if (text.startsWith(\"LIKE RANGE OF \")) {\r\n const sub = node.findFirstExpression(Expressions.SimpleFieldChain);\r\n found = this.resolveLikeName(sub);\r\n if (found === undefined) {\r\n return new Types.UnknownType(\"LIKE RANGE OF, could not resolve type\");\r\n }\r\n const structure = new Types.StructureType([\r\n { name: \"sign\", type: new Types.CharacterType(1) },\r\n { name: \"option\", type: new Types.CharacterType(2) },\r\n { name: \"low\", type: found },\r\n { name: \"high\", type: found },\r\n ], name);\r\n return new Types.TableType(structure, options);\r\n }\r\n // fallback to old style syntax, OCCURS etc\r\n return this.parseType(node, name);\r\n }\r\n parseType(node, qualifiedName) {\r\n var _a, _b, _c, _d, _e, _f;\r\n const typeName = node.findFirstExpression(Expressions.TypeName);\r\n let text = (_a = node.findFirstExpression(Expressions.Type)) === null || _a === void 0 ? void 0 : _a.concatTokens().toUpperCase();\r\n if (text === undefined) {\r\n text = (_b = node.findFirstExpression(Expressions.TypeParam)) === null || _b === void 0 ? void 0 : _b.concatTokens().toUpperCase();\r\n }\r\n if (text === undefined) {\r\n text = (_c = node.findFirstExpression(Expressions.TypeTable)) === null || _c === void 0 ? void 0 : _c.concatTokens().toUpperCase();\r\n if ((text === null || text === void 0 ? void 0 : text.startsWith(\"TYPE\")) === false && (text === null || text === void 0 ? void 0 : text.startsWith(\"LIKE\")) === false) {\r\n text = \"TYPE\";\r\n }\r\n }\r\n if (text === undefined) {\r\n text = (_d = node.findFirstExpression(Expressions.FormParamType)) === null || _d === void 0 ? void 0 : _d.concatTokens().toUpperCase();\r\n }\r\n if (text === undefined) {\r\n text = \"TYPE\";\r\n }\r\n let found = undefined;\r\n if (text.startsWith(\"LIKE LINE OF \")) {\r\n const name = (_e = node.findFirstExpression(Expressions.FieldChain)) === null || _e === void 0 ? void 0 : _e.concatTokens();\r\n let e = node.findFirstExpression(Expressions.Type);\r\n if (e === undefined) {\r\n e = node.findFirstExpression(Expressions.FormParamType);\r\n }\r\n const type = this.resolveLikeName(e, false);\r\n if (type === undefined) {\r\n return new Types.UnknownType(\"Type error, could not resolve \\\"\" + name + \"\\\", parseType\");\r\n }\r\n else if (type instanceof Types.TableType) {\r\n return type.getRowType();\r\n }\r\n else if (type instanceof Types.VoidType) {\r\n return type;\r\n }\r\n else {\r\n return new Types.UnknownType(\"Type error, not a table type \" + name);\r\n }\r\n }\r\n else if (text.startsWith(\"LIKE REF TO \")) {\r\n const name = (_f = node.findFirstExpression(Expressions.FieldChain)) === null || _f === void 0 ? void 0 : _f.concatTokens();\r\n const type = this.resolveLikeName(node.findFirstExpression(Expressions.Type), false);\r\n if (type === undefined) {\r\n return new Types.UnknownType(\"Type error, could not resolve \\\"\" + name + \"\\\", parseType\");\r\n }\r\n return new Types.DataReference(type, name);\r\n }\r\n else if (text === \"TYPE STANDARD TABLE\"\r\n || text === \"TYPE SORTED TABLE\"\r\n || text === \"TYPE HASHED TABLE\"\r\n || text === \"TYPE INDEX TABLE\"\r\n || text === \"TYPE ANY TABLE\") {\r\n return new Types.TableType(new Types.AnyType(), { withHeader: node.concatTokens().toUpperCase().includes(\"WITH HEADER LINE\") });\r\n }\r\n else if (text.startsWith(\"LIKE \")) {\r\n let sub = node.findFirstExpression(Expressions.Type);\r\n if (sub === undefined) {\r\n sub = node.findFirstExpression(Expressions.FormParamType);\r\n }\r\n if (sub === undefined) {\r\n sub = node.findFirstExpression(Expressions.TypeParam);\r\n }\r\n if (sub === undefined) {\r\n sub = node.findFirstExpression(Expressions.FieldChain);\r\n }\r\n found = this.resolveLikeName(sub);\r\n if (found && this.isOccurs(node)) {\r\n found = new Types.TableType(found, { withHeader: text.includes(\"WITH HEADER LINE\") }, qualifiedName);\r\n }\r\n }\r\n else if (text.startsWith(\"TYPE LINE OF \")) {\r\n const sub = node.findFirstExpression(Expressions.TypeName);\r\n found = this.resolveTypeName(sub);\r\n if (found instanceof _typed_identifier_1.TypedIdentifier) {\r\n found = found.getType();\r\n }\r\n if (found instanceof Types.TableType) {\r\n return found.getRowType();\r\n }\r\n else if (found instanceof Types.VoidType) {\r\n return found;\r\n }\r\n else if (found instanceof Types.UnknownType) {\r\n return new Types.UnknownType(\"TYPE LINE OF, unknown type, \" + found.getError());\r\n }\r\n else {\r\n return new Types.UnknownType(\"TYPE LINE OF, unexpected type, \" + (found === null || found === void 0 ? void 0 : found.constructor.name));\r\n }\r\n }\r\n else if (text.startsWith(\"TYPE REF TO \")) {\r\n found = this.resolveTypeRef(typeName);\r\n }\r\n else if (text.startsWith(\"TYPE\")) {\r\n found = this.resolveTypeName(typeName, this.findLength(node), this.findDecimals(node), qualifiedName);\r\n const concat = node.concatTokens().toUpperCase();\r\n if (found && this.isOccurs(node)) {\r\n found = new Types.TableType(found, { withHeader: concat.includes(\" WITH HEADER LINE\") }, qualifiedName);\r\n }\r\n else if (found && concat.includes(\" WITH HEADER LINE\")) {\r\n if (found instanceof Types.VoidType) {\r\n found = new Types.TableType(found, { withHeader: true });\r\n }\r\n else if (!(found instanceof Types.TableType)) {\r\n throw new Error(\"WITH HEADER LINE can only be used with internal table\");\r\n }\r\n else {\r\n found = new Types.TableType(found.getRowType(), { withHeader: true });\r\n }\r\n }\r\n if (found === undefined && typeName === undefined) {\r\n let length = 1;\r\n const len = node.findDirectExpression(Expressions.ConstantFieldLength);\r\n if (len) {\r\n const int = len.findDirectExpression(Expressions.Integer);\r\n if (int) {\r\n length = parseInt(int.concatTokens(), 10);\r\n }\r\n }\r\n found = new Types.CharacterType(length, qualifiedName); // fallback\r\n if (this.isOccurs(node)) {\r\n found = new Types.TableType(found, { withHeader: concat.includes(\" WITH HEADER LINE\") }, qualifiedName);\r\n }\r\n }\r\n }\r\n return found;\r\n }\r\n /////////////////////\r\n isOccurs(node) {\r\n var _a;\r\n if (node.findDirectTokenByText(\"OCCURS\")) {\r\n return true;\r\n }\r\n else if ((_a = node.findFirstExpression(Expressions.TypeTable)) === null || _a === void 0 ? void 0 : _a.findDirectTokenByText(\"OCCURS\")) {\r\n return true;\r\n }\r\n return false;\r\n }\r\n // todo, rewrite this method\r\n resolveTypeChain(expr) {\r\n var _a;\r\n const chainText = expr.concatTokens().toUpperCase();\r\n if (chainText.includes(\"=>\") === false && chainText.includes(\"-\") === false) {\r\n return undefined;\r\n }\r\n let className;\r\n let rest = chainText;\r\n if (chainText.includes(\"=>\")) {\r\n const split = chainText.split(\"=>\");\r\n className = split[0];\r\n rest = split[1];\r\n }\r\n const subs = rest.split(\"-\");\r\n let foundType = undefined;\r\n if (className) {\r\n const split = chainText.split(\"=>\");\r\n const className = split[0];\r\n // the prefix might be itself\r\n if ((this.scope.getType() === _scope_type_1.ScopeType.Interface\r\n || this.scope.getType() === _scope_type_1.ScopeType.ClassDefinition)\r\n && this.scope.getName().toUpperCase() === className.toUpperCase()) {\r\n const foundId = this.scope.findType(subs[0]);\r\n foundType = foundId === null || foundId === void 0 ? void 0 : foundId.getType();\r\n if (foundType === undefined) {\r\n return new Types.UnknownType(\"Could not resolve type \" + chainText);\r\n }\r\n this.scope.addReference(expr.getTokens()[2], foundId, _reference_1.ReferenceType.TypeReference, this.filename);\r\n }\r\n else {\r\n // lookup in local and global scope\r\n const obj = this.scope.findObjectDefinition(className);\r\n if (obj === undefined && this.scope.getDDIC().inErrorNamespace(className) === false) {\r\n this.scope.addReference(expr.getFirstToken(), undefined, _reference_1.ReferenceType.ObjectOrientedVoidReference, this.filename, { ooName: className.toUpperCase() });\r\n return new Types.VoidType(className);\r\n }\r\n else if (obj === undefined) {\r\n return new Types.UnknownType(\"Could not resolve top \" + className + \", resolveTypeChain\");\r\n }\r\n const type = obj instanceof types_1.ClassDefinition ? \"CLAS\" : \"INTF\";\r\n this.scope.addReference(expr.getFirstToken(), obj, _reference_1.ReferenceType.ObjectOrientedReference, this.filename, { ooType: type, ooName: className });\r\n const byName = new _object_oriented_1.ObjectOriented(this.scope).searchTypeName(obj, subs[0]);\r\n foundType = byName === null || byName === void 0 ? void 0 : byName.getType();\r\n if (byName === undefined || foundType === undefined) {\r\n return new Types.UnknownType(subs[0] + \" not found in class or interface\");\r\n }\r\n this.scope.addReference(expr.getTokens()[2], byName, _reference_1.ReferenceType.TypeReference, this.filename);\r\n }\r\n }\r\n else {\r\n const found = this.scope.findType(subs[0]);\r\n foundType = found === null || found === void 0 ? void 0 : found.getType();\r\n if (foundType === undefined) {\r\n const typePoolType = (_a = this.scope.findTypePoolType(subs[0])) === null || _a === void 0 ? void 0 : _a.getType();\r\n if (typePoolType) {\r\n // this.scope.addReference(typeName.getFirstToken(), typePoolType, ReferenceType.TypeReference, this.filename);\r\n foundType = typePoolType;\r\n }\r\n if (foundType === undefined) {\r\n const f = this.scope.getDDIC().lookupTableOrView(subs[0]);\r\n this.scope.getDDICReferences().addUsing(this.scope.getParentObj(), { object: f.object, filename: this.filename, token: expr.getFirstToken() });\r\n if (f.type instanceof _typed_identifier_1.TypedIdentifier) {\r\n foundType = f.type.getType();\r\n }\r\n else {\r\n foundType = f.type;\r\n }\r\n }\r\n }\r\n else {\r\n this.scope.addReference(expr.getFirstToken(), found, _reference_1.ReferenceType.TypeReference, this.filename);\r\n }\r\n if (foundType === undefined && this.scope.getDDIC().inErrorNamespace(subs[0]) === false) {\r\n this.scope.addReference(expr.getFirstToken(), undefined, _reference_1.ReferenceType.VoidType, this.filename);\r\n return new Types.VoidType(subs[0]);\r\n }\r\n else if (foundType instanceof Types.VoidType) {\r\n this.scope.addReference(expr.getFirstToken(), undefined, _reference_1.ReferenceType.VoidType, this.filename);\r\n return foundType;\r\n }\r\n else if (foundType === undefined) {\r\n return new Types.UnknownType(\"Unknown type \" + subs[0]);\r\n }\r\n }\r\n subs.shift();\r\n while (subs.length > 0) {\r\n if (foundType instanceof Types.UnknownType\r\n || foundType instanceof Types.VoidType) {\r\n return foundType;\r\n }\r\n else if (!(foundType instanceof Types.StructureType)) {\r\n return new Types.UnknownType(\"Not a structured type\");\r\n }\r\n foundType = foundType.getComponentByName(subs[0]);\r\n subs.shift();\r\n }\r\n return foundType;\r\n }\r\n resolveConstantValue(expr) {\r\n var _a, _b;\r\n if (!(expr.get() instanceof Expressions.SimpleFieldChain)) {\r\n throw new Error(\"resolveConstantValue\");\r\n }\r\n const firstNode = expr.getFirstChild();\r\n const firstToken = firstNode.getFirstToken();\r\n const firstName = firstToken.getStr();\r\n if (firstNode.get() instanceof Expressions.Field) {\r\n const found = this.scope.findVariable(firstName);\r\n const val = found === null || found === void 0 ? void 0 : found.getValue();\r\n if (typeof val === \"string\") {\r\n this.scope.addReference(firstToken, found, _reference_1.ReferenceType.DataReadReference, this.filename);\r\n return val;\r\n }\r\n return undefined;\r\n }\r\n else if (firstNode.get() instanceof Expressions.ClassName\r\n && firstName.toLowerCase() === this.scope.getName().toLowerCase()\r\n && (this.scope.getType() === _scope_type_1.ScopeType.Interface\r\n || this.scope.getType() === _scope_type_1.ScopeType.ClassDefinition)) {\r\n const children = expr.getChildren();\r\n const token = (_a = children[2]) === null || _a === void 0 ? void 0 : _a.getFirstToken();\r\n const found = this.scope.findVariable(token.getStr());\r\n const val = found === null || found === void 0 ? void 0 : found.getValue();\r\n if (typeof val === \"string\") {\r\n this.scope.addReference(firstToken, found, _reference_1.ReferenceType.DataReadReference, this.filename);\r\n return val;\r\n }\r\n return undefined;\r\n }\r\n else if (firstNode.get() instanceof Expressions.ClassName) {\r\n const obj = this.scope.findObjectDefinition(firstName);\r\n if (obj === undefined) {\r\n if (this.scope.existsObject(firstName).found === true) {\r\n return undefined;\r\n }\r\n else if (this.scope.getDDIC().inErrorNamespace(firstName) === true) {\r\n throw new Error(\"resolveConstantValue, not found: \" + firstName);\r\n }\r\n else {\r\n this.scope.addReference(firstNode.getFirstToken(), undefined, _reference_1.ReferenceType.ObjectOrientedVoidReference, this.filename, { ooName: firstName.toUpperCase() });\r\n return undefined;\r\n }\r\n }\r\n const children = expr.getChildren();\r\n const token = (_b = children[2]) === null || _b === void 0 ? void 0 : _b.getFirstToken();\r\n const attr = token.getStr();\r\n const c = new _object_oriented_1.ObjectOriented(this.scope).searchConstantName(obj, attr);\r\n if (c instanceof class_constant_1.ClassConstant) {\r\n this.scope.addReference(token, c, _reference_1.ReferenceType.DataReadReference, this.filename);\r\n const val = c.getValue();\r\n if (typeof val === \"string\") {\r\n return val;\r\n }\r\n else if (typeof val === \"object\" && children[4]) {\r\n const name = children[4].getFirstToken().getStr();\r\n if (val[name] !== undefined) {\r\n return val[name];\r\n }\r\n }\r\n return undefined;\r\n }\r\n throw new Error(\"resolveConstantValue, constant not found \" + attr);\r\n }\r\n else {\r\n throw new Error(\"resolveConstantValue, unexpected structure\");\r\n }\r\n }\r\n resolveTypeRef(chain) {\r\n var _a;\r\n if (chain === undefined) {\r\n return undefined;\r\n }\r\n const name = chain.getFirstToken().getStr();\r\n if (chain.getAllTokens().length === 1) {\r\n if (name.toUpperCase() === \"OBJECT\") {\r\n return new Types.GenericObjectReferenceType();\r\n }\r\n const search = this.scope.existsObject(name);\r\n if (search.found === true && search.id) {\r\n this.scope.addReference(chain.getFirstToken(), search.id, _reference_1.ReferenceType.ObjectOrientedReference, this.filename, { ooType: search.ooType, ooName: name });\r\n return new Types.ObjectReferenceType(search.id, name);\r\n }\r\n }\r\n const found = this.resolveTypeName(chain);\r\n if (found && !(found instanceof Types.UnknownType) && !(found instanceof Types.VoidType)) {\r\n return new Types.DataReference(found);\r\n }\r\n else if (chain.concatTokens().toUpperCase() === \"DATA\") {\r\n return new Types.DataReference(new Types.AnyType());\r\n }\r\n if (this.scope.isBadiDef(name) === true) {\r\n return new Types.VoidType(name);\r\n }\r\n if (((_a = this.scope.getDDIC()) === null || _a === void 0 ? void 0 : _a.inErrorNamespace(name)) === false) {\r\n // this.scope.addReference(chain.getFirstToken(), undefined, ReferenceType.VoidType, this.filename);\r\n return new Types.VoidType(name);\r\n }\r\n return new Types.UnknownType(\"REF, unable to resolve \" + name);\r\n }\r\n findValue(node) {\r\n const val = node.findFirstExpression(Expressions.Value);\r\n if (val === undefined) {\r\n throw new Error(\"VALUE missing in expression\");\r\n }\r\n if (val.concatTokens().toUpperCase() === \"VALUE IS INITIAL\") {\r\n return undefined;\r\n }\r\n const constant = val.findFirstExpression(Expressions.Constant);\r\n if (constant) {\r\n return constant.concatTokens();\r\n }\r\n const chain = val.findFirstExpression(Expressions.SimpleFieldChain);\r\n if (chain) {\r\n return this.resolveConstantValue(chain);\r\n }\r\n throw new Error(\"findValue, unexpected\");\r\n }\r\n findDecimals(node) {\r\n var _a, _b;\r\n const dec = (_b = (_a = node.findDirectExpression(Expressions.Decimals)) === null || _a === void 0 ? void 0 : _a.findDirectExpression(Expressions.Integer)) === null || _b === void 0 ? void 0 : _b.concatTokens();\r\n if (dec) {\r\n return parseInt(dec, 10);\r\n }\r\n return undefined;\r\n }\r\n findLength(node) {\r\n const val = node.findFirstExpression(Expressions.Length);\r\n const flen = node.findFirstExpression(Expressions.ConstantFieldLength);\r\n if (val && flen) {\r\n throw new Error(\"Only specify length once\");\r\n }\r\n if (flen) {\r\n const cintExpr = flen.findFirstExpression(Expressions.Integer);\r\n if (cintExpr) {\r\n return this.parseInt(cintExpr.concatTokens());\r\n }\r\n const cchain = flen.findFirstExpression(Expressions.SimpleFieldChain);\r\n if (cchain) {\r\n const val = this.resolveConstantValue(cchain);\r\n return this.parseInt(val);\r\n }\r\n }\r\n if (val === undefined) {\r\n return 1;\r\n }\r\n const intExpr = val.findFirstExpression(Expressions.Integer);\r\n if (intExpr) {\r\n return this.parseInt(intExpr.concatTokens());\r\n }\r\n const strExpr = val.findFirstExpression(Expressions.ConstantString);\r\n if (strExpr) {\r\n return this.parseInt(strExpr.concatTokens());\r\n }\r\n const chain = val.findFirstExpression(Expressions.SimpleFieldChain);\r\n if (chain) {\r\n const val = this.resolveConstantValue(chain);\r\n return this.parseInt(val);\r\n }\r\n throw new Error(\"Unexpected, findLength\");\r\n }\r\n parseInt(text) {\r\n if (text === undefined) {\r\n return undefined;\r\n }\r\n if (text.startsWith(\"'\")) {\r\n text = text.split(\"'\")[1];\r\n }\r\n else if (text.startsWith(\"`\")) {\r\n text = text.split(\"`\")[1];\r\n }\r\n return parseInt(text, 10);\r\n }\r\n}\r\nexports.BasicTypes = BasicTypes;\r\n//# sourceMappingURL=basic_types.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/5_syntax/basic_types.js?");
6707
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.BasicTypes = void 0;\r\n/* eslint-disable default-case */\r\nconst _typed_identifier_1 = __webpack_require__(/*! ../types/_typed_identifier */ \"./node_modules/@abaplint/core/build/src/abap/types/_typed_identifier.js\");\r\nconst Expressions = __webpack_require__(/*! ../2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst Statements = __webpack_require__(/*! ../2_statements/statements */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js\");\r\nconst Types = __webpack_require__(/*! ../types/basic */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/index.js\");\r\nconst _scope_type_1 = __webpack_require__(/*! ./_scope_type */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_scope_type.js\");\r\nconst _object_oriented_1 = __webpack_require__(/*! ./_object_oriented */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_object_oriented.js\");\r\nconst class_constant_1 = __webpack_require__(/*! ../types/class_constant */ \"./node_modules/@abaplint/core/build/src/abap/types/class_constant.js\");\r\nconst identifier_1 = __webpack_require__(/*! ../1_lexer/tokens/identifier */ \"./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/identifier.js\");\r\nconst _reference_1 = __webpack_require__(/*! ./_reference */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_reference.js\");\r\nconst basic_1 = __webpack_require__(/*! ../types/basic */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/index.js\");\r\nconst field_chain_1 = __webpack_require__(/*! ./expressions/field_chain */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/field_chain.js\");\r\nconst types_1 = __webpack_require__(/*! ../types */ \"./node_modules/@abaplint/core/build/src/abap/types/index.js\");\r\nconst expressions_1 = __webpack_require__(/*! ../2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst _builtin_1 = __webpack_require__(/*! ./_builtin */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_builtin.js\");\r\nconst position_1 = __webpack_require__(/*! ../../position */ \"./node_modules/@abaplint/core/build/src/position.js\");\r\nclass BasicTypes {\r\n constructor(filename, scope) {\r\n this.filename = filename;\r\n this.scope = scope;\r\n }\r\n lookupQualifiedName(name) {\r\n var _a;\r\n // argh, todo, rewrite this entire method, more argh\r\n if (name === undefined) {\r\n return undefined;\r\n }\r\n const found = this.scope.findType(name);\r\n if (found) {\r\n return found;\r\n }\r\n if (name.includes(\"=>\")) {\r\n const split = name.split(\"=>\");\r\n const ooName = split[0];\r\n const typeName = split[1];\r\n const oo = this.scope.findObjectDefinition(ooName);\r\n if (oo) {\r\n if (typeName.includes(\"-\")) {\r\n const split = typeName.split(\"-\");\r\n const subTypeName = split[0];\r\n const fieldName = split[1];\r\n const stru = oo.getTypeDefinitions().getByName(subTypeName);\r\n const struType = stru === null || stru === void 0 ? void 0 : stru.getType();\r\n if (stru && struType instanceof basic_1.StructureType) {\r\n const f = struType.getComponentByName(fieldName);\r\n if (f) {\r\n return new _typed_identifier_1.TypedIdentifier(stru.getToken(), stru.getFilename(), f);\r\n }\r\n }\r\n }\r\n else {\r\n const f = oo.getTypeDefinitions().getByName(typeName);\r\n if (f) {\r\n return f;\r\n }\r\n }\r\n }\r\n }\r\n else if (name.includes(\"-\")) {\r\n const split = name.split(\"-\");\r\n const typeName = split[0];\r\n const fieldName = split[1];\r\n const type = this.scope.findType(typeName);\r\n if (type) {\r\n const stru = type.getType();\r\n if (stru instanceof basic_1.StructureType) {\r\n const f = stru.getComponentByName(fieldName);\r\n if (f) {\r\n return new _typed_identifier_1.TypedIdentifier(type.getToken(), type.getFilename(), f);\r\n }\r\n }\r\n }\r\n }\r\n const lookup = this.scope.getDDIC().lookupNoVoid(name);\r\n const id = (_a = lookup === null || lookup === void 0 ? void 0 : lookup.object) === null || _a === void 0 ? void 0 : _a.getIdentifier();\r\n if (id && (lookup === null || lookup === void 0 ? void 0 : lookup.type)) {\r\n return new _typed_identifier_1.TypedIdentifier(id.getToken(), id.getFilename(), lookup.type);\r\n }\r\n const builtin = this.scope.getDDIC().lookupBuiltinType(name);\r\n if (builtin) {\r\n return new _typed_identifier_1.TypedIdentifier(new identifier_1.Identifier(new position_1.Position(1, 1), name), _builtin_1.BuiltIn.filename, builtin);\r\n }\r\n const type = this.scope.findTypePoolType(name);\r\n if (type) {\r\n return type;\r\n }\r\n return undefined;\r\n }\r\n resolveLikeName(node, headerLogic = true) {\r\n var _a;\r\n if (node === undefined) {\r\n return undefined;\r\n }\r\n let chain = node.findFirstExpression(Expressions.FieldChain);\r\n if (chain === undefined) {\r\n chain = node.findFirstExpression(Expressions.TypeName);\r\n }\r\n if (chain === undefined) {\r\n chain = node.findFirstExpression(Expressions.FieldSub);\r\n }\r\n if (chain === undefined) {\r\n chain = node.findFirstExpression(Expressions.SimpleFieldChain);\r\n }\r\n if (chain === undefined) {\r\n throw new Error(\"resolveLikeName, chain undefined\");\r\n }\r\n const fullName = chain.concatTokens();\r\n const children = [...chain.getChildren()];\r\n if (children.length === 0) {\r\n return new Types.UnknownType(\"Type error, could not resolve \\\"\" + fullName + \"\\\", resolveLikeName1\");\r\n }\r\n let type = undefined;\r\n if (children[1] && (children[1].getFirstToken().getStr() === \"=>\" || children[1].getFirstToken().getStr() === \"->\")) {\r\n type = new field_chain_1.FieldChain().runSyntax(chain, this.scope, this.filename, _reference_1.ReferenceType.TypeReference);\r\n }\r\n else {\r\n const name = children.shift().getFirstToken().getStr();\r\n let found = this.scope.findVariable(name);\r\n type = found === null || found === void 0 ? void 0 : found.getType();\r\n if (found === undefined) {\r\n found = this.scope.findExtraLikeType(name);\r\n type = found === null || found === void 0 ? void 0 : found.getType();\r\n }\r\n if (found) {\r\n this.scope.addReference(chain === null || chain === void 0 ? void 0 : chain.getFirstToken(), found, _reference_1.ReferenceType.TypeReference, this.filename);\r\n }\r\n if (type === undefined) {\r\n type = (_a = this.scope.getDDIC().lookupNoVoid(name)) === null || _a === void 0 ? void 0 : _a.type;\r\n }\r\n if (type === undefined && this.scope.isOO() === false && this.scope.getDDIC().inErrorNamespace(name) === false) {\r\n this.scope.addReference(chain.getChildren()[0].getFirstToken(), undefined, _reference_1.ReferenceType.VoidType, this.filename);\r\n return new Types.VoidType(name);\r\n }\r\n while (children.length > 0) {\r\n const child = children.shift();\r\n if (child.getFirstToken().getStr() === \"-\") {\r\n if (type instanceof Types.VoidType) {\r\n return type;\r\n }\r\n }\r\n else if (child.concatTokens() === \"[]\") {\r\n if (type instanceof Types.TableType) {\r\n type = new basic_1.TableType(type.getRowType(), { withHeader: false });\r\n }\r\n }\r\n else { // field name\r\n let sub = undefined;\r\n if (type instanceof Types.TableType) {\r\n type = type.getRowType();\r\n }\r\n if (type instanceof Types.StructureType) {\r\n sub = type.getComponentByName(child.getFirstToken().getStr());\r\n }\r\n if (sub === undefined) {\r\n return new Types.UnknownType(\"Type error, field not part of structure \" + fullName);\r\n }\r\n type = sub;\r\n }\r\n }\r\n if (type instanceof Types.VoidType) {\r\n return type;\r\n }\r\n else if (type instanceof basic_1.TableType\r\n && type.isWithHeader()\r\n && headerLogic === true) {\r\n type = type.getRowType();\r\n }\r\n else if (type instanceof Types.TableType\r\n && type.isWithHeader() === true\r\n && type.getRowType() instanceof Types.VoidType) {\r\n return type.getRowType();\r\n }\r\n }\r\n if (!type) {\r\n return new Types.UnknownType(\"Type error, could not resolve \\\"\" + fullName + \"\\\", resolveLikeName2\");\r\n }\r\n return type;\r\n }\r\n resolveTypeName(typeName, length, decimals, qualifiedName) {\r\n var _a;\r\n if (typeName === undefined) {\r\n return undefined;\r\n }\r\n let chain = this.resolveTypeChain(typeName);\r\n if (chain) {\r\n if (chain instanceof basic_1.CharacterType && qualifiedName) {\r\n chain = chain.cloneType(qualifiedName);\r\n }\r\n return chain;\r\n }\r\n const chainText = typeName.concatTokens().toUpperCase();\r\n const f = this.scope.getDDIC().lookupBuiltinType(chainText, length, decimals, qualifiedName);\r\n if (f !== undefined) {\r\n return f;\r\n }\r\n const typ = this.scope.findType(chainText);\r\n if (typ) {\r\n const token = typeName.getFirstToken();\r\n if (chainText.includes(\"~\")) {\r\n const name = chainText.split(\"~\")[0];\r\n const idef = this.scope.findInterfaceDefinition(name);\r\n if (idef) {\r\n this.scope.addReference(token, idef, _reference_1.ReferenceType.ObjectOrientedReference, this.filename, { ooType: \"INTF\", ooName: name });\r\n }\r\n }\r\n this.scope.addReference(token, typ, _reference_1.ReferenceType.TypeReference, this.filename);\r\n return typ.getType();\r\n }\r\n const type = (_a = this.scope.findTypePoolType(chainText)) === null || _a === void 0 ? void 0 : _a.getType();\r\n if (type) {\r\n // this.scope.addReference(typeName.getFirstToken(), type, ReferenceType.TypeReference, this.filename);\r\n return type;\r\n }\r\n const ddic = this.scope.getDDIC().lookup(chainText);\r\n if (ddic) {\r\n this.scope.getDDICReferences().addUsing(this.scope.getParentObj(), { object: ddic.object, token: typeName.getFirstToken(), filename: this.filename });\r\n if (ddic.type instanceof _typed_identifier_1.TypedIdentifier) {\r\n this.scope.addReference(typeName.getFirstToken(), ddic.type, _reference_1.ReferenceType.TypeReference, this.filename);\r\n }\r\n else if (ddic.type instanceof basic_1.VoidType) {\r\n this.scope.addReference(typeName.getFirstToken(), undefined, _reference_1.ReferenceType.VoidType, this.filename);\r\n }\r\n return ddic.type;\r\n }\r\n return undefined;\r\n }\r\n simpleType(node, qualifiedNamePrefix) {\r\n let nameExpr = node.findFirstExpression(Expressions.NamespaceSimpleName);\r\n if (nameExpr === undefined) {\r\n nameExpr = node.findFirstExpression(Expressions.DefinitionName);\r\n }\r\n if (nameExpr === undefined) {\r\n return undefined;\r\n }\r\n let name = nameExpr.getFirstToken();\r\n if (nameExpr.countTokens() > 1) { // workaround for names with dashes\r\n name = new identifier_1.Identifier(name.getStart(), nameExpr.concatTokens());\r\n }\r\n let qualifiedName = undefined;\r\n if (node.get() instanceof Statements.Type) {\r\n if (this.scope.isTypePool() === true) {\r\n qualifiedName = name.getStr();\r\n }\r\n else {\r\n qualifiedName = (qualifiedNamePrefix || \"\") + name.getStr();\r\n if (this.scope.getType() === _scope_type_1.ScopeType.ClassDefinition\r\n || this.scope.getType() === _scope_type_1.ScopeType.Interface) {\r\n qualifiedName = this.scope.getName() + \"=>\" + qualifiedName;\r\n }\r\n }\r\n }\r\n else if (qualifiedNamePrefix) {\r\n qualifiedName = qualifiedNamePrefix + qualifiedName;\r\n }\r\n const found = this.parseType(node, qualifiedName);\r\n if (found) {\r\n return new _typed_identifier_1.TypedIdentifier(name, this.filename, found);\r\n }\r\n return undefined;\r\n }\r\n parseTable(node, name) {\r\n var _a;\r\n const typename = node.findFirstExpression(Expressions.TypeName);\r\n const text = (_a = node.findFirstExpression(Expressions.TypeTable)) === null || _a === void 0 ? void 0 : _a.concatTokens().toUpperCase();\r\n if (text === undefined) {\r\n return undefined;\r\n }\r\n let type = undefined;\r\n if (text.includes(\" STANDARD TABLE \")) {\r\n type = basic_1.TableAccessType.standard;\r\n }\r\n else if (text.includes(\" SORTED TABLE \")) {\r\n type = basic_1.TableAccessType.sorted;\r\n }\r\n else if (text.includes(\" HASHED TABLE \")) {\r\n type = basic_1.TableAccessType.hashed;\r\n }\r\n const keyFields = [];\r\n if (type) {\r\n const keys = node.findFirstExpression(expressions_1.TypeTableKey);\r\n for (const k of (keys === null || keys === void 0 ? void 0 : keys.findDirectExpressions(expressions_1.FieldSub)) || []) {\r\n keyFields.push(k.concatTokens().toUpperCase());\r\n }\r\n }\r\n const options = {\r\n withHeader: text.includes(\" WITH HEADER LINE\"),\r\n type: type,\r\n isUnique: text.includes(\" WITH UNIQUE\"),\r\n keyFields: keyFields,\r\n };\r\n let found = undefined;\r\n if (text.startsWith(\"TYPE TABLE OF REF TO \")\r\n || text.startsWith(\"TYPE STANDARD TABLE OF REF TO \")\r\n || text.startsWith(\"TYPE SORTED TABLE OF REF TO \")\r\n || text.startsWith(\"TYPE HASHED TABLE OF REF TO \")) {\r\n found = this.resolveTypeRef(typename);\r\n if (found) {\r\n return new Types.TableType(found, options, name);\r\n }\r\n }\r\n else if (text.startsWith(\"TYPE TABLE OF \")\r\n || text.startsWith(\"TYPE STANDARD TABLE OF \")\r\n || text.startsWith(\"TYPE SORTED TABLE OF \")\r\n || text.startsWith(\"TYPE HASHED TABLE OF \")) {\r\n found = this.resolveTypeName(typename);\r\n if (found) {\r\n return new Types.TableType(found, options, name);\r\n }\r\n }\r\n else if (text.startsWith(\"LIKE TABLE OF \")\r\n || text.startsWith(\"LIKE STANDARD TABLE OF \")\r\n || text.startsWith(\"LIKE SORTED TABLE OF \")\r\n || text.startsWith(\"LIKE HASHED TABLE OF \")) {\r\n found = this.resolveLikeName(node);\r\n if (found) {\r\n return new Types.TableType(found, options, name);\r\n }\r\n }\r\n else if (text === \"TYPE STANDARD TABLE\"\r\n || text === \"TYPE SORTED TABLE\"\r\n || text === \"TYPE HASHED TABLE\"\r\n || text === \"TYPE INDEX TABLE\"\r\n || text === \"TYPE ANY TABLE\") {\r\n return new Types.TableType(new Types.AnyType(), options);\r\n }\r\n else if (text.startsWith(\"TYPE RANGE OF \")) {\r\n const sub = node.findFirstExpression(Expressions.TypeName);\r\n found = this.resolveTypeName(sub);\r\n if (found === undefined) {\r\n return new Types.UnknownType(\"TYPE RANGE OF, could not resolve type\");\r\n }\r\n const structure = new Types.StructureType([\r\n { name: \"sign\", type: new Types.CharacterType(1) },\r\n { name: \"option\", type: new Types.CharacterType(2) },\r\n { name: \"low\", type: found },\r\n { name: \"high\", type: found },\r\n ]);\r\n return new Types.TableType(structure, options, name);\r\n }\r\n else if (text.startsWith(\"LIKE RANGE OF \")) {\r\n const sub = node.findFirstExpression(Expressions.SimpleFieldChain);\r\n found = this.resolveLikeName(sub);\r\n if (found === undefined) {\r\n return new Types.UnknownType(\"LIKE RANGE OF, could not resolve type\");\r\n }\r\n const structure = new Types.StructureType([\r\n { name: \"sign\", type: new Types.CharacterType(1) },\r\n { name: \"option\", type: new Types.CharacterType(2) },\r\n { name: \"low\", type: found },\r\n { name: \"high\", type: found },\r\n ], name);\r\n return new Types.TableType(structure, options);\r\n }\r\n // fallback to old style syntax, OCCURS etc\r\n return this.parseType(node, name);\r\n }\r\n parseType(node, qualifiedName) {\r\n var _a, _b, _c, _d, _e, _f;\r\n const typeName = node.findFirstExpression(Expressions.TypeName);\r\n let text = (_a = node.findFirstExpression(Expressions.Type)) === null || _a === void 0 ? void 0 : _a.concatTokens().toUpperCase();\r\n if (text === undefined) {\r\n text = (_b = node.findFirstExpression(Expressions.TypeParam)) === null || _b === void 0 ? void 0 : _b.concatTokens().toUpperCase();\r\n }\r\n if (text === undefined) {\r\n text = (_c = node.findFirstExpression(Expressions.TypeTable)) === null || _c === void 0 ? void 0 : _c.concatTokens().toUpperCase();\r\n if ((text === null || text === void 0 ? void 0 : text.startsWith(\"TYPE\")) === false && (text === null || text === void 0 ? void 0 : text.startsWith(\"LIKE\")) === false) {\r\n text = \"TYPE\";\r\n }\r\n }\r\n if (text === undefined) {\r\n text = (_d = node.findFirstExpression(Expressions.FormParamType)) === null || _d === void 0 ? void 0 : _d.concatTokens().toUpperCase();\r\n }\r\n if (text === undefined) {\r\n text = \"TYPE\";\r\n }\r\n let found = undefined;\r\n if (text.startsWith(\"LIKE LINE OF \")) {\r\n const name = (_e = node.findFirstExpression(Expressions.FieldChain)) === null || _e === void 0 ? void 0 : _e.concatTokens();\r\n let e = node.findFirstExpression(Expressions.Type);\r\n if (e === undefined) {\r\n e = node.findFirstExpression(Expressions.FormParamType);\r\n }\r\n const type = this.resolveLikeName(e, false);\r\n if (type === undefined) {\r\n return new Types.UnknownType(\"Type error, could not resolve \\\"\" + name + \"\\\", parseType\");\r\n }\r\n else if (type instanceof Types.TableType) {\r\n return type.getRowType();\r\n }\r\n else if (type instanceof Types.VoidType) {\r\n return type;\r\n }\r\n else {\r\n return new Types.UnknownType(\"Type error, not a table type \" + name);\r\n }\r\n }\r\n else if (text.startsWith(\"LIKE REF TO \")) {\r\n const name = (_f = node.findFirstExpression(Expressions.FieldChain)) === null || _f === void 0 ? void 0 : _f.concatTokens();\r\n const type = this.resolveLikeName(node.findFirstExpression(Expressions.Type), false);\r\n if (type === undefined) {\r\n return new Types.UnknownType(\"Type error, could not resolve \\\"\" + name + \"\\\", parseType\");\r\n }\r\n return new Types.DataReference(type, name);\r\n }\r\n else if (text === \"TYPE STANDARD TABLE\"\r\n || text === \"TYPE SORTED TABLE\"\r\n || text === \"TYPE HASHED TABLE\"\r\n || text === \"TYPE INDEX TABLE\"\r\n || text === \"TYPE ANY TABLE\") {\r\n return new Types.TableType(new Types.AnyType(), { withHeader: node.concatTokens().toUpperCase().includes(\"WITH HEADER LINE\") });\r\n }\r\n else if (text.startsWith(\"LIKE \")) {\r\n let sub = node.findFirstExpression(Expressions.Type);\r\n if (sub === undefined) {\r\n sub = node.findFirstExpression(Expressions.FormParamType);\r\n }\r\n if (sub === undefined) {\r\n sub = node.findFirstExpression(Expressions.TypeParam);\r\n }\r\n if (sub === undefined) {\r\n sub = node.findFirstExpression(Expressions.FieldChain);\r\n }\r\n found = this.resolveLikeName(sub);\r\n if (found && this.isOccurs(node)) {\r\n found = new Types.TableType(found, { withHeader: text.includes(\"WITH HEADER LINE\") }, qualifiedName);\r\n }\r\n }\r\n else if (text.startsWith(\"TYPE LINE OF \")) {\r\n const sub = node.findFirstExpression(Expressions.TypeName);\r\n found = this.resolveTypeName(sub);\r\n if (found instanceof _typed_identifier_1.TypedIdentifier) {\r\n found = found.getType();\r\n }\r\n if (found instanceof Types.TableType) {\r\n return found.getRowType();\r\n }\r\n else if (found instanceof Types.VoidType) {\r\n return found;\r\n }\r\n else if (found instanceof Types.UnknownType) {\r\n return new Types.UnknownType(\"TYPE LINE OF, unknown type, \" + found.getError());\r\n }\r\n else {\r\n return new Types.UnknownType(\"TYPE LINE OF, unexpected type, \" + (found === null || found === void 0 ? void 0 : found.constructor.name));\r\n }\r\n }\r\n else if (text.startsWith(\"TYPE REF TO \")) {\r\n found = this.resolveTypeRef(typeName);\r\n }\r\n else if (text.startsWith(\"TYPE\")) {\r\n found = this.resolveTypeName(typeName, this.findLength(node), this.findDecimals(node), qualifiedName);\r\n const concat = node.concatTokens().toUpperCase();\r\n if (found && this.isOccurs(node)) {\r\n found = new Types.TableType(found, { withHeader: concat.includes(\" WITH HEADER LINE\") }, qualifiedName);\r\n }\r\n else if (found && concat.includes(\" WITH HEADER LINE\")) {\r\n if (found instanceof Types.VoidType) {\r\n found = new Types.TableType(found, { withHeader: true });\r\n }\r\n else if (!(found instanceof Types.TableType)) {\r\n throw new Error(\"WITH HEADER LINE can only be used with internal table\");\r\n }\r\n else {\r\n found = new Types.TableType(found.getRowType(), { withHeader: true });\r\n }\r\n }\r\n if (found === undefined && typeName === undefined) {\r\n let length = 1;\r\n const len = node.findDirectExpression(Expressions.ConstantFieldLength);\r\n if (len) {\r\n const int = len.findDirectExpression(Expressions.Integer);\r\n if (int) {\r\n length = parseInt(int.concatTokens(), 10);\r\n }\r\n }\r\n found = new Types.CharacterType(length, qualifiedName); // fallback\r\n if (this.isOccurs(node)) {\r\n found = new Types.TableType(found, { withHeader: concat.includes(\" WITH HEADER LINE\") }, qualifiedName);\r\n }\r\n }\r\n }\r\n return found;\r\n }\r\n /////////////////////\r\n isOccurs(node) {\r\n var _a;\r\n if (node.findDirectTokenByText(\"OCCURS\")) {\r\n return true;\r\n }\r\n else if ((_a = node.findFirstExpression(Expressions.TypeTable)) === null || _a === void 0 ? void 0 : _a.findDirectTokenByText(\"OCCURS\")) {\r\n return true;\r\n }\r\n return false;\r\n }\r\n // todo, rewrite this method\r\n resolveTypeChain(expr) {\r\n var _a;\r\n const chainText = expr.concatTokens().toUpperCase();\r\n if (chainText.includes(\"=>\") === false && chainText.includes(\"-\") === false) {\r\n return undefined;\r\n }\r\n let className;\r\n let rest = chainText;\r\n if (chainText.includes(\"=>\")) {\r\n const split = chainText.split(\"=>\");\r\n className = split[0];\r\n rest = split[1];\r\n }\r\n const subs = rest.split(\"-\");\r\n let foundType = undefined;\r\n if (className) {\r\n const split = chainText.split(\"=>\");\r\n const className = split[0];\r\n // the prefix might be itself\r\n if ((this.scope.getType() === _scope_type_1.ScopeType.Interface\r\n || this.scope.getType() === _scope_type_1.ScopeType.ClassDefinition)\r\n && this.scope.getName().toUpperCase() === className.toUpperCase()) {\r\n const foundId = this.scope.findType(subs[0]);\r\n foundType = foundId === null || foundId === void 0 ? void 0 : foundId.getType();\r\n if (foundType === undefined) {\r\n return new Types.UnknownType(\"Could not resolve type \" + chainText);\r\n }\r\n this.scope.addReference(expr.getTokens()[2], foundId, _reference_1.ReferenceType.TypeReference, this.filename);\r\n }\r\n else {\r\n // lookup in local and global scope\r\n const obj = this.scope.findObjectDefinition(className);\r\n if (obj === undefined && this.scope.getDDIC().inErrorNamespace(className) === false) {\r\n this.scope.addReference(expr.getFirstToken(), undefined, _reference_1.ReferenceType.ObjectOrientedVoidReference, this.filename, { ooName: className.toUpperCase() });\r\n return new Types.VoidType(className);\r\n }\r\n else if (obj === undefined) {\r\n return new Types.UnknownType(\"Could not resolve top \" + className + \", resolveTypeChain\");\r\n }\r\n const type = obj instanceof types_1.ClassDefinition ? \"CLAS\" : \"INTF\";\r\n this.scope.addReference(expr.getFirstToken(), obj, _reference_1.ReferenceType.ObjectOrientedReference, this.filename, { ooType: type, ooName: className });\r\n const byName = new _object_oriented_1.ObjectOriented(this.scope).searchTypeName(obj, subs[0]);\r\n foundType = byName === null || byName === void 0 ? void 0 : byName.getType();\r\n if (byName === undefined || foundType === undefined) {\r\n return new Types.UnknownType(subs[0] + \" not found in class or interface\");\r\n }\r\n this.scope.addReference(expr.getTokens()[2], byName, _reference_1.ReferenceType.TypeReference, this.filename);\r\n }\r\n }\r\n else if (chainText.includes(\"->\")) {\r\n const [varName, typeName] = chainText.split(\"->\");\r\n const varVar = this.scope.findVariable(varName);\r\n const foo = varVar === null || varVar === void 0 ? void 0 : varVar.getType();\r\n if (foo instanceof basic_1.ObjectReferenceType) {\r\n const id = foo.getIdentifier();\r\n const type = id instanceof types_1.ClassDefinition ? \"CLAS\" : \"INTF\";\r\n this.scope.addReference(expr.getFirstToken(), id, _reference_1.ReferenceType.ObjectOrientedReference, this.filename, { ooType: type, ooName: id.getName() });\r\n if (id instanceof types_1.ClassDefinition) {\r\n const byName = new _object_oriented_1.ObjectOriented(this.scope).searchTypeName(id, typeName);\r\n foundType = byName === null || byName === void 0 ? void 0 : byName.getType();\r\n if (byName === undefined || foundType === undefined) {\r\n return new Types.UnknownType(typeName + \" not found in class or interface\");\r\n }\r\n this.scope.addReference(expr.getTokens()[2], byName, _reference_1.ReferenceType.TypeReference, this.filename);\r\n }\r\n }\r\n // todo, ugh, hmm\r\n while (subs.length > 0) {\r\n subs.shift();\r\n }\r\n }\r\n else {\r\n const found = this.scope.findType(subs[0]);\r\n foundType = found === null || found === void 0 ? void 0 : found.getType();\r\n if (foundType === undefined) {\r\n const typePoolType = (_a = this.scope.findTypePoolType(subs[0])) === null || _a === void 0 ? void 0 : _a.getType();\r\n if (typePoolType) {\r\n // this.scope.addReference(typeName.getFirstToken(), typePoolType, ReferenceType.TypeReference, this.filename);\r\n foundType = typePoolType;\r\n }\r\n if (foundType === undefined) {\r\n const f = this.scope.getDDIC().lookupTableOrView(subs[0]);\r\n this.scope.getDDICReferences().addUsing(this.scope.getParentObj(), { object: f.object, filename: this.filename, token: expr.getFirstToken() });\r\n if (f.type instanceof _typed_identifier_1.TypedIdentifier) {\r\n foundType = f.type.getType();\r\n }\r\n else {\r\n foundType = f.type;\r\n }\r\n }\r\n }\r\n else {\r\n this.scope.addReference(expr.getFirstToken(), found, _reference_1.ReferenceType.TypeReference, this.filename);\r\n }\r\n if (foundType === undefined && this.scope.getDDIC().inErrorNamespace(subs[0]) === false) {\r\n this.scope.addReference(expr.getFirstToken(), undefined, _reference_1.ReferenceType.VoidType, this.filename);\r\n return new Types.VoidType(subs[0]);\r\n }\r\n else if (foundType instanceof Types.VoidType) {\r\n this.scope.addReference(expr.getFirstToken(), undefined, _reference_1.ReferenceType.VoidType, this.filename);\r\n return foundType;\r\n }\r\n else if (foundType === undefined) {\r\n return new Types.UnknownType(\"Unknown type \" + subs[0]);\r\n }\r\n }\r\n subs.shift();\r\n while (subs.length > 0) {\r\n if (foundType instanceof Types.UnknownType\r\n || foundType instanceof Types.VoidType) {\r\n return foundType;\r\n }\r\n else if (!(foundType instanceof Types.StructureType)) {\r\n return new Types.UnknownType(\"Not a structured type\");\r\n }\r\n foundType = foundType.getComponentByName(subs[0]);\r\n subs.shift();\r\n }\r\n return foundType;\r\n }\r\n resolveConstantValue(expr) {\r\n var _a, _b;\r\n if (!(expr.get() instanceof Expressions.SimpleFieldChain)) {\r\n throw new Error(\"resolveConstantValue\");\r\n }\r\n const firstNode = expr.getFirstChild();\r\n const firstToken = firstNode.getFirstToken();\r\n const firstName = firstToken.getStr();\r\n if (firstNode.get() instanceof Expressions.Field) {\r\n const found = this.scope.findVariable(firstName);\r\n const val = found === null || found === void 0 ? void 0 : found.getValue();\r\n if (typeof val === \"string\") {\r\n this.scope.addReference(firstToken, found, _reference_1.ReferenceType.DataReadReference, this.filename);\r\n return val;\r\n }\r\n return undefined;\r\n }\r\n else if (firstNode.get() instanceof Expressions.ClassName\r\n && firstName.toLowerCase() === this.scope.getName().toLowerCase()\r\n && (this.scope.getType() === _scope_type_1.ScopeType.Interface\r\n || this.scope.getType() === _scope_type_1.ScopeType.ClassDefinition)) {\r\n const children = expr.getChildren();\r\n const token = (_a = children[2]) === null || _a === void 0 ? void 0 : _a.getFirstToken();\r\n const found = this.scope.findVariable(token.getStr());\r\n const val = found === null || found === void 0 ? void 0 : found.getValue();\r\n if (typeof val === \"string\") {\r\n this.scope.addReference(firstToken, found, _reference_1.ReferenceType.DataReadReference, this.filename);\r\n return val;\r\n }\r\n return undefined;\r\n }\r\n else if (firstNode.get() instanceof Expressions.ClassName) {\r\n const obj = this.scope.findObjectDefinition(firstName);\r\n if (obj === undefined) {\r\n if (this.scope.existsObject(firstName).found === true) {\r\n return undefined;\r\n }\r\n else if (this.scope.getDDIC().inErrorNamespace(firstName) === true) {\r\n throw new Error(\"resolveConstantValue, not found: \" + firstName);\r\n }\r\n else {\r\n this.scope.addReference(firstNode.getFirstToken(), undefined, _reference_1.ReferenceType.ObjectOrientedVoidReference, this.filename, { ooName: firstName.toUpperCase() });\r\n return undefined;\r\n }\r\n }\r\n const children = expr.getChildren();\r\n const token = (_b = children[2]) === null || _b === void 0 ? void 0 : _b.getFirstToken();\r\n const attr = token.getStr();\r\n const c = new _object_oriented_1.ObjectOriented(this.scope).searchConstantName(obj, attr);\r\n if (c instanceof class_constant_1.ClassConstant) {\r\n this.scope.addReference(token, c, _reference_1.ReferenceType.DataReadReference, this.filename);\r\n const val = c.getValue();\r\n if (typeof val === \"string\") {\r\n return val;\r\n }\r\n else if (typeof val === \"object\" && children[4]) {\r\n const name = children[4].getFirstToken().getStr();\r\n if (val[name] !== undefined) {\r\n return val[name];\r\n }\r\n }\r\n return undefined;\r\n }\r\n throw new Error(\"resolveConstantValue, constant not found \" + attr);\r\n }\r\n else {\r\n throw new Error(\"resolveConstantValue, unexpected structure\");\r\n }\r\n }\r\n resolveTypeRef(chain) {\r\n var _a;\r\n if (chain === undefined) {\r\n return undefined;\r\n }\r\n const name = chain.getFirstToken().getStr();\r\n if (chain.getAllTokens().length === 1) {\r\n if (name.toUpperCase() === \"OBJECT\") {\r\n return new Types.GenericObjectReferenceType();\r\n }\r\n const search = this.scope.existsObject(name);\r\n if (search.found === true && search.id) {\r\n this.scope.addReference(chain.getFirstToken(), search.id, _reference_1.ReferenceType.ObjectOrientedReference, this.filename, { ooType: search.ooType, ooName: name });\r\n return new Types.ObjectReferenceType(search.id, name);\r\n }\r\n }\r\n const found = this.resolveTypeName(chain);\r\n if (found && !(found instanceof Types.UnknownType) && !(found instanceof Types.VoidType)) {\r\n return new Types.DataReference(found);\r\n }\r\n else if (chain.concatTokens().toUpperCase() === \"DATA\") {\r\n return new Types.DataReference(new Types.AnyType());\r\n }\r\n if (this.scope.isBadiDef(name) === true) {\r\n return new Types.VoidType(name);\r\n }\r\n if (((_a = this.scope.getDDIC()) === null || _a === void 0 ? void 0 : _a.inErrorNamespace(name)) === false) {\r\n // this.scope.addReference(chain.getFirstToken(), undefined, ReferenceType.VoidType, this.filename);\r\n return new Types.VoidType(name);\r\n }\r\n return new Types.UnknownType(\"REF, unable to resolve \" + name);\r\n }\r\n findValue(node) {\r\n const val = node.findFirstExpression(Expressions.Value);\r\n if (val === undefined) {\r\n throw new Error(\"VALUE missing in expression\");\r\n }\r\n if (val.concatTokens().toUpperCase() === \"VALUE IS INITIAL\") {\r\n return undefined;\r\n }\r\n const constant = val.findFirstExpression(Expressions.Constant);\r\n if (constant) {\r\n return constant.concatTokens();\r\n }\r\n const chain = val.findFirstExpression(Expressions.SimpleFieldChain);\r\n if (chain) {\r\n return this.resolveConstantValue(chain);\r\n }\r\n throw new Error(\"findValue, unexpected\");\r\n }\r\n findDecimals(node) {\r\n var _a, _b;\r\n const dec = (_b = (_a = node.findDirectExpression(Expressions.Decimals)) === null || _a === void 0 ? void 0 : _a.findDirectExpression(Expressions.Integer)) === null || _b === void 0 ? void 0 : _b.concatTokens();\r\n if (dec) {\r\n return parseInt(dec, 10);\r\n }\r\n return undefined;\r\n }\r\n findLength(node) {\r\n const val = node.findFirstExpression(Expressions.Length);\r\n const flen = node.findFirstExpression(Expressions.ConstantFieldLength);\r\n if (val && flen) {\r\n throw new Error(\"Only specify length once\");\r\n }\r\n if (flen) {\r\n const cintExpr = flen.findFirstExpression(Expressions.Integer);\r\n if (cintExpr) {\r\n return this.parseInt(cintExpr.concatTokens());\r\n }\r\n const cchain = flen.findFirstExpression(Expressions.SimpleFieldChain);\r\n if (cchain) {\r\n const val = this.resolveConstantValue(cchain);\r\n return this.parseInt(val);\r\n }\r\n }\r\n if (val === undefined) {\r\n return 1;\r\n }\r\n const intExpr = val.findFirstExpression(Expressions.Integer);\r\n if (intExpr) {\r\n return this.parseInt(intExpr.concatTokens());\r\n }\r\n const strExpr = val.findFirstExpression(Expressions.ConstantString);\r\n if (strExpr) {\r\n return this.parseInt(strExpr.concatTokens());\r\n }\r\n const chain = val.findFirstExpression(Expressions.SimpleFieldChain);\r\n if (chain) {\r\n const val = this.resolveConstantValue(chain);\r\n return this.parseInt(val);\r\n }\r\n throw new Error(\"Unexpected, findLength\");\r\n }\r\n parseInt(text) {\r\n if (text === undefined) {\r\n return undefined;\r\n }\r\n if (text.startsWith(\"'\")) {\r\n text = text.split(\"'\")[1];\r\n }\r\n else if (text.startsWith(\"`\")) {\r\n text = text.split(\"`\")[1];\r\n }\r\n return parseInt(text, 10);\r\n }\r\n}\r\nexports.BasicTypes = BasicTypes;\r\n//# sourceMappingURL=basic_types.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/5_syntax/basic_types.js?");
6708
6708
 
6709
6709
  /***/ }),
6710
6710
 
@@ -8057,7 +8057,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
8057
8057
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
8058
8058
 
8059
8059
  "use strict";
8060
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.Loop = void 0;\r\nconst Expressions = __webpack_require__(/*! ../../2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst basic_1 = __webpack_require__(/*! ../../types/basic */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/index.js\");\r\nconst target_1 = __webpack_require__(/*! ../expressions/target */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/target.js\");\r\nconst source_1 = __webpack_require__(/*! ../expressions/source */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/source.js\");\r\nconst inline_data_1 = __webpack_require__(/*! ../expressions/inline_data */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/inline_data.js\");\r\nconst inline_fs_1 = __webpack_require__(/*! ../expressions/inline_fs */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/inline_fs.js\");\r\nconst fstarget_1 = __webpack_require__(/*! ../expressions/fstarget */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/fstarget.js\");\r\nconst component_compare_1 = __webpack_require__(/*! ../expressions/component_compare */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/component_compare.js\");\r\nconst component_cond_1 = __webpack_require__(/*! ../expressions/component_cond */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/component_cond.js\");\r\nconst dynamic_1 = __webpack_require__(/*! ../expressions/dynamic */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/dynamic.js\");\r\nconst loop_group_by_1 = __webpack_require__(/*! ../expressions/loop_group_by */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/loop_group_by.js\");\r\nclass Loop {\r\n runSyntax(node, scope, filename) {\r\n const loopTarget = node.findDirectExpression(Expressions.LoopTarget);\r\n let target = loopTarget === null || loopTarget === void 0 ? void 0 : loopTarget.findDirectExpression(Expressions.Target);\r\n const targetType = target ? new target_1.Target().runSyntax(target, scope, filename) : undefined;\r\n if (target === undefined) {\r\n target = node.findDirectExpression(Expressions.FSTarget);\r\n }\r\n const sources = node.findDirectExpressions(Expressions.Source);\r\n let firstSource = node.findDirectExpression(Expressions.SimpleSource2);\r\n if (firstSource === undefined) {\r\n firstSource = sources[0];\r\n }\r\n let sourceType = firstSource ? new source_1.Source().runSyntax(firstSource, scope, filename, targetType) : undefined;\r\n const concat = node.concatTokens().toUpperCase();\r\n if (sourceType === undefined) {\r\n throw new Error(\"No source type determined\");\r\n }\r\n else if (sourceType instanceof basic_1.UnknownType) {\r\n throw new Error(\"Loop, not a table type, \" + sourceType.getError());\r\n }\r\n else if (sourceType instanceof basic_1.TableType\r\n && target === undefined\r\n && sourceType.isWithHeader() === false\r\n && node.getChildren().length === 4) {\r\n throw new Error(\"Loop, no header line\");\r\n }\r\n else if (!(sourceType instanceof basic_1.TableType)\r\n && !(sourceType instanceof basic_1.VoidType)\r\n && concat.startsWith(\"LOOP AT GROUP \") === false) {\r\n throw new Error(\"Loop, not a table type\");\r\n }\r\n if (sourceType instanceof basic_1.TableType) {\r\n sourceType = sourceType.getRowType();\r\n if (concat.includes(\" REFERENCE INTO \")) {\r\n sourceType = new basic_1.DataReference(sourceType);\r\n }\r\n }\r\n const inline = target === null || target === void 0 ? void 0 : target.findDirectExpression(Expressions.InlineData);\r\n if (inline) {\r\n new inline_data_1.InlineData().runSyntax(inline, scope, filename, sourceType);\r\n }\r\n for (const s of sources) {\r\n if (s === firstSource) {\r\n continue;\r\n }\r\n new source_1.Source().runSyntax(s, scope, filename);\r\n }\r\n const inlinefs = target === null || target === void 0 ? void 0 : target.findDirectExpression(Expressions.InlineFS);\r\n if (inlinefs) {\r\n new inline_fs_1.InlineFS().runSyntax(inlinefs, scope, filename, sourceType);\r\n }\r\n else {\r\n const fstarget = loopTarget === null || loopTarget === void 0 ? void 0 : loopTarget.findDirectExpression(Expressions.FSTarget);\r\n if (fstarget) {\r\n new fstarget_1.FSTarget().runSyntax(fstarget, scope, filename, sourceType);\r\n }\r\n }\r\n for (const t of node.findDirectExpressions(Expressions.ComponentCompare)) {\r\n new component_compare_1.ComponentCompare().runSyntax(t, scope, filename);\r\n }\r\n for (const t of node.findDirectExpressions(Expressions.ComponentCond)) {\r\n new component_cond_1.ComponentCond().runSyntax(t, scope, filename);\r\n }\r\n for (const t of node.findDirectExpressions(Expressions.Dynamic)) {\r\n new dynamic_1.Dynamic().runSyntax(t, scope, filename);\r\n }\r\n const group = node.findDirectExpression(Expressions.LoopGroupBy);\r\n if (group) {\r\n new loop_group_by_1.LoopGroupBy().runSyntax(group, scope, filename);\r\n }\r\n }\r\n}\r\nexports.Loop = Loop;\r\n//# sourceMappingURL=loop.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/loop.js?");
8060
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.Loop = void 0;\r\nconst Expressions = __webpack_require__(/*! ../../2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst basic_1 = __webpack_require__(/*! ../../types/basic */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/index.js\");\r\nconst target_1 = __webpack_require__(/*! ../expressions/target */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/target.js\");\r\nconst source_1 = __webpack_require__(/*! ../expressions/source */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/source.js\");\r\nconst inline_data_1 = __webpack_require__(/*! ../expressions/inline_data */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/inline_data.js\");\r\nconst inline_fs_1 = __webpack_require__(/*! ../expressions/inline_fs */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/inline_fs.js\");\r\nconst fstarget_1 = __webpack_require__(/*! ../expressions/fstarget */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/fstarget.js\");\r\nconst component_compare_1 = __webpack_require__(/*! ../expressions/component_compare */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/component_compare.js\");\r\nconst component_cond_1 = __webpack_require__(/*! ../expressions/component_cond */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/component_cond.js\");\r\nconst dynamic_1 = __webpack_require__(/*! ../expressions/dynamic */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/dynamic.js\");\r\nconst loop_group_by_1 = __webpack_require__(/*! ../expressions/loop_group_by */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/loop_group_by.js\");\r\nclass Loop {\r\n runSyntax(node, scope, filename) {\r\n const loopTarget = node.findDirectExpression(Expressions.LoopTarget);\r\n let target = loopTarget === null || loopTarget === void 0 ? void 0 : loopTarget.findDirectExpression(Expressions.Target);\r\n const targetType = target ? new target_1.Target().runSyntax(target, scope, filename) : undefined;\r\n if (target === undefined) {\r\n target = node.findDirectExpression(Expressions.FSTarget);\r\n }\r\n const sources = node.findDirectExpressions(Expressions.Source);\r\n let firstSource = node.findDirectExpression(Expressions.SimpleSource2);\r\n if (firstSource === undefined) {\r\n firstSource = sources[0];\r\n }\r\n let sourceType = firstSource ? new source_1.Source().runSyntax(firstSource, scope, filename, targetType) : undefined;\r\n const concat = node.concatTokens().toUpperCase();\r\n if (sourceType === undefined) {\r\n throw new Error(\"No source type determined\");\r\n }\r\n else if (sourceType instanceof basic_1.UnknownType) {\r\n throw new Error(\"Loop, not a table type, \" + sourceType.getError());\r\n }\r\n else if (sourceType instanceof basic_1.TableType\r\n && target === undefined\r\n && sourceType.isWithHeader() === false\r\n && node.getChildren().length === 4) {\r\n throw new Error(\"Loop, no header line\");\r\n }\r\n else if (!(sourceType instanceof basic_1.TableType)\r\n && !(sourceType instanceof basic_1.AnyType)\r\n && !(sourceType instanceof basic_1.VoidType)\r\n && concat.startsWith(\"LOOP AT GROUP \") === false) {\r\n throw new Error(\"Loop, not a table type\");\r\n }\r\n if (sourceType instanceof basic_1.TableType) {\r\n sourceType = sourceType.getRowType();\r\n if (concat.includes(\" REFERENCE INTO \")) {\r\n sourceType = new basic_1.DataReference(sourceType);\r\n }\r\n }\r\n const inline = target === null || target === void 0 ? void 0 : target.findDirectExpression(Expressions.InlineData);\r\n if (inline) {\r\n new inline_data_1.InlineData().runSyntax(inline, scope, filename, sourceType);\r\n }\r\n for (const s of sources) {\r\n if (s === firstSource) {\r\n continue;\r\n }\r\n new source_1.Source().runSyntax(s, scope, filename);\r\n }\r\n const inlinefs = target === null || target === void 0 ? void 0 : target.findDirectExpression(Expressions.InlineFS);\r\n if (inlinefs) {\r\n new inline_fs_1.InlineFS().runSyntax(inlinefs, scope, filename, sourceType);\r\n }\r\n else {\r\n const fstarget = loopTarget === null || loopTarget === void 0 ? void 0 : loopTarget.findDirectExpression(Expressions.FSTarget);\r\n if (fstarget) {\r\n new fstarget_1.FSTarget().runSyntax(fstarget, scope, filename, sourceType);\r\n }\r\n }\r\n for (const t of node.findDirectExpressions(Expressions.ComponentCompare)) {\r\n new component_compare_1.ComponentCompare().runSyntax(t, scope, filename);\r\n }\r\n for (const t of node.findDirectExpressions(Expressions.ComponentCond)) {\r\n new component_cond_1.ComponentCond().runSyntax(t, scope, filename);\r\n }\r\n for (const t of node.findDirectExpressions(Expressions.Dynamic)) {\r\n new dynamic_1.Dynamic().runSyntax(t, scope, filename);\r\n }\r\n const group = node.findDirectExpression(Expressions.LoopGroupBy);\r\n if (group) {\r\n new loop_group_by_1.LoopGroupBy().runSyntax(group, scope, filename);\r\n }\r\n }\r\n}\r\nexports.Loop = Loop;\r\n//# sourceMappingURL=loop.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/loop.js?");
8061
8061
 
8062
8062
  /***/ }),
8063
8063
 
@@ -9399,7 +9399,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
9399
9399
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
9400
9400
 
9401
9401
  "use strict";
9402
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.MethodParameters = void 0;\r\nconst method_def_1 = __webpack_require__(/*! ../2_statements/statements/method_def */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/method_def.js\");\r\nconst Expressions = __webpack_require__(/*! ../2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst nodes_1 = __webpack_require__(/*! ../nodes */ \"./node_modules/@abaplint/core/build/src/abap/nodes/index.js\");\r\nconst _typed_identifier_1 = __webpack_require__(/*! ./_typed_identifier */ \"./node_modules/@abaplint/core/build/src/abap/types/_typed_identifier.js\");\r\nconst basic_1 = __webpack_require__(/*! ./basic */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/index.js\");\r\nconst method_def_returning_1 = __webpack_require__(/*! ../5_syntax/expressions/method_def_returning */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/method_def_returning.js\");\r\nconst method_param_1 = __webpack_require__(/*! ../5_syntax/expressions/method_param */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/method_param.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\n// todo:\r\n// this.exceptions = [];\r\n// also consider RAISING vs EXCEPTIONS\r\nclass MethodParameters {\r\n constructor(node, filename, scope) {\r\n if (!(node.get() instanceof method_def_1.MethodDef)) {\r\n throw new Error(\"MethodDefinition, expected MethodDef as part of input node\");\r\n }\r\n this.importing = [];\r\n this.exporting = [];\r\n this.changing = [];\r\n this.optional = [];\r\n this.defaults = {};\r\n this.returning = undefined;\r\n this.preferred = undefined;\r\n this.exceptions = [];\r\n this.filename = filename;\r\n this.parse(node, scope, filename);\r\n }\r\n getFilename() {\r\n return this.filename;\r\n }\r\n getOptional() {\r\n return this.optional;\r\n }\r\n getAll() {\r\n const ret = [];\r\n const returning = this.getReturning();\r\n if (returning) {\r\n ret.push(returning);\r\n }\r\n ret.push(...this.getImporting());\r\n ret.push(...this.getExporting());\r\n ret.push(...this.getChanging());\r\n return ret;\r\n }\r\n getDefaultImporting() {\r\n if (this.importing.length === 0) {\r\n return undefined;\r\n }\r\n else if (this.importing.length === 1) {\r\n return this.importing[0].getName().toUpperCase();\r\n }\r\n else if (this.preferred) {\r\n return this.preferred;\r\n }\r\n let candidates = this.importing.map(i => i.getName().toUpperCase());\r\n candidates = candidates.filter(c => this.optional.indexOf(c) < 0);\r\n if (candidates.length === 1) {\r\n return candidates[0];\r\n }\r\n return undefined;\r\n }\r\n getImporting() {\r\n return this.importing;\r\n }\r\n getRequiredParameters() {\r\n const ret = [];\r\n for (const i of this.getImporting()) {\r\n if (this.getOptional().some(o => o.toUpperCase() === i.getName().toUpperCase()) === true) {\r\n continue;\r\n }\r\n ret.push(i);\r\n }\r\n for (const i of this.getChanging()) {\r\n if (this.getOptional().some(o => o.toUpperCase() === i.getName().toUpperCase()) === true) {\r\n continue;\r\n }\r\n ret.push(i);\r\n }\r\n return ret;\r\n }\r\n getExporting() {\r\n return this.exporting;\r\n }\r\n getChanging() {\r\n return this.changing;\r\n }\r\n getReturning() {\r\n return this.returning;\r\n }\r\n getExceptions() {\r\n return this.exceptions;\r\n }\r\n getParameterDefault(parameter) {\r\n return this.defaults[parameter.toUpperCase()];\r\n }\r\n ///////////////////\r\n parse(node, scope, filename) {\r\n var _a, _b;\r\n const handler = node.findFirstExpression(Expressions.EventHandler);\r\n if (handler) {\r\n const nameToken = (_a = node.findFirstExpression(Expressions.ClassName)) === null || _a === void 0 ? void 0 : _a.getFirstToken();\r\n const ooName = nameToken === null || nameToken === void 0 ? void 0 : nameToken.getStr();\r\n const def = scope.findObjectDefinition(ooName);\r\n const doVoid = def ? false : !scope.getDDIC().inErrorNamespace(ooName);\r\n if (def) {\r\n scope.addReference(nameToken, def, _reference_1.ReferenceType.ObjectOrientedReference, filename);\r\n }\r\n else if (doVoid && ooName) {\r\n scope.addReference(nameToken, undefined, _reference_1.ReferenceType.ObjectOrientedVoidReference, this.filename, { ooName: ooName.toUpperCase() });\r\n }\r\n const eventName = (_b = node.findFirstExpression(Expressions.Field)) === null || _b === void 0 ? void 0 : _b.getFirstToken().getStr();\r\n const event = new _object_oriented_1.ObjectOriented(scope).searchEvent(def, eventName);\r\n for (const p of handler.findAllExpressions(Expressions.MethodParamName)) {\r\n const token = p.getFirstToken();\r\n const search = token.getStr().toUpperCase().replace(\"!\", \"\");\r\n this.optional.push(search); // all parameters optional for event handlers\r\n if (search === \"SENDER\" && def) {\r\n this.importing.push(new _typed_identifier_1.TypedIdentifier(token, this.filename, new basic_1.ObjectReferenceType(def), [\"event_parameter\" /* IdentifierMeta.EventParameter */]));\r\n continue;\r\n }\r\n const found = event === null || event === void 0 ? void 0 : event.getParameters().find(p => p.getName().toUpperCase() === search);\r\n if (found) {\r\n this.importing.push(new _typed_identifier_1.TypedIdentifier(token, this.filename, found.getType(), [\"event_parameter\" /* IdentifierMeta.EventParameter */]));\r\n }\r\n else if (doVoid) {\r\n this.importing.push(new _typed_identifier_1.TypedIdentifier(token, this.filename, new basic_1.VoidType(ooName), [\"event_parameter\" /* IdentifierMeta.EventParameter */]));\r\n }\r\n else {\r\n const type = new basic_1.UnknownType(`handler parameter not found \"${search}\"`);\r\n this.importing.push(new _typed_identifier_1.TypedIdentifier(token, this.filename, type, [\"event_parameter\" /* IdentifierMeta.EventParameter */]));\r\n }\r\n }\r\n return;\r\n }\r\n const importing = node.findFirstExpression(Expressions.MethodDefImporting);\r\n if (importing) {\r\n this.add(this.importing, importing, scope, [\"importing\" /* IdentifierMeta.MethodImporting */]);\r\n if (importing.concatTokens().toUpperCase().includes(\" PREFERRED PARAMETER\")) {\r\n this.preferred = importing.getLastToken().getStr().toUpperCase();\r\n if (this.preferred.startsWith(\"!\")) {\r\n this.preferred = this.preferred.substring(1);\r\n }\r\n }\r\n }\r\n const exporting = node.findFirstExpression(Expressions.MethodDefExporting);\r\n if (exporting) {\r\n this.add(this.exporting, exporting, scope, [\"exporting\" /* IdentifierMeta.MethodExporting */]);\r\n }\r\n const changing = node.findFirstExpression(Expressions.MethodDefChanging);\r\n if (changing) {\r\n this.add(this.changing, changing, scope, [\"changing\" /* IdentifierMeta.MethodChanging */]);\r\n }\r\n const returning = node.findFirstExpression(Expressions.MethodDefReturning);\r\n if (returning) {\r\n this.returning = new method_def_returning_1.MethodDefReturning().runSyntax(returning, scope, this.filename, [\"returning\" /* IdentifierMeta.MethodReturning */]);\r\n }\r\n }\r\n add(target, source, scope, meta) {\r\n var _a;\r\n for (const opt of source.findAllExpressions(Expressions.MethodParamOptional)) {\r\n const p = opt.findDirectExpression(Expressions.MethodParam);\r\n if (p === undefined) {\r\n continue;\r\n }\r\n const extraMeta = [];\r\n if (opt.concatTokens().toUpperCase().startsWith(\"VALUE(\")) {\r\n extraMeta.push(\"pass_by_value\" /* IdentifierMeta.PassByValue */);\r\n }\r\n else if (meta.includes(\"importing\" /* IdentifierMeta.MethodImporting */)) {\r\n extraMeta.push(\"read_only\" /* IdentifierMeta.ReadOnly */);\r\n }\r\n target.push(new method_param_1.MethodParam().runSyntax(p, scope, this.filename, [...meta, ...extraMeta]));\r\n if (opt.getLastToken().getStr().toUpperCase() === \"OPTIONAL\") {\r\n const name = target[target.length - 1].getName().toUpperCase();\r\n this.optional.push(name);\r\n }\r\n else if (opt.findFirstExpression(Expressions.Default)) {\r\n const name = target[target.length - 1].getName().toUpperCase();\r\n this.optional.push(name);\r\n const val = (_a = opt.findFirstExpression(Expressions.Default)) === null || _a === void 0 ? void 0 : _a.getLastChild();\r\n if (val && val instanceof nodes_1.ExpressionNode) {\r\n this.defaults[name] = val;\r\n }\r\n }\r\n }\r\n if (target.length > 0) {\r\n return;\r\n }\r\n const params = source.findAllExpressions(Expressions.MethodParam);\r\n for (const param of params) {\r\n target.push(new method_param_1.MethodParam().runSyntax(param, scope, this.filename, meta));\r\n }\r\n }\r\n}\r\nexports.MethodParameters = MethodParameters;\r\n//# sourceMappingURL=method_parameters.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/types/method_parameters.js?");
9402
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.MethodParameters = void 0;\r\nconst method_def_1 = __webpack_require__(/*! ../2_statements/statements/method_def */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/method_def.js\");\r\nconst Expressions = __webpack_require__(/*! ../2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst nodes_1 = __webpack_require__(/*! ../nodes */ \"./node_modules/@abaplint/core/build/src/abap/nodes/index.js\");\r\nconst _typed_identifier_1 = __webpack_require__(/*! ./_typed_identifier */ \"./node_modules/@abaplint/core/build/src/abap/types/_typed_identifier.js\");\r\nconst basic_1 = __webpack_require__(/*! ./basic */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/index.js\");\r\nconst method_def_returning_1 = __webpack_require__(/*! ../5_syntax/expressions/method_def_returning */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/method_def_returning.js\");\r\nconst method_param_1 = __webpack_require__(/*! ../5_syntax/expressions/method_param */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/method_param.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\n// todo:\r\n// this.exceptions = [];\r\n// also consider RAISING vs EXCEPTIONS\r\nclass MethodParameters {\r\n constructor(node, filename, scope) {\r\n if (!(node.get() instanceof method_def_1.MethodDef)) {\r\n throw new Error(\"MethodDefinition, expected MethodDef as part of input node\");\r\n }\r\n this.importing = [];\r\n this.exporting = [];\r\n this.changing = [];\r\n this.optional = [];\r\n this.defaults = {};\r\n this.returning = undefined;\r\n this.preferred = undefined;\r\n this.exceptions = [];\r\n this.filename = filename;\r\n this.parse(node, scope, filename);\r\n }\r\n getFilename() {\r\n return this.filename;\r\n }\r\n getOptional() {\r\n return this.optional;\r\n }\r\n getAll() {\r\n const ret = [];\r\n const returning = this.getReturning();\r\n if (returning) {\r\n ret.push(returning);\r\n }\r\n ret.push(...this.getImporting());\r\n ret.push(...this.getExporting());\r\n ret.push(...this.getChanging());\r\n return ret;\r\n }\r\n getDefaultImporting() {\r\n if (this.importing.length === 0) {\r\n return undefined;\r\n }\r\n else if (this.importing.length === 1) {\r\n return this.importing[0].getName().toUpperCase();\r\n }\r\n else if (this.preferred) {\r\n return this.preferred;\r\n }\r\n let candidates = this.importing.map(i => i.getName().toUpperCase());\r\n candidates = candidates.filter(c => this.optional.indexOf(c) < 0);\r\n if (candidates.length === 1) {\r\n return candidates[0];\r\n }\r\n return undefined;\r\n }\r\n getImporting() {\r\n return this.importing;\r\n }\r\n getRequiredParameters() {\r\n const ret = [];\r\n for (const i of this.getImporting()) {\r\n if (this.getOptional().some(o => o.toUpperCase() === i.getName().toUpperCase()) === true) {\r\n continue;\r\n }\r\n ret.push(i);\r\n }\r\n for (const i of this.getChanging()) {\r\n if (this.getOptional().some(o => o.toUpperCase() === i.getName().toUpperCase()) === true) {\r\n continue;\r\n }\r\n ret.push(i);\r\n }\r\n return ret;\r\n }\r\n getExporting() {\r\n return this.exporting;\r\n }\r\n getChanging() {\r\n return this.changing;\r\n }\r\n getReturning() {\r\n return this.returning;\r\n }\r\n getExceptions() {\r\n return this.exceptions;\r\n }\r\n getParameterDefault(parameter) {\r\n return this.defaults[parameter.toUpperCase()];\r\n }\r\n ///////////////////\r\n parse(node, scope, filename) {\r\n var _a, _b;\r\n const handler = node.findFirstExpression(Expressions.EventHandler);\r\n if (handler) {\r\n const nameToken = (_a = node.findFirstExpression(Expressions.ClassName)) === null || _a === void 0 ? void 0 : _a.getFirstToken();\r\n const ooName = nameToken === null || nameToken === void 0 ? void 0 : nameToken.getStr();\r\n const def = scope.findObjectDefinition(ooName);\r\n const doVoid = def ? false : !scope.getDDIC().inErrorNamespace(ooName);\r\n if (def) {\r\n scope.addReference(nameToken, def, _reference_1.ReferenceType.ObjectOrientedReference, filename);\r\n }\r\n else if (doVoid && ooName) {\r\n scope.addReference(nameToken, undefined, _reference_1.ReferenceType.ObjectOrientedVoidReference, this.filename, { ooName: ooName.toUpperCase() });\r\n }\r\n const eventName = (_b = node.findFirstExpression(Expressions.Field)) === null || _b === void 0 ? void 0 : _b.getFirstToken().getStr();\r\n const event = new _object_oriented_1.ObjectOriented(scope).searchEvent(def, eventName);\r\n for (const p of handler.findAllExpressions(Expressions.MethodParamName)) {\r\n const token = p.getFirstToken();\r\n const search = token.getStr().toUpperCase().replace(\"!\", \"\");\r\n this.optional.push(search); // all parameters optional for event handlers\r\n if (search === \"SENDER\" && def) {\r\n this.importing.push(new _typed_identifier_1.TypedIdentifier(token, this.filename, new basic_1.ObjectReferenceType(def), [\"event_parameter\" /* IdentifierMeta.EventParameter */]));\r\n continue;\r\n }\r\n const found = event === null || event === void 0 ? void 0 : event.getParameters().find(p => p.getName().toUpperCase() === search);\r\n if (found) {\r\n this.importing.push(new _typed_identifier_1.TypedIdentifier(token, this.filename, found.getType(), [\"event_parameter\" /* IdentifierMeta.EventParameter */]));\r\n }\r\n else if (doVoid) {\r\n this.importing.push(new _typed_identifier_1.TypedIdentifier(token, this.filename, new basic_1.VoidType(ooName), [\"event_parameter\" /* IdentifierMeta.EventParameter */]));\r\n }\r\n else {\r\n const type = new basic_1.UnknownType(`handler parameter not found \"${search}\"`);\r\n this.importing.push(new _typed_identifier_1.TypedIdentifier(token, this.filename, type, [\"event_parameter\" /* IdentifierMeta.EventParameter */]));\r\n }\r\n }\r\n return;\r\n }\r\n const importing = node.findFirstExpression(Expressions.MethodDefImporting);\r\n if (importing) {\r\n this.add(this.importing, importing, scope, [\"importing\" /* IdentifierMeta.MethodImporting */]);\r\n if (importing.concatTokens().toUpperCase().includes(\" PREFERRED PARAMETER\")) {\r\n this.preferred = importing.getLastToken().getStr().toUpperCase();\r\n if (this.preferred.startsWith(\"!\")) {\r\n this.preferred = this.preferred.substring(1);\r\n }\r\n }\r\n }\r\n // RAP parameters, temporary fix\r\n const rapName = node.findExpressionAfterToken(\"IMPORTING\");\r\n if (rapName) {\r\n this.importing.push(new _typed_identifier_1.TypedIdentifier(rapName.getFirstToken(), filename, new basic_1.VoidType(\"RapMethodParameter\"), [\"importing\" /* IdentifierMeta.MethodImporting */]));\r\n }\r\n const exporting = node.findFirstExpression(Expressions.MethodDefExporting);\r\n if (exporting) {\r\n this.add(this.exporting, exporting, scope, [\"exporting\" /* IdentifierMeta.MethodExporting */]);\r\n }\r\n const changing = node.findFirstExpression(Expressions.MethodDefChanging);\r\n if (changing) {\r\n this.add(this.changing, changing, scope, [\"changing\" /* IdentifierMeta.MethodChanging */]);\r\n }\r\n const returning = node.findFirstExpression(Expressions.MethodDefReturning);\r\n if (returning) {\r\n this.returning = new method_def_returning_1.MethodDefReturning().runSyntax(returning, scope, this.filename, [\"returning\" /* IdentifierMeta.MethodReturning */]);\r\n }\r\n }\r\n add(target, source, scope, meta) {\r\n var _a;\r\n for (const opt of source.findAllExpressions(Expressions.MethodParamOptional)) {\r\n const p = opt.findDirectExpression(Expressions.MethodParam);\r\n if (p === undefined) {\r\n continue;\r\n }\r\n const extraMeta = [];\r\n if (opt.concatTokens().toUpperCase().startsWith(\"VALUE(\")) {\r\n extraMeta.push(\"pass_by_value\" /* IdentifierMeta.PassByValue */);\r\n }\r\n else if (meta.includes(\"importing\" /* IdentifierMeta.MethodImporting */)) {\r\n extraMeta.push(\"read_only\" /* IdentifierMeta.ReadOnly */);\r\n }\r\n target.push(new method_param_1.MethodParam().runSyntax(p, scope, this.filename, [...meta, ...extraMeta]));\r\n if (opt.getLastToken().getStr().toUpperCase() === \"OPTIONAL\") {\r\n const name = target[target.length - 1].getName().toUpperCase();\r\n this.optional.push(name);\r\n }\r\n else if (opt.findFirstExpression(Expressions.Default)) {\r\n const name = target[target.length - 1].getName().toUpperCase();\r\n this.optional.push(name);\r\n const val = (_a = opt.findFirstExpression(Expressions.Default)) === null || _a === void 0 ? void 0 : _a.getLastChild();\r\n if (val && val instanceof nodes_1.ExpressionNode) {\r\n this.defaults[name] = val;\r\n }\r\n }\r\n }\r\n if (target.length > 0) {\r\n return;\r\n }\r\n const params = source.findAllExpressions(Expressions.MethodParam);\r\n for (const param of params) {\r\n target.push(new method_param_1.MethodParam().runSyntax(param, scope, this.filename, meta));\r\n }\r\n }\r\n}\r\nexports.MethodParameters = MethodParameters;\r\n//# sourceMappingURL=method_parameters.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/types/method_parameters.js?");
9403
9403
 
9404
9404
  /***/ }),
9405
9405
 
@@ -9465,7 +9465,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
9465
9465
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
9466
9466
 
9467
9467
  "use strict";
9468
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.CDSParser = void 0;\r\nconst tokens_1 = __webpack_require__(/*! ../abap/1_lexer/tokens */ \"./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js\");\r\nconst combi_1 = __webpack_require__(/*! ../abap/2_statements/combi */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js\");\r\nconst nodes_1 = __webpack_require__(/*! ../abap/nodes */ \"./node_modules/@abaplint/core/build/src/abap/nodes/index.js\");\r\nconst version_1 = __webpack_require__(/*! ../version */ \"./node_modules/@abaplint/core/build/src/version.js\");\r\nconst cds_lexer_1 = __webpack_require__(/*! ./cds_lexer */ \"./node_modules/@abaplint/core/build/src/cds/cds_lexer.js\");\r\nconst Expressions = __webpack_require__(/*! ./expressions */ \"./node_modules/@abaplint/core/build/src/cds/expressions/index.js\");\r\n// todo: the names of the ABAP + CDS + DDL expressions might overlap, if overlapping the singleton will fail\r\nclass CDSParser {\r\n parse(file) {\r\n if (file === undefined) {\r\n return undefined;\r\n }\r\n let tokens = cds_lexer_1.CDSLexer.run(file);\r\n tokens = tokens.filter(t => !(t instanceof tokens_1.Comment));\r\n // console.dir(tokens);\r\n let res = combi_1.Combi.run(new Expressions.CDSDefineView(), tokens, version_1.defaultVersion);\r\n if (res === undefined || !(res[0] instanceof nodes_1.ExpressionNode)) {\r\n res = combi_1.Combi.run(new Expressions.CDSDefineAbstract(), tokens, version_1.defaultVersion);\r\n }\r\n if (res === undefined || !(res[0] instanceof nodes_1.ExpressionNode)) {\r\n res = combi_1.Combi.run(new Expressions.CDSDefineProjection(), tokens, version_1.defaultVersion);\r\n }\r\n if (res === undefined || !(res[0] instanceof nodes_1.ExpressionNode)) {\r\n res = combi_1.Combi.run(new Expressions.CDSAnnotate(), tokens, version_1.defaultVersion);\r\n }\r\n if (res === undefined || !(res[0] instanceof nodes_1.ExpressionNode)) {\r\n return undefined;\r\n }\r\n return res[0];\r\n }\r\n}\r\nexports.CDSParser = CDSParser;\r\n//# sourceMappingURL=cds_parser.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/cds/cds_parser.js?");
9468
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.CDSParser = void 0;\r\nconst tokens_1 = __webpack_require__(/*! ../abap/1_lexer/tokens */ \"./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js\");\r\nconst combi_1 = __webpack_require__(/*! ../abap/2_statements/combi */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js\");\r\nconst nodes_1 = __webpack_require__(/*! ../abap/nodes */ \"./node_modules/@abaplint/core/build/src/abap/nodes/index.js\");\r\nconst version_1 = __webpack_require__(/*! ../version */ \"./node_modules/@abaplint/core/build/src/version.js\");\r\nconst cds_lexer_1 = __webpack_require__(/*! ./cds_lexer */ \"./node_modules/@abaplint/core/build/src/cds/cds_lexer.js\");\r\nconst Expressions = __webpack_require__(/*! ./expressions */ \"./node_modules/@abaplint/core/build/src/cds/expressions/index.js\");\r\n// todo: the names of the ABAP + CDS + DDL expressions might overlap, if overlapping the singleton will fail\r\nclass CDSParser {\r\n parse(file) {\r\n if (file === undefined) {\r\n return undefined;\r\n }\r\n let tokens = cds_lexer_1.CDSLexer.run(file);\r\n tokens = tokens.filter(t => !(t instanceof tokens_1.Comment));\r\n // console.dir(tokens);\r\n let res = combi_1.Combi.run(new Expressions.CDSDefineView(), tokens, version_1.defaultVersion);\r\n if (res === undefined || !(res[0] instanceof nodes_1.ExpressionNode)) {\r\n res = combi_1.Combi.run(new Expressions.CDSDefineAbstract(), tokens, version_1.defaultVersion);\r\n }\r\n if (res === undefined || !(res[0] instanceof nodes_1.ExpressionNode)) {\r\n res = combi_1.Combi.run(new Expressions.CDSDefineProjection(), tokens, version_1.defaultVersion);\r\n }\r\n if (res === undefined || !(res[0] instanceof nodes_1.ExpressionNode)) {\r\n res = combi_1.Combi.run(new Expressions.CDSAnnotate(), tokens, version_1.defaultVersion);\r\n }\r\n if (res === undefined || !(res[0] instanceof nodes_1.ExpressionNode)) {\r\n res = combi_1.Combi.run(new Expressions.CDSDefineCustom(), tokens, version_1.defaultVersion);\r\n }\r\n if (res === undefined || !(res[0] instanceof nodes_1.ExpressionNode)) {\r\n return undefined;\r\n }\r\n return res[0];\r\n }\r\n}\r\nexports.CDSParser = CDSParser;\r\n//# sourceMappingURL=cds_parser.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/cds/cds_parser.js?");
9469
9469
 
9470
9470
  /***/ }),
9471
9471
 
@@ -9634,6 +9634,17 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
9634
9634
 
9635
9635
  /***/ }),
9636
9636
 
9637
+ /***/ "./node_modules/@abaplint/core/build/src/cds/expressions/cds_define_custom.js":
9638
+ /*!************************************************************************************!*\
9639
+ !*** ./node_modules/@abaplint/core/build/src/cds/expressions/cds_define_custom.js ***!
9640
+ \************************************************************************************/
9641
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
9642
+
9643
+ "use strict";
9644
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.CDSDefineCustom = void 0;\r\nconst _1 = __webpack_require__(/*! . */ \"./node_modules/@abaplint/core/build/src/cds/expressions/index.js\");\r\nconst combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js\");\r\nconst cds_name_1 = __webpack_require__(/*! ./cds_name */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_name.js\");\r\nconst cds_type_1 = __webpack_require__(/*! ./cds_type */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_type.js\");\r\nclass CDSDefineCustom extends combi_1.Expression {\r\n getRunnable() {\r\n const field = (0, combi_1.seq)((0, combi_1.star)(_1.CDSAnnotation), (0, combi_1.opt)((0, combi_1.str)(\"KEY\")), cds_name_1.CDSName, \":\", cds_type_1.CDSType, \";\");\r\n return (0, combi_1.seq)((0, combi_1.star)(_1.CDSAnnotation), (0, combi_1.str)(\"DEFINE ROOT CUSTOM ENTITY\"), cds_name_1.CDSName, (0, combi_1.str)(\"{\"), (0, combi_1.plus)(field), (0, combi_1.str)(\"}\"), (0, combi_1.opt)(\";\"));\r\n }\r\n}\r\nexports.CDSDefineCustom = CDSDefineCustom;\r\n//# sourceMappingURL=cds_define_custom.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/cds/expressions/cds_define_custom.js?");
9645
+
9646
+ /***/ }),
9647
+
9637
9648
  /***/ "./node_modules/@abaplint/core/build/src/cds/expressions/cds_define_projection.js":
9638
9649
  /*!****************************************************************************************!*\
9639
9650
  !*** ./node_modules/@abaplint/core/build/src/cds/expressions/cds_define_projection.js ***!
@@ -9722,6 +9733,17 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
9722
9733
 
9723
9734
  /***/ }),
9724
9735
 
9736
+ /***/ "./node_modules/@abaplint/core/build/src/cds/expressions/cds_parameters_select.js":
9737
+ /*!****************************************************************************************!*\
9738
+ !*** ./node_modules/@abaplint/core/build/src/cds/expressions/cds_parameters_select.js ***!
9739
+ \****************************************************************************************/
9740
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
9741
+
9742
+ "use strict";
9743
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.CDSParametersSelect = void 0;\r\nconst _1 = __webpack_require__(/*! . */ \"./node_modules/@abaplint/core/build/src/cds/expressions/index.js\");\r\nconst combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js\");\r\nclass CDSParametersSelect extends combi_1.Expression {\r\n getRunnable() {\r\n const name = (0, combi_1.seq)(_1.CDSName, (0, combi_1.opt)((0, combi_1.seq)(\".\", _1.CDSName)));\r\n const value = (0, combi_1.alt)(name, _1.CDSString);\r\n const nameValue = (0, combi_1.seq)(name, \":\", value);\r\n return (0, combi_1.seq)(\"(\", nameValue, (0, combi_1.star)((0, combi_1.seq)(\",\", nameValue)), \")\");\r\n }\r\n}\r\nexports.CDSParametersSelect = CDSParametersSelect;\r\n//# sourceMappingURL=cds_parameters_select.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/cds/expressions/cds_parameters_select.js?");
9744
+
9745
+ /***/ }),
9746
+
9725
9747
  /***/ "./node_modules/@abaplint/core/build/src/cds/expressions/cds_relation.js":
9726
9748
  /*!*******************************************************************************!*\
9727
9749
  !*** ./node_modules/@abaplint/core/build/src/cds/expressions/cds_relation.js ***!
@@ -9729,7 +9751,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
9729
9751
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
9730
9752
 
9731
9753
  "use strict";
9732
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.CDSRelation = void 0;\r\nconst _1 = __webpack_require__(/*! . */ \"./node_modules/@abaplint/core/build/src/cds/expressions/index.js\");\r\nconst combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js\");\r\nclass CDSRelation extends combi_1.Expression {\r\n getRunnable() {\r\n return (0, combi_1.seq)((0, combi_1.regex)(/^[\\w_]+$/), (0, combi_1.opt)(_1.CDSAs));\r\n }\r\n}\r\nexports.CDSRelation = CDSRelation;\r\n//# sourceMappingURL=cds_relation.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/cds/expressions/cds_relation.js?");
9754
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.CDSRelation = void 0;\r\nconst _1 = __webpack_require__(/*! . */ \"./node_modules/@abaplint/core/build/src/cds/expressions/index.js\");\r\nconst combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js\");\r\nclass CDSRelation extends combi_1.Expression {\r\n getRunnable() {\r\n const pre = (0, combi_1.seq)(\"/\", (0, combi_1.regex)(/^[\\w_]+$/), \"/\");\r\n return (0, combi_1.seq)((0, combi_1.opt)(pre), (0, combi_1.regex)(/^[\\w_]+$/), (0, combi_1.opt)(_1.CDSAs));\r\n }\r\n}\r\nexports.CDSRelation = CDSRelation;\r\n//# sourceMappingURL=cds_relation.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/cds/expressions/cds_relation.js?");
9733
9755
 
9734
9756
  /***/ }),
9735
9757
 
@@ -9740,7 +9762,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
9740
9762
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
9741
9763
 
9742
9764
  "use strict";
9743
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.CDSSelect = void 0;\r\nconst _1 = __webpack_require__(/*! . */ \"./node_modules/@abaplint/core/build/src/cds/expressions/index.js\");\r\nconst combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js\");\r\nconst cds_association_1 = __webpack_require__(/*! ./cds_association */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_association.js\");\r\nconst cds_element_1 = __webpack_require__(/*! ./cds_element */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_element.js\");\r\nconst cds_join_1 = __webpack_require__(/*! ./cds_join */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_join.js\");\r\nclass CDSSelect extends combi_1.Expression {\r\n getRunnable() {\r\n return (0, combi_1.seq)(\"SELECT\", (0, combi_1.opt)(\"DISTINCT\"), \"FROM\", _1.CDSSource, (0, combi_1.star)(cds_join_1.CDSJoin), (0, combi_1.star)(_1.CDSComposition), (0, combi_1.star)(cds_association_1.CDSAssociation), (0, combi_1.star)(_1.CDSComposition), (0, combi_1.str)(\"{\"), (0, combi_1.plus)(cds_element_1.CDSElement), (0, combi_1.star)((0, combi_1.seq)(\",\", cds_element_1.CDSElement)), (0, combi_1.str)(\"}\"), (0, combi_1.opt)(_1.CDSGroupBy), (0, combi_1.opt)(_1.CDSWhere), (0, combi_1.opt)((0, combi_1.seq)(\"UNION\", (0, combi_1.opt)(\"ALL\"), CDSSelect)));\r\n }\r\n}\r\nexports.CDSSelect = CDSSelect;\r\n//# sourceMappingURL=cds_select.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/cds/expressions/cds_select.js?");
9765
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.CDSSelect = void 0;\r\nconst _1 = __webpack_require__(/*! . */ \"./node_modules/@abaplint/core/build/src/cds/expressions/index.js\");\r\nconst combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js\");\r\nconst cds_association_1 = __webpack_require__(/*! ./cds_association */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_association.js\");\r\nconst cds_join_1 = __webpack_require__(/*! ./cds_join */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_join.js\");\r\nclass CDSSelect extends combi_1.Expression {\r\n getRunnable() {\r\n return (0, combi_1.seq)(\"SELECT\", (0, combi_1.opt)(\"DISTINCT\"), \"FROM\", _1.CDSSource, (0, combi_1.opt)(_1.CDSParametersSelect), (0, combi_1.opt)(_1.CDSAs), (0, combi_1.star)(cds_join_1.CDSJoin), (0, combi_1.star)(_1.CDSComposition), (0, combi_1.star)(cds_association_1.CDSAssociation), (0, combi_1.star)(_1.CDSComposition), (0, combi_1.str)(\"{\"), (0, combi_1.plus)(_1.CDSElement), (0, combi_1.star)((0, combi_1.seq)(\",\", _1.CDSElement)), (0, combi_1.str)(\"}\"), (0, combi_1.opt)(_1.CDSGroupBy), (0, combi_1.opt)(_1.CDSWhere), (0, combi_1.opt)((0, combi_1.seq)(\"UNION\", (0, combi_1.opt)(\"ALL\"), CDSSelect)));\r\n }\r\n}\r\nexports.CDSSelect = CDSSelect;\r\n//# sourceMappingURL=cds_select.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/cds/expressions/cds_select.js?");
9744
9766
 
9745
9767
  /***/ }),
9746
9768
 
@@ -9806,7 +9828,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
9806
9828
  /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
9807
9829
 
9808
9830
  "use strict";
9809
- eval("\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\r\n};\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n__exportStar(__webpack_require__(/*! ./cds_aggregate */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_aggregate.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_aggregate */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_aggregate.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_annotate */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_annotate.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_annotation_array */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_annotation_array.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_annotation_object */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_annotation_object.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_annotation_simple */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_annotation_simple.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_annotation */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_annotation.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_arithmetics */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_arithmetics.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_as */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_as.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_association */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_association.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_cardinality */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_cardinality.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_case */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_case.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_cast */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_cast.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_composition */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_composition.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_condition */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_condition.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_define_abstract */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_define_abstract.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_define_projection */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_define_projection.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_define_view */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_define_view.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_element */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_element.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_function */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_function.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_group_by */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_group_by.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_join */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_join.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_name */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_name.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_parameters */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_parameters.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_relation */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_relation.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_select */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_select.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_source */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_source.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_string */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_string.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_type */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_type.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_where */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_where.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_with_parameters */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_with_parameters.js\"), exports);\r\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/cds/expressions/index.js?");
9831
+ eval("\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\r\n};\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n__exportStar(__webpack_require__(/*! ./cds_aggregate */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_aggregate.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_annotate */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_annotate.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_annotation_array */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_annotation_array.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_annotation_object */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_annotation_object.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_annotation_simple */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_annotation_simple.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_annotation */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_annotation.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_arithmetics */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_arithmetics.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_as */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_as.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_association */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_association.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_cardinality */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_cardinality.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_case */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_case.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_cast */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_cast.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_composition */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_composition.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_condition */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_condition.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_define_abstract */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_define_abstract.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_define_custom */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_define_custom.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_define_projection */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_define_projection.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_define_view */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_define_view.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_element */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_element.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_function */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_function.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_group_by */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_group_by.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_join */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_join.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_name */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_name.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_parameters_select */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_parameters_select.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_parameters */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_parameters.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_relation */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_relation.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_select */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_select.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_source */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_source.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_string */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_string.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_type */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_type.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_where */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_where.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_with_parameters */ \"./node_modules/@abaplint/core/build/src/cds/expressions/cds_with_parameters.js\"), exports);\r\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/cds/expressions/index.js?");
9810
9832
 
9811
9833
  /***/ }),
9812
9834
 
@@ -11610,7 +11632,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
11610
11632
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
11611
11633
 
11612
11634
  "use strict";
11613
- eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.Registry = void 0;\nconst config_1 = __webpack_require__(/*! ./config */ \"./node_modules/@abaplint/core/build/src/config.js\");\nconst artifacts_objects_1 = __webpack_require__(/*! ./artifacts_objects */ \"./node_modules/@abaplint/core/build/src/artifacts_objects.js\");\nconst find_global_definitions_1 = __webpack_require__(/*! ./abap/5_syntax/global_definitions/find_global_definitions */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/global_definitions/find_global_definitions.js\");\nconst excludeHelper_1 = __webpack_require__(/*! ./utils/excludeHelper */ \"./node_modules/@abaplint/core/build/src/utils/excludeHelper.js\");\nconst ddic_references_1 = __webpack_require__(/*! ./ddic_references */ \"./node_modules/@abaplint/core/build/src/ddic_references.js\");\nconst rules_runner_1 = __webpack_require__(/*! ./rules_runner */ \"./node_modules/@abaplint/core/build/src/rules_runner.js\");\n// todo, this should really be an instance in case there are multiple Registry'ies\nclass ParsingPerformance {\n static clear() {\n this.results = [];\n this.lexing = 0;\n this.statements = 0;\n this.structure = 0;\n }\n static push(obj, result) {\n if (result.runtimeExtra) {\n this.lexing += result.runtimeExtra.lexing;\n this.statements += result.runtimeExtra.statements;\n this.structure += result.runtimeExtra.structure;\n }\n if (result.runtime < 100) {\n return;\n }\n if (this.results === undefined) {\n this.results = [];\n }\n let extra = \"\";\n if (result.runtimeExtra) {\n extra = `\\t(lexing: ${result.runtimeExtra.lexing}ms, statements: ${result.runtimeExtra.statements}ms, structure: ${result.runtimeExtra.structure}ms)`;\n }\n this.results.push({\n runtime: result.runtime,\n extra,\n name: obj.getType() + \" \" + obj.getName(),\n });\n }\n static output() {\n const MAX = 10;\n this.results.sort((a, b) => { return b.runtime - a.runtime; });\n for (let i = 0; i < MAX; i++) {\n const row = this.results[i];\n if (row === undefined) {\n break;\n }\n process.stderr.write(`\\t${row.runtime}ms\\t${row.name} ${row.extra}\\n`);\n }\n process.stderr.write(`\\tTotal lexing: ${this.lexing}ms\\n`);\n process.stderr.write(`\\tTotal statements: ${this.statements}ms\\n`);\n process.stderr.write(`\\tTotal structure: ${this.structure}ms\\n`);\n }\n}\n///////////////////////////////////////////////////////////////////////////////////////////////\nclass Registry {\n constructor(conf) {\n this.objects = {};\n this.objectsByType = {};\n this.dependencies = {};\n this.conf = conf ? conf : config_1.Config.getDefault();\n this.references = new ddic_references_1.DDICReferences();\n }\n static abaplintVersion() {\n // magic, see build script \"version.sh\"\n return \"2.93.61\";\n }\n getDDICReferences() {\n return this.references;\n }\n *getObjects() {\n for (const name in this.objects) {\n for (const type in this.objects[name]) {\n yield this.objects[name][type];\n }\n }\n }\n *getObjectsByType(type) {\n for (const name in this.objectsByType[type] || []) {\n yield this.objectsByType[type][name];\n }\n }\n *getFiles() {\n for (const obj of this.getObjects()) {\n for (const file of obj.getFiles()) {\n yield file;\n }\n }\n }\n getFirstObject() {\n for (const name in this.objects) {\n for (const type in this.objects[name]) {\n return this.objects[name][type];\n }\n }\n return undefined;\n }\n getObjectCount(skipDependencies = true) {\n let res = 0;\n for (const o of this.getObjects()) {\n if (skipDependencies === true && this.isDependency(o)) {\n continue;\n }\n res = res + 1;\n }\n return res;\n }\n getFileByName(filename) {\n const upper = filename.toUpperCase();\n for (const o of this.getObjects()) {\n for (const f of o.getFiles()) {\n if (f.getFilename().toUpperCase() === upper) {\n return f;\n }\n }\n }\n return undefined;\n }\n getObject(type, name) {\n if (type === undefined || name === undefined) {\n return undefined;\n }\n const searchName = name.toUpperCase();\n if (this.objects[searchName]) {\n return this.objects[searchName][type];\n }\n return undefined;\n }\n getConfig() {\n return this.conf;\n }\n // assumption: Config is immutable, and can only be changed via this method\n setConfig(conf) {\n for (const obj of this.getObjects()) {\n obj.setDirty();\n }\n this.conf = conf;\n return this;\n }\n inErrorNamespace(name) {\n // todo: performance? cache regexp?\n const reg = new RegExp(this.getConfig().getSyntaxSetttings().errorNamespace, \"i\");\n return reg.test(name);\n }\n addFile(file) {\n return this.addFiles([file]);\n }\n updateFile(file) {\n const obj = this.find(file.getObjectName(), file.getObjectType());\n obj.updateFile(file);\n return this;\n }\n removeFile(file) {\n const obj = this.find(file.getObjectName(), file.getObjectType());\n obj.removeFile(file);\n if (obj.getFiles().length === 0) {\n this.references.clear(obj);\n this.removeObject(obj);\n }\n return this;\n }\n _addFiles(files, dependency) {\n var _a;\n const globalExclude = ((_a = this.conf.getGlobal().exclude) !== null && _a !== void 0 ? _a : [])\n .map(pattern => new RegExp(pattern, \"i\"));\n for (const f of files) {\n const filename = f.getFilename();\n const isNotAbapgitFile = filename.split(\".\").length <= 2;\n if (isNotAbapgitFile || excludeHelper_1.ExcludeHelper.isExcluded(filename, globalExclude)) {\n continue;\n }\n let found = this.findOrCreate(f.getObjectName(), f.getObjectType());\n if (dependency === false && found && this.isDependency(found)) {\n this.removeDependency(found);\n found = this.findOrCreate(f.getObjectName(), f.getObjectType());\n }\n found.addFile(f);\n }\n return this;\n }\n addFiles(files) {\n this._addFiles(files, false);\n return this;\n }\n addDependencies(files) {\n for (const f of files) {\n this.addDependency(f);\n }\n return this;\n }\n addDependency(file) {\n var _a;\n const type = (_a = file.getObjectType()) === null || _a === void 0 ? void 0 : _a.toUpperCase();\n if (type === undefined) {\n return this;\n }\n const name = file.getObjectName().toUpperCase();\n if (this.dependencies[type] === undefined) {\n this.dependencies[type] = {};\n }\n this.dependencies[type][name] = true;\n this._addFiles([file], true);\n return this;\n }\n removeDependency(obj) {\n var _a;\n (_a = this.dependencies[obj.getType()]) === null || _a === void 0 ? true : delete _a[obj.getName()];\n this.removeObject(obj);\n }\n isDependency(obj) {\n var _a;\n return ((_a = this.dependencies[obj.getType()]) === null || _a === void 0 ? void 0 : _a[obj.getName()]) === true;\n }\n isFileDependency(filename) {\n var _a, _b;\n const f = this.getFileByName(filename);\n if (f === undefined) {\n return false;\n }\n const type = (_a = f.getObjectType()) === null || _a === void 0 ? void 0 : _a.toUpperCase();\n if (type === undefined) {\n return false;\n }\n const name = f.getObjectName().toUpperCase();\n return ((_b = this.dependencies[type]) === null || _b === void 0 ? void 0 : _b[name]) === true;\n }\n // assumption: the file is already in the registry\n findObjectForFile(file) {\n const filename = file.getFilename();\n for (const obj of this.getObjects()) {\n for (const ofile of obj.getFiles()) {\n if (ofile.getFilename() === filename) {\n return obj;\n }\n }\n }\n return undefined;\n }\n // todo, this will be changed to async sometime\n findIssues(input) {\n if (this.isDirty() === true) {\n this.parse();\n }\n return new rules_runner_1.RulesRunner(this).runRules(this.getObjects(), input);\n }\n // todo, this will be changed to async sometime\n findIssuesObject(iobj) {\n if (this.isDirty() === true) {\n this.parse();\n }\n return new rules_runner_1.RulesRunner(this).runRules([iobj]);\n }\n // todo, this will be changed to async sometime\n parse() {\n if (this.isDirty() === false) {\n return this;\n }\n ParsingPerformance.clear();\n for (const o of this.getObjects()) {\n this.parsePrivate(o);\n }\n new find_global_definitions_1.FindGlobalDefinitions(this).run();\n return this;\n }\n async parseAsync(input) {\n var _a, _b;\n if (this.isDirty() === false) {\n return this;\n }\n ParsingPerformance.clear();\n (_a = input === null || input === void 0 ? void 0 : input.progress) === null || _a === void 0 ? void 0 : _a.set(this.getObjectCount(false), \"Lexing and parsing\");\n for (const o of this.getObjects()) {\n await ((_b = input === null || input === void 0 ? void 0 : input.progress) === null || _b === void 0 ? void 0 : _b.tick(\"Lexing and parsing(\" + this.conf.getVersion() + \") - \" + o.getType() + \" \" + o.getName()));\n this.parsePrivate(o);\n }\n if ((input === null || input === void 0 ? void 0 : input.outputPerformance) === true) {\n ParsingPerformance.output();\n }\n new find_global_definitions_1.FindGlobalDefinitions(this).run(input === null || input === void 0 ? void 0 : input.progress);\n return this;\n }\n //////////////////////////////////////////\n // todo, refactor, this is a mess, see where-used, a lot of the code should be in this method instead\n parsePrivate(input) {\n const config = this.getConfig();\n const result = input.parse(config.getVersion(), config.getSyntaxSetttings().globalMacros, this);\n ParsingPerformance.push(input, result);\n }\n isDirty() {\n for (const o of this.getObjects()) {\n const dirty = o.isDirty();\n if (dirty === true) {\n return true;\n }\n }\n return false;\n }\n findOrCreate(name, type) {\n try {\n return this.find(name, type);\n }\n catch (_a) {\n const newName = name.toUpperCase();\n const newType = type ? type : \"UNKNOWN\";\n const add = artifacts_objects_1.ArtifactsObjects.newObject(newName, newType);\n if (this.objects[newName] === undefined) {\n this.objects[newName] = {};\n }\n this.objects[newName][newType] = add;\n if (this.objectsByType[newType] === undefined) {\n this.objectsByType[newType] = {};\n }\n this.objectsByType[newType][newName] = add;\n return add;\n }\n }\n removeObject(remove) {\n if (remove === undefined) {\n return;\n }\n if (this.objects[remove.getName()][remove.getType()] === undefined) {\n throw new Error(\"removeObject: object not found\");\n }\n if (Object.keys(this.objects[remove.getName()]).length === 1) {\n delete this.objects[remove.getName()];\n }\n else {\n delete this.objects[remove.getName()][remove.getType()];\n }\n if (Object.keys(this.objectsByType[remove.getType()]).length === 1) {\n delete this.objectsByType[remove.getType()];\n }\n else {\n delete this.objectsByType[remove.getType()][remove.getName()];\n }\n }\n find(name, type) {\n const searchType = type ? type : \"UNKNOWN\";\n const searchName = name.toUpperCase();\n if (this.objects[searchName] !== undefined\n && this.objects[searchName][searchType]) {\n return this.objects[searchName][searchType];\n }\n throw new Error(\"find: object not found, \" + type + \" \" + name);\n }\n}\nexports.Registry = Registry;\n//# sourceMappingURL=registry.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/registry.js?");
11635
+ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.Registry = void 0;\nconst config_1 = __webpack_require__(/*! ./config */ \"./node_modules/@abaplint/core/build/src/config.js\");\nconst artifacts_objects_1 = __webpack_require__(/*! ./artifacts_objects */ \"./node_modules/@abaplint/core/build/src/artifacts_objects.js\");\nconst find_global_definitions_1 = __webpack_require__(/*! ./abap/5_syntax/global_definitions/find_global_definitions */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/global_definitions/find_global_definitions.js\");\nconst excludeHelper_1 = __webpack_require__(/*! ./utils/excludeHelper */ \"./node_modules/@abaplint/core/build/src/utils/excludeHelper.js\");\nconst ddic_references_1 = __webpack_require__(/*! ./ddic_references */ \"./node_modules/@abaplint/core/build/src/ddic_references.js\");\nconst rules_runner_1 = __webpack_require__(/*! ./rules_runner */ \"./node_modules/@abaplint/core/build/src/rules_runner.js\");\n// todo, this should really be an instance in case there are multiple Registry'ies\nclass ParsingPerformance {\n static clear() {\n this.results = [];\n this.lexing = 0;\n this.statements = 0;\n this.structure = 0;\n }\n static push(obj, result) {\n if (result.runtimeExtra) {\n this.lexing += result.runtimeExtra.lexing;\n this.statements += result.runtimeExtra.statements;\n this.structure += result.runtimeExtra.structure;\n }\n if (result.runtime < 100) {\n return;\n }\n if (this.results === undefined) {\n this.results = [];\n }\n let extra = \"\";\n if (result.runtimeExtra) {\n extra = `\\t(lexing: ${result.runtimeExtra.lexing}ms, statements: ${result.runtimeExtra.statements}ms, structure: ${result.runtimeExtra.structure}ms)`;\n }\n this.results.push({\n runtime: result.runtime,\n extra,\n name: obj.getType() + \" \" + obj.getName(),\n });\n }\n static output() {\n const MAX = 10;\n this.results.sort((a, b) => { return b.runtime - a.runtime; });\n for (let i = 0; i < MAX; i++) {\n const row = this.results[i];\n if (row === undefined) {\n break;\n }\n process.stderr.write(`\\t${row.runtime}ms\\t${row.name} ${row.extra}\\n`);\n }\n process.stderr.write(`\\tTotal lexing: ${this.lexing}ms\\n`);\n process.stderr.write(`\\tTotal statements: ${this.statements}ms\\n`);\n process.stderr.write(`\\tTotal structure: ${this.structure}ms\\n`);\n }\n}\n///////////////////////////////////////////////////////////////////////////////////////////////\nclass Registry {\n constructor(conf) {\n this.objects = {};\n this.objectsByType = {};\n this.dependencies = {};\n this.conf = conf ? conf : config_1.Config.getDefault();\n this.references = new ddic_references_1.DDICReferences();\n }\n static abaplintVersion() {\n // magic, see build script \"version.sh\"\n return \"2.93.63\";\n }\n getDDICReferences() {\n return this.references;\n }\n *getObjects() {\n for (const name in this.objects) {\n for (const type in this.objects[name]) {\n yield this.objects[name][type];\n }\n }\n }\n *getObjectsByType(type) {\n for (const name in this.objectsByType[type] || []) {\n yield this.objectsByType[type][name];\n }\n }\n *getFiles() {\n for (const obj of this.getObjects()) {\n for (const file of obj.getFiles()) {\n yield file;\n }\n }\n }\n getFirstObject() {\n for (const name in this.objects) {\n for (const type in this.objects[name]) {\n return this.objects[name][type];\n }\n }\n return undefined;\n }\n getObjectCount(skipDependencies = true) {\n let res = 0;\n for (const o of this.getObjects()) {\n if (skipDependencies === true && this.isDependency(o)) {\n continue;\n }\n res = res + 1;\n }\n return res;\n }\n getFileByName(filename) {\n const upper = filename.toUpperCase();\n for (const o of this.getObjects()) {\n for (const f of o.getFiles()) {\n if (f.getFilename().toUpperCase() === upper) {\n return f;\n }\n }\n }\n return undefined;\n }\n getObject(type, name) {\n if (type === undefined || name === undefined) {\n return undefined;\n }\n const searchName = name.toUpperCase();\n if (this.objects[searchName]) {\n return this.objects[searchName][type];\n }\n return undefined;\n }\n getConfig() {\n return this.conf;\n }\n // assumption: Config is immutable, and can only be changed via this method\n setConfig(conf) {\n for (const obj of this.getObjects()) {\n obj.setDirty();\n }\n this.conf = conf;\n return this;\n }\n inErrorNamespace(name) {\n // todo: performance? cache regexp?\n const reg = new RegExp(this.getConfig().getSyntaxSetttings().errorNamespace, \"i\");\n return reg.test(name);\n }\n addFile(file) {\n return this.addFiles([file]);\n }\n updateFile(file) {\n const obj = this.find(file.getObjectName(), file.getObjectType());\n obj.updateFile(file);\n return this;\n }\n removeFile(file) {\n const obj = this.find(file.getObjectName(), file.getObjectType());\n obj.removeFile(file);\n if (obj.getFiles().length === 0) {\n this.references.clear(obj);\n this.removeObject(obj);\n }\n return this;\n }\n _addFiles(files, dependency) {\n var _a;\n const globalExclude = ((_a = this.conf.getGlobal().exclude) !== null && _a !== void 0 ? _a : [])\n .map(pattern => new RegExp(pattern, \"i\"));\n for (const f of files) {\n const filename = f.getFilename();\n const isNotAbapgitFile = filename.split(\".\").length <= 2;\n if (isNotAbapgitFile || excludeHelper_1.ExcludeHelper.isExcluded(filename, globalExclude)) {\n continue;\n }\n let found = this.findOrCreate(f.getObjectName(), f.getObjectType());\n if (dependency === false && found && this.isDependency(found)) {\n this.removeDependency(found);\n found = this.findOrCreate(f.getObjectName(), f.getObjectType());\n }\n found.addFile(f);\n }\n return this;\n }\n addFiles(files) {\n this._addFiles(files, false);\n return this;\n }\n addDependencies(files) {\n for (const f of files) {\n this.addDependency(f);\n }\n return this;\n }\n addDependency(file) {\n var _a;\n const type = (_a = file.getObjectType()) === null || _a === void 0 ? void 0 : _a.toUpperCase();\n if (type === undefined) {\n return this;\n }\n const name = file.getObjectName().toUpperCase();\n if (this.dependencies[type] === undefined) {\n this.dependencies[type] = {};\n }\n this.dependencies[type][name] = true;\n this._addFiles([file], true);\n return this;\n }\n removeDependency(obj) {\n var _a;\n (_a = this.dependencies[obj.getType()]) === null || _a === void 0 ? true : delete _a[obj.getName()];\n this.removeObject(obj);\n }\n isDependency(obj) {\n var _a;\n return ((_a = this.dependencies[obj.getType()]) === null || _a === void 0 ? void 0 : _a[obj.getName()]) === true;\n }\n isFileDependency(filename) {\n var _a, _b;\n const f = this.getFileByName(filename);\n if (f === undefined) {\n return false;\n }\n const type = (_a = f.getObjectType()) === null || _a === void 0 ? void 0 : _a.toUpperCase();\n if (type === undefined) {\n return false;\n }\n const name = f.getObjectName().toUpperCase();\n return ((_b = this.dependencies[type]) === null || _b === void 0 ? void 0 : _b[name]) === true;\n }\n // assumption: the file is already in the registry\n findObjectForFile(file) {\n const filename = file.getFilename();\n for (const obj of this.getObjects()) {\n for (const ofile of obj.getFiles()) {\n if (ofile.getFilename() === filename) {\n return obj;\n }\n }\n }\n return undefined;\n }\n // todo, this will be changed to async sometime\n findIssues(input) {\n if (this.isDirty() === true) {\n this.parse();\n }\n return new rules_runner_1.RulesRunner(this).runRules(this.getObjects(), input);\n }\n // todo, this will be changed to async sometime\n findIssuesObject(iobj) {\n if (this.isDirty() === true) {\n this.parse();\n }\n return new rules_runner_1.RulesRunner(this).runRules([iobj]);\n }\n // todo, this will be changed to async sometime\n parse() {\n if (this.isDirty() === false) {\n return this;\n }\n ParsingPerformance.clear();\n for (const o of this.getObjects()) {\n this.parsePrivate(o);\n }\n new find_global_definitions_1.FindGlobalDefinitions(this).run();\n return this;\n }\n async parseAsync(input) {\n var _a, _b;\n if (this.isDirty() === false) {\n return this;\n }\n ParsingPerformance.clear();\n (_a = input === null || input === void 0 ? void 0 : input.progress) === null || _a === void 0 ? void 0 : _a.set(this.getObjectCount(false), \"Lexing and parsing\");\n for (const o of this.getObjects()) {\n await ((_b = input === null || input === void 0 ? void 0 : input.progress) === null || _b === void 0 ? void 0 : _b.tick(\"Lexing and parsing(\" + this.conf.getVersion() + \") - \" + o.getType() + \" \" + o.getName()));\n this.parsePrivate(o);\n }\n if ((input === null || input === void 0 ? void 0 : input.outputPerformance) === true) {\n ParsingPerformance.output();\n }\n new find_global_definitions_1.FindGlobalDefinitions(this).run(input === null || input === void 0 ? void 0 : input.progress);\n return this;\n }\n //////////////////////////////////////////\n // todo, refactor, this is a mess, see where-used, a lot of the code should be in this method instead\n parsePrivate(input) {\n const config = this.getConfig();\n const result = input.parse(config.getVersion(), config.getSyntaxSetttings().globalMacros, this);\n ParsingPerformance.push(input, result);\n }\n isDirty() {\n for (const o of this.getObjects()) {\n const dirty = o.isDirty();\n if (dirty === true) {\n return true;\n }\n }\n return false;\n }\n findOrCreate(name, type) {\n try {\n return this.find(name, type);\n }\n catch (_a) {\n const newName = name.toUpperCase();\n const newType = type ? type : \"UNKNOWN\";\n const add = artifacts_objects_1.ArtifactsObjects.newObject(newName, newType);\n if (this.objects[newName] === undefined) {\n this.objects[newName] = {};\n }\n this.objects[newName][newType] = add;\n if (this.objectsByType[newType] === undefined) {\n this.objectsByType[newType] = {};\n }\n this.objectsByType[newType][newName] = add;\n return add;\n }\n }\n removeObject(remove) {\n if (remove === undefined) {\n return;\n }\n if (this.objects[remove.getName()][remove.getType()] === undefined) {\n throw new Error(\"removeObject: object not found\");\n }\n if (Object.keys(this.objects[remove.getName()]).length === 1) {\n delete this.objects[remove.getName()];\n }\n else {\n delete this.objects[remove.getName()][remove.getType()];\n }\n if (Object.keys(this.objectsByType[remove.getType()]).length === 1) {\n delete this.objectsByType[remove.getType()];\n }\n else {\n delete this.objectsByType[remove.getType()][remove.getName()];\n }\n }\n find(name, type) {\n const searchType = type ? type : \"UNKNOWN\";\n const searchName = name.toUpperCase();\n if (this.objects[searchName] !== undefined\n && this.objects[searchName][searchType]) {\n return this.objects[searchName][searchType];\n }\n throw new Error(\"find: object not found, \" + type + \" \" + name);\n }\n}\nexports.Registry = Registry;\n//# sourceMappingURL=registry.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/registry.js?");
11614
11636
 
11615
11637
  /***/ }),
11616
11638
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/cli",
3
- "version": "2.93.61",
3
+ "version": "2.93.63",
4
4
  "description": "abaplint - Command Line Interface",
5
5
  "bin": {
6
6
  "abaplint": "./abaplint"
@@ -39,7 +39,7 @@
39
39
  },
40
40
  "homepage": "https://abaplint.org",
41
41
  "devDependencies": {
42
- "@abaplint/core": "^2.93.61",
42
+ "@abaplint/core": "^2.93.63",
43
43
  "@types/chai": "^4.3.3",
44
44
  "@types/glob": "^7.2.0",
45
45
  "@types/minimist": "^1.2.2",