@abaplint/runtime 2.5.79 → 2.6.1
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/builtin/numofchar.js +1 -0
- package/build/src/compare/eq.js +16 -0
- package/build/src/statements/assign.js +1 -1
- package/build/src/statements/concatenate.js +1 -1
- package/build/src/statements/convert.js +2 -1
- package/build/src/types/character.js +1 -1
- package/build/src/types/date.js +6 -0
- package/package.json +1 -1
package/build/src/compare/eq.js
CHANGED
|
@@ -27,6 +27,16 @@ function eq(left, right) {
|
|
|
27
27
|
else if (left instanceof types_1.FieldSymbol) {
|
|
28
28
|
return eq(left.getPointer(), right);
|
|
29
29
|
}
|
|
30
|
+
// for performance, do the typicaly/easy cases first
|
|
31
|
+
if (right instanceof types_1.Character && left instanceof types_1.Character && right.getLength() === left.getLength()) {
|
|
32
|
+
return right.get() === left.get();
|
|
33
|
+
}
|
|
34
|
+
else if (right instanceof types_1.Numc && left instanceof types_1.Numc && right.getLength() === left.getLength()) {
|
|
35
|
+
return right.get() === left.get();
|
|
36
|
+
}
|
|
37
|
+
else if (right instanceof types_1.Integer && left instanceof types_1.Integer) {
|
|
38
|
+
return right.get() === left.get();
|
|
39
|
+
}
|
|
30
40
|
if (left instanceof types_1.Table || right instanceof types_1.Table || left instanceof types_1.HashedTable || right instanceof types_1.HashedTable) {
|
|
31
41
|
if ((left instanceof types_1.Table || left instanceof types_1.HashedTable)
|
|
32
42
|
&& (right instanceof types_1.Table || right instanceof types_1.HashedTable)) {
|
|
@@ -63,6 +73,9 @@ function eq(left, right) {
|
|
|
63
73
|
if (left instanceof types_1.Character) {
|
|
64
74
|
l = left.getTrimEnd();
|
|
65
75
|
}
|
|
76
|
+
else if (left instanceof types_1.Date) {
|
|
77
|
+
l = left.get().trimEnd();
|
|
78
|
+
}
|
|
66
79
|
else if (typeof left === "object") {
|
|
67
80
|
l = left.get();
|
|
68
81
|
}
|
|
@@ -73,6 +86,9 @@ function eq(left, right) {
|
|
|
73
86
|
if (right instanceof types_1.Character) {
|
|
74
87
|
r = right.getTrimEnd();
|
|
75
88
|
}
|
|
89
|
+
else if (right instanceof types_1.Date) {
|
|
90
|
+
l = right.get().trimEnd();
|
|
91
|
+
}
|
|
76
92
|
else if (typeof right === "object") {
|
|
77
93
|
r = right.get();
|
|
78
94
|
}
|
|
@@ -95,7 +95,7 @@ function assign(input) {
|
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
97
|
else if (!(input.source instanceof types_1.Table)) {
|
|
98
|
-
result = input.source.get()[component.toLowerCase()];
|
|
98
|
+
result = input.source.get()[component.toLowerCase().trimEnd()];
|
|
99
99
|
}
|
|
100
100
|
if (result === undefined) {
|
|
101
101
|
// not a field in the structure
|
package/build/src/types/date.js
CHANGED