@abaplint/core 2.94.2 → 2.94.4
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 +7 -0
- package/build/src/abap/5_syntax/global_definitions/find_global_definitions.js +1 -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/objects/lock_object.js +40 -2
- package/build/src/registry.js +1 -1
- package/build/src/rules/pragma_style.js +1 -1
- package/package.json +6 -6
package/build/abaplint.d.ts
CHANGED
|
@@ -3684,11 +3684,18 @@ declare class Local implements IStatement {
|
|
|
3684
3684
|
}
|
|
3685
3685
|
|
|
3686
3686
|
declare class LockObject extends AbstractObject {
|
|
3687
|
+
private parsedXML;
|
|
3687
3688
|
getType(): string;
|
|
3688
3689
|
getAllowedNaming(): {
|
|
3689
3690
|
maxLength: number;
|
|
3690
3691
|
allowNamespace: boolean;
|
|
3691
3692
|
};
|
|
3693
|
+
getPrimaryTable(): string | undefined;
|
|
3694
|
+
parseType(reg: IRegistry): void;
|
|
3695
|
+
parse(): {
|
|
3696
|
+
updated: boolean;
|
|
3697
|
+
runtime: number;
|
|
3698
|
+
};
|
|
3692
3699
|
getDescription(): string | undefined;
|
|
3693
3700
|
}
|
|
3694
3701
|
|
|
@@ -27,6 +27,7 @@ class FindGlobalDefinitions {
|
|
|
27
27
|
else if (o instanceof objects_1.DataElement
|
|
28
28
|
|| o instanceof objects_1.View
|
|
29
29
|
|| o instanceof objects_1.TableType
|
|
30
|
+
|| o instanceof objects_1.LockObject
|
|
30
31
|
|| o instanceof objects_1.Table) {
|
|
31
32
|
o.parseType(this.reg); // make sure the references are set after parsing finishes
|
|
32
33
|
}
|
|
@@ -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 {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.LockObject = void 0;
|
|
4
|
+
const ddic_1 = require("../ddic");
|
|
4
5
|
const _abstract_object_1 = require("./_abstract_object");
|
|
5
6
|
class LockObject extends _abstract_object_1.AbstractObject {
|
|
6
7
|
getType() {
|
|
@@ -12,9 +13,46 @@ class LockObject extends _abstract_object_1.AbstractObject {
|
|
|
12
13
|
allowNamespace: true,
|
|
13
14
|
};
|
|
14
15
|
}
|
|
16
|
+
getPrimaryTable() {
|
|
17
|
+
var _a;
|
|
18
|
+
this.parse();
|
|
19
|
+
return (_a = this.parsedXML) === null || _a === void 0 ? void 0 : _a.primaryTable;
|
|
20
|
+
}
|
|
21
|
+
parseType(reg) {
|
|
22
|
+
var _a, _b;
|
|
23
|
+
this.parse();
|
|
24
|
+
const references = [];
|
|
25
|
+
const ddic = new ddic_1.DDIC(reg);
|
|
26
|
+
if ((_a = this.parsedXML) === null || _a === void 0 ? void 0 : _a.primaryTable) {
|
|
27
|
+
const found = ddic.lookupTableOrView2((_b = this.parsedXML) === null || _b === void 0 ? void 0 : _b.primaryTable);
|
|
28
|
+
if (found) {
|
|
29
|
+
references.push({ object: found });
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
reg.getDDICReferences().setUsing(this, references);
|
|
33
|
+
}
|
|
34
|
+
parse() {
|
|
35
|
+
var _a, _b;
|
|
36
|
+
if (this.parsedXML) {
|
|
37
|
+
return { updated: false, runtime: 0 };
|
|
38
|
+
}
|
|
39
|
+
const start = Date.now();
|
|
40
|
+
this.parsedXML = {};
|
|
41
|
+
const parsed = super.parseRaw2();
|
|
42
|
+
if (parsed === undefined
|
|
43
|
+
|| parsed.abapGit === undefined
|
|
44
|
+
|| parsed.abapGit["asx:abap"]["asx:values"] === undefined) {
|
|
45
|
+
return { updated: false, runtime: 0 };
|
|
46
|
+
}
|
|
47
|
+
this.parsedXML.primaryTable = (_a = parsed.abapGit["asx:abap"]["asx:values"].DD25V) === null || _a === void 0 ? void 0 : _a.ROOTTAB;
|
|
48
|
+
this.parsedXML.description = (_b = parsed.abapGit["asx:abap"]["asx:values"].DD25V) === null || _b === void 0 ? void 0 : _b.DDTEXT;
|
|
49
|
+
const end = Date.now();
|
|
50
|
+
return { updated: true, runtime: end - start };
|
|
51
|
+
}
|
|
15
52
|
getDescription() {
|
|
16
|
-
|
|
17
|
-
|
|
53
|
+
var _a;
|
|
54
|
+
this.parse();
|
|
55
|
+
return (_a = this.parsedXML) === null || _a === void 0 ? void 0 : _a.description;
|
|
18
56
|
}
|
|
19
57
|
}
|
|
20
58
|
exports.LockObject = LockObject;
|
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.4",
|
|
4
4
|
"description": "abaplint - Core API",
|
|
5
5
|
"main": "build/src/index.js",
|
|
6
6
|
"typings": "build/abaplint.d.ts",
|
|
@@ -46,17 +46,17 @@
|
|
|
46
46
|
},
|
|
47
47
|
"homepage": "https://abaplint.org",
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@microsoft/api-extractor": "^7.33.
|
|
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.14",
|
|
53
53
|
"chai": "^4.3.7",
|
|
54
|
-
"eslint": "^8.
|
|
55
|
-
"mocha": "^10.
|
|
54
|
+
"eslint": "^8.29.0",
|
|
55
|
+
"mocha": "^10.2.0",
|
|
56
56
|
"c8": "^7.12.0",
|
|
57
57
|
"source-map-support": "^0.5.21",
|
|
58
58
|
"ts-json-schema-generator": "^1.1.2",
|
|
59
|
-
"typescript": "^4.9.
|
|
59
|
+
"typescript": "^4.9.4"
|
|
60
60
|
},
|
|
61
61
|
"dependencies": {
|
|
62
62
|
"fast-xml-parser": "^4.0.12",
|