@abaplint/core 2.113.130 → 2.113.132

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.
@@ -3660,6 +3660,10 @@ export declare interface INode {
3660
3660
  getLastToken(): Token;
3661
3661
  }
3662
3662
 
3663
+ declare class Input implements IStatement {
3664
+ getMatcher(): IStatementRunnable;
3665
+ }
3666
+
3663
3667
  declare class InsertDatabase implements IStatement {
3664
3668
  getMatcher(): IStatementRunnable;
3665
3669
  }
@@ -5015,6 +5019,7 @@ declare namespace Objects {
5015
5019
  OutboundService,
5016
5020
  PackageInterface,
5017
5021
  Package,
5022
+ PageFormat,
5018
5023
  Parameter,
5019
5024
  PersonalizationObject,
5020
5025
  Program,
@@ -5130,6 +5135,15 @@ declare class PackedType extends AbstractType {
5130
5135
  toCDS(): string;
5131
5136
  }
5132
5137
 
5138
+ declare class PageFormat extends AbstractObject {
5139
+ getType(): string;
5140
+ getAllowedNaming(): {
5141
+ maxLength: number;
5142
+ allowNamespace: boolean;
5143
+ };
5144
+ getDescription(): string | undefined;
5145
+ }
5146
+
5133
5147
  declare class Parameter extends AbstractObject {
5134
5148
  getType(): string;
5135
5149
  getAllowedNaming(): {
@@ -6345,6 +6359,7 @@ declare namespace Statements {
6345
6359
  ReadEntities,
6346
6360
  RollbackEntities,
6347
6361
  Summary,
6362
+ Input,
6348
6363
  OnChange_2 as OnChange,
6349
6364
  AtUserCommand,
6350
6365
  Position_2 as Position,
@@ -105,6 +105,7 @@ __exportStar(require("./modify_entities"), exports);
105
105
  __exportStar(require("./read_entities"), exports);
106
106
  __exportStar(require("./rollback_entities"), exports);
107
107
  __exportStar(require("./summary"), exports);
108
+ __exportStar(require("./input"), exports);
108
109
  __exportStar(require("./on_change"), exports);
109
110
  __exportStar(require("./at_user_command"), exports);
110
111
  __exportStar(require("./position"), exports);
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Input = void 0;
4
+ const combi_1 = require("../combi");
5
+ const version_1 = require("../../../version");
6
+ class Input {
7
+ getMatcher() {
8
+ return (0, combi_1.verNot)(version_1.Version.Cloud, "INPUT");
9
+ }
10
+ }
11
+ exports.Input = Input;
12
+ //# sourceMappingURL=input.js.map
@@ -513,6 +513,9 @@ class BasicTypes {
513
513
  if (found && this.isOccurs(node)) {
514
514
  found = new Types.TableType(found, { withHeader: text.includes("WITH HEADER LINE"), keyType: Types.TableKeyType.default }, qualifiedName);
515
515
  }
516
+ else if (text.endsWith(" WITH HEADER LINE") && found instanceof Types.TableType) {
517
+ found = new Types.TableType(found.getRowType(), { withHeader: true, keyType: Types.TableKeyType.default }, qualifiedName);
518
+ }
516
519
  }
517
520
  else if (text.startsWith("TYPE LINE OF ")) {
518
521
  const sub = node.findFirstExpression(Expressions.TypeName);
@@ -252,10 +252,12 @@ class Select {
252
252
  var _a, _b;
253
253
  let expr = undefined;
254
254
  const ret = [];
255
- expr = node.findFirstExpression(Expressions.SQLFieldList);
256
- if (expr === undefined) {
255
+ if (node.get() instanceof Expressions.SelectLoop) {
257
256
  expr = node.findFirstExpression(Expressions.SQLFieldListLoop);
258
257
  }
258
+ else {
259
+ expr = node.findFirstExpression(Expressions.SQLFieldList);
260
+ }
259
261
  if (((_a = expr === null || expr === void 0 ? void 0 : expr.getFirstChild()) === null || _a === void 0 ? void 0 : _a.get()) instanceof Expressions.Dynamic) {
260
262
  dynamic_1.Dynamic.runSyntax(expr.getFirstChild(), input);
261
263
  }
@@ -62,7 +62,9 @@ class ReadTable {
62
62
  }
63
63
  const type = source_1.Source.runSyntax(s, input);
64
64
  if (s === afterKey) {
65
- if (type instanceof basic_1.StringType || type instanceof basic_1.TableType || type instanceof basic_1.ObjectReferenceType) {
65
+ if (type instanceof basic_1.StringType
66
+ || (type instanceof basic_1.TableType && type.isWithHeader() === false)
67
+ || type instanceof basic_1.ObjectReferenceType) {
66
68
  const message = "Key cannot be string or table or reference";
67
69
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, s.getFirstToken(), message));
68
70
  return;
@@ -119,7 +119,7 @@ class Data {
119
119
  else if (c instanceof nodes_1.StatementNode && ctyp instanceof Statements.Type) {
120
120
  const found = new type_1.Type().runSyntax(c, input);
121
121
  if (found) {
122
- input.scope.addIdentifier(found);
122
+ input.scope.addType(found);
123
123
  }
124
124
  }
125
125
  else if (c instanceof nodes_1.StructureNode && ctyp instanceof Structures.Types) {
@@ -136,6 +136,7 @@ __exportStar(require("./object_characteristic"), exports);
136
136
  __exportStar(require("./outbound_service"), exports);
137
137
  __exportStar(require("./package_interface"), exports);
138
138
  __exportStar(require("./package"), exports);
139
+ __exportStar(require("./page_format"), exports);
139
140
  __exportStar(require("./parameter"), exports);
140
141
  __exportStar(require("./personalization_object"), exports);
141
142
  __exportStar(require("./program"), exports);
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PageFormat = void 0;
4
+ const _abstract_object_1 = require("./_abstract_object");
5
+ class PageFormat extends _abstract_object_1.AbstractObject {
6
+ getType() {
7
+ return "SPPF";
8
+ }
9
+ getAllowedNaming() {
10
+ return {
11
+ maxLength: 30,
12
+ allowNamespace: true,
13
+ };
14
+ }
15
+ getDescription() {
16
+ // todo
17
+ return undefined;
18
+ }
19
+ }
20
+ exports.PageFormat = PageFormat;
21
+ //# sourceMappingURL=page_format.js.map
@@ -67,7 +67,7 @@ class Registry {
67
67
  }
68
68
  static abaplintVersion() {
69
69
  // magic, see build script "version.sh"
70
- return "2.113.130";
70
+ return "2.113.132";
71
71
  }
72
72
  getDDICReferences() {
73
73
  return this.ddicReferences;
@@ -116,6 +116,7 @@ ENDIF.
116
116
  return issues;
117
117
  }
118
118
  analyze(file, cond) {
119
+ var _a, _b;
119
120
  const issues = [];
120
121
  let comparator = "";
121
122
  let found = false;
@@ -141,6 +142,17 @@ ENDIF.
141
142
  found = true; // dont report for the simple case that contains quick fixes
142
143
  }
143
144
  }
145
+ else if (c instanceof nodes_1.ExpressionNode
146
+ && c.get() instanceof Expressions.Compare
147
+ && ((_a = c.getFirstChild()) === null || _a === void 0 ? void 0 : _a.get()) instanceof Expressions.Source
148
+ && c.getChildren().length === 3) {
149
+ const concat = (_b = c.getFirstChild()) === null || _b === void 0 ? void 0 : _b.concatTokens();
150
+ if ((concat === null || concat === void 0 ? void 0 : concat.startsWith("(")) && concat.endsWith(")")) {
151
+ const message = "Parentheses can be removed";
152
+ const issue = issue_1.Issue.atToken(file, c.getFirstToken(), message, this.getMetadata().key, this.conf.severity);
153
+ issues.push(issue);
154
+ }
155
+ }
144
156
  if (comparator === "") {
145
157
  comparator = current;
146
158
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/core",
3
- "version": "2.113.130",
3
+ "version": "2.113.132",
4
4
  "description": "abaplint - Core API",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/abaplint.d.ts",
@@ -53,10 +53,10 @@
53
53
  "@microsoft/api-extractor": "^7.52.8",
54
54
  "@types/chai": "^4.3.20",
55
55
  "@types/mocha": "^10.0.10",
56
- "@types/node": "^24.0.1",
56
+ "@types/node": "^24.0.4",
57
57
  "chai": "^4.5.0",
58
58
  "eslint": "^9.29.0",
59
- "mocha": "^11.6.0",
59
+ "mocha": "^11.7.1",
60
60
  "c8": "^10.1.3",
61
61
  "source-map-support": "^0.5.21",
62
62
  "ts-json-schema-generator": "^2.4.0",