@abaplint/cli 2.113.234 → 2.113.235

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 +50 -9
  2. package/package.json +2 -2
package/build/cli.js CHANGED
@@ -5045,7 +5045,7 @@ const combi_1 = __webpack_require__(/*! ../combi */ "./node_modules/@abaplint/co
5045
5045
  const tokens_1 = __webpack_require__(/*! ../../1_lexer/tokens */ "./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js");
5046
5046
  class DefinitionName extends combi_1.Expression {
5047
5047
  getRunnable() {
5048
- const r = (0, combi_1.regex)(/^&|&?((\w*\/\w+\/)|(\w*\/\w+\/)?[\w\*$%\?]+)$/);
5048
+ const r = (0, combi_1.regex)(/^&|&?((\w*\/\w+\/)|(\w*\/\w+\/)?[\w\*$%\?#]+)$/);
5049
5049
  return (0, combi_1.seq)(r, (0, combi_1.starPrio)((0, combi_1.seq)((0, combi_1.tok)(tokens_1.Dash), (0, combi_1.optPrio)(r))), (0, combi_1.optPrio)((0, combi_1.tok)(tokens_1.DashW)));
5050
5050
  }
5051
5051
  }
@@ -13352,12 +13352,12 @@ const version_1 = __webpack_require__(/*! ../../../version */ "./node_modules/@a
13352
13352
  const tokens_1 = __webpack_require__(/*! ../../1_lexer/tokens */ "./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js");
13353
13353
  class Field {
13354
13354
  getMatcher() {
13355
- const module = (0, combi_1.seq)("MODULE", expressions_1.FormName, (0, combi_1.opt)((0, combi_1.alt)("ON INPUT", "ON REQUEST", "ON CHAIN-REQUEST")));
13355
+ const module = (0, combi_1.seq)("MODULE", expressions_1.FormName, (0, combi_1.opt)((0, combi_1.alt)("ON INPUT", "ON REQUEST", "ON CHAIN-REQUEST", "AT CURSOR-SELECTION")));
13356
13356
  const values = (0, combi_1.seq)("VALUES", (0, combi_1.tok)(tokens_1.WParenLeft), "BETWEEN", expressions_1.Constant, "AND", expressions_1.Constant, (0, combi_1.tok)(tokens_1.ParenRightW));
13357
13357
  const wit = (0, combi_1.seq)("WITH", expressions_1.FieldChain);
13358
13358
  const cond = (0, combi_1.seq)(expressions_1.FieldChain, "=", expressions_1.FieldChain);
13359
13359
  const where = (0, combi_1.seq)(cond, (0, combi_1.starPrio)((0, combi_1.seq)("AND", cond)));
13360
- const select = (0, combi_1.seq)("SELECT * FROM", expressions_1.FieldChain, "WHERE", where, "INTO RESULT WHENEVER NOT FOUND SEND ERRORMESSAGE");
13360
+ const select = (0, combi_1.seq)("SELECT * FROM", expressions_1.FieldChain, "WHERE", where, (0, combi_1.opt)("INTO RESULT WHENEVER NOT FOUND SEND ERRORMESSAGE"));
13361
13361
  const ret = (0, combi_1.seq)("FIELD", expressions_1.FieldChain, (0, combi_1.opt)((0, combi_1.altPrio)(module, values, wit, select)));
13362
13362
  return (0, combi_1.verNot)(version_1.Version.Cloud, ret);
13363
13363
  }
@@ -15773,7 +15773,9 @@ class Perform {
15773
15773
  const program = (0, combi_1.seq)("IN PROGRAM", (0, combi_1.opt)((0, combi_1.alt)(Expressions.Dynamic, Expressions.IncludeName)));
15774
15774
  const found = (0, combi_1.str)("IF FOUND");
15775
15775
  const full = (0, combi_1.seq)((0, combi_1.alt)(Expressions.FormName, Expressions.Dynamic), (0, combi_1.opt)((0, combi_1.verNot)(version_1.Version.Cloud, program)));
15776
- const ret = (0, combi_1.seq)("PERFORM", (0, combi_1.alt)(short, full), (0, combi_1.opt)(found), (0, combi_1.opt)(expressions_1.PerformTables), (0, combi_1.opt)(expressions_1.PerformUsing), (0, combi_1.opt)(expressions_1.PerformChanging), (0, combi_1.opt)(found), (0, combi_1.opt)(commit));
15776
+ const normal = (0, combi_1.seq)((0, combi_1.opt)(found), (0, combi_1.opt)(expressions_1.PerformTables), (0, combi_1.opt)(expressions_1.PerformUsing), (0, combi_1.opt)(expressions_1.PerformChanging), (0, combi_1.opt)(found), (0, combi_1.opt)(commit));
15777
+ const of = (0, combi_1.seq)("OF", (0, combi_1.plus)(Expressions.FormName));
15778
+ const ret = (0, combi_1.seq)("PERFORM", (0, combi_1.alt)(short, full), (0, combi_1.altPrio)(of, normal));
15777
15779
  return ret;
15778
15780
  }
15779
15781
  }
@@ -24085,6 +24087,7 @@ exports.AssertError = AssertError;
24085
24087
  Object.defineProperty(exports, "__esModule", ({ value: true }));
24086
24088
  exports.BasicTypes = void 0;
24087
24089
  const _typed_identifier_1 = __webpack_require__(/*! ../types/_typed_identifier */ "./node_modules/@abaplint/core/build/src/abap/types/_typed_identifier.js");
24090
+ const nodes_1 = __webpack_require__(/*! ../nodes */ "./node_modules/@abaplint/core/build/src/abap/nodes/index.js");
24088
24091
  const Expressions = __webpack_require__(/*! ../2_statements/expressions */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
24089
24092
  const Statements = __webpack_require__(/*! ../2_statements/statements */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js");
24090
24093
  const Types = __webpack_require__(/*! ../types/basic */ "./node_modules/@abaplint/core/build/src/abap/types/basic/index.js");
@@ -24241,6 +24244,30 @@ class BasicTypes {
24241
24244
  type = new basic_1.TableType(type.getRowType(), { withHeader: false, keyType: Types.TableKeyType.default });
24242
24245
  }
24243
24246
  }
24247
+ else if (child instanceof nodes_1.ExpressionNode && child.get() instanceof Expressions.FieldLength) {
24248
+ const len = parseInt(child.concatTokens().replace("(", "").replace(")", ""), 10);
24249
+ if (isNaN(len)) {
24250
+ type = new Types.UnknownType("Type error, invalid field length");
24251
+ }
24252
+ else {
24253
+ if (type instanceof Types.DateType) {
24254
+ if (len > 8) {
24255
+ type = new Types.UnknownType("Type error, offset too long");
24256
+ }
24257
+ else {
24258
+ type = new Types.CharacterType(len);
24259
+ }
24260
+ }
24261
+ else if (type instanceof Types.CharacterType) {
24262
+ if (len <= type.getLength()) {
24263
+ type = new Types.CharacterType(len);
24264
+ }
24265
+ else {
24266
+ type = new Types.UnknownType("Type error, offset too long");
24267
+ }
24268
+ }
24269
+ }
24270
+ }
24244
24271
  else { // field name
24245
24272
  if (type instanceof Types.TableType) {
24246
24273
  type = type.getRowType();
@@ -32001,18 +32028,25 @@ const Expressions = __webpack_require__(/*! ../../2_statements/expressions */ ".
32001
32028
  const _typed_identifier_1 = __webpack_require__(/*! ../../types/_typed_identifier */ "./node_modules/@abaplint/core/build/src/abap/types/_typed_identifier.js");
32002
32029
  const basic_types_1 = __webpack_require__(/*! ../basic_types */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/basic_types.js");
32003
32030
  const unknown_type_1 = __webpack_require__(/*! ../../types/basic/unknown_type */ "./node_modules/@abaplint/core/build/src/abap/types/basic/unknown_type.js");
32031
+ const basic_1 = __webpack_require__(/*! ../../types/basic */ "./node_modules/@abaplint/core/build/src/abap/types/basic/index.js");
32004
32032
  class FieldSymbol {
32005
32033
  runSyntax(node, input) {
32006
32034
  var _a;
32007
32035
  const fsname = (_a = node.findFirstExpression(Expressions.FieldSymbol)) === null || _a === void 0 ? void 0 : _a.getFirstToken();
32036
+ if (fsname === undefined) {
32037
+ return;
32038
+ }
32039
+ if (node.getChildren().length === 5) {
32040
+ // no type specified
32041
+ input.scope.addIdentifier(new _typed_identifier_1.TypedIdentifier(fsname, input.filename, basic_1.VoidType.get("FS-SIMPLE")));
32042
+ return;
32043
+ }
32008
32044
  const bfound = new basic_types_1.BasicTypes(input).parseType(node);
32009
- if (bfound && fsname) {
32045
+ if (bfound) {
32010
32046
  input.scope.addIdentifier(new _typed_identifier_1.TypedIdentifier(fsname, input.filename, bfound));
32011
32047
  return;
32012
32048
  }
32013
- if (fsname) {
32014
- input.scope.addIdentifier(new _typed_identifier_1.TypedIdentifier(fsname, input.filename, new unknown_type_1.UnknownType("Fieldsymbol, fallback")));
32015
- }
32049
+ input.scope.addIdentifier(new _typed_identifier_1.TypedIdentifier(fsname, input.filename, new unknown_type_1.UnknownType("Fieldsymbol, fallback")));
32016
32050
  }
32017
32051
  }
32018
32052
  exports.FieldSymbol = FieldSymbol;
@@ -54778,13 +54812,20 @@ class Registry {
54778
54812
  this.objectsByType = {};
54779
54813
  this.dependencies = {};
54780
54814
  this.setConfig(conf ? conf : config_1.Config.getDefault());
54815
+ this.clear();
54816
+ }
54817
+ /** clears all objects, keeping the configuration */
54818
+ clear() {
54819
+ this.objects = {};
54820
+ this.objectsByType = {};
54821
+ this.dependencies = {};
54781
54822
  this.ddicReferences = new ddic_references_1.DDICReferences();
54782
54823
  this.msagReferences = new msag_references_1.MSAGReferences();
54783
54824
  this.macroReferences = new macro_references_1.MacroReferences();
54784
54825
  }
54785
54826
  static abaplintVersion() {
54786
54827
  // magic, see build script "version.sh"
54787
- return "2.113.234";
54828
+ return "2.113.235";
54788
54829
  }
54789
54830
  getDDICReferences() {
54790
54831
  return this.ddicReferences;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/cli",
3
- "version": "2.113.234",
3
+ "version": "2.113.235",
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.234",
41
+ "@abaplint/core": "^2.113.235",
42
42
  "@types/chai": "^4.3.20",
43
43
  "@types/minimist": "^1.2.5",
44
44
  "@types/mocha": "^10.0.10",