@abaplint/cli 2.120.91 → 2.120.92

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 +19 -4
  2. package/package.json +2 -2
package/build/cli.js CHANGED
@@ -13538,9 +13538,12 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
13538
13538
  exports.Data = void 0;
13539
13539
  const combi_1 = __webpack_require__(/*! ../combi */ "../core/build/src/abap/2_statements/combi.js");
13540
13540
  const expressions_1 = __webpack_require__(/*! ../expressions */ "../core/build/src/abap/2_statements/expressions/index.js");
13541
+ const tokens_1 = __webpack_require__(/*! ../../1_lexer/tokens */ "../core/build/src/abap/1_lexer/tokens/index.js");
13541
13542
  class Data {
13542
13543
  getMatcher() {
13543
- return (0, combi_1.seq)("DATA", expressions_1.DataDefinition, (0, combi_1.optPrio)("%_PREDEFINED"));
13544
+ // unnamed field, only relevant inside DATA BEGIN OF
13545
+ const unnamed = (0, combi_1.seq)((0, combi_1.altPrio)((0, combi_1.tok)(tokens_1.WParenLeft), (0, combi_1.tok)(tokens_1.ParenLeft)), expressions_1.Integer, (0, combi_1.altPrio)((0, combi_1.tok)(tokens_1.ParenRightW), (0, combi_1.tok)(tokens_1.ParenRight)));
13546
+ return (0, combi_1.seq)("DATA", (0, combi_1.altPrio)(expressions_1.DataDefinition, unnamed), (0, combi_1.optPrio)("%_PREDEFINED"));
13544
13547
  }
13545
13548
  }
13546
13549
  exports.Data = Data;
@@ -24748,6 +24751,7 @@ class ABAPFileInformationParser {
24748
24751
  }
24749
24752
  parseAttributes(node, visibility) {
24750
24753
  var _a;
24754
+ var _b;
24751
24755
  if (node === undefined) {
24752
24756
  return [];
24753
24757
  }
@@ -24764,7 +24768,10 @@ class ABAPFileInformationParser {
24764
24768
  }
24765
24769
  }
24766
24770
  for (const d of data) {
24767
- const name = d.findFirstExpression(Expressions.DefinitionName).getFirstToken();
24771
+ const name = (_a = d.findFirstExpression(Expressions.DefinitionName)) === null || _a === void 0 ? void 0 : _a.getFirstToken();
24772
+ if (name === undefined) {
24773
+ continue;
24774
+ }
24768
24775
  ret.push({
24769
24776
  name: name.getStr(),
24770
24777
  identifier: new _identifier_1.Identifier(name, this.filename),
@@ -24778,7 +24785,7 @@ class ABAPFileInformationParser {
24778
24785
  classData.push(structure.findDirectStatement(Statements.ClassDataBegin));
24779
24786
  }
24780
24787
  for (const d of classData) {
24781
- const name = ((_a = d.findFirstExpression(Expressions.DefinitionName)) !== null && _a !== void 0 ? _a : d.findDirectExpression(Expressions.NamespaceSimpleName)).getFirstToken();
24788
+ const name = ((_b = d.findFirstExpression(Expressions.DefinitionName)) !== null && _b !== void 0 ? _b : d.findDirectExpression(Expressions.NamespaceSimpleName)).getFirstToken();
24782
24789
  ret.push({
24783
24790
  name: name.getStr(),
24784
24791
  identifier: new _identifier_1.Identifier(name, this.filename),
@@ -49226,6 +49233,11 @@ class Data {
49226
49233
  for (const c of node.getChildren()) {
49227
49234
  const ctyp = c.get();
49228
49235
  if (c instanceof nodes_1.StatementNode && ctyp instanceof Statements.Data) {
49236
+ const unnamedLength = c.findDirectExpression(Expressions.Integer);
49237
+ if (unnamedLength && c.findDirectExpression(Expressions.DataDefinition) === undefined) {
49238
+ components.push({ name: "", type: new Basic.CharacterType(parseInt(unnamedLength.concatTokens(), 10)) });
49239
+ continue;
49240
+ }
49229
49241
  const found = new data_1.Data().runSyntax(c, input);
49230
49242
  if (found) {
49231
49243
  components.push({ name: found.getName(), type: found.getType() });
@@ -53158,6 +53170,9 @@ class StructureType extends _abstract_type_1.AbstractType {
53158
53170
  }
53159
53171
  this.indexed = {};
53160
53172
  for (const c of components) {
53173
+ if (c.name === "") {
53174
+ continue; // unnamed field, eg. "DATA: BEGIN OF str, (10), END OF str."
53175
+ }
53161
53176
  const upper = c.name.toUpperCase();
53162
53177
  if (this.indexed[upper] !== undefined) {
53163
53178
  throw new Error("Structure, duplicate field name \"" + upper + "\", " + qualifiedName);
@@ -72779,7 +72794,7 @@ class Registry {
72779
72794
  }
72780
72795
  static abaplintVersion() {
72781
72796
  // magic, see build script "version.js"
72782
- return "2.120.91";
72797
+ return "2.120.92";
72783
72798
  }
72784
72799
  getDDICReferences() {
72785
72800
  return this.ddicReferences;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/cli",
3
- "version": "2.120.91",
3
+ "version": "2.120.92",
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.91",
42
+ "@abaplint/core": "^2.120.92",
43
43
  "@types/chai": "^4.3.20",
44
44
  "@types/minimist": "^1.2.5",
45
45
  "@types/mocha": "^10.0.10",