@abaplint/core 2.113.234 → 2.113.235
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 +8 -6
- package/build/src/abap/2_statements/expressions/definition_name.js +1 -1
- package/build/src/abap/2_statements/statements/field.js +2 -2
- package/build/src/abap/2_statements/statements/perform.js +3 -1
- package/build/src/abap/5_syntax/basic_types.js +25 -0
- package/build/src/abap/5_syntax/statements/fieldsymbol.js +11 -4
- package/build/src/registry.js +8 -1
- package/package.json +2 -2
package/build/abaplint.d.ts
CHANGED
|
@@ -5615,15 +5615,17 @@ declare class RefreshControl implements IStatement {
|
|
|
5615
5615
|
}
|
|
5616
5616
|
|
|
5617
5617
|
export declare class Registry implements IRegistry {
|
|
5618
|
-
private
|
|
5619
|
-
private
|
|
5620
|
-
private
|
|
5621
|
-
private
|
|
5622
|
-
private
|
|
5623
|
-
private
|
|
5618
|
+
private objects;
|
|
5619
|
+
private objectsByType;
|
|
5620
|
+
private dependencies;
|
|
5621
|
+
private ddicReferences;
|
|
5622
|
+
private msagReferences;
|
|
5623
|
+
private macroReferences;
|
|
5624
5624
|
private errorNamespace;
|
|
5625
5625
|
private conf;
|
|
5626
5626
|
constructor(conf?: IConfiguration);
|
|
5627
|
+
/** clears all objects, keeping the configuration */
|
|
5628
|
+
clear(): void;
|
|
5627
5629
|
static abaplintVersion(): string;
|
|
5628
5630
|
getDDICReferences(): IDDICReferences;
|
|
5629
5631
|
getMSAGReferences(): IMSAGReferences;
|
|
@@ -5,7 +5,7 @@ const combi_1 = require("../combi");
|
|
|
5
5
|
const tokens_1 = require("../../1_lexer/tokens");
|
|
6
6
|
class DefinitionName extends combi_1.Expression {
|
|
7
7
|
getRunnable() {
|
|
8
|
-
const r = (0, combi_1.regex)(/^&|&?((\w*\/\w+\/)|(\w*\/\w+\/)?[\w
|
|
8
|
+
const r = (0, combi_1.regex)(/^&|&?((\w*\/\w+\/)|(\w*\/\w+\/)?[\w\*$%\?#]+)$/);
|
|
9
9
|
return (0, combi_1.seq)(r, (0, combi_1.starPrio)((0, combi_1.seq)((0, combi_1.tok)(tokens_1.Dash), (0, combi_1.optPrio)(r))), (0, combi_1.optPrio)((0, combi_1.tok)(tokens_1.DashW)));
|
|
10
10
|
}
|
|
11
11
|
}
|
|
@@ -7,12 +7,12 @@ const version_1 = require("../../../version");
|
|
|
7
7
|
const tokens_1 = require("../../1_lexer/tokens");
|
|
8
8
|
class Field {
|
|
9
9
|
getMatcher() {
|
|
10
|
-
const module = (0, combi_1.seq)("MODULE", expressions_1.FormName, (0, combi_1.opt)((0, combi_1.alt)("ON INPUT", "ON REQUEST", "ON CHAIN-REQUEST")));
|
|
10
|
+
const module = (0, combi_1.seq)("MODULE", expressions_1.FormName, (0, combi_1.opt)((0, combi_1.alt)("ON INPUT", "ON REQUEST", "ON CHAIN-REQUEST", "AT CURSOR-SELECTION")));
|
|
11
11
|
const values = (0, combi_1.seq)("VALUES", (0, combi_1.tok)(tokens_1.WParenLeft), "BETWEEN", expressions_1.Constant, "AND", expressions_1.Constant, (0, combi_1.tok)(tokens_1.ParenRightW));
|
|
12
12
|
const wit = (0, combi_1.seq)("WITH", expressions_1.FieldChain);
|
|
13
13
|
const cond = (0, combi_1.seq)(expressions_1.FieldChain, "=", expressions_1.FieldChain);
|
|
14
14
|
const where = (0, combi_1.seq)(cond, (0, combi_1.starPrio)((0, combi_1.seq)("AND", cond)));
|
|
15
|
-
const select = (0, combi_1.seq)("SELECT * FROM", expressions_1.FieldChain, "WHERE", where, "INTO RESULT WHENEVER NOT FOUND SEND ERRORMESSAGE");
|
|
15
|
+
const select = (0, combi_1.seq)("SELECT * FROM", expressions_1.FieldChain, "WHERE", where, (0, combi_1.opt)("INTO RESULT WHENEVER NOT FOUND SEND ERRORMESSAGE"));
|
|
16
16
|
const ret = (0, combi_1.seq)("FIELD", expressions_1.FieldChain, (0, combi_1.opt)((0, combi_1.altPrio)(module, values, wit, select)));
|
|
17
17
|
return (0, combi_1.verNot)(version_1.Version.Cloud, ret);
|
|
18
18
|
}
|
|
@@ -14,7 +14,9 @@ class Perform {
|
|
|
14
14
|
const program = (0, combi_1.seq)("IN PROGRAM", (0, combi_1.opt)((0, combi_1.alt)(Expressions.Dynamic, Expressions.IncludeName)));
|
|
15
15
|
const found = (0, combi_1.str)("IF FOUND");
|
|
16
16
|
const full = (0, combi_1.seq)((0, combi_1.alt)(Expressions.FormName, Expressions.Dynamic), (0, combi_1.opt)((0, combi_1.verNot)(version_1.Version.Cloud, program)));
|
|
17
|
-
const
|
|
17
|
+
const normal = (0, combi_1.seq)((0, combi_1.opt)(found), (0, combi_1.opt)(expressions_1.PerformTables), (0, combi_1.opt)(expressions_1.PerformUsing), (0, combi_1.opt)(expressions_1.PerformChanging), (0, combi_1.opt)(found), (0, combi_1.opt)(commit));
|
|
18
|
+
const of = (0, combi_1.seq)("OF", (0, combi_1.plus)(Expressions.FormName));
|
|
19
|
+
const ret = (0, combi_1.seq)("PERFORM", (0, combi_1.alt)(short, full), (0, combi_1.altPrio)(of, normal));
|
|
18
20
|
return ret;
|
|
19
21
|
}
|
|
20
22
|
}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.BasicTypes = void 0;
|
|
4
4
|
const _typed_identifier_1 = require("../types/_typed_identifier");
|
|
5
|
+
const nodes_1 = require("../nodes");
|
|
5
6
|
const Expressions = require("../2_statements/expressions");
|
|
6
7
|
const Statements = require("../2_statements/statements");
|
|
7
8
|
const Types = require("../types/basic");
|
|
@@ -158,6 +159,30 @@ class BasicTypes {
|
|
|
158
159
|
type = new basic_1.TableType(type.getRowType(), { withHeader: false, keyType: Types.TableKeyType.default });
|
|
159
160
|
}
|
|
160
161
|
}
|
|
162
|
+
else if (child instanceof nodes_1.ExpressionNode && child.get() instanceof Expressions.FieldLength) {
|
|
163
|
+
const len = parseInt(child.concatTokens().replace("(", "").replace(")", ""), 10);
|
|
164
|
+
if (isNaN(len)) {
|
|
165
|
+
type = new Types.UnknownType("Type error, invalid field length");
|
|
166
|
+
}
|
|
167
|
+
else {
|
|
168
|
+
if (type instanceof Types.DateType) {
|
|
169
|
+
if (len > 8) {
|
|
170
|
+
type = new Types.UnknownType("Type error, offset too long");
|
|
171
|
+
}
|
|
172
|
+
else {
|
|
173
|
+
type = new Types.CharacterType(len);
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
else if (type instanceof Types.CharacterType) {
|
|
177
|
+
if (len <= type.getLength()) {
|
|
178
|
+
type = new Types.CharacterType(len);
|
|
179
|
+
}
|
|
180
|
+
else {
|
|
181
|
+
type = new Types.UnknownType("Type error, offset too long");
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
}
|
|
161
186
|
else { // field name
|
|
162
187
|
if (type instanceof Types.TableType) {
|
|
163
188
|
type = type.getRowType();
|
|
@@ -5,18 +5,25 @@ const Expressions = require("../../2_statements/expressions");
|
|
|
5
5
|
const _typed_identifier_1 = require("../../types/_typed_identifier");
|
|
6
6
|
const basic_types_1 = require("../basic_types");
|
|
7
7
|
const unknown_type_1 = require("../../types/basic/unknown_type");
|
|
8
|
+
const basic_1 = require("../../types/basic");
|
|
8
9
|
class FieldSymbol {
|
|
9
10
|
runSyntax(node, input) {
|
|
10
11
|
var _a;
|
|
11
12
|
const fsname = (_a = node.findFirstExpression(Expressions.FieldSymbol)) === null || _a === void 0 ? void 0 : _a.getFirstToken();
|
|
13
|
+
if (fsname === undefined) {
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
if (node.getChildren().length === 5) {
|
|
17
|
+
// no type specified
|
|
18
|
+
input.scope.addIdentifier(new _typed_identifier_1.TypedIdentifier(fsname, input.filename, basic_1.VoidType.get("FS-SIMPLE")));
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
12
21
|
const bfound = new basic_types_1.BasicTypes(input).parseType(node);
|
|
13
|
-
if (bfound
|
|
22
|
+
if (bfound) {
|
|
14
23
|
input.scope.addIdentifier(new _typed_identifier_1.TypedIdentifier(fsname, input.filename, bfound));
|
|
15
24
|
return;
|
|
16
25
|
}
|
|
17
|
-
|
|
18
|
-
input.scope.addIdentifier(new _typed_identifier_1.TypedIdentifier(fsname, input.filename, new unknown_type_1.UnknownType("Fieldsymbol, fallback")));
|
|
19
|
-
}
|
|
26
|
+
input.scope.addIdentifier(new _typed_identifier_1.TypedIdentifier(fsname, input.filename, new unknown_type_1.UnknownType("Fieldsymbol, fallback")));
|
|
20
27
|
}
|
|
21
28
|
}
|
|
22
29
|
exports.FieldSymbol = FieldSymbol;
|
package/build/src/registry.js
CHANGED
|
@@ -61,13 +61,20 @@ class Registry {
|
|
|
61
61
|
this.objectsByType = {};
|
|
62
62
|
this.dependencies = {};
|
|
63
63
|
this.setConfig(conf ? conf : config_1.Config.getDefault());
|
|
64
|
+
this.clear();
|
|
65
|
+
}
|
|
66
|
+
/** clears all objects, keeping the configuration */
|
|
67
|
+
clear() {
|
|
68
|
+
this.objects = {};
|
|
69
|
+
this.objectsByType = {};
|
|
70
|
+
this.dependencies = {};
|
|
64
71
|
this.ddicReferences = new ddic_references_1.DDICReferences();
|
|
65
72
|
this.msagReferences = new msag_references_1.MSAGReferences();
|
|
66
73
|
this.macroReferences = new macro_references_1.MacroReferences();
|
|
67
74
|
}
|
|
68
75
|
static abaplintVersion() {
|
|
69
76
|
// magic, see build script "version.sh"
|
|
70
|
-
return "2.113.
|
|
77
|
+
return "2.113.235";
|
|
71
78
|
}
|
|
72
79
|
getDDICReferences() {
|
|
73
80
|
return this.ddicReferences;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/core",
|
|
3
|
-
"version": "2.113.
|
|
3
|
+
"version": "2.113.235",
|
|
4
4
|
"description": "abaplint - Core API",
|
|
5
5
|
"main": "build/src/index.js",
|
|
6
6
|
"typings": "build/abaplint.d.ts",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
},
|
|
51
51
|
"homepage": "https://abaplint.org",
|
|
52
52
|
"devDependencies": {
|
|
53
|
-
"@microsoft/api-extractor": "^7.53.
|
|
53
|
+
"@microsoft/api-extractor": "^7.53.3",
|
|
54
54
|
"@types/chai": "^4.3.20",
|
|
55
55
|
"@types/mocha": "^10.0.10",
|
|
56
56
|
"@types/node": "^24.9.1",
|