@abaplint/transpiler-cli 2.7.126 → 2.7.127

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/bundle.js +51 -6
  2. package/package.json +4 -4
package/build/bundle.js CHANGED
@@ -572,6 +572,9 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
572
572
  exports.Token = void 0;
573
573
  const position_1 = __webpack_require__(/*! ../../../position */ "./node_modules/@abaplint/core/build/src/position.js");
574
574
  class Token {
575
+ [Symbol.for("debug.description")]() {
576
+ return `${this.constructor.name} ${this.str}`;
577
+ }
575
578
  constructor(start, str) {
576
579
  this.start = start;
577
580
  this.str = str;
@@ -4303,6 +4306,7 @@ __exportStar(__webpack_require__(/*! ./sql_order_by */ "./node_modules/@abaplint
4303
4306
  __exportStar(__webpack_require__(/*! ./sql_path */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_path.js"), exports);
4304
4307
  __exportStar(__webpack_require__(/*! ./sql_source_simple */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_source_simple.js"), exports);
4305
4308
  __exportStar(__webpack_require__(/*! ./sql_source */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_source.js"), exports);
4309
+ __exportStar(__webpack_require__(/*! ./sql_source_no_space */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_source_no_space.js"), exports);
4306
4310
  __exportStar(__webpack_require__(/*! ./sql_target */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_target.js"), exports);
4307
4311
  __exportStar(__webpack_require__(/*! ./sql_up_to */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_up_to.js"), exports);
4308
4312
  __exportStar(__webpack_require__(/*! ./string_template_formatting */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/string_template_formatting.js"), exports);
@@ -6797,7 +6801,7 @@ const version_1 = __webpack_require__(/*! ../../../version */ "./node_modules/@a
6797
6801
  class SQLIn extends combi_1.Expression {
6798
6802
  getRunnable() {
6799
6803
  const val = new _1.SQLSource();
6800
- const short = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.At), _1.SimpleSource3);
6804
+ const short = new _1.SQLSourceNoSpace();
6801
6805
  const listOld = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WParenLeft), (0, combi_1.alt)((0, combi_1.ver)(version_1.Version.v740sp05, short), val), (0, combi_1.starPrio)((0, combi_1.seq)(",", val)), (0, combi_1.altPrio)((0, combi_1.tok)(tokens_1.ParenRight), (0, combi_1.tok)(tokens_1.ParenRightW), (0, combi_1.tok)(tokens_1.WParenRightW)));
6802
6806
  const listNew = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WParenLeftW), val, (0, combi_1.starPrio)((0, combi_1.seq)(",", (0, combi_1.altPrio)(short, val))), (0, combi_1.altPrio)((0, combi_1.tok)(tokens_1.WParenRight), (0, combi_1.tok)(tokens_1.WParenRightW)));
6803
6807
  const list = (0, combi_1.alt)(listOld, (0, combi_1.ver)(version_1.Version.v740sp02, listNew)); // version is a guess, https://github.com/abaplint/abaplint/issues/2530
@@ -6981,6 +6985,32 @@ exports.SQLSource = SQLSource;
6981
6985
 
6982
6986
  /***/ }),
6983
6987
 
6988
+ /***/ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_source_no_space.js":
6989
+ /*!****************************************************************************************************!*\
6990
+ !*** ./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_source_no_space.js ***!
6991
+ \****************************************************************************************************/
6992
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
6993
+
6994
+ "use strict";
6995
+
6996
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
6997
+ exports.SQLSourceNoSpace = void 0;
6998
+ const combi_1 = __webpack_require__(/*! ../combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
6999
+ const version_1 = __webpack_require__(/*! ../../../version */ "./node_modules/@abaplint/core/build/src/version.js");
7000
+ const tokens_1 = __webpack_require__(/*! ../../1_lexer/tokens */ "./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js");
7001
+ const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
7002
+ class SQLSourceNoSpace extends combi_1.Expression {
7003
+ getRunnable() {
7004
+ const paren = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.ParenLeftW), _1.Source, (0, combi_1.tok)(tokens_1.WParenRightW));
7005
+ const at = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)((0, combi_1.tok)(tokens_1.At), (0, combi_1.altPrio)(_1.SimpleSource3, paren)));
7006
+ return (0, combi_1.alt)(_1.SQLAliasField, _1.SimpleSource3, at);
7007
+ }
7008
+ }
7009
+ exports.SQLSourceNoSpace = SQLSourceNoSpace;
7010
+ //# sourceMappingURL=sql_source_no_space.js.map
7011
+
7012
+ /***/ }),
7013
+
6984
7014
  /***/ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_source_simple.js":
6985
7015
  /*!**************************************************************************************************!*\
6986
7016
  !*** ./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_source_simple.js ***!
@@ -19147,7 +19177,7 @@ BuiltIn.methods = [
19147
19177
  {
19148
19178
  name: "LINE_INDEX",
19149
19179
  mandatory: {
19150
- "val": basic_1.CLikeType.get(),
19180
+ "val": new basic_1.AnyType(),
19151
19181
  },
19152
19182
  return: basic_1.IntegerType.get(),
19153
19183
  version: version_1.Version.v740sp02,
@@ -20888,9 +20918,10 @@ class TypeUtils {
20888
20918
  }
20889
20919
  return true;
20890
20920
  }
20891
- else if (target instanceof basic_1.CharacterType) {
20892
- return false;
20921
+ else if (target instanceof basic_1.VoidType || target instanceof basic_1.AnyType) {
20922
+ return true;
20893
20923
  }
20924
+ return false;
20894
20925
  }
20895
20926
  else if (source instanceof basic_1.Integer8Type) {
20896
20927
  if (target instanceof basic_1.IntegerType || target instanceof basic_1.StringType) {
@@ -25265,12 +25296,16 @@ exports.SQLCompare = void 0;
25265
25296
  const Expressions = __webpack_require__(/*! ../../2_statements/expressions */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
25266
25297
  const nodes_1 = __webpack_require__(/*! ../../nodes */ "./node_modules/@abaplint/core/build/src/abap/nodes/index.js");
25267
25298
  const basic_1 = __webpack_require__(/*! ../../types/basic */ "./node_modules/@abaplint/core/build/src/abap/types/basic/index.js");
25299
+ const source_1 = __webpack_require__(/*! ./source */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/source.js");
25268
25300
  const sql_source_1 = __webpack_require__(/*! ./sql_source */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/sql_source.js");
25269
25301
  class SQLCompare {
25270
25302
  runSyntax(node, scope, filename, tables) {
25271
25303
  var _a;
25272
25304
  let sourceType;
25273
25305
  let token;
25306
+ for (const s of node.findAllExpressions(Expressions.SimpleSource3)) {
25307
+ new source_1.Source().runSyntax(s, scope, filename);
25308
+ }
25274
25309
  for (const s of node.findAllExpressions(Expressions.SQLSource)) {
25275
25310
  for (const child of s.getChildren()) {
25276
25311
  if (child instanceof nodes_1.ExpressionNode) {
@@ -26075,6 +26110,9 @@ class ScopeData {
26075
26110
  }
26076
26111
  }
26077
26112
  class SpaghettiScopeNode extends ScopeData {
26113
+ [Symbol.for("debug.description")]() {
26114
+ return `SpaghettiSN ${this.identifier.sname} ${this.identifier.stype}`;
26115
+ }
26078
26116
  constructor(identifier, parent) {
26079
26117
  super();
26080
26118
  this.identifier = identifier;
@@ -33659,6 +33697,9 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
33659
33697
  exports.TypedIdentifier = void 0;
33660
33698
  const _identifier_1 = __webpack_require__(/*! ../4_file_information/_identifier */ "./node_modules/@abaplint/core/build/src/abap/4_file_information/_identifier.js");
33661
33699
  class TypedIdentifier extends _identifier_1.Identifier {
33700
+ [Symbol.for("debug.description")]() {
33701
+ return `${this.constructor.name} ${this.getName()}:${this.getType().constructor.name}`;
33702
+ }
33662
33703
  static from(id, type, meta) {
33663
33704
  return new TypedIdentifier(id.getToken(), id.getFilename(), type, meta);
33664
33705
  }
@@ -41535,6 +41576,9 @@ const _abstract_object_1 = __webpack_require__(/*! ./_abstract_object */ "./node
41535
41576
  const xml_utils_1 = __webpack_require__(/*! ../xml_utils */ "./node_modules/@abaplint/core/build/src/xml_utils.js");
41536
41577
  const abap_parser_1 = __webpack_require__(/*! ../abap/abap_parser */ "./node_modules/@abaplint/core/build/src/abap/abap_parser.js");
41537
41578
  class ABAPObject extends _abstract_object_1.AbstractObject {
41579
+ [Symbol.for("debug.description")]() {
41580
+ return `${this.constructor.name} ${this.getName()}`;
41581
+ }
41538
41582
  constructor(name) {
41539
41583
  super(name);
41540
41584
  this.parsed = [];
@@ -49047,7 +49091,7 @@ class Registry {
49047
49091
  }
49048
49092
  static abaplintVersion() {
49049
49093
  // magic, see build script "version.sh"
49050
- return "2.102.61";
49094
+ return "2.102.64";
49051
49095
  }
49052
49096
  getDDICReferences() {
49053
49097
  return this.ddicReferences;
@@ -54232,6 +54276,7 @@ Make sure to test the downported code, it might not always be completely correct
54232
54276
  };
54233
54277
  const candidates = [high.findAllExpressionsRecursive(Expressions.SQLTarget),
54234
54278
  high.findAllExpressionsRecursive(Expressions.SQLSource),
54279
+ high.findAllExpressionsRecursive(Expressions.SQLSourceNoSpace),
54235
54280
  high.findAllExpressionsRecursive(Expressions.SQLSourceSimple)].flat();
54236
54281
  for (const c of candidates.reverse()) {
54237
54282
  if (c.getFirstToken() instanceof tokens_1.WAt
@@ -78664,7 +78709,7 @@ class MethodImplementationTranspiler {
78664
78709
  && type.isGeneric() === false) {
78665
78710
  after += `let ${varName} = ${unique}?.${varName};\n`;
78666
78711
  if (identifier.getType().getQualifiedName() !== undefined && identifier.getType().getQualifiedName() !== "") {
78667
- after += `if (${varName}.getQualifiedName === undefined || ${varName}.getQualifiedName() !== "${(_a = identifier.getType().getQualifiedName()) === null || _a === void 0 ? void 0 : _a.toUpperCase()}") { ${varName} = undefined; }\n`;
78712
+ after += `if (${varName}?.getQualifiedName === undefined || ${varName}.getQualifiedName() !== "${(_a = identifier.getType().getQualifiedName()) === null || _a === void 0 ? void 0 : _a.toUpperCase()}") { ${varName} = undefined; }\n`;
78668
78713
  }
78669
78714
  after += `if (${varName} === undefined) { ${varName} = ${new transpile_types_1.TranspileTypes().toType(identifier.getType())}.set(${unique}.${varName}); }\n`;
78670
78715
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/transpiler-cli",
3
- "version": "2.7.126",
3
+ "version": "2.7.127",
4
4
  "description": "Transpiler - Command Line Interface",
5
5
  "funding": "https://github.com/sponsors/larshp",
6
6
  "bin": {
@@ -26,12 +26,12 @@
26
26
  "author": "abaplint",
27
27
  "license": "MIT",
28
28
  "devDependencies": {
29
- "@abaplint/transpiler": "^2.7.126",
29
+ "@abaplint/transpiler": "^2.7.127",
30
30
  "@types/glob": "^7.2.0",
31
31
  "glob": "=7.2.0",
32
32
  "@types/progress": "^2.0.6",
33
- "@types/node": "^20.8.8",
34
- "@abaplint/core": "^2.102.61",
33
+ "@types/node": "^20.8.9",
34
+ "@abaplint/core": "^2.102.64",
35
35
  "progress": "^2.0.3",
36
36
  "webpack": "^5.89.0",
37
37
  "webpack-cli": "^5.1.4",