@abaplint/transpiler-cli 2.13.47 → 2.13.48

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 +207 -54
  2. package/package.json +4 -4
package/build/bundle.js CHANGED
@@ -4244,7 +4244,7 @@ class Compare extends combi_1.Expression {
4244
4244
  const inn = (0, combi_1.seq)((0, combi_1.optPrio)("NOT"), "IN", (0, combi_1.altPrio)(_1.Source, list));
4245
4245
  const sopt = (0, combi_1.seq)("IS", (0, combi_1.optPrio)("NOT"), (0, combi_1.altPrio)("SUPPLIED", "BOUND", (0, combi_1.ver)(version_1.Release.v750, (0, combi_1.seq)("INSTANCE OF", _1.ClassName), { also: combi_1.AlsoIn.OpenABAP }), "REQUESTED", "INITIAL"));
4246
4246
  const between = (0, combi_1.seq)((0, combi_1.optPrio)("NOT"), "BETWEEN", _1.Source, "AND", _1.Source);
4247
- // https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abennews-740_sp08-expressions.htm
4247
+ // https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-us/abennews-740_sp08-expressions.html
4248
4248
  // but also seems to work in v740sp05, blah
4249
4249
  const predicate = (0, combi_1.ver)(version_1.Release.v740sp08, _1.MethodCallChain, { also: combi_1.AlsoIn.OpenABAP });
4250
4250
  const rett = (0, combi_1.seq)(_1.Source, (0, combi_1.altPrio)((0, combi_1.seq)(_1.CompareOperator, _1.Source), inn, between, sopt));
@@ -7441,10 +7441,10 @@ exports.PerformTables = PerformTables;
7441
7441
  Object.defineProperty(exports, "__esModule", ({ value: true }));
7442
7442
  exports.PerformUsing = void 0;
7443
7443
  const combi_1 = __webpack_require__(/*! ../combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
7444
- const source_1 = __webpack_require__(/*! ./source */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/source.js");
7444
+ const simple_source3_1 = __webpack_require__(/*! ./simple_source3 */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/simple_source3.js");
7445
7445
  class PerformUsing extends combi_1.Expression {
7446
7446
  getRunnable() {
7447
- const using = (0, combi_1.seq)("USING", (0, combi_1.plus)(source_1.Source));
7447
+ const using = (0, combi_1.seq)("USING", (0, combi_1.plus)(simple_source3_1.SimpleSource3));
7448
7448
  return using;
7449
7449
  }
7450
7450
  }
@@ -10770,7 +10770,7 @@ const version_1 = __webpack_require__(/*! ../../../version */ "./node_modules/@a
10770
10770
  const dynamic_1 = __webpack_require__(/*! ./dynamic */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/dynamic.js");
10771
10771
  class StringTemplateFormatting extends combi_1.Expression {
10772
10772
  getRunnable() {
10773
- // https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abapcompute_string_format_options.htm
10773
+ // https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-us/abapcompute_string_format_options.html
10774
10774
  const alphaOptions = (0, combi_1.altPrio)("OUT", "RAW", "IN", _1.Source);
10775
10775
  const alignOptions = (0, combi_1.altPrio)("LEFT", "RIGHT", "CENTER", _1.Source, dynamic_1.Dynamic);
10776
10776
  const dateTimeOptions = (0, combi_1.altPrio)("RAW", "ISO", "USER", "ENVIRONMENT", _1.Source, dynamic_1.Dynamic);
@@ -18179,7 +18179,8 @@ class ReadEntities {
18179
18179
  const result = (0, combi_1.seq)("RESULT", expressions_1.Target);
18180
18180
  const failed = (0, combi_1.seq)("FAILED", expressions_1.Target);
18181
18181
  const reported = (0, combi_1.seq)("REPORTED", expressions_1.Target);
18182
- const foo = (0, combi_1.seq)((0, combi_1.opt)((0, combi_1.seq)("BY", expressions_1.EMLEntityPath)), (0, combi_1.alt)(fields, from, all), (0, combi_1.optPrio)(result));
18182
+ const execute = (0, combi_1.seq)("EXECUTE", expressions_1.SimpleName, from);
18183
+ const foo = (0, combi_1.seq)((0, combi_1.opt)((0, combi_1.seq)("BY", expressions_1.EMLEntityPath)), (0, combi_1.alt)(fields, from, all, execute), (0, combi_1.optPrio)(result));
18183
18184
  const entity = (0, combi_1.seq)("ENTITY", expressions_1.NamespaceSimpleName, (0, combi_1.plus)(foo));
18184
18185
  const s = (0, combi_1.seq)("ENTITIES OF", expressions_1.NamespaceSimpleName, (0, combi_1.opt)("IN LOCAL MODE"), (0, combi_1.plus)(entity), (0, combi_1.optPrio)((0, combi_1.seq)("LINK", expressions_1.Target)), (0, combi_1.optPrio)((0, combi_1.per)(failed, reported)));
18185
18186
  const byall = (0, combi_1.seq)("BY", expressions_1.EMLEntityPath, all);
@@ -25523,7 +25524,7 @@ class BuiltIn {
25523
25524
  const sy = new _typed_identifier_1.TypedIdentifier(id1, BuiltIn.filename, type, ["read_only" /* IdentifierMeta.ReadOnly */, "built-in" /* IdentifierMeta.BuiltIn */]);
25524
25525
  const id2 = new tokens_1.Identifier(new position_1.Position(this.row++, 1), "syst");
25525
25526
  const syst = new _typed_identifier_1.TypedIdentifier(id2, BuiltIn.filename, type, ["read_only" /* IdentifierMeta.ReadOnly */, "built-in" /* IdentifierMeta.BuiltIn */]);
25526
- // https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abennews-610-system.htm
25527
+ // https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-us/abennews-610-system.html
25527
25528
  const id3 = new tokens_1.Identifier(new position_1.Position(this.row++, 1), "sy-repid");
25528
25529
  const syrepid = new _typed_identifier_1.TypedIdentifier(id3, BuiltIn.filename, new basic_1.CharacterType(40, { qualifiedName: "sy-repid" }), ["read_only" /* IdentifierMeta.ReadOnly */, "built-in" /* IdentifierMeta.BuiltIn */]);
25529
25530
  const id4 = new tokens_1.Identifier(new position_1.Position(this.row++, 1), "syst-repid");
@@ -28134,7 +28135,7 @@ class TypeUtils {
28134
28135
  }
28135
28136
  }
28136
28137
  else if (source instanceof basic_1.IntegerType) {
28137
- if (target instanceof basic_1.StringType) {
28138
+ if (target instanceof basic_1.StringType || target instanceof basic_1.DateType) {
28138
28139
  return false;
28139
28140
  }
28140
28141
  else if (target instanceof basic_1.Integer8Type || target instanceof basic_1.PackedType) {
@@ -43560,7 +43561,7 @@ class Perform {
43560
43561
  }
43561
43562
  }
43562
43563
  for (const u of node.findDirectExpressions(Expressions.PerformUsing)) {
43563
- for (const s of u.findDirectExpressions(Expressions.Source)) {
43564
+ for (const s of u.findDirectExpressions(Expressions.SimpleSource3)) {
43564
43565
  source_1.Source.runSyntax(s, input);
43565
43566
  }
43566
43567
  }
@@ -43845,10 +43846,15 @@ const Expressions = __importStar(__webpack_require__(/*! ../../2_statements/expr
43845
43846
  const _typed_identifier_1 = __webpack_require__(/*! ../../types/_typed_identifier */ "./node_modules/@abaplint/core/build/src/abap/types/_typed_identifier.js");
43846
43847
  const basic_1 = __webpack_require__(/*! ../../types/basic */ "./node_modules/@abaplint/core/build/src/abap/types/basic/index.js");
43847
43848
  const basic_types_1 = __webpack_require__(/*! ../basic_types */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/basic_types.js");
43849
+ const _syntax_input_1 = __webpack_require__(/*! ../_syntax_input */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_syntax_input.js");
43848
43850
  const assert_error_1 = __webpack_require__(/*! ../assert_error */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/assert_error.js");
43849
43851
  class Ranges {
43850
43852
  runSyntax(node, input) {
43851
43853
  var _a;
43854
+ if (input.scope.isAnyOO()) {
43855
+ const message = "RANGES is not allowed within classes";
43856
+ input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
43857
+ }
43852
43858
  const nameToken = (_a = node.findFirstExpression(Expressions.DefinitionName)) === null || _a === void 0 ? void 0 : _a.getFirstToken();
43853
43859
  const typeExpression = node.findFirstExpression(Expressions.SimpleFieldChain2);
43854
43860
  if (typeExpression === undefined) {
@@ -47630,6 +47636,117 @@ exports.TypeEnum = TypeEnum;
47630
47636
 
47631
47637
  /***/ },
47632
47638
 
47639
+ /***/ "./node_modules/@abaplint/core/build/src/abap/5_syntax/structures/type_mesh.js"
47640
+ /*!*************************************************************************************!*\
47641
+ !*** ./node_modules/@abaplint/core/build/src/abap/5_syntax/structures/type_mesh.js ***!
47642
+ \*************************************************************************************/
47643
+ (__unused_webpack_module, exports, __webpack_require__) {
47644
+
47645
+ "use strict";
47646
+
47647
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
47648
+ if (k2 === undefined) k2 = k;
47649
+ var desc = Object.getOwnPropertyDescriptor(m, k);
47650
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
47651
+ desc = { enumerable: true, get: function() { return m[k]; } };
47652
+ }
47653
+ Object.defineProperty(o, k2, desc);
47654
+ }) : (function(o, m, k, k2) {
47655
+ if (k2 === undefined) k2 = k;
47656
+ o[k2] = m[k];
47657
+ }));
47658
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
47659
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
47660
+ }) : function(o, v) {
47661
+ o["default"] = v;
47662
+ });
47663
+ var __importStar = (this && this.__importStar) || (function () {
47664
+ var ownKeys = function(o) {
47665
+ ownKeys = Object.getOwnPropertyNames || function (o) {
47666
+ var ar = [];
47667
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
47668
+ return ar;
47669
+ };
47670
+ return ownKeys(o);
47671
+ };
47672
+ return function (mod) {
47673
+ if (mod && mod.__esModule) return mod;
47674
+ var result = {};
47675
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
47676
+ __setModuleDefault(result, mod);
47677
+ return result;
47678
+ };
47679
+ })();
47680
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
47681
+ exports.TypeMesh = void 0;
47682
+ const Expressions = __importStar(__webpack_require__(/*! ../../2_statements/expressions */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js"));
47683
+ const Statements = __importStar(__webpack_require__(/*! ../../2_statements/statements */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js"));
47684
+ const nodes_1 = __webpack_require__(/*! ../../nodes */ "./node_modules/@abaplint/core/build/src/abap/nodes/index.js");
47685
+ const _typed_identifier_1 = __webpack_require__(/*! ../../types/_typed_identifier */ "./node_modules/@abaplint/core/build/src/abap/types/_typed_identifier.js");
47686
+ const Basic = __importStar(__webpack_require__(/*! ../../types/basic */ "./node_modules/@abaplint/core/build/src/abap/types/basic/index.js"));
47687
+ const basic_types_1 = __webpack_require__(/*! ../basic_types */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/basic_types.js");
47688
+ const type_1 = __webpack_require__(/*! ../statements/type */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/type.js");
47689
+ const _scope_type_1 = __webpack_require__(/*! ../_scope_type */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_scope_type.js");
47690
+ class TypeMesh {
47691
+ runSyntax(node, input) {
47692
+ var _a;
47693
+ const begin = node.findDirectStatement(Statements.TypeMeshBegin);
47694
+ if (begin === undefined) {
47695
+ return undefined;
47696
+ }
47697
+ const name = (_a = begin.findFirstExpression(Expressions.NamespaceSimpleName)) === null || _a === void 0 ? void 0 : _a.getFirstToken();
47698
+ if (name === undefined) {
47699
+ return undefined;
47700
+ }
47701
+ const components = [];
47702
+ for (const c of node.getChildren()) {
47703
+ if (!(c instanceof nodes_1.StatementNode)) {
47704
+ continue;
47705
+ }
47706
+ const ctyp = c.get();
47707
+ if (ctyp instanceof Statements.Type) {
47708
+ const found = new type_1.Type().runSyntax(c, input, name.getStr() + "-");
47709
+ if (found) {
47710
+ components.push({ name: found.getName(), type: found.getType() });
47711
+ }
47712
+ }
47713
+ else if (ctyp instanceof Statements.TypeMesh) {
47714
+ const found = this.runMeshNode(c, input);
47715
+ if (found) {
47716
+ components.push({ name: found.getName(), type: found.getType() });
47717
+ }
47718
+ }
47719
+ }
47720
+ let qualifiedName = name.getStr();
47721
+ if (input.scope.getType() === _scope_type_1.ScopeType.ClassDefinition
47722
+ || input.scope.getType() === _scope_type_1.ScopeType.Interface) {
47723
+ qualifiedName = input.scope.getName() + "=>" + qualifiedName;
47724
+ }
47725
+ return new _typed_identifier_1.TypedIdentifier(name, input.filename, new Basic.StructureType(components, qualifiedName));
47726
+ }
47727
+ ////////////////////
47728
+ runMeshNode(node, input) {
47729
+ var _a;
47730
+ const nameToken = (_a = node.findFirstExpression(Expressions.NamespaceSimpleName)) === null || _a === void 0 ? void 0 : _a.getFirstToken();
47731
+ if (nameToken === undefined) {
47732
+ return undefined;
47733
+ }
47734
+ const typeName = node.findFirstExpression(Expressions.TypeName);
47735
+ let type = new basic_types_1.BasicTypes(input).resolveTypeName(typeName);
47736
+ if (type === undefined) {
47737
+ type = new Basic.UnknownType("Mesh node, unknown type " + (typeName === null || typeName === void 0 ? void 0 : typeName.concatTokens()));
47738
+ }
47739
+ else if (node.concatTokens().toUpperCase().includes(" TYPE REF TO ")) {
47740
+ type = new Basic.DataReference(type);
47741
+ }
47742
+ return new _typed_identifier_1.TypedIdentifier(nameToken, input.filename, type);
47743
+ }
47744
+ }
47745
+ exports.TypeMesh = TypeMesh;
47746
+ //# sourceMappingURL=type_mesh.js.map
47747
+
47748
+ /***/ },
47749
+
47633
47750
  /***/ "./node_modules/@abaplint/core/build/src/abap/5_syntax/structures/types.js"
47634
47751
  /*!*********************************************************************************!*\
47635
47752
  !*** ./node_modules/@abaplint/core/build/src/abap/5_syntax/structures/types.js ***!
@@ -47791,6 +47908,7 @@ const objects_1 = __webpack_require__(/*! ../../objects */ "./node_modules/@abap
47791
47908
  const position_1 = __webpack_require__(/*! ../../position */ "./node_modules/@abaplint/core/build/src/position.js");
47792
47909
  const data_1 = __webpack_require__(/*! ./structures/data */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/structures/data.js");
47793
47910
  const type_enum_1 = __webpack_require__(/*! ./structures/type_enum */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/structures/type_enum.js");
47911
+ const type_mesh_1 = __webpack_require__(/*! ./structures/type_mesh */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/structures/type_mesh.js");
47794
47912
  const types_1 = __webpack_require__(/*! ./structures/types */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/structures/types.js");
47795
47913
  const statics_1 = __webpack_require__(/*! ./structures/statics */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/structures/statics.js");
47796
47914
  const constants_1 = __webpack_require__(/*! ./structures/constants */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/structures/constants.js");
@@ -48225,6 +48343,13 @@ class SyntaxLogic {
48225
48343
  this.scope.addIdentifier(new statics_1.Statics().runSyntax(node, input));
48226
48344
  return true;
48227
48345
  }
48346
+ else if (stru instanceof Structures.TypeMesh) {
48347
+ const found = new type_mesh_1.TypeMesh().runSyntax(node, input);
48348
+ if (found) {
48349
+ this.scope.addType(found);
48350
+ }
48351
+ return true;
48352
+ }
48228
48353
  else if (stru instanceof Structures.TypeEnum) {
48229
48354
  const values = new type_enum_1.TypeEnum().runSyntax(node, input).values;
48230
48355
  this.scope.addList(values);
@@ -51363,6 +51488,7 @@ const data_1 = __webpack_require__(/*! ../5_syntax/statements/data */ "./node_mo
51363
51488
  const constant_1 = __webpack_require__(/*! ../5_syntax/statements/constant */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/constant.js");
51364
51489
  const data_2 = __webpack_require__(/*! ../5_syntax/structures/data */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/structures/data.js");
51365
51490
  const type_enum_1 = __webpack_require__(/*! ../5_syntax/structures/type_enum */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/structures/type_enum.js");
51491
+ const type_mesh_1 = __webpack_require__(/*! ../5_syntax/structures/type_mesh */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/structures/type_mesh.js");
51366
51492
  const constants_1 = __webpack_require__(/*! ../5_syntax/structures/constants */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/structures/constants.js");
51367
51493
  const type_definitions_1 = __webpack_require__(/*! ./type_definitions */ "./node_modules/@abaplint/core/build/src/abap/types/type_definitions.js");
51368
51494
  const types_1 = __webpack_require__(/*! ../5_syntax/structures/types */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/structures/types.js");
@@ -51523,6 +51649,13 @@ class Attributes {
51523
51649
  // scope.addIdentifier(attr);
51524
51650
  }
51525
51651
  }
51652
+ else if (ctyp instanceof Structures.TypeMesh) {
51653
+ const res = new type_mesh_1.TypeMesh().runSyntax(c, input);
51654
+ if (res) {
51655
+ input.scope.addType(res);
51656
+ this.tlist.push({ type: res, visibility });
51657
+ }
51658
+ }
51526
51659
  else if (ctyp instanceof Structures.Types) {
51527
51660
  const res = new types_1.Types().runSyntax(c, input);
51528
51661
  if (res) {
@@ -69590,7 +69723,7 @@ class Registry {
69590
69723
  }
69591
69724
  static abaplintVersion() {
69592
69725
  // magic, see build script "version.js"
69593
- return "2.120.6";
69726
+ return "2.120.9";
69594
69727
  }
69595
69728
  getDDICReferences() {
69596
69729
  return this.ddicReferences;
@@ -69934,7 +70067,7 @@ class SevenBitAscii {
69934
70067
  shortDescription: `Only allow characters from the 7bit ASCII set.`,
69935
70068
  extendedInformation: `https://docs.abapopenchecks.org/checks/05/
69936
70069
 
69937
- https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abencharacter_set_guidl.htm
70070
+ https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/abencharacter_set_guidl.html
69938
70071
 
69939
70072
  Checkes files with extensions ".abap" and ".asddls"`,
69940
70073
  tags: [_irule_1.RuleTag.SingleFile],
@@ -71552,7 +71685,7 @@ class AvoidUse extends _abap_rule_1.ABAPRule {
71552
71685
  shortDescription: `Detects usage of certain statements.`,
71553
71686
  extendedInformation: `DEFAULT KEY: https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-default-key
71554
71687
 
71555
- Macros: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abenmacros_guidl.htm
71688
+ Macros: https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/abenmacros_guidl.html
71556
71689
 
71557
71690
  STATICS: use CLASS-DATA instead
71558
71691
 
@@ -72286,7 +72419,7 @@ class CDSCommentStyle {
72286
72419
 
72287
72420
  Comments starting with "--" are considered obsolete
72288
72421
 
72289
- https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abencds_general_syntax_rules.htm`,
72422
+ https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-us/abencds_general_syntax_rules.html`,
72290
72423
  tags: [_irule_1.RuleTag.SingleFile],
72291
72424
  badExample: "-- this is a comment",
72292
72425
  goodExample: "// this is a comment",
@@ -72815,7 +72948,7 @@ class ChainMainlyDeclarations extends _abap_rule_1.ABAPRule {
72815
72948
  extendedInformation: `
72816
72949
  https://docs.abapopenchecks.org/checks/23/
72817
72950
 
72818
- https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abenchained_statements_guidl.htm
72951
+ https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/abenchained_statements_guidl.html
72819
72952
  `,
72820
72953
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
72821
72954
  badExample: `CALL METHOD: bar.`,
@@ -74339,7 +74472,7 @@ before reading it, so a leftover value is not accidentally used.
74339
74472
 
74340
74473
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#clear-or-overwrite-exporting-reference-parameters
74341
74474
 
74342
- https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/abenref_transf_output_param_guidl.htm
74475
+ https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/abenref_transf_output_param_guidl.html
74343
74476
 
74344
74477
  Note: EXPORTING parameters passed by VALUE are always initialized and are therefore not reported.
74345
74478
  Reading and writing the parameter in the same statement (e.g. "ev_result = ev_result + 1") is reported,
@@ -75038,7 +75171,7 @@ class ConstructorVisibilityPublic {
75038
75171
  This only applies to global classes.
75039
75172
 
75040
75173
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#if-your-global-class-is-create-private-leave-the-constructor-public
75041
- https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abeninstance_constructor_guidl.htm`,
75174
+ https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/abeninstance_constructor_guidl.html`,
75042
75175
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
75043
75176
  badExample: `CLASS zcl_foo DEFINITION PUBLIC CREATE PRIVATE.
75044
75177
  PRIVATE SECTION.
@@ -80073,8 +80206,8 @@ class ExitOrCheck extends _abap_rule_1.ABAPRule {
80073
80206
  title: "Find EXIT or CHECK outside loops",
80074
80207
  shortDescription: `Detects usages of EXIT or CHECK statements outside of loops.
80075
80208
  Use RETURN to leave procesing blocks instead.`,
80076
- extendedInformation: `https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abenleave_processing_blocks.htm
80077
- https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abapcheck_processing_blocks.htm
80209
+ extendedInformation: `https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/abenleave_processing_blocks.html
80210
+ https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/abapcheck_processing_blocks.html
80078
80211
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#check-vs-return`,
80079
80212
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
80080
80213
  badExample: `CHECK is_valid = abap_true.
@@ -80164,7 +80297,7 @@ class ExpandMacros extends _abap_rule_1.ABAPRule {
80164
80297
  key: "expand_macros",
80165
80298
  title: "Expand Macros",
80166
80299
  shortDescription: `Allows expanding macro calls with quick fixes`,
80167
- extendedInformation: `Macros: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abenmacros_guidl.htm
80300
+ extendedInformation: `Macros: https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/abenmacros_guidl.html
80168
80301
 
80169
80302
  Note that macros/DEFINE cannot be used in the ABAP Cloud programming model`,
80170
80303
  badExample: `DEFINE _hello.
@@ -80378,7 +80511,7 @@ class FMGlobalParametersObsolete {
80378
80511
  key: "fm_global_parameters_obsolete",
80379
80512
  title: "FM Global Parameters Obsolete",
80380
80513
  shortDescription: `Check for function modules with global parameters`,
80381
- extendedInformation: `https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abenglobal_parameters_obsolete.htm`,
80514
+ extendedInformation: `https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/abenglobal_parameters_obsolete.html`,
80382
80515
  tags: [],
80383
80516
  };
80384
80517
  }
@@ -80863,7 +80996,7 @@ class FormTablesObsolete extends _abap_rule_1.ABAPRule {
80863
80996
  key: "form_tables_obsolete",
80864
80997
  title: "TABLES parameters are obsolete",
80865
80998
  shortDescription: `Checks for TABLES parameters in forms.`,
80866
- extendedInformation: `https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abapform_tables.htm`,
80999
+ extendedInformation: `https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/abapform_tables.html`,
80867
81000
  tags: [_irule_1.RuleTag.SingleFile],
80868
81001
  badExample: `FORM update_items TABLES items.
80869
81002
  ENDFORM.`,
@@ -82824,7 +82957,7 @@ class ImplicitStartOfSelection extends _abap_rule_1.ABAPRule {
82824
82957
  shortDescription: `Add explicit selection screen event handling`,
82825
82958
  extendedInformation: `Only runs for executable programs
82826
82959
 
82827
- https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapstart-of-selection.htm`,
82960
+ https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-us/abapstart-of-selection.html`,
82828
82961
  tags: [_irule_1.RuleTag.SingleFile],
82829
82962
  badExample: `REPORT zfoo.
82830
82963
  WRITE 'hello'.`,
@@ -86265,7 +86398,7 @@ class MethodOverwritesBuiltIn extends _abap_rule_1.ABAPRule {
86265
86398
  key: "method_overwrites_builtin",
86266
86399
  title: "Method name overwrites builtin function",
86267
86400
  shortDescription: `Checks Method names that overwrite builtin SAP functions`,
86268
- extendedInformation: `https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abenbuilt_in_functions_overview.htm
86401
+ extendedInformation: `https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-us/abenbuilt_in_functions_overview.html
86269
86402
 
86270
86403
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-obscuring-built-in-functions
86271
86404
 
@@ -86507,7 +86640,7 @@ class MixReturning extends _abap_rule_1.ABAPRule {
86507
86640
  shortDescription: `Checks that methods don't have a mixture of returning and exporting/changing parameters`,
86508
86641
  extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-either-returning-or-exporting-or-changing-but-not-a-combination
86509
86642
 
86510
- This syntax is not allowed on versions earlier than 740sp02, https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abennews-740-abap_objects.htm#!ABAP_MODIFICATION_1@1@`,
86643
+ This syntax is not allowed on versions earlier than 740sp02, https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-us/abennews-740-abap_objects.html#!ABAP_MODIFICATION_1@1@`,
86511
86644
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Syntax],
86512
86645
  badExample: `CLASS lcl DEFINITION.
86513
86646
  PUBLIC SECTION.
@@ -87838,7 +87971,7 @@ class NoMacros extends _abap_rule_1.ABAPRule {
87838
87971
  shortDescription: `Checks that macros are not used`,
87839
87972
  extendedInformation: `Macros reduce readability and are difficult to debug, use methods or form routines instead.
87840
87973
 
87841
- https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/abenmacros_guidl.htm`,
87974
+ https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/abenmacros_guidl.html`,
87842
87975
  tags: [_irule_1.RuleTag.SingleFile],
87843
87976
  badExample: `DEFINE _macro.
87844
87977
  WRITE 'hello'.
@@ -88096,13 +88229,13 @@ https://github.com/SAP/styleguides/blob/main/clean-abap/sub-sections/AvoidEncodi
88096
88229
  return ret;
88097
88230
  }
88098
88231
  checkMethodParameters(topNode, regex, file) {
88099
- var _a, _b;
88232
+ var _a, _b, _c;
88100
88233
  const ret = [];
88101
88234
  for (const method of topNode.findAllStatements(Statements.MethodDef)) {
88102
88235
  for (const param of method.findAllExpressionsMulti([Expressions.MethodDefReturning, Expressions.MethodParam])) {
88103
88236
  const nameToken = param === null || param === void 0 ? void 0 : param.findFirstExpression(Expressions.MethodParamName);
88104
- const type = (_b = (_a = param === null || param === void 0 ? void 0 : param.findFirstExpression(Expressions.TypeParam)) === null || _a === void 0 ? void 0 : _a.concatTokens()) === null || _b === void 0 ? void 0 : _b.toUpperCase();
88105
- if (this.getConfig().allowIsPrefixBoolean === true && (type === null || type === void 0 ? void 0 : type.endsWith("TYPE ABAP_BOOL"))) {
88237
+ const typeName = (_c = (_b = (_a = param === null || param === void 0 ? void 0 : param.findFirstExpression(Expressions.TypeParam)) === null || _a === void 0 ? void 0 : _a.findFirstExpression(Expressions.TypeNameOrInfer)) === null || _b === void 0 ? void 0 : _b.concatTokens()) === null || _c === void 0 ? void 0 : _c.toUpperCase();
88238
+ if (this.getConfig().allowIsPrefixBoolean === true && typeName === "ABAP_BOOL") {
88106
88239
  continue;
88107
88240
  }
88108
88241
  const name = nameToken === null || nameToken === void 0 ? void 0 : nameToken.concatTokens();
@@ -88762,44 +88895,44 @@ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-func
88762
88895
 
88763
88896
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-obsolete-language-elements
88764
88897
 
88765
- SET EXTENDED CHECK: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapset_extended_check.htm
88898
+ SET EXTENDED CHECK: https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-us/abapset_extended_check.html
88766
88899
 
88767
- IS REQUESTED: https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abenlogexp_requested.htm
88900
+ IS REQUESTED: https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/abenlogexp_requested.html
88768
88901
 
88769
- WITH HEADER LINE: https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abapdata_header_line.htm
88902
+ WITH HEADER LINE: https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/abapdata_header_line.html
88770
88903
 
88771
- FIELD-SYMBOLS STRUCTURE: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapfield-symbols_obsolete_typing.htm
88904
+ FIELD-SYMBOLS STRUCTURE: https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-us/abapfield-symbols_obsolete_typing.html
88772
88905
 
88773
- TYPE-POOLS: from 702, https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abennews-71-program_load.htm
88906
+ TYPE-POOLS: from 702, https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/abennews-71-program_load.html
88774
88907
 
88775
- LOAD addition: from 702, https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abennews-71-program_load.htm
88908
+ LOAD addition: from 702, https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/abennews-71-program_load.html
88776
88909
 
88777
- COMMUICATION: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapcommunication.htm
88910
+ COMMUICATION: https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-us/abapcommunication.html
88778
88911
 
88779
- OCCURS: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapdata_occurs.htm
88912
+ OCCURS: https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-us/abapdata_occurs.html
88780
88913
 
88781
- PARAMETER: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abapparameter.htm
88914
+ PARAMETER: https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/abapparameter.html
88782
88915
 
88783
- RANGES: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapranges.htm
88916
+ RANGES: https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/abapranges.html
88784
88917
 
88785
- PACK: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abappack.htm
88918
+ PACK: https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-us/abappack.html
88786
88919
 
88787
- MOVE: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapmove_obs.htm
88920
+ MOVE: https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-us/abapmove_obs.html
88788
88921
 
88789
- SELECT without INTO: https://help.sap.com/doc/abapdocu_731_index_htm/7.31/en-US/abapselect_obsolete.htm
88922
+ SELECT without INTO: https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/abapselect_obsolete.html
88790
88923
  SELECT COUNT(*) is considered okay
88791
88924
 
88792
- FREE MEMORY: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abapfree_mem_id_obsolete.htm
88925
+ FREE MEMORY: https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-us/abapfree_mem_id_obsolete.html
88793
88926
 
88794
- SORT BY FS: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapsort_itab_obsolete.htm
88927
+ SORT BY FS: https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/abapsort_itab_obsolete.html
88795
88928
 
88796
- CALL TRANSFORMATION OBJECTS: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapcall_transformation_objects.htm
88929
+ CALL TRANSFORMATION OBJECTS: https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/abapcall_transformation_objects.html
88797
88930
 
88798
- POSIX REGEX: https://help.sap.com/doc/abapdocu_755_index_htm/7.55/en-US/index.htm
88931
+ POSIX REGEX: https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/ABENREGEX_MIGRATING_POSIX.html
88799
88932
 
88800
88933
  OCCURENCES: check for OCCURENCES vs OCCURRENCES
88801
88934
 
88802
- CLIENT SPECIFIED, from 754: https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abapselect_client_obsolete.htm`,
88935
+ CLIENT SPECIFIED, from 754: https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/abapselect_client_obsolete.html`,
88803
88936
  badExample: `REFRESH itab.
88804
88937
 
88805
88938
  COMPUTE foo = 2 + 2.
@@ -90248,7 +90381,7 @@ class PragmaStyle extends _abap_rule_1.ABAPRule {
90248
90381
  title: "Pragma Style",
90249
90382
  shortDescription: `Check pragmas placement and case`,
90250
90383
  tags: [_irule_1.RuleTag.SingleFile],
90251
- extendedInformation: `https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/abenpragma.htm`,
90384
+ extendedInformation: `https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/ABENPRAGMA.html`,
90252
90385
  badExample: `DATA field ##NO_TEXT TYPE i.`,
90253
90386
  goodExample: `DATA field TYPE i ##NO_TEXT.`,
90254
90387
  };
@@ -92486,7 +92619,7 @@ class RFCErrorHandling extends _abap_rule_1.ABAPRule {
92486
92619
  title: "RFC error handling",
92487
92620
  tags: [_irule_1.RuleTag.SingleFile],
92488
92621
  shortDescription: `Checks that exceptions 'system_failure' and 'communication_failure' are handled in RFC calls`,
92489
- extendedInformation: `https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abenrfc_exception.htm`,
92622
+ extendedInformation: `https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/abenrfc_exception.html`,
92490
92623
  badExample: `CALL FUNCTION 'ZRFC'
92491
92624
  DESTINATION lv_rfc.`,
92492
92625
  goodExample: `CALL FUNCTION 'ZRFC'
@@ -94480,9 +94613,9 @@ class StrictSQL extends _abap_rule_1.ABAPRule {
94480
94613
  key: "strict_sql",
94481
94614
  title: "Strict SQL",
94482
94615
  shortDescription: `Strict SQL`,
94483
- extendedInformation: `https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abapinto_clause.htm
94616
+ extendedInformation: `https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/abapinto_clause.html
94484
94617
 
94485
- https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abenopensql_strict_mode_750.htm
94618
+ https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/ABENABAP_SQL_STRICT_MODES.html
94486
94619
 
94487
94620
  Also see separate rule sql_escape_host_variables
94488
94621
 
@@ -94870,7 +95003,7 @@ class SyModification extends _abap_rule_1.ABAPRule {
94870
95003
  key: "sy_modification",
94871
95004
  title: "Modification of SY fields",
94872
95005
  shortDescription: `Finds modification of sy fields`,
94873
- extendedInformation: `https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abensystem_fields.htm
95006
+ extendedInformation: `https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/abensystem_fields.html
94874
95007
 
94875
95008
  Changes to SY-TVAR* fields are not reported
94876
95009
 
@@ -95198,7 +95331,7 @@ class TablesDeclaredLocally extends _abap_rule_1.ABAPRule {
95198
95331
  key: "tables_declared_locally",
95199
95332
  title: "Check for locally declared TABLES",
95200
95333
  shortDescription: `TABLES are always global, so declare them globally`,
95201
- extendedInformation: `https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abaptables.htm`,
95334
+ extendedInformation: `https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-us/abaptables.html`,
95202
95335
  tags: [_irule_1.RuleTag.SingleFile],
95203
95336
  badExample: `FORM foo.
95204
95337
  TABLES t100.
@@ -104679,14 +104812,34 @@ class SQLCondTranspiler {
104679
104812
  return sourceWithComponents;
104680
104813
  }
104681
104814
  let ret = "";
104815
+ let hostExpression = false;
104682
104816
  for (const child of node.getChildren()) {
104817
+ if (!(child instanceof abaplint.Nodes.ExpressionNode) && child.getFirstToken().getStr() === "@") {
104818
+ hostExpression = true;
104819
+ continue;
104820
+ }
104683
104821
  if (ret !== "") {
104684
104822
  ret += " ";
104685
104823
  }
104686
- if ((child.get() instanceof abaplint.Expressions.SQLFieldName
104824
+ if (hostExpression
104825
+ && child instanceof abaplint.Nodes.ExpressionNode
104826
+ && child.get() instanceof abaplint.Expressions.SimpleSource3) {
104827
+ const code = new simple_source3_1.SimpleSource3Transpiler(true).transpile(child, traversal).getCode();
104828
+ ret += `'" + ${code} + "'`;
104829
+ hostExpression = false;
104830
+ }
104831
+ else if ((child.get() instanceof abaplint.Expressions.SQLFieldName
104687
104832
  || child.get() instanceof abaplint.Expressions.SQLAliasField)
104688
104833
  && child instanceof abaplint.Nodes.ExpressionNode) {
104689
- ret += new sql_field_name_1.SQLFieldNameTranspiler().transpile(child, traversal).getCode();
104834
+ if (hostExpression) {
104835
+ let name = traversal.prefixAndName(child.getFirstToken(), filename).replace("~", "$");
104836
+ name = traversal_1.Traversal.prefixVariable(traversal_1.Traversal.escapeNamespace(name));
104837
+ ret += `'" + ${name}.get() + "'`;
104838
+ hostExpression = false;
104839
+ }
104840
+ else {
104841
+ ret += new sql_field_name_1.SQLFieldNameTranspiler().transpile(child, traversal).getCode();
104842
+ }
104690
104843
  }
104691
104844
  else if (child.get() instanceof abaplint.Expressions.SQLSource
104692
104845
  && child instanceof abaplint.Nodes.ExpressionNode) {
@@ -114260,7 +114413,7 @@ class PerformTranspiler {
114260
114413
  index++;
114261
114414
  }
114262
114415
  index = 0;
114263
- for (const u of node.findDirectExpression(abaplint.Expressions.PerformUsing)?.findDirectExpressions(abaplint.Expressions.Source) || []) {
114416
+ for (const u of node.findDirectExpression(abaplint.Expressions.PerformUsing)?.findDirectExpressions(abaplint.Expressions.SimpleSource3) || []) {
114264
114417
  const name = def?.getUsingParameters()[index].getName().toLowerCase();
114265
114418
  if (name === undefined) {
114266
114419
  continue;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/transpiler-cli",
3
- "version": "2.13.47",
3
+ "version": "2.13.48",
4
4
  "description": "Transpiler - Command Line Interface",
5
5
  "funding": "https://github.com/sponsors/larshp",
6
6
  "bin": {
@@ -27,10 +27,10 @@
27
27
  "author": "abaplint",
28
28
  "license": "MIT",
29
29
  "devDependencies": {
30
- "@abaplint/core": "^2.120.6",
31
- "@abaplint/transpiler": "^2.13.47",
30
+ "@abaplint/core": "^2.120.9",
31
+ "@abaplint/transpiler": "^2.13.48",
32
32
  "@types/glob": "^8.1.0",
33
- "@types/node": "^24.12.2",
33
+ "@types/node": "^24.13.3",
34
34
  "@types/progress": "^2.0.7",
35
35
  "glob": "=7.2.0",
36
36
  "p-limit": "^3.1.0",