@abaplint/core 2.113.131 → 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.
- package/build/abaplint.d.ts +15 -0
- package/build/src/abap/2_statements/statements/index.js +1 -0
- package/build/src/abap/2_statements/statements/input.js +12 -0
- package/build/src/abap/5_syntax/basic_types.js +3 -0
- package/build/src/abap/5_syntax/expressions/select.js +4 -2
- package/build/src/abap/5_syntax/statements/read_table.js +3 -1
- package/build/src/objects/index.js +1 -0
- package/build/src/objects/page_format.js +21 -0
- package/build/src/registry.js +1 -1
- package/build/src/rules/many_parentheses.js +12 -0
- package/package.json +3 -3
package/build/abaplint.d.ts
CHANGED
|
@@ -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
|
-
|
|
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
|
|
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;
|
|
@@ -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
|
package/build/src/registry.js
CHANGED
|
@@ -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.
|
|
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.
|
|
56
|
+
"@types/node": "^24.0.4",
|
|
57
57
|
"chai": "^4.5.0",
|
|
58
58
|
"eslint": "^9.29.0",
|
|
59
|
-
"mocha": "^11.
|
|
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",
|