@abaplint/core 2.112.7 → 2.112.9
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 +11 -1
- package/build/src/abap/2_statements/expressions/parameter_exception.js +1 -1
- package/build/src/abap/5_syntax/basic_types.js +1 -1
- package/build/src/cds/cds_parser.js +3 -0
- package/build/src/cds/expressions/cds_extend_view.js +15 -0
- package/build/src/cds/expressions/cds_having.js +12 -0
- package/build/src/cds/expressions/cds_select.js +1 -1
- package/build/src/cds/expressions/index.js +3 -1
- package/build/src/registry.js +1 -1
- package/build/src/rules/classic_exceptions_overlap.js +1 -1
- package/build/src/rules/cyclic_oo.js +1 -1
- package/package.json +3 -3
package/build/abaplint.d.ts
CHANGED
|
@@ -807,6 +807,10 @@ declare class CDSElement extends Expression {
|
|
|
807
807
|
getRunnable(): IStatementRunnable;
|
|
808
808
|
}
|
|
809
809
|
|
|
810
|
+
declare class CDSExtendView extends Expression {
|
|
811
|
+
getRunnable(): IStatementRunnable;
|
|
812
|
+
}
|
|
813
|
+
|
|
810
814
|
declare class CDSFunction extends Expression {
|
|
811
815
|
getRunnable(): IStatementRunnable;
|
|
812
816
|
}
|
|
@@ -815,6 +819,10 @@ declare class CDSGroupBy extends Expression {
|
|
|
815
819
|
getRunnable(): IStatementRunnable;
|
|
816
820
|
}
|
|
817
821
|
|
|
822
|
+
declare class CDSHaving extends Expression {
|
|
823
|
+
getRunnable(): IStatementRunnable;
|
|
824
|
+
}
|
|
825
|
+
|
|
818
826
|
declare class CDSInteger extends Expression {
|
|
819
827
|
getRunnable(): IStatementRunnable;
|
|
820
828
|
}
|
|
@@ -2351,14 +2359,16 @@ declare namespace ExpressionsCDS {
|
|
|
2351
2359
|
CDSDefineProjection,
|
|
2352
2360
|
CDSDefineView,
|
|
2353
2361
|
CDSElement,
|
|
2362
|
+
CDSExtendView,
|
|
2354
2363
|
CDSFunction,
|
|
2355
2364
|
CDSGroupBy,
|
|
2356
|
-
|
|
2365
|
+
CDSHaving,
|
|
2357
2366
|
CDSInteger,
|
|
2358
2367
|
CDSJoin,
|
|
2359
2368
|
CDSName,
|
|
2360
2369
|
CDSParametersSelect,
|
|
2361
2370
|
CDSParameters,
|
|
2371
|
+
CDSProviderContract,
|
|
2362
2372
|
CDSRelation,
|
|
2363
2373
|
CDSSelect,
|
|
2364
2374
|
CDSSource,
|
|
@@ -6,7 +6,7 @@ const _1 = require(".");
|
|
|
6
6
|
class ParameterException extends combi_1.Expression {
|
|
7
7
|
getRunnable() {
|
|
8
8
|
const name = (0, combi_1.altPrio)("OTHERS", _1.ParameterName);
|
|
9
|
-
return (0, combi_1.seq)(name, "=", _1.
|
|
9
|
+
return (0, combi_1.seq)(name, "=", (0, combi_1.altPrio)(_1.Integer, _1.SimpleFieldChain), (0, combi_1.optPrio)((0, combi_1.seq)("MESSAGE", _1.Target)));
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
12
|
exports.ParameterException = ParameterException;
|
|
@@ -796,7 +796,7 @@ class BasicTypes {
|
|
|
796
796
|
const attr = token.getStr();
|
|
797
797
|
const c = new _object_oriented_1.ObjectOriented(this.input.scope).searchConstantName(obj, attr);
|
|
798
798
|
if (c instanceof class_constant_1.ClassConstant) {
|
|
799
|
-
this.input.scope.addReference(firstToken, obj, _reference_1.ReferenceType.ObjectOrientedReference, this.input.filename);
|
|
799
|
+
this.input.scope.addReference(firstToken, obj, _reference_1.ReferenceType.ObjectOrientedReference, this.input.filename, { ooName: obj.getName() });
|
|
800
800
|
this.input.scope.addReference(token, c, _reference_1.ReferenceType.DataReadReference, this.input.filename);
|
|
801
801
|
const val = c.getValue();
|
|
802
802
|
if (typeof val === "string") {
|
|
@@ -29,6 +29,9 @@ class CDSParser {
|
|
|
29
29
|
if (res === undefined || !(res[0] instanceof nodes_1.ExpressionNode)) {
|
|
30
30
|
res = combi_1.Combi.run(new Expressions.CDSDefineCustom(), tokens, version_1.defaultVersion);
|
|
31
31
|
}
|
|
32
|
+
if (res === undefined || !(res[0] instanceof nodes_1.ExpressionNode)) {
|
|
33
|
+
res = combi_1.Combi.run(new Expressions.CDSExtendView(), tokens, version_1.defaultVersion);
|
|
34
|
+
}
|
|
32
35
|
if (res === undefined || !(res[0] instanceof nodes_1.ExpressionNode)) {
|
|
33
36
|
return undefined;
|
|
34
37
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CDSExtendView = void 0;
|
|
4
|
+
const _1 = require(".");
|
|
5
|
+
const combi_1 = require("../../abap/2_statements/combi");
|
|
6
|
+
const cds_name_1 = require("./cds_name");
|
|
7
|
+
class CDSExtendView extends combi_1.Expression {
|
|
8
|
+
getRunnable() {
|
|
9
|
+
const namedot = (0, combi_1.seq)(cds_name_1.CDSName, (0, combi_1.opt)((0, combi_1.seq)(".", cds_name_1.CDSName)), (0, combi_1.opt)(_1.CDSAs));
|
|
10
|
+
const valueNested = (0, combi_1.seq)("{", namedot, (0, combi_1.star)((0, combi_1.seq)(",", namedot)), "}");
|
|
11
|
+
return (0, combi_1.seq)((0, combi_1.star)(_1.CDSAnnotation), (0, combi_1.str)("EXTEND VIEW"), (0, combi_1.opt)((0, combi_1.str)("ENTITY")), cds_name_1.CDSName, (0, combi_1.str)("WITH"), (0, combi_1.opt)(cds_name_1.CDSName), valueNested, (0, combi_1.opt)(";"));
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
exports.CDSExtendView = CDSExtendView;
|
|
15
|
+
//# sourceMappingURL=cds_extend_view.js.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CDSHaving = void 0;
|
|
4
|
+
const _1 = require(".");
|
|
5
|
+
const combi_1 = require("../../abap/2_statements/combi");
|
|
6
|
+
class CDSHaving extends combi_1.Expression {
|
|
7
|
+
getRunnable() {
|
|
8
|
+
return (0, combi_1.seq)("HAVING", _1.CDSCondition);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
exports.CDSHaving = CDSHaving;
|
|
12
|
+
//# sourceMappingURL=cds_having.js.map
|
|
@@ -10,7 +10,7 @@ class CDSSelect extends combi_1.Expression {
|
|
|
10
10
|
const fields = (0, combi_1.opt)((0, combi_1.seq)((0, combi_1.star)((0, combi_1.seq)(_1.CDSElement, ",")), _1.CDSElement));
|
|
11
11
|
const distinct = (0, combi_1.str)("DISTINCT");
|
|
12
12
|
const elements = (0, combi_1.seq)((0, combi_1.str)("{"), (0, combi_1.plus)(_1.CDSElement), (0, combi_1.star)((0, combi_1.seq)(",", _1.CDSElement)), (0, combi_1.str)("}"));
|
|
13
|
-
return (0, combi_1.seq)("SELECT", (0, combi_1.opt)(distinct), (0, combi_1.opt)(fields), "FROM", _1.CDSSource, (0, combi_1.opt)(_1.CDSParametersSelect), (0, combi_1.opt)(_1.CDSAs), (0, combi_1.star)(cds_join_1.CDSJoin), (0, combi_1.star)(_1.CDSComposition), (0, combi_1.star)(cds_association_1.CDSAssociation), (0, combi_1.star)(_1.CDSComposition), (0, combi_1.opt)(elements), (0, combi_1.opt)(_1.CDSGroupBy), (0, combi_1.opt)(_1.
|
|
13
|
+
return (0, combi_1.seq)("SELECT", (0, combi_1.opt)(distinct), (0, combi_1.opt)(fields), "FROM", _1.CDSSource, (0, combi_1.opt)(_1.CDSParametersSelect), (0, combi_1.opt)(_1.CDSAs), (0, combi_1.star)(cds_join_1.CDSJoin), (0, combi_1.star)(_1.CDSComposition), (0, combi_1.star)(cds_association_1.CDSAssociation), (0, combi_1.star)(_1.CDSComposition), (0, combi_1.opt)(elements), (0, combi_1.opt)(_1.CDSWhere), (0, combi_1.opt)(_1.CDSGroupBy), (0, combi_1.opt)(_1.CDSHaving), (0, combi_1.opt)((0, combi_1.seq)("UNION", (0, combi_1.opt)("ALL"), CDSSelect)));
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
exports.CDSSelect = CDSSelect;
|
|
@@ -33,14 +33,16 @@ __exportStar(require("./cds_define_custom"), exports);
|
|
|
33
33
|
__exportStar(require("./cds_define_projection"), exports);
|
|
34
34
|
__exportStar(require("./cds_define_view"), exports);
|
|
35
35
|
__exportStar(require("./cds_element"), exports);
|
|
36
|
+
__exportStar(require("./cds_extend_view"), exports);
|
|
36
37
|
__exportStar(require("./cds_function"), exports);
|
|
37
38
|
__exportStar(require("./cds_group_by"), exports);
|
|
38
|
-
__exportStar(require("./
|
|
39
|
+
__exportStar(require("./cds_having"), exports);
|
|
39
40
|
__exportStar(require("./cds_integer"), exports);
|
|
40
41
|
__exportStar(require("./cds_join"), exports);
|
|
41
42
|
__exportStar(require("./cds_name"), exports);
|
|
42
43
|
__exportStar(require("./cds_parameters_select"), exports);
|
|
43
44
|
__exportStar(require("./cds_parameters"), exports);
|
|
45
|
+
__exportStar(require("./cds_provider_contract"), exports);
|
|
44
46
|
__exportStar(require("./cds_relation"), exports);
|
|
45
47
|
__exportStar(require("./cds_select"), exports);
|
|
46
48
|
__exportStar(require("./cds_source"), exports);
|
package/build/src/registry.js
CHANGED
|
@@ -51,7 +51,7 @@ class ClassicExceptionsOverlap extends _abap_rule_1.ABAPRule {
|
|
|
51
51
|
for (const p of struc.findAllExpressions(Expressions.ParameterListExceptions)) {
|
|
52
52
|
const set = new Set();
|
|
53
53
|
for (const e of p.findAllExpressions(Expressions.ParameterException)) {
|
|
54
|
-
const text = (_a = e.findDirectExpression(Expressions.
|
|
54
|
+
const text = (_a = e.findDirectExpression(Expressions.Integer)) === null || _a === void 0 ? void 0 : _a.concatTokens().toUpperCase();
|
|
55
55
|
if (text === undefined) {
|
|
56
56
|
continue;
|
|
57
57
|
}
|
|
@@ -31,7 +31,7 @@ class CyclicOO {
|
|
|
31
31
|
return {
|
|
32
32
|
key: "cyclic_oo",
|
|
33
33
|
title: "Cyclic OO",
|
|
34
|
-
shortDescription: `Finds cyclic OO references`,
|
|
34
|
+
shortDescription: `Finds cyclic/circular OO references`,
|
|
35
35
|
extendedInformation: `Runs for global INTF + CLAS objects
|
|
36
36
|
|
|
37
37
|
Objects must be without syntax errors for this rule to take effect
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/core",
|
|
3
|
-
"version": "2.112.
|
|
3
|
+
"version": "2.112.9",
|
|
4
4
|
"description": "abaplint - Core API",
|
|
5
5
|
"main": "build/src/index.js",
|
|
6
6
|
"typings": "build/abaplint.d.ts",
|
|
@@ -51,9 +51,9 @@
|
|
|
51
51
|
"homepage": "https://abaplint.org",
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@microsoft/api-extractor": "^7.47.4",
|
|
54
|
-
"@types/chai": "^4.3.
|
|
54
|
+
"@types/chai": "^4.3.17",
|
|
55
55
|
"@types/mocha": "^10.0.7",
|
|
56
|
-
"@types/node": "^22.0.
|
|
56
|
+
"@types/node": "^22.0.2",
|
|
57
57
|
"chai": "^4.5.0",
|
|
58
58
|
"eslint": "^8.57.0",
|
|
59
59
|
"mocha": "^10.7.0",
|