@abaplint/cli 2.120.5 → 2.120.7

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 +104 -5
  2. package/package.json +2 -2
package/build/cli.js CHANGED
@@ -17753,7 +17753,8 @@ class ReadEntities {
17753
17753
  const result = (0, combi_1.seq)("RESULT", expressions_1.Target);
17754
17754
  const failed = (0, combi_1.seq)("FAILED", expressions_1.Target);
17755
17755
  const reported = (0, combi_1.seq)("REPORTED", expressions_1.Target);
17756
- 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));
17756
+ const execute = (0, combi_1.seq)("EXECUTE", expressions_1.SimpleName, from);
17757
+ 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));
17757
17758
  const entity = (0, combi_1.seq)("ENTITY", expressions_1.NamespaceSimpleName, (0, combi_1.plus)(foo));
17758
17759
  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)));
17759
17760
  const byall = (0, combi_1.seq)("BY", expressions_1.EMLEntityPath, all);
@@ -31419,6 +31420,10 @@ class InlineData {
31419
31420
  static runSyntax(node, input, type) {
31420
31421
  var _a;
31421
31422
  const token = (_a = node.findFirstExpression(Expressions.TargetField)) === null || _a === void 0 ? void 0 : _a.getFirstToken();
31423
+ if (token && token.getStr().length > 30) {
31424
+ const message = "DATA name too long, " + token.getStr();
31425
+ input.issues.push((0, _syntax_input_1.syntaxIssue)(input, token, message));
31426
+ }
31422
31427
  if (token && type) {
31423
31428
  if (type instanceof basic_1.CSequenceType || type instanceof basic_1.CLikeType) {
31424
31429
  type = basic_1.StringType.get();
@@ -31590,10 +31595,16 @@ const Expressions = __importStar(__webpack_require__(/*! ../../2_statements/expr
31590
31595
  const _typed_identifier_1 = __webpack_require__(/*! ../../types/_typed_identifier */ "../core/build/src/abap/types/_typed_identifier.js");
31591
31596
  const basic_1 = __webpack_require__(/*! ../../types/basic */ "../core/build/src/abap/types/basic/index.js");
31592
31597
  const _reference_1 = __webpack_require__(/*! ../_reference */ "../core/build/src/abap/5_syntax/_reference.js");
31598
+ const _syntax_input_1 = __webpack_require__(/*! ../_syntax_input */ "../core/build/src/abap/5_syntax/_syntax_input.js");
31593
31599
  class InlineFS {
31594
31600
  static runSyntax(node, input, type) {
31595
31601
  var _a;
31596
31602
  const token = (_a = node.findFirstExpression(Expressions.TargetFieldSymbol)) === null || _a === void 0 ? void 0 : _a.getFirstToken();
31603
+ const fs = node.findFirstExpression(Expressions.FieldSymbol);
31604
+ if (fs && fs.concatTokens().length > 30) {
31605
+ const message = "FIELD-SYMBOLS name too long, " + fs.concatTokens();
31606
+ input.issues.push((0, _syntax_input_1.syntaxIssue)(input, fs.getFirstToken(), message));
31607
+ }
31597
31608
  if (token && type) {
31598
31609
  const identifier = new _typed_identifier_1.TypedIdentifier(token, input.filename, type, ["inline" /* IdentifierMeta.InlineDefinition */]);
31599
31610
  input.scope.addIdentifier(identifier);
@@ -36728,6 +36739,75 @@ exports.Assign = Assign;
36728
36739
 
36729
36740
  /***/ },
36730
36741
 
36742
+ /***/ "../core/build/src/abap/5_syntax/statements/at_selection_screen.js"
36743
+ /*!*************************************************************************!*\
36744
+ !*** ../core/build/src/abap/5_syntax/statements/at_selection_screen.js ***!
36745
+ \*************************************************************************/
36746
+ (__unused_webpack_module, exports, __webpack_require__) {
36747
+
36748
+ "use strict";
36749
+
36750
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
36751
+ if (k2 === undefined) k2 = k;
36752
+ var desc = Object.getOwnPropertyDescriptor(m, k);
36753
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
36754
+ desc = { enumerable: true, get: function() { return m[k]; } };
36755
+ }
36756
+ Object.defineProperty(o, k2, desc);
36757
+ }) : (function(o, m, k, k2) {
36758
+ if (k2 === undefined) k2 = k;
36759
+ o[k2] = m[k];
36760
+ }));
36761
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
36762
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
36763
+ }) : function(o, v) {
36764
+ o["default"] = v;
36765
+ });
36766
+ var __importStar = (this && this.__importStar) || (function () {
36767
+ var ownKeys = function(o) {
36768
+ ownKeys = Object.getOwnPropertyNames || function (o) {
36769
+ var ar = [];
36770
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
36771
+ return ar;
36772
+ };
36773
+ return ownKeys(o);
36774
+ };
36775
+ return function (mod) {
36776
+ if (mod && mod.__esModule) return mod;
36777
+ var result = {};
36778
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
36779
+ __setModuleDefault(result, mod);
36780
+ return result;
36781
+ };
36782
+ })();
36783
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
36784
+ exports.AtSelectionScreen = void 0;
36785
+ const Expressions = __importStar(__webpack_require__(/*! ../../2_statements/expressions */ "../core/build/src/abap/2_statements/expressions/index.js"));
36786
+ const _reference_1 = __webpack_require__(/*! ../_reference */ "../core/build/src/abap/5_syntax/_reference.js");
36787
+ const source_field_1 = __webpack_require__(/*! ../expressions/source_field */ "../core/build/src/abap/5_syntax/expressions/source_field.js");
36788
+ class AtSelectionScreen {
36789
+ runSyntax(node, input) {
36790
+ // "AT SELECTION-SCREEN ON <field>", "ON VALUE-REQUEST FOR <field>",
36791
+ // "ON HELP-REQUEST FOR <field>" and "ON END OF <field>" all reference
36792
+ // a parameter or select-option, register these as read references so
36793
+ // they are not reported as unused.
36794
+ const fields = [
36795
+ ...node.findDirectExpressions(Expressions.FieldSub),
36796
+ ...node.findDirectExpressions(Expressions.Field),
36797
+ ];
36798
+ for (const field of fields) {
36799
+ const token = field.getFirstToken();
36800
+ if (input.scope.findVariable(token.getStr()) !== undefined) {
36801
+ source_field_1.SourceField.runSyntax(field, input, _reference_1.ReferenceType.DataReadReference, false);
36802
+ }
36803
+ }
36804
+ }
36805
+ }
36806
+ exports.AtSelectionScreen = AtSelectionScreen;
36807
+ //# sourceMappingURL=at_selection_screen.js.map
36808
+
36809
+ /***/ },
36810
+
36731
36811
  /***/ "../core/build/src/abap/5_syntax/statements/authority_check.js"
36732
36812
  /*!*********************************************************************!*\
36733
36813
  !*** ../core/build/src/abap/5_syntax/statements/authority_check.js ***!
@@ -39915,14 +39995,19 @@ const Expressions = __importStar(__webpack_require__(/*! ../../2_statements/expr
39915
39995
  const _typed_identifier_1 = __webpack_require__(/*! ../../types/_typed_identifier */ "../core/build/src/abap/types/_typed_identifier.js");
39916
39996
  const basic_types_1 = __webpack_require__(/*! ../basic_types */ "../core/build/src/abap/5_syntax/basic_types.js");
39917
39997
  const unknown_type_1 = __webpack_require__(/*! ../../types/basic/unknown_type */ "../core/build/src/abap/types/basic/unknown_type.js");
39998
+ const _syntax_input_1 = __webpack_require__(/*! ../_syntax_input */ "../core/build/src/abap/5_syntax/_syntax_input.js");
39918
39999
  const basic_1 = __webpack_require__(/*! ../../types/basic */ "../core/build/src/abap/types/basic/index.js");
39919
40000
  class FieldSymbol {
39920
40001
  runSyntax(node, input) {
39921
- var _a;
39922
- const fsname = (_a = node.findFirstExpression(Expressions.FieldSymbol)) === null || _a === void 0 ? void 0 : _a.getFirstToken();
39923
- if (fsname === undefined) {
40002
+ const fs = node.findFirstExpression(Expressions.FieldSymbol);
40003
+ const fsname = fs === null || fs === void 0 ? void 0 : fs.getFirstToken();
40004
+ if (fs === undefined || fsname === undefined) {
39924
40005
  return;
39925
40006
  }
40007
+ if (fs.concatTokens().length > 30) {
40008
+ const message = "FIELD-SYMBOLS name too long, " + fs.concatTokens();
40009
+ input.issues.push((0, _syntax_input_1.syntaxIssue)(input, fsname, message));
40010
+ }
39926
40011
  if (node.getChildren().length === 5) {
39927
40012
  // no type specified
39928
40013
  input.scope.addIdentifier(new _typed_identifier_1.TypedIdentifier(fsname, input.filename, basic_1.VoidType.get("FS-SIMPLE")));
@@ -47325,6 +47410,7 @@ const if_1 = __webpack_require__(/*! ./statements/if */ "../core/build/src/abap/
47325
47410
  const else_if_1 = __webpack_require__(/*! ./statements/else_if */ "../core/build/src/abap/5_syntax/statements/else_if.js");
47326
47411
  const append_1 = __webpack_require__(/*! ./statements/append */ "../core/build/src/abap/5_syntax/statements/append.js");
47327
47412
  const selection_screen_1 = __webpack_require__(/*! ./statements/selection_screen */ "../core/build/src/abap/5_syntax/statements/selection_screen.js");
47413
+ const at_selection_screen_1 = __webpack_require__(/*! ./statements/at_selection_screen */ "../core/build/src/abap/5_syntax/statements/at_selection_screen.js");
47328
47414
  const ranges_1 = __webpack_require__(/*! ./statements/ranges */ "../core/build/src/abap/5_syntax/statements/ranges.js");
47329
47415
  const write_1 = __webpack_require__(/*! ./statements/write */ "../core/build/src/abap/5_syntax/statements/write.js");
47330
47416
  const case_1 = __webpack_require__(/*! ./statements/case */ "../core/build/src/abap/5_syntax/statements/case.js");
@@ -47532,6 +47618,7 @@ if (Object.keys(map).length === 0) {
47532
47618
  addToMap(new authority_check_1.AuthorityCheck());
47533
47619
  addToMap(new insert_report_1.InsertReport());
47534
47620
  addToMap(new selection_screen_1.SelectionScreen());
47621
+ addToMap(new at_selection_screen_1.AtSelectionScreen());
47535
47622
  addToMap(new ranges_1.Ranges());
47536
47623
  addToMap(new add_1.Add());
47537
47624
  addToMap(new raise_event_1.RaiseEvent());
@@ -51231,6 +51318,7 @@ class ClassDefinition extends _identifier_1.Identifier {
51231
51318
  this.createVisibilityValue = visibility_1.Visibility.Public;
51232
51319
  }
51233
51320
  // perform checks after everything has been initialized
51321
+ this.checkInterfaceVisibility(input, node);
51234
51322
  this.checkMethodsFromSuperClasses(input);
51235
51323
  this.checkMethodNameLength(input);
51236
51324
  this.checkClassConstructorStatic(input);
@@ -51304,6 +51392,17 @@ class ClassDefinition extends _identifier_1.Identifier {
51304
51392
  }
51305
51393
  }
51306
51394
  }
51395
+ checkInterfaceVisibility(input, node) {
51396
+ const sections = [
51397
+ node.findDirectStructure(Structures.ProtectedSection),
51398
+ node.findDirectStructure(Structures.PrivateSection),
51399
+ ];
51400
+ for (const section of sections) {
51401
+ for (const statement of (section === null || section === void 0 ? void 0 : section.findAllStatements(Statements.InterfaceDef)) || []) {
51402
+ input.issues.push((0, _syntax_input_1.syntaxIssue)(input, statement.getFirstToken(), "INTERFACES can only be declared in public sections"));
51403
+ }
51404
+ }
51405
+ }
51307
51406
  checkMethodsFromSuperClasses(input) {
51308
51407
  var _a;
51309
51408
  const scope = input.scope;
@@ -69066,7 +69165,7 @@ class Registry {
69066
69165
  }
69067
69166
  static abaplintVersion() {
69068
69167
  // magic, see build script "version.js"
69069
- return "2.120.5";
69168
+ return "2.120.7";
69070
69169
  }
69071
69170
  getDDICReferences() {
69072
69171
  return this.ddicReferences;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/cli",
3
- "version": "2.120.5",
3
+ "version": "2.120.7",
4
4
  "description": "abaplint - Command Line Interface",
5
5
  "funding": "https://github.com/sponsors/larshp",
6
6
  "bin": {
@@ -39,7 +39,7 @@
39
39
  },
40
40
  "homepage": "https://abaplint.org",
41
41
  "devDependencies": {
42
- "@abaplint/core": "^2.120.5",
42
+ "@abaplint/core": "^2.120.7",
43
43
  "@types/chai": "^4.3.20",
44
44
  "@types/minimist": "^1.2.5",
45
45
  "@types/mocha": "^10.0.10",