@abaplint/core 2.120.65 → 2.120.66
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/2_statements/expressions/source.js +4 -2
- package/build/src/abap/5_syntax/expressions/method_parameters.js +5 -2
- package/build/src/abap/5_syntax/statements/convert.js +1 -1
- package/build/src/abap/types/basic/data_reference_type.js +5 -0
- package/build/src/registry.js +1 -1
- package/package.json +1 -1
|
@@ -16,7 +16,9 @@ class Source extends combi_1.Expression {
|
|
|
16
16
|
const comp = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.Dash), _1.ComponentChain);
|
|
17
17
|
const attr = (0, combi_1.seq)(_1.Arrow, attribute_chain_1.AttributeChain);
|
|
18
18
|
const deref = (0, combi_1.optPrio)((0, combi_1.ver)(version_1.Release.v756, dereference_1.Dereference));
|
|
19
|
-
|
|
19
|
+
// below v756 "->*" directly after a functional method call is a syntax error, CAST can be dereferenced
|
|
20
|
+
const dynChain = (0, combi_1.star)((0, combi_1.seq)((0, combi_1.altPrio)((0, _dynamic_access_1.dynAttr)(), (0, _dynamic_access_1.dynComp)()), (0, combi_1.optPrio)(dereference_1.Dereference)));
|
|
21
|
+
const castDeref = (0, combi_1.seq)(_1.Cast, dereference_1.Dereference);
|
|
20
22
|
const method = (0, combi_1.seq)(_1.MethodCallChain, (0, combi_1.optPrio)((0, combi_1.altPrio)(attr, comp)), deref, dynChain);
|
|
21
23
|
const rparen = (0, combi_1.tok)(tokens_1.WParenRightW);
|
|
22
24
|
const rparenNoSpace = (0, combi_1.altPrio)((0, combi_1.tok)(tokens_1.ParenRightW), (0, combi_1.tok)(tokens_1.WParenRightW));
|
|
@@ -26,7 +28,7 @@ class Source extends combi_1.Expression {
|
|
|
26
28
|
const after = (0, combi_1.seq)((0, combi_1.altPrio)("&", "&&", _1.ArithOperator), Source);
|
|
27
29
|
const bool = (0, combi_1.seq)((0, combi_1.altPrio)((0, combi_1.ver)(version_1.Release.v702, (0, combi_1.regex)(/^BOOLC$/i), { also: combi_1.AlsoIn.OpenABAP }), (0, combi_1.ver)(version_1.Release.v740sp08, (0, combi_1.regex)(/^XSDBOOL$/i), { also: combi_1.AlsoIn.OpenABAP })), (0, combi_1.tok)(tokens_1.ParenLeftW), _1.Cond, ")");
|
|
28
30
|
const prefix = (0, combi_1.altPrio)((0, combi_1.tok)(tokens_1.WPlus), "BIT-NOT");
|
|
29
|
-
const old = (0, combi_1.seq)((0, combi_1.optPrio)(prefix), (0, combi_1.altPrio)(_1.Constant, _1.StringTemplate, text_element_1.TextElement, bool, method, (0, combi_1.seq)(_1.FieldChain, deref), paren), (0, combi_1.optPrio)(after));
|
|
31
|
+
const old = (0, combi_1.seq)((0, combi_1.optPrio)(prefix), (0, combi_1.altPrio)(_1.Constant, _1.StringTemplate, text_element_1.TextElement, bool, castDeref, method, (0, combi_1.seq)(_1.FieldChain, deref), paren), (0, combi_1.optPrio)(after));
|
|
30
32
|
const corr = (0, combi_1.ver)(version_1.Release.v740sp05, (0, combi_1.seq)("CORRESPONDING", _1.TypeNameOrInfer, (0, combi_1.tok)(tokens_1.ParenLeftW), _1.CorrespondingBody, rparen, (0, combi_1.optPrio)(after)), { also: combi_1.AlsoIn.OpenABAP });
|
|
31
33
|
const conv = (0, combi_1.ver)(version_1.Release.v740sp02, (0, combi_1.seq)("CONV", _1.TypeNameOrInfer, lparenNoSpace, _1.ConvBody, rparenNoSpace, (0, combi_1.optPrio)(after)), { also: combi_1.AlsoIn.OpenABAP });
|
|
32
34
|
const swit = (0, combi_1.ver)(version_1.Release.v740sp02, (0, combi_1.seq)("SWITCH", _1.TypeNameOrInfer, (0, combi_1.tok)(tokens_1.ParenLeftW), _1.SwitchBody, rparenNoSpace, (0, combi_1.optPrio)(after)), { also: combi_1.AlsoIn.OpenABAP });
|
|
@@ -47,6 +47,9 @@ const field_chain_1 = require("./field_chain");
|
|
|
47
47
|
const _reference_1 = require("../_reference");
|
|
48
48
|
const _check_offset_length_1 = require("./_check_offset_length");
|
|
49
49
|
const _check_text_symbol_1 = require("./_check_text_symbol");
|
|
50
|
+
function normalizeParameterName(name) {
|
|
51
|
+
return name.replace(/^!/, "").toUpperCase();
|
|
52
|
+
}
|
|
50
53
|
class MethodParameters {
|
|
51
54
|
constructor() {
|
|
52
55
|
this.requiredParameters = undefined;
|
|
@@ -233,7 +236,7 @@ class MethodParameters {
|
|
|
233
236
|
throw new assert_error_1.AssertError("parameterListS, unexpected node, child");
|
|
234
237
|
}
|
|
235
238
|
const nameNode = c.findDirectExpression(Expressions.ParameterName);
|
|
236
|
-
const name = nameNode ===
|
|
239
|
+
const name = nameNode === undefined ? undefined : normalizeParameterName(nameNode.getFirstToken().getStr());
|
|
237
240
|
if (name === undefined || nameNode === undefined) {
|
|
238
241
|
throw new assert_error_1.AssertError("parameterListS, no name determined");
|
|
239
242
|
}
|
|
@@ -288,7 +291,7 @@ class MethodParameters {
|
|
|
288
291
|
throw new assert_error_1.AssertError("parameterListT, unexpected node, child");
|
|
289
292
|
}
|
|
290
293
|
const nameNode = c.findDirectExpression(Expressions.ParameterName);
|
|
291
|
-
const name = nameNode ===
|
|
294
|
+
const name = nameNode === undefined ? undefined : normalizeParameterName(nameNode.getFirstToken().getStr());
|
|
292
295
|
if (name === undefined || nameNode === undefined) {
|
|
293
296
|
throw new assert_error_1.AssertError("parameterListT, no name determined");
|
|
294
297
|
}
|
|
@@ -76,7 +76,7 @@ class Convert {
|
|
|
76
76
|
if ((stampTarget === null || stampTarget === void 0 ? void 0 : stampTarget.get()) instanceof Expressions.Target) {
|
|
77
77
|
const inline = stampTarget === null || stampTarget === void 0 ? void 0 : stampTarget.findDirectExpression(Expressions.InlineData);
|
|
78
78
|
if (inline) {
|
|
79
|
-
inline_data_1.InlineData.runSyntax(inline, input, new basic_1.PackedType(8,
|
|
79
|
+
inline_data_1.InlineData.runSyntax(inline, input, new basic_1.PackedType(8, 0));
|
|
80
80
|
}
|
|
81
81
|
else {
|
|
82
82
|
target_1.Target.runSyntax(stampTarget, input);
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.DataReference = void 0;
|
|
4
4
|
const _abstract_type_1 = require("./_abstract_type");
|
|
5
5
|
const any_type_1 = require("./any_type");
|
|
6
|
+
const table_type_1 = require("./table_type");
|
|
6
7
|
class DataReference extends _abstract_type_1.AbstractType {
|
|
7
8
|
constructor(type, qualifiedName) {
|
|
8
9
|
super({ qualifiedName: qualifiedName });
|
|
@@ -25,6 +26,10 @@ class DataReference extends _abstract_type_1.AbstractType {
|
|
|
25
26
|
if (this.type instanceof any_type_1.AnyType) {
|
|
26
27
|
return true;
|
|
27
28
|
}
|
|
29
|
+
// LIKE REF TO a generic table, eg. a field symbol TYPE STANDARD TABLE
|
|
30
|
+
if (this.type instanceof table_type_1.TableType && this.type.isGeneric()) {
|
|
31
|
+
return true;
|
|
32
|
+
}
|
|
28
33
|
return false;
|
|
29
34
|
}
|
|
30
35
|
containsVoid() {
|
package/build/src/registry.js
CHANGED