@abaplint/core 2.93.47 → 2.93.48
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.
|
@@ -10,12 +10,12 @@ class Target extends combi_1.Expression {
|
|
|
10
10
|
getRunnable() {
|
|
11
11
|
const attr = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.InstanceArrow), attribute_name_1.AttributeName);
|
|
12
12
|
const comp = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.Dash), _1.ComponentName);
|
|
13
|
-
const something = (0, combi_1.starPrio)((0, combi_1.altPrio)(attr, comp, _1.TableExpression));
|
|
13
|
+
const something = (0, combi_1.starPrio)((0, combi_1.altPrio)(dereference_1.Dereference, attr, comp, _1.TableExpression));
|
|
14
14
|
const cast = (0, combi_1.seq)((0, combi_1.altPrio)(_1.Cast, _1.NewObject), _1.Arrow, _1.FieldAll);
|
|
15
15
|
const clas = (0, combi_1.seq)(_1.ClassName, (0, combi_1.tok)(tokens_1.StaticArrow), attribute_name_1.AttributeName);
|
|
16
16
|
const start = (0, combi_1.altPrio)(cast, clas, _1.TargetField, _1.TargetFieldSymbol);
|
|
17
17
|
const fields = (0, combi_1.seq)((0, combi_1.optPrio)(_1.FieldOffset), (0, combi_1.optPrio)(_1.FieldLength));
|
|
18
|
-
const optional = (0, combi_1.altPrio)(_1.TableBody, fields
|
|
18
|
+
const optional = (0, combi_1.altPrio)(_1.TableBody, fields);
|
|
19
19
|
return (0, combi_1.altPrio)(_1.InlineData, _1.InlineFS, (0, combi_1.seq)(start, something, optional));
|
|
20
20
|
}
|
|
21
21
|
}
|
|
@@ -11,6 +11,7 @@ const objects_1 = require("../../objects");
|
|
|
11
11
|
const _typed_identifier_1 = require("../types/_typed_identifier");
|
|
12
12
|
const basic_1 = require("../types/basic");
|
|
13
13
|
const ddic_1 = require("../../ddic");
|
|
14
|
+
const _object_oriented_1 = require("./_object_oriented");
|
|
14
15
|
class Procedural {
|
|
15
16
|
constructor(reg, scope) {
|
|
16
17
|
this.scope = scope;
|
|
@@ -67,7 +68,7 @@ class Procedural {
|
|
|
67
68
|
return undefined;
|
|
68
69
|
}
|
|
69
70
|
findFunctionScope(obj, node, filename) {
|
|
70
|
-
var _a;
|
|
71
|
+
var _a, _b;
|
|
71
72
|
if (!(obj instanceof objects_1.FunctionGroup)) {
|
|
72
73
|
throw new Error("findFunctionScope, expected function group input");
|
|
73
74
|
}
|
|
@@ -101,6 +102,14 @@ class Procedural {
|
|
|
101
102
|
}
|
|
102
103
|
}
|
|
103
104
|
}
|
|
105
|
+
else if (found instanceof basic_1.UnknownType && ((_b = param.type) === null || _b === void 0 ? void 0 : _b.includes("=>"))) {
|
|
106
|
+
const [name, field] = param.type.split("=>");
|
|
107
|
+
const def = this.scope.findObjectDefinition(name);
|
|
108
|
+
const c = new _object_oriented_1.ObjectOriented(this.scope).searchTypeName(def, field);
|
|
109
|
+
if (c) {
|
|
110
|
+
found = c.getType();
|
|
111
|
+
}
|
|
112
|
+
}
|
|
104
113
|
if (found instanceof basic_1.UnknownType && param.type) {
|
|
105
114
|
const f = ddic.lookupBuiltinType(param.type);
|
|
106
115
|
if (f) {
|
|
@@ -11,6 +11,7 @@ const attribute_name_1 = require("./attribute_name");
|
|
|
11
11
|
const field_offset_1 = require("./field_offset");
|
|
12
12
|
const _reference_1 = require("../_reference");
|
|
13
13
|
const table_expression_1 = require("./table_expression");
|
|
14
|
+
const expressions_1 = require("../../2_statements/expressions");
|
|
14
15
|
class Target {
|
|
15
16
|
runSyntax(node, scope, filename) {
|
|
16
17
|
const concat = node.concatTokens();
|
|
@@ -54,6 +55,12 @@ class Target {
|
|
|
54
55
|
throw new Error("Not a object reference, target");
|
|
55
56
|
}
|
|
56
57
|
}
|
|
58
|
+
else if (current.get() instanceof expressions_1.Dereference) {
|
|
59
|
+
if (!(context instanceof basic_1.DataReference)) {
|
|
60
|
+
throw new Error("Not a object reference, target");
|
|
61
|
+
}
|
|
62
|
+
context = context.getType();
|
|
63
|
+
}
|
|
57
64
|
else if (current.get() instanceof Expressions.ComponentName) {
|
|
58
65
|
context = new component_name_1.ComponentName().runSyntax(context, current);
|
|
59
66
|
}
|
package/build/src/registry.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/core",
|
|
3
|
-
"version": "2.93.
|
|
3
|
+
"version": "2.93.48",
|
|
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.4",
|
|
50
50
|
"@types/chai": "^4.3.3",
|
|
51
51
|
"@types/mocha": "^10.0.0",
|
|
52
|
-
"@types/node": "^18.11.
|
|
52
|
+
"@types/node": "^18.11.2",
|
|
53
53
|
"chai": "^4.3.6",
|
|
54
54
|
"eslint": "^8.25.0",
|
|
55
55
|
"mocha": "^10.1.0",
|