@abaplint/core 2.120.15 → 2.120.17
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 +3 -0
- 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/_builtin.js +20 -20
- package/build/src/abap/5_syntax/_type_utils.js +4 -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/abap/types/basic/simple_type.js +7 -0
- package/build/src/ddic.js +1 -1
- package/build/src/registry.js +1 -1
- package/package.json +1 -1
package/build/abaplint.d.ts
CHANGED
|
@@ -6774,6 +6774,9 @@ declare class SimpleTarget extends Expression {
|
|
|
6774
6774
|
}
|
|
6775
6775
|
|
|
6776
6776
|
declare class SimpleType extends AbstractType {
|
|
6777
|
+
private static readonly singleton;
|
|
6778
|
+
static get(): SimpleType;
|
|
6779
|
+
private constructor();
|
|
6777
6780
|
toText(): string;
|
|
6778
6781
|
toABAP(): string;
|
|
6779
6782
|
isGeneric(): boolean;
|
|
@@ -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
|
}
|
|
@@ -674,7 +674,7 @@ BuiltIn.methods = {
|
|
|
674
674
|
counter: BuiltIn.counter++,
|
|
675
675
|
mandatory: {
|
|
676
676
|
"val": basic_1.CLikeType.get(),
|
|
677
|
-
"format": basic_1.
|
|
677
|
+
"format": basic_1.SimpleType.get(),
|
|
678
678
|
},
|
|
679
679
|
return: basic_1.StringType.get(),
|
|
680
680
|
release: version_1.Release.v702,
|
|
@@ -866,17 +866,17 @@ BuiltIn.methods = {
|
|
|
866
866
|
"NMAX": {
|
|
867
867
|
counter: BuiltIn.counter++,
|
|
868
868
|
mandatory: {
|
|
869
|
-
"val1": basic_1.
|
|
870
|
-
"val2": basic_1.
|
|
869
|
+
"val1": basic_1.SimpleType.get(),
|
|
870
|
+
"val2": basic_1.SimpleType.get(),
|
|
871
871
|
},
|
|
872
872
|
optional: {
|
|
873
|
-
"val3": basic_1.
|
|
874
|
-
"val4": basic_1.
|
|
875
|
-
"val5": basic_1.
|
|
876
|
-
"val6": basic_1.
|
|
877
|
-
"val7": basic_1.
|
|
878
|
-
"val8": basic_1.
|
|
879
|
-
"val9": basic_1.
|
|
873
|
+
"val3": basic_1.SimpleType.get(),
|
|
874
|
+
"val4": basic_1.SimpleType.get(),
|
|
875
|
+
"val5": basic_1.SimpleType.get(),
|
|
876
|
+
"val6": basic_1.SimpleType.get(),
|
|
877
|
+
"val7": basic_1.SimpleType.get(),
|
|
878
|
+
"val8": basic_1.SimpleType.get(),
|
|
879
|
+
"val9": basic_1.SimpleType.get(),
|
|
880
880
|
},
|
|
881
881
|
return: basic_1.IntegerType.get(),
|
|
882
882
|
release: version_1.Release.v702,
|
|
@@ -884,17 +884,17 @@ BuiltIn.methods = {
|
|
|
884
884
|
"NMIN": {
|
|
885
885
|
counter: BuiltIn.counter++,
|
|
886
886
|
mandatory: {
|
|
887
|
-
"val1": basic_1.
|
|
888
|
-
"val2": basic_1.
|
|
887
|
+
"val1": basic_1.SimpleType.get(),
|
|
888
|
+
"val2": basic_1.SimpleType.get(),
|
|
889
889
|
},
|
|
890
890
|
optional: {
|
|
891
|
-
"val3": basic_1.
|
|
892
|
-
"val4": basic_1.
|
|
893
|
-
"val5": basic_1.
|
|
894
|
-
"val6": basic_1.
|
|
895
|
-
"val7": basic_1.
|
|
896
|
-
"val8": basic_1.
|
|
897
|
-
"val9": basic_1.
|
|
891
|
+
"val3": basic_1.SimpleType.get(),
|
|
892
|
+
"val4": basic_1.SimpleType.get(),
|
|
893
|
+
"val5": basic_1.SimpleType.get(),
|
|
894
|
+
"val6": basic_1.SimpleType.get(),
|
|
895
|
+
"val7": basic_1.SimpleType.get(),
|
|
896
|
+
"val8": basic_1.SimpleType.get(),
|
|
897
|
+
"val9": basic_1.SimpleType.get(),
|
|
898
898
|
},
|
|
899
899
|
return: basic_1.IntegerType.get(),
|
|
900
900
|
release: version_1.Release.v702,
|
|
@@ -910,7 +910,7 @@ BuiltIn.methods = {
|
|
|
910
910
|
counter: BuiltIn.counter++,
|
|
911
911
|
mandatory: {
|
|
912
912
|
"val": basic_1.CLikeType.get(),
|
|
913
|
-
"occ": basic_1.
|
|
913
|
+
"occ": basic_1.SimpleType.get(),
|
|
914
914
|
},
|
|
915
915
|
return: basic_1.StringType.get(),
|
|
916
916
|
release: version_1.Release.v702,
|
|
@@ -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
|
|
@@ -345,6 +346,9 @@ class TypeUtils {
|
|
|
345
346
|
if (calculated) {
|
|
346
347
|
return this.isAssignable(source, target);
|
|
347
348
|
}
|
|
349
|
+
if (target instanceof basic_1.CLikeType) {
|
|
350
|
+
return this.isCharLikeStrict(source);
|
|
351
|
+
}
|
|
348
352
|
if (target instanceof basic_1.PGenericType) {
|
|
349
353
|
return source instanceof basic_1.PackedType
|
|
350
354
|
|| source instanceof basic_1.PGenericType
|
|
@@ -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
|
}
|
|
@@ -3,6 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.SimpleType = void 0;
|
|
4
4
|
const _abstract_type_1 = require("./_abstract_type");
|
|
5
5
|
class SimpleType extends _abstract_type_1.AbstractType {
|
|
6
|
+
static get() {
|
|
7
|
+
return this.singleton;
|
|
8
|
+
}
|
|
9
|
+
constructor() {
|
|
10
|
+
super();
|
|
11
|
+
}
|
|
6
12
|
toText() {
|
|
7
13
|
return "```simple```";
|
|
8
14
|
}
|
|
@@ -20,4 +26,5 @@ class SimpleType extends _abstract_type_1.AbstractType {
|
|
|
20
26
|
}
|
|
21
27
|
}
|
|
22
28
|
exports.SimpleType = SimpleType;
|
|
29
|
+
SimpleType.singleton = new SimpleType();
|
|
23
30
|
//# sourceMappingURL=simple_type.js.map
|
package/build/src/ddic.js
CHANGED
|
@@ -109,7 +109,7 @@ class DDIC {
|
|
|
109
109
|
case "ANY":
|
|
110
110
|
return Types.AnyType.get({ qualifiedName: qualifiedName });
|
|
111
111
|
case "SIMPLE":
|
|
112
|
-
return
|
|
112
|
+
return Types.SimpleType.get();
|
|
113
113
|
case "%_C_POINTER":
|
|
114
114
|
return new Types.HexType(8, qualifiedName);
|
|
115
115
|
case "TABLE":
|
package/build/src/registry.js
CHANGED