@abaplint/core 2.94.3 → 2.94.5
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/src/abap/5_syntax/basic_types.js +4 -0
- package/build/src/abap/5_syntax/expressions/method_call_body.js +5 -0
- package/build/src/abap/5_syntax/statements/modify_internal.js +27 -0
- package/build/src/abap/5_syntax/statements/search.js +14 -0
- package/build/src/abap/5_syntax/statements/translate.js +18 -0
- package/build/src/abap/5_syntax/syntax.js +6 -0
- package/build/src/registry.js +1 -1
- package/build/src/rules/pragma_style.js +1 -1
- package/package.json +2 -2
|
@@ -675,6 +675,7 @@ class BasicTypes {
|
|
|
675
675
|
}
|
|
676
676
|
resolveConstantValue(expr) {
|
|
677
677
|
var _a, _b;
|
|
678
|
+
// todo: rewrite this method
|
|
678
679
|
if (!(expr.get() instanceof Expressions.SimpleFieldChain)) {
|
|
679
680
|
throw new Error("resolveConstantValue");
|
|
680
681
|
}
|
|
@@ -688,6 +689,9 @@ class BasicTypes {
|
|
|
688
689
|
this.scope.addReference(firstToken, found, _reference_1.ReferenceType.DataReadReference, this.filename);
|
|
689
690
|
return val;
|
|
690
691
|
}
|
|
692
|
+
else if ((found === null || found === void 0 ? void 0 : found.getType()) instanceof basic_1.StructureType) {
|
|
693
|
+
this.scope.addReference(firstToken, found, _reference_1.ReferenceType.DataReadReference, this.filename);
|
|
694
|
+
}
|
|
691
695
|
return undefined;
|
|
692
696
|
}
|
|
693
697
|
else if (firstNode.get() instanceof Expressions.ClassName
|
|
@@ -4,12 +4,17 @@ exports.MethodCallBody = void 0;
|
|
|
4
4
|
const Expressions = require("../../2_statements/expressions");
|
|
5
5
|
const method_parameters_1 = require("./method_parameters");
|
|
6
6
|
const source_1 = require("./source");
|
|
7
|
+
const method_call_param_1 = require("./method_call_param");
|
|
7
8
|
class MethodCallBody {
|
|
8
9
|
runSyntax(node, scope, filename, method) {
|
|
9
10
|
const parameters = node.findDirectExpression(Expressions.MethodParameters);
|
|
10
11
|
if (parameters) {
|
|
11
12
|
new method_parameters_1.MethodParameters().runSyntax(parameters, scope, method, filename);
|
|
12
13
|
}
|
|
14
|
+
const param = node.findDirectExpression(Expressions.MethodCallParam);
|
|
15
|
+
if (param) {
|
|
16
|
+
new method_call_param_1.MethodCallParam().runSyntax(param, scope, method, filename);
|
|
17
|
+
}
|
|
13
18
|
for (const s of node.findDirectExpressions(Expressions.Source)) {
|
|
14
19
|
new source_1.Source().runSyntax(s, scope, filename);
|
|
15
20
|
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ModifyInternal = void 0;
|
|
4
|
+
const Expressions = require("../../2_statements/expressions");
|
|
5
|
+
const source_1 = require("../expressions/source");
|
|
6
|
+
const target_1 = require("../expressions/target");
|
|
7
|
+
const fstarget_1 = require("../expressions/fstarget");
|
|
8
|
+
const component_cond_1 = require("../expressions/component_cond");
|
|
9
|
+
class ModifyInternal {
|
|
10
|
+
runSyntax(node, scope, filename) {
|
|
11
|
+
for (const s of node.findDirectExpressions(Expressions.Source)) {
|
|
12
|
+
new source_1.Source().runSyntax(s, scope, filename);
|
|
13
|
+
}
|
|
14
|
+
for (const t of node.findDirectExpressions(Expressions.Target)) {
|
|
15
|
+
new target_1.Target().runSyntax(t, scope, filename);
|
|
16
|
+
}
|
|
17
|
+
const target = node.findDirectExpression(Expressions.FSTarget);
|
|
18
|
+
if (target) {
|
|
19
|
+
new fstarget_1.FSTarget().runSyntax(target, scope, filename, undefined);
|
|
20
|
+
}
|
|
21
|
+
for (const t of node.findDirectExpressions(Expressions.ComponentCond)) {
|
|
22
|
+
new component_cond_1.ComponentCond().runSyntax(t, scope, filename);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
exports.ModifyInternal = ModifyInternal;
|
|
27
|
+
//# sourceMappingURL=modify_internal.js.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Search = void 0;
|
|
4
|
+
const Expressions = require("../../2_statements/expressions");
|
|
5
|
+
const source_1 = require("../expressions/source");
|
|
6
|
+
class Search {
|
|
7
|
+
runSyntax(node, scope, filename) {
|
|
8
|
+
for (const s of node.findDirectExpressions(Expressions.Source)) {
|
|
9
|
+
new source_1.Source().runSyntax(s, scope, filename);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
exports.Search = Search;
|
|
14
|
+
//# sourceMappingURL=search.js.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Translate = void 0;
|
|
4
|
+
const Expressions = require("../../2_statements/expressions");
|
|
5
|
+
const source_1 = require("../expressions/source");
|
|
6
|
+
const target_1 = require("../expressions/target");
|
|
7
|
+
class Translate {
|
|
8
|
+
runSyntax(node, scope, filename) {
|
|
9
|
+
for (const s of node.findDirectExpressions(Expressions.Source)) {
|
|
10
|
+
new source_1.Source().runSyntax(s, scope, filename);
|
|
11
|
+
}
|
|
12
|
+
for (const t of node.findDirectExpressions(Expressions.Target)) {
|
|
13
|
+
new target_1.Target().runSyntax(t, scope, filename);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
exports.Translate = Translate;
|
|
18
|
+
//# sourceMappingURL=translate.js.map
|
|
@@ -22,6 +22,9 @@ const perform_1 = require("./statements/perform");
|
|
|
22
22
|
const type_1 = require("./statements/type");
|
|
23
23
|
const constant_1 = require("./statements/constant");
|
|
24
24
|
const static_1 = require("./statements/static");
|
|
25
|
+
const search_1 = require("./statements/search");
|
|
26
|
+
const translate_1 = require("./statements/translate");
|
|
27
|
+
const modify_internal_1 = require("./statements/modify_internal");
|
|
25
28
|
const data_2 = require("./statements/data");
|
|
26
29
|
const parameter_1 = require("./statements/parameter");
|
|
27
30
|
const fieldsymbol_1 = require("./statements/fieldsymbol");
|
|
@@ -258,6 +261,9 @@ if (Object.keys(map).length === 0) {
|
|
|
258
261
|
addToMap(new modify_entities_1.ModifyEntities());
|
|
259
262
|
addToMap(new commit_entities_1.CommitEntities());
|
|
260
263
|
addToMap(new call_kernel_1.CallKernel());
|
|
264
|
+
addToMap(new search_1.Search());
|
|
265
|
+
addToMap(new translate_1.Translate());
|
|
266
|
+
addToMap(new modify_internal_1.ModifyInternal());
|
|
261
267
|
}
|
|
262
268
|
// -----------------------------------
|
|
263
269
|
class SyntaxLogic {
|
package/build/src/registry.js
CHANGED
|
@@ -22,7 +22,7 @@ class PragmaStyle extends _abap_rule_1.ABAPRule {
|
|
|
22
22
|
return {
|
|
23
23
|
key: "pragma_style",
|
|
24
24
|
title: "Pragma Style",
|
|
25
|
-
shortDescription: `Check pragmas
|
|
25
|
+
shortDescription: `Check pragmas placement and case`,
|
|
26
26
|
tags: [_irule_1.RuleTag.SingleFile],
|
|
27
27
|
extendedInformation: `https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/abenpragma.htm`,
|
|
28
28
|
badExample: `DATA field ##NO_TEXT TYPE i.`,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/core",
|
|
3
|
-
"version": "2.94.
|
|
3
|
+
"version": "2.94.5",
|
|
4
4
|
"description": "abaplint - Core API",
|
|
5
5
|
"main": "build/src/index.js",
|
|
6
6
|
"typings": "build/abaplint.d.ts",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"@microsoft/api-extractor": "^7.33.7",
|
|
50
50
|
"@types/chai": "^4.3.4",
|
|
51
51
|
"@types/mocha": "^10.0.1",
|
|
52
|
-
"@types/node": "^18.11.
|
|
52
|
+
"@types/node": "^18.11.15",
|
|
53
53
|
"chai": "^4.3.7",
|
|
54
54
|
"eslint": "^8.29.0",
|
|
55
55
|
"mocha": "^10.2.0",
|