@abaplint/cli 2.113.52 → 2.113.53

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 +17 -14
  2. package/package.json +2 -2
package/build/cli.js CHANGED
@@ -6056,7 +6056,8 @@ const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src
6056
6056
  class InlineLoopDefinition extends combi_1.Expression {
6057
6057
  getRunnable() {
6058
6058
  const index = (0, combi_1.seq)("INDEX INTO", _1.TargetField);
6059
- return (0, combi_1.seq)((0, combi_1.altPrio)(_1.TargetFieldSymbol, _1.TargetField), "IN", (0, combi_1.opt)("GROUP"), _1.Source, (0, combi_1.optPrio)(index));
6059
+ const key = (0, combi_1.seq)("USING KEY", _1.SimpleName);
6060
+ return (0, combi_1.seq)((0, combi_1.altPrio)(_1.TargetFieldSymbol, _1.TargetField), "IN", (0, combi_1.opt)("GROUP"), _1.Source, (0, combi_1.optPrio)(key), (0, combi_1.optPrio)(index));
6060
6061
  }
6061
6062
  }
6062
6063
  exports.InlineLoopDefinition = InlineLoopDefinition;
@@ -7458,8 +7459,6 @@ const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src
7458
7459
  const version_1 = __webpack_require__(/*! ../../../version */ "./node_modules/@abaplint/core/build/src/version.js");
7459
7460
  const sql_group_by_1 = __webpack_require__(/*! ./sql_group_by */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_group_by.js");
7460
7461
  const sql_into_structure_1 = __webpack_require__(/*! ./sql_into_structure */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_into_structure.js");
7461
- const tokens_1 = __webpack_require__(/*! ../../1_lexer/tokens */ "./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js");
7462
- const sql_field_name_1 = __webpack_require__(/*! ./sql_field_name */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_field_name.js");
7463
7462
  const sql_up_to_1 = __webpack_require__(/*! ./sql_up_to */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_up_to.js");
7464
7463
  class Select extends combi_1.Expression {
7465
7464
  getRunnable() {
@@ -7471,8 +7470,7 @@ class Select extends combi_1.Expression {
7471
7470
  // todo, HINTS cannot be anywhere, need an expression dedicated for strict sql
7472
7471
  const perm = (0, combi_1.per)(_1.SQLFrom, into, _1.SQLForAllEntries, where, _1.SQLOrderBy, sql_up_to_1.SQLUpTo, offset, _1.SQLClient, _1.SQLHaving, bypass, sql_group_by_1.SQLGroupBy, fields, _1.DatabaseConnection, _1.SQLHints);
7473
7472
  const permSingle = (0, combi_1.per)(_1.SQLFrom, (0, combi_1.altPrio)(sql_into_structure_1.SQLIntoStructure, _1.SQLIntoList), where, _1.SQLClient, bypass, sql_group_by_1.SQLGroupBy, fields, _1.DatabaseConnection, _1.SQLHints);
7474
- const paren = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WParenLeftW), sql_field_name_1.SQLFieldName, (0, combi_1.tok)(tokens_1.WParenRightW));
7475
- const fieldList = (0, combi_1.optPrio)((0, combi_1.altPrio)(_1.SQLFieldList, paren));
7473
+ const fieldList = (0, combi_1.optPrio)(_1.SQLFieldList);
7476
7474
  const single = (0, combi_1.seq)("SINGLE", (0, combi_1.optPrio)("FOR UPDATE"), fieldList, permSingle);
7477
7475
  const other = (0, combi_1.seq)((0, combi_1.optPrio)("DISTINCT"), fieldList, perm);
7478
7476
  const ret = (0, combi_1.seq)("SELECT", (0, combi_1.altPrio)(single, other));
@@ -8213,11 +8211,13 @@ exports.SQLFieldList = void 0;
8213
8211
  const combi_1 = __webpack_require__(/*! ../combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
8214
8212
  const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
8215
8213
  const version_1 = __webpack_require__(/*! ../../../version */ "./node_modules/@abaplint/core/build/src/version.js");
8214
+ const tokens_1 = __webpack_require__(/*! ../../1_lexer/tokens */ "./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js");
8216
8215
  class SQLFieldList extends combi_1.Expression {
8217
8216
  getRunnable() {
8217
+ const paren = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WParenLeftW), _1.SQLFieldName, (0, combi_1.tok)(tokens_1.WParenRightW));
8218
8218
  const nev = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.starPrio)((0, combi_1.seq)(",", _1.SQLField)));
8219
8219
  const old = (0, combi_1.starPrio)(_1.SQLField);
8220
- return (0, combi_1.altPrio)("*", _1.Dynamic, (0, combi_1.seq)(_1.SQLField, (0, combi_1.alt)(nev, old)));
8220
+ return (0, combi_1.altPrio)("*", _1.Dynamic, (0, combi_1.seq)(_1.SQLField, (0, combi_1.alt)(nev, old)), paren);
8221
8221
  }
8222
8222
  }
8223
8223
  exports.SQLFieldList = SQLFieldList;
@@ -8901,7 +8901,7 @@ class StringTemplateFormatting extends combi_1.Expression {
8901
8901
  const alignOptions = (0, combi_1.altPrio)("LEFT", "RIGHT", "CENTER", _1.Source);
8902
8902
  const dateTimeOptions = (0, combi_1.altPrio)("RAW", "ISO", "USER", "ENVIRONMENT", _1.Source, dynamic_1.Dynamic);
8903
8903
  const timeStampOptions = (0, combi_1.altPrio)("SPACE", "ISO", "USER", "ENVIRONMENT", _1.Source);
8904
- const numberOptions = (0, combi_1.altPrio)("RAW", "USER", "ENVIRONMENT", _1.Source);
8904
+ const numberOptions = (0, combi_1.altPrio)("RAW", "USER", "ENVIRONMENT", _1.Source, dynamic_1.Dynamic);
8905
8905
  const signOptions = (0, combi_1.altPrio)("LEFT", "LEFTPLUS", "LEFTSPACE", "RIGHT", "RIGHTPLUS", "RIGHTSPACE", _1.Source);
8906
8906
  const caseOptions = (0, combi_1.altPrio)("RAW", "UPPER", "LOWER", _1.Source, dynamic_1.Dynamic);
8907
8907
  const zeroXSDOptions = (0, combi_1.altPrio)("YES", "NO", _1.Source);
@@ -9113,7 +9113,7 @@ const combi_1 = __webpack_require__(/*! ../combi */ "./node_modules/@abaplint/co
9113
9113
  const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
9114
9114
  class TargetFieldSymbol extends combi_1.Expression {
9115
9115
  getRunnable() {
9116
- return new _1.FieldSymbol();
9116
+ return (0, combi_1.seq)(_1.FieldSymbol, (0, combi_1.optPrio)(_1.TableBody));
9117
9117
  }
9118
9118
  }
9119
9119
  exports.TargetFieldSymbol = TargetFieldSymbol;
@@ -14695,7 +14695,7 @@ class MethodDef {
14695
14695
  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, (0, combi_1.altPrio)(forRead, forfunction)), (0, combi_1.seq)("FEATURES IMPORTING", expressions_1.MethodParamName, "REQUEST", expressions_1.NamespaceSimpleName, "FOR", expressions_1.NamespaceSimpleName, result), (0, combi_1.seq)("BEHAVIOR IMPORTING", expressions_1.MethodParamName, "FOR CREATE", expressions_1.TypeName, expressions_1.MethodParamName, "FOR UPDATE", expressions_1.TypeName, expressions_1.MethodParamName, "FOR DELETE", expressions_1.TypeName), (0, combi_1.seq)("BEHAVIOR IMPORTING", expressions_1.MethodParamName, "FOR READ", expressions_1.TypeName, result), (0, combi_1.seq)((0, combi_1.alt)("BEHAVIOR", "LOCK"), "IMPORTING", expressions_1.MethodParamName, "FOR LOCK", expressions_1.TypeName), (0, combi_1.seq)("DETERMINE", (0, combi_1.alt)("ON MODIFY", "ON SAVE"), "IMPORTING", expressions_1.MethodParamName, "FOR", expressions_1.TypeName), (0, combi_1.seq)("GLOBAL AUTHORIZATION IMPORTING REQUEST", expressions_1.MethodParamName, "FOR", expressions_1.TypeName, result), (0, combi_1.seq)("INSTANCE AUTHORIZATION IMPORTING", expressions_1.MethodParamName, "REQUEST", expressions_1.MethodParamName, "FOR", expressions_1.TypeName, result), (0, combi_1.seq)("INSTANCE FEATURES IMPORTING", expressions_1.MethodParamName, "REQUEST", expressions_1.MethodParamName, "FOR", expressions_1.TypeName, result));
14696
14696
  // todo, this is only from version something
14697
14697
  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));
14698
- 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)));
14698
+ 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), (0, combi_1.optPrio)(def), 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)));
14699
14699
  return ret;
14700
14700
  }
14701
14701
  }
@@ -22949,6 +22949,9 @@ class TypeUtils {
22949
22949
  return this.isAssignable(source, target);
22950
22950
  }
22951
22951
  isAssignable(source, target) {
22952
+ if (source === undefined || target === undefined) {
22953
+ return true;
22954
+ }
22952
22955
  /*
22953
22956
  console.dir(source);
22954
22957
  console.dir(target);
@@ -39822,7 +39825,7 @@ exports.CDSDetermineTypes = void 0;
39822
39825
  const basic_1 = __webpack_require__(/*! ../abap/types/basic */ "./node_modules/@abaplint/core/build/src/abap/types/basic/index.js");
39823
39826
  const ddic_1 = __webpack_require__(/*! ../ddic */ "./node_modules/@abaplint/core/build/src/ddic.js");
39824
39827
  class CDSDetermineTypes {
39825
- parseType(reg, parsedData) {
39828
+ parseType(reg, parsedData, ddlsName) {
39826
39829
  const ddic = new ddic_1.DDIC(reg);
39827
39830
  if ((parsedData === null || parsedData === void 0 ? void 0 : parsedData.fields.length) === 0) {
39828
39831
  return new basic_1.VoidType("DDLS:todo");
@@ -39848,7 +39851,7 @@ class CDSDetermineTypes {
39848
39851
  if ((source === null || source === void 0 ? void 0 : source.name) === undefined) {
39849
39852
  components.push({
39850
39853
  name: f.name,
39851
- type: new basic_1.UnknownType("CDS parser error, unknown source"),
39854
+ type: new basic_1.UnknownType("CDS parser error, unknown source, " + ddlsName),
39852
39855
  });
39853
39856
  continue;
39854
39857
  }
@@ -39893,7 +39896,7 @@ class CDSDetermineTypes {
39893
39896
  else {
39894
39897
  components.push({
39895
39898
  name: f.name,
39896
- type: new basic_1.VoidType("DDLS:fieldname"),
39899
+ type: new basic_1.VoidType("DDLS:fieldname:" + ddlsName),
39897
39900
  });
39898
39901
  }
39899
39902
  }
@@ -46824,7 +46827,7 @@ class DataDefinition extends _abstract_object_1.AbstractObject {
46824
46827
  }
46825
46828
  parseType(reg) {
46826
46829
  this.parse();
46827
- return new cds_determine_types_1.CDSDetermineTypes().parseType(reg, this.parsedData);
46830
+ return new cds_determine_types_1.CDSDetermineTypes().parseType(reg, this.parsedData, this.getName());
46828
46831
  }
46829
46832
  getParsedData() {
46830
46833
  return this.parsedData;
@@ -53126,7 +53129,7 @@ class Registry {
53126
53129
  }
53127
53130
  static abaplintVersion() {
53128
53131
  // magic, see build script "version.sh"
53129
- return "2.113.52";
53132
+ return "2.113.53";
53130
53133
  }
53131
53134
  getDDICReferences() {
53132
53135
  return this.ddicReferences;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/cli",
3
- "version": "2.113.52",
3
+ "version": "2.113.53",
4
4
  "description": "abaplint - Command Line Interface",
5
5
  "funding": "https://github.com/sponsors/larshp",
6
6
  "bin": {
@@ -38,7 +38,7 @@
38
38
  },
39
39
  "homepage": "https://abaplint.org",
40
40
  "devDependencies": {
41
- "@abaplint/core": "^2.113.52",
41
+ "@abaplint/core": "^2.113.53",
42
42
  "@types/chai": "^4.3.20",
43
43
  "@types/glob": "^8.1.0",
44
44
  "@types/minimist": "^1.2.5",