@abaplint/cli 2.113.225 → 2.113.227

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 +123 -46
  2. package/package.json +2 -2
package/build/cli.js CHANGED
@@ -31853,6 +31853,38 @@ exports.FetchNextCursor = FetchNextCursor;
31853
31853
 
31854
31854
  /***/ }),
31855
31855
 
31856
+ /***/ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/field_group.js":
31857
+ /*!***************************************************************************************!*\
31858
+ !*** ./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/field_group.js ***!
31859
+ \***************************************************************************************/
31860
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
31861
+
31862
+ "use strict";
31863
+
31864
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
31865
+ exports.FieldGroup = void 0;
31866
+ const Expressions = __webpack_require__(/*! ../../2_statements/expressions */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
31867
+ const _typed_identifier_1 = __webpack_require__(/*! ../../types/_typed_identifier */ "./node_modules/@abaplint/core/build/src/abap/types/_typed_identifier.js");
31868
+ const basic_1 = __webpack_require__(/*! ../../types/basic */ "./node_modules/@abaplint/core/build/src/abap/types/basic/index.js");
31869
+ class FieldGroup {
31870
+ runSyntax(node, input) {
31871
+ const nameExpression = node.findFirstExpression(Expressions.Field);
31872
+ if (nameExpression === undefined) {
31873
+ return;
31874
+ }
31875
+ const name = nameExpression === null || nameExpression === void 0 ? void 0 : nameExpression.concatTokens();
31876
+ if (name === undefined) {
31877
+ return;
31878
+ }
31879
+ const id = new _typed_identifier_1.TypedIdentifier(nameExpression === null || nameExpression === void 0 ? void 0 : nameExpression.getFirstToken(), input.filename, basic_1.VoidType.get("FIELD-GROUP"));
31880
+ input.scope.addIdentifier(id);
31881
+ }
31882
+ }
31883
+ exports.FieldGroup = FieldGroup;
31884
+ //# sourceMappingURL=field_group.js.map
31885
+
31886
+ /***/ }),
31887
+
31856
31888
  /***/ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/fieldsymbol.js":
31857
31889
  /*!***************************************************************************************!*\
31858
31890
  !*** ./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/fieldsymbol.js ***!
@@ -32036,6 +32068,30 @@ exports.Format = Format;
32036
32068
 
32037
32069
  /***/ }),
32038
32070
 
32071
+ /***/ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/free.js":
32072
+ /*!********************************************************************************!*\
32073
+ !*** ./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/free.js ***!
32074
+ \********************************************************************************/
32075
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
32076
+
32077
+ "use strict";
32078
+
32079
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
32080
+ exports.Free = void 0;
32081
+ const Expressions = __webpack_require__(/*! ../../2_statements/expressions */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
32082
+ const target_1 = __webpack_require__(/*! ../expressions/target */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/target.js");
32083
+ class Free {
32084
+ runSyntax(node, input) {
32085
+ for (const t of node.findDirectExpressions(Expressions.Target)) {
32086
+ target_1.Target.runSyntax(t, input);
32087
+ }
32088
+ }
32089
+ }
32090
+ exports.Free = Free;
32091
+ //# sourceMappingURL=free.js.map
32092
+
32093
+ /***/ }),
32094
+
32039
32095
  /***/ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/get_badi.js":
32040
32096
  /*!************************************************************************************!*\
32041
32097
  !*** ./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/get_badi.js ***!
@@ -32408,7 +32464,7 @@ const _syntax_input_1 = __webpack_require__(/*! ../_syntax_input */ "./node_modu
32408
32464
  const assert_error_1 = __webpack_require__(/*! ../assert_error */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/assert_error.js");
32409
32465
  class IncludeType {
32410
32466
  runSyntax(node, input) {
32411
- var _a, _b, _c;
32467
+ var _a, _b, _c, _d, _e;
32412
32468
  const components = [];
32413
32469
  const iname = node.findFirstExpression(Expressions.TypeName);
32414
32470
  if (iname === undefined) {
@@ -32423,7 +32479,10 @@ class IncludeType {
32423
32479
  ityp = found;
32424
32480
  }
32425
32481
  }
32426
- const as = (_b = node.findExpressionAfterToken("AS")) === null || _b === void 0 ? void 0 : _b.concatTokens();
32482
+ else if (ityp instanceof basic_1.UnknownType) {
32483
+ ityp = (_c = (_b = input.scope.findVariable(name)) === null || _b === void 0 ? void 0 : _b.getType()) !== null && _c !== void 0 ? _c : ityp;
32484
+ }
32485
+ const as = (_d = node.findExpressionAfterToken("AS")) === null || _d === void 0 ? void 0 : _d.concatTokens();
32427
32486
  if (as && ityp instanceof basic_1.StructureType) {
32428
32487
  ityp = new basic_1.StructureType(ityp.getComponents().concat([{
32429
32488
  name: as,
@@ -32434,7 +32493,10 @@ class IncludeType {
32434
32493
  else if (ityp instanceof basic_1.TableType && isStructure) {
32435
32494
  ityp = ityp.getRowType();
32436
32495
  }
32437
- else if (ityp instanceof basic_1.VoidType) {
32496
+ if (ityp instanceof basic_1.VoidType) {
32497
+ return ityp;
32498
+ }
32499
+ else if (ityp instanceof basic_1.UnknownType) {
32438
32500
  return ityp;
32439
32501
  }
32440
32502
  if (!(ityp instanceof basic_1.StructureType)) {
@@ -32442,7 +32504,7 @@ class IncludeType {
32442
32504
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, iname.getFirstToken(), message));
32443
32505
  return basic_1.VoidType.get(_syntax_input_1.CheckSyntaxKey);
32444
32506
  }
32445
- const suffix = (_c = node.findExpressionAfterToken("SUFFIX")) === null || _c === void 0 ? void 0 : _c.concatTokens();
32507
+ const suffix = (_e = node.findExpressionAfterToken("SUFFIX")) === null || _e === void 0 ? void 0 : _e.concatTokens();
32446
32508
  if (suffix && ityp instanceof basic_1.StructureType) {
32447
32509
  const components = [];
32448
32510
  for (const c of ityp.getComponents()) {
@@ -34002,6 +34064,30 @@ exports.Receive = Receive;
34002
34064
 
34003
34065
  /***/ }),
34004
34066
 
34067
+ /***/ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/refresh.js":
34068
+ /*!***********************************************************************************!*\
34069
+ !*** ./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/refresh.js ***!
34070
+ \***********************************************************************************/
34071
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
34072
+
34073
+ "use strict";
34074
+
34075
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
34076
+ exports.Refresh = void 0;
34077
+ const Expressions = __webpack_require__(/*! ../../2_statements/expressions */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
34078
+ const target_1 = __webpack_require__(/*! ../expressions/target */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/target.js");
34079
+ class Refresh {
34080
+ runSyntax(node, input) {
34081
+ for (const t of node.findDirectExpressions(Expressions.Target)) {
34082
+ target_1.Target.runSyntax(t, input);
34083
+ }
34084
+ }
34085
+ }
34086
+ exports.Refresh = Refresh;
34087
+ //# sourceMappingURL=refresh.js.map
34088
+
34089
+ /***/ }),
34090
+
34005
34091
  /***/ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/replace.js":
34006
34092
  /*!***********************************************************************************!*\
34007
34093
  !*** ./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/replace.js ***!
@@ -35480,46 +35566,6 @@ class Data {
35480
35566
  }
35481
35567
  else if (c instanceof nodes_1.StatementNode && ctyp instanceof Statements.IncludeType) {
35482
35568
  // INCLUDES
35483
- /*
35484
- const typeToken = c.findFirstExpression(Expressions.TypeName)?.getFirstToken();
35485
- const typeName = typeToken?.getStr();
35486
-
35487
- let foundId = input.scope.findType(typeName);
35488
- if (foundId === undefined) {
35489
- foundId = input.scope.findVariable(typeName);
35490
- }
35491
-
35492
- let found = foundId?.getType();
35493
- if (found === undefined) {
35494
- const f = input.scope.getDDIC().lookupTableOrView(typeName).type;
35495
- if (f instanceof TypedIdentifier) {
35496
- found = f.getType();
35497
- } else {
35498
- found = f;
35499
- }
35500
- } else {
35501
- input.scope.addReference(typeToken, foundId, ReferenceType.TypeReference, input.filename);
35502
- }
35503
- if (found instanceof Basic.VoidType) {
35504
- if (table === true) {
35505
- const ttyp = new Basic.TableType(found, {withHeader: true, keyType: Basic.TableKeyType.default});
35506
- return new TypedIdentifier(name, input.filename, ttyp);
35507
- } else {
35508
- return new TypedIdentifier(name, input.filename, found);
35509
- }
35510
- }
35511
- if (found instanceof Basic.UnknownType) {
35512
- return new TypedIdentifier(name, input.filename, new Basic.UnknownType("unknown type, " + typeName));
35513
- }
35514
- if (found instanceof Basic.TableType && found.isWithHeader()) {
35515
- found = found.getRowType();
35516
- }
35517
- if (!(found instanceof Basic.StructureType)) {
35518
- const message = "not structured, " + typeName;
35519
- input.issues.push(syntaxIssue(input, typeToken!, message));
35520
- return new TypedIdentifier(name, input.filename, Basic.VoidType.get(CheckSyntaxKey));
35521
- }
35522
- */
35523
35569
  const found = new include_type_1.IncludeType().runSyntax(c, input);
35524
35570
  if (found instanceof Basic.VoidType) {
35525
35571
  if (table === true) {
@@ -35530,6 +35576,9 @@ class Data {
35530
35576
  return new _typed_identifier_1.TypedIdentifier(name, input.filename, found);
35531
35577
  }
35532
35578
  }
35579
+ else if (found instanceof Basic.UnknownType) {
35580
+ return new _typed_identifier_1.TypedIdentifier(name, input.filename, found);
35581
+ }
35533
35582
  for (const c of found) {
35534
35583
  components.push(c);
35535
35584
  }
@@ -35812,7 +35861,7 @@ class Types {
35812
35861
  }
35813
35862
  else if (ctyp instanceof Statements.IncludeType) {
35814
35863
  const found = new include_type_1.IncludeType().runSyntax(c, input);
35815
- if (found instanceof basic_1.VoidType) {
35864
+ if (found instanceof basic_1.VoidType || found instanceof Basic.UnknownType) {
35816
35865
  voidd = found;
35817
35866
  }
35818
35867
  else {
@@ -35921,6 +35970,8 @@ const do_1 = __webpack_require__(/*! ./statements/do */ "./node_modules/@abaplin
35921
35970
  const concatenate_1 = __webpack_require__(/*! ./statements/concatenate */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/concatenate.js");
35922
35971
  const call_function_1 = __webpack_require__(/*! ./statements/call_function */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/call_function.js");
35923
35972
  const clear_1 = __webpack_require__(/*! ./statements/clear */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/clear.js");
35973
+ const refresh_1 = __webpack_require__(/*! ./statements/refresh */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/refresh.js");
35974
+ const free_1 = __webpack_require__(/*! ./statements/free */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/free.js");
35924
35975
  const replace_1 = __webpack_require__(/*! ./statements/replace */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/replace.js");
35925
35976
  const get_bit_1 = __webpack_require__(/*! ./statements/get_bit */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/get_bit.js");
35926
35977
  const raise_1 = __webpack_require__(/*! ./statements/raise */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/raise.js");
@@ -36003,6 +36054,7 @@ const modify_entities_1 = __webpack_require__(/*! ./statements/modify_entities *
36003
36054
  const commit_entities_1 = __webpack_require__(/*! ./statements/commit_entities */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/commit_entities.js");
36004
36055
  const _syntax_input_1 = __webpack_require__(/*! ./_syntax_input */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_syntax_input.js");
36005
36056
  const assert_error_1 = __webpack_require__(/*! ./assert_error */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/assert_error.js");
36057
+ const field_group_1 = __webpack_require__(/*! ./statements/field_group */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/field_group.js");
36006
36058
  // -----------------------------------
36007
36059
  const map = {};
36008
36060
  function addToMap(handler) {
@@ -36046,6 +36098,8 @@ if (Object.keys(map).length === 0) {
36046
36098
  addToMap(new delete_internal_1.DeleteInternal());
36047
36099
  addToMap(new delete_cluster_1.DeleteCluster());
36048
36100
  addToMap(new clear_1.Clear());
36101
+ addToMap(new free_1.Free());
36102
+ addToMap(new refresh_1.Refresh());
36049
36103
  addToMap(new receive_1.Receive());
36050
36104
  addToMap(new get_bit_1.GetBit());
36051
36105
  addToMap(new class_local_friends_1.ClassLocalFriends());
@@ -36133,6 +36187,7 @@ if (Object.keys(map).length === 0) {
36133
36187
  addToMap(new translate_1.Translate());
36134
36188
  addToMap(new modify_internal_1.ModifyInternal());
36135
36189
  addToMap(new read_textpool_1.ReadTextpool());
36190
+ addToMap(new field_group_1.FieldGroup());
36136
36191
  addToMap(new editor_call_1.EditorCall());
36137
36192
  addToMap(new delete_memory_1.DeleteMemory());
36138
36193
  }
@@ -54606,7 +54661,7 @@ class Registry {
54606
54661
  }
54607
54662
  static abaplintVersion() {
54608
54663
  // magic, see build script "version.sh"
54609
- return "2.113.225";
54664
+ return "2.113.227";
54610
54665
  }
54611
54666
  getDDICReferences() {
54612
54667
  return this.ddicReferences;
@@ -56585,6 +56640,10 @@ DATA END OF foo.`,
56585
56640
  if (t.getChildren().length !== 3) {
56586
56641
  continue;
56587
56642
  }
56643
+ const data = t.findFirstStatement(Statements.DataBegin);
56644
+ if (data === null || data === void 0 ? void 0 : data.findDirectTokenByText("OCCURS")) {
56645
+ continue;
56646
+ }
56588
56647
  if (t.findFirstStatement(Statements.IncludeType)) {
56589
56648
  const token = t.getFirstToken();
56590
56649
  const message = "DATA BEGIN with single INCLUDE";
@@ -70116,6 +70175,12 @@ class ObsoleteStatementConf extends _basic_rule_config_1.BasicRuleConfig {
70116
70175
  this.formDefinition = true;
70117
70176
  /** Check for FORM IMPLEMENTATION */
70118
70177
  this.formImplementation = true;
70178
+ /** Check for COMMON PART */
70179
+ this.commonPart = true;
70180
+ /** Check for FIELD-GROUPS */
70181
+ this.fieldGroups = true;
70182
+ /** Check for REPLACE INTO */
70183
+ this.replaceInto = true;
70119
70184
  }
70120
70185
  }
70121
70186
  exports.ObsoleteStatementConf = ObsoleteStatementConf;
@@ -70227,10 +70292,22 @@ ENDIF.`,
70227
70292
  const issue = issue_1.Issue.atStatement(file, staNode, "COMMUNICATION is obsolete", this.getMetadata().key, this.conf.severity);
70228
70293
  issues.push(issue);
70229
70294
  }
70295
+ if (this.conf.commonPart && sta instanceof Statements.DataBegin && staNode.findDirectTokenByText("COMMON")) {
70296
+ const issue = issue_1.Issue.atStatement(file, staNode, "COMMON PART is obsolete", this.getMetadata().key, this.conf.severity);
70297
+ issues.push(issue);
70298
+ }
70299
+ if (this.conf.replaceInto && sta instanceof Statements.Replace && staNode.findDirectTokenByText("INTO")) {
70300
+ const issue = issue_1.Issue.atStatement(file, staNode, "REPLACE INTO is obsolete", this.getMetadata().key, this.conf.severity);
70301
+ issues.push(issue);
70302
+ }
70230
70303
  if (this.conf.pack && sta instanceof Statements.Pack) {
70231
70304
  const issue = issue_1.Issue.atStatement(file, staNode, "PACK is obsolete", this.getMetadata().key, this.conf.severity);
70232
70305
  issues.push(issue);
70233
70306
  }
70307
+ if (this.conf.fieldGroups && sta instanceof Statements.FieldGroup) {
70308
+ const issue = issue_1.Issue.atStatement(file, staNode, "FIELD-GROUPS is obsolete", this.getMetadata().key, this.conf.severity);
70309
+ issues.push(issue);
70310
+ }
70234
70311
  if (this.conf.parameter && sta instanceof Statements.Parameter) {
70235
70312
  const token = staNode.getFirstToken();
70236
70313
  if (token.getStr().toUpperCase() === "PARAMETER") {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/cli",
3
- "version": "2.113.225",
3
+ "version": "2.113.227",
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.225",
41
+ "@abaplint/core": "^2.113.227",
42
42
  "@types/chai": "^4.3.20",
43
43
  "@types/minimist": "^1.2.5",
44
44
  "@types/mocha": "^10.0.10",