@abaplint/core 2.120.15 → 2.120.16
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/field_chain.js +1 -1
- package/build/src/abap/2_statements/expressions/table_expression.js +1 -1
- package/build/src/abap/5_syntax/_type_utils.js +1 -0
- package/build/src/abap/5_syntax/statements/insert_internal.js +8 -4
- package/build/src/abap/5_syntax/structures/class_data.js +9 -1
- package/build/src/registry.js +1 -1
- package/package.json +1 -1
|
@@ -9,7 +9,7 @@ class FieldChain extends combi_1.Expression {
|
|
|
9
9
|
getRunnable() {
|
|
10
10
|
const attr = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.InstanceArrow), _1.AttributeName);
|
|
11
11
|
const comp = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.Dash), (0, combi_1.optPrio)(_1.ComponentName));
|
|
12
|
-
const chain = (0, combi_1.star)((0, combi_1.altPrio)(_1.Dereference, (0, _dynamic_access_1.dynAttr)(), attr, (0, _dynamic_access_1.dynComp)((0, combi_1.optPrio)(_1.FieldOffset), (0, combi_1.optPrio)(_1.FieldLength)), comp, _1.TableExpression));
|
|
12
|
+
const chain = (0, combi_1.star)((0, combi_1.altPrio)(_1.Dereference, (0, _dynamic_access_1.dynAttr)(), attr, (0, _dynamic_access_1.dynComp)((0, combi_1.optPrio)(_1.FieldOffset), (0, combi_1.optPrio)(_1.FieldLength)), comp, (0, combi_1.tok)(tokens_1.AssociationName), _1.TableExpression));
|
|
13
13
|
const clas = (0, combi_1.seq)(_1.ClassName, (0, combi_1.tok)(tokens_1.StaticArrow), _1.AttributeName);
|
|
14
14
|
const start = (0, combi_1.altPrio)(clas, _1.SourceField, _1.SourceFieldSymbol);
|
|
15
15
|
const after = (0, combi_1.altPrio)((0, combi_1.tok)(tokens_1.DashW), (0, combi_1.seq)((0, combi_1.optPrio)(_1.TableBody), (0, combi_1.optPrio)(_1.FieldOffset), (0, combi_1.optPrio)(_1.FieldLength)));
|
|
@@ -10,7 +10,7 @@ class TableExpression extends combi_1.Expression {
|
|
|
10
10
|
const fields = (0, combi_1.plus)((0, combi_1.seq)((0, combi_1.altPrio)(_1.ComponentChainSimple, _1.Dynamic), "=", _1.Source));
|
|
11
11
|
const key = (0, combi_1.seq)("KEY", _1.SimpleName);
|
|
12
12
|
const index = (0, combi_1.seq)("INDEX", _1.Source);
|
|
13
|
-
const ret = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.BracketLeftW), (0, combi_1.alt)(_1.Source, (0, combi_1.seq)((0, combi_1.optPrio)(key), (0, combi_1.opt)("COMPONENTS"), (0, combi_1.altPrio)(fields, index))), (0, combi_1.altPrio)((0, combi_1.tok)(tokens_1.WBracketRight), (0, combi_1.tok)(tokens_1.WBracketRightW)));
|
|
13
|
+
const ret = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.BracketLeftW), (0, combi_1.alt)((0, combi_1.seq)(_1.Source, fields), _1.Source, (0, combi_1.seq)((0, combi_1.optPrio)(key), (0, combi_1.opt)("COMPONENTS"), (0, combi_1.altPrio)(fields, index))), (0, combi_1.altPrio)((0, combi_1.tok)(tokens_1.WBracketRight), (0, combi_1.tok)(tokens_1.WBracketRightW)));
|
|
14
14
|
return (0, combi_1.ver)(version_1.Release.v740sp02, ret, { also: combi_1.AlsoIn.OpenABAP });
|
|
15
15
|
}
|
|
16
16
|
}
|
|
@@ -88,6 +88,7 @@ class TypeUtils {
|
|
|
88
88
|
|| type instanceof basic_1.NumericType
|
|
89
89
|
|| type instanceof basic_1.DateType
|
|
90
90
|
|| type instanceof basic_1.TimeType
|
|
91
|
+
|| type instanceof cgeneric_type_1.CGenericType
|
|
91
92
|
|| type instanceof basic_1.CLikeType
|
|
92
93
|
|| type instanceof basic_1.AnyType
|
|
93
94
|
|| type instanceof basic_1.UnknownType
|
|
@@ -63,9 +63,13 @@ class InsertInternal {
|
|
|
63
63
|
&& node.findDirectTokenByText("LINES") === undefined) {
|
|
64
64
|
targetType = targetType.getRowType();
|
|
65
65
|
}
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
66
|
+
const initial = node.findDirectTokenByText("INITIAL") !== undefined;
|
|
67
|
+
let source;
|
|
68
|
+
if (initial === false) {
|
|
69
|
+
source = node.findDirectExpression(Expressions.SimpleSource4);
|
|
70
|
+
if (source === undefined) {
|
|
71
|
+
source = node.findDirectExpression(Expressions.Source);
|
|
72
|
+
}
|
|
69
73
|
}
|
|
70
74
|
const sourceType = source ? source_1.Source.runSyntax(source, input, targetType) : targetType;
|
|
71
75
|
if (targetType === undefined
|
|
@@ -87,7 +91,7 @@ class InsertInternal {
|
|
|
87
91
|
fstarget_1.FSTarget.runSyntax(afterAssigning, input, sourceType);
|
|
88
92
|
}
|
|
89
93
|
}
|
|
90
|
-
if (
|
|
94
|
+
if (initial === false) {
|
|
91
95
|
let error = false;
|
|
92
96
|
if (sourceType instanceof basic_1.IntegerType && targetType instanceof basic_1.Integer8Type) {
|
|
93
97
|
error = true;
|
|
@@ -36,6 +36,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
36
36
|
exports.ClassData = void 0;
|
|
37
37
|
const Expressions = __importStar(require("../../2_statements/expressions"));
|
|
38
38
|
const Statements = __importStar(require("../../2_statements/statements"));
|
|
39
|
+
const Structures = __importStar(require("../../3_structures/structures"));
|
|
39
40
|
const nodes_1 = require("../../nodes");
|
|
40
41
|
const _typed_identifier_1 = require("../../types/_typed_identifier");
|
|
41
42
|
const Basic = __importStar(require("../../types/basic"));
|
|
@@ -54,7 +55,14 @@ class ClassData {
|
|
|
54
55
|
values[found.getName()] = found.getValue();
|
|
55
56
|
}
|
|
56
57
|
}
|
|
57
|
-
|
|
58
|
+
else if (c instanceof nodes_1.StructureNode && ctyp instanceof Structures.ClassData) {
|
|
59
|
+
const found = new ClassData().runSyntax(c, input);
|
|
60
|
+
if (found) {
|
|
61
|
+
components.push({ name: found.getName(), type: found.getType() });
|
|
62
|
+
values[found.getName()] = found.getValue();
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
// todo, INCLUDES
|
|
58
66
|
}
|
|
59
67
|
return new _typed_identifier_1.TypedIdentifier(name, input.filename, new Basic.StructureType(components), ["static" /* IdentifierMeta.Static */], values);
|
|
60
68
|
}
|
package/build/src/registry.js
CHANGED