@abaplint/core 2.113.244 → 2.113.246
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/statements/convert.js +5 -4
- package/build/src/abap/5_syntax/basic_types.js +6 -2
- package/build/src/abap/5_syntax/expressions/sql_for_all_entries.js +1 -1
- package/build/src/abap/5_syntax/statements/convert.js +15 -8
- package/build/src/abap/5_syntax/statements/read_table.js +3 -0
- package/build/src/registry.js +1 -1
- package/package.json +1 -1
|
@@ -9,17 +9,18 @@ class Convert {
|
|
|
9
9
|
const intoTime = (0, combi_1.seq)("TIME", expressions_1.Target);
|
|
10
10
|
const intoDate = (0, combi_1.seq)("DATE", expressions_1.Target);
|
|
11
11
|
const into = (0, combi_1.seq)("INTO", (0, combi_1.per)(intoTime, intoDate));
|
|
12
|
-
const
|
|
12
|
+
const daylightSource = (0, combi_1.seq)("DAYLIGHT SAVING TIME", expressions_1.Source);
|
|
13
|
+
const daylightTarget = (0, combi_1.seq)("DAYLIGHT SAVING TIME", expressions_1.Target);
|
|
13
14
|
const zone = (0, combi_1.seq)("TIME ZONE", expressions_1.Source);
|
|
14
|
-
const time = (0, combi_1.seq)("TIME STAMP", expressions_1.Source, (0, combi_1.per)(zone, into,
|
|
15
|
+
const time = (0, combi_1.seq)("TIME STAMP", expressions_1.Source, (0, combi_1.per)(zone, into, daylightTarget));
|
|
15
16
|
const dat = (0, combi_1.seq)("DATE", expressions_1.Source);
|
|
16
17
|
const tim = (0, combi_1.seq)("TIME", expressions_1.Source);
|
|
17
18
|
const stamp = (0, combi_1.seq)("INTO TIME STAMP", expressions_1.Target);
|
|
18
19
|
const intoutc = (0, combi_1.ver)(version_1.Version.v754, (0, combi_1.seq)("INTO UTCLONG", expressions_1.Target));
|
|
19
20
|
const invert = (0, combi_1.seq)("INTO INVERTED-DATE", expressions_1.Target);
|
|
20
|
-
const date = (0, combi_1.seq)((0, combi_1.per)(dat, tim), (0, combi_1.per)(
|
|
21
|
+
const date = (0, combi_1.seq)((0, combi_1.per)(dat, tim), (0, combi_1.per)(daylightSource, stamp, zone, invert, intoutc));
|
|
21
22
|
const inv = (0, combi_1.seq)("INVERTED-DATE", expressions_1.Source, "INTO DATE", expressions_1.Target);
|
|
22
|
-
const utclong = (0, combi_1.ver)(version_1.Version.v754, (0, combi_1.seq)("UTCLONG", expressions_1.Source, (0, combi_1.per)(zone, into,
|
|
23
|
+
const utclong = (0, combi_1.ver)(version_1.Version.v754, (0, combi_1.seq)("UTCLONG", expressions_1.Source, (0, combi_1.per)(zone, into, daylightSource)));
|
|
23
24
|
return (0, combi_1.seq)("CONVERT", (0, combi_1.alt)(time, date, inv, utclong));
|
|
24
25
|
}
|
|
25
26
|
}
|
|
@@ -95,7 +95,6 @@ class BasicTypes {
|
|
|
95
95
|
return undefined;
|
|
96
96
|
}
|
|
97
97
|
resolveLikeName(node, headerLogic = true) {
|
|
98
|
-
var _a;
|
|
99
98
|
if (node === undefined) {
|
|
100
99
|
return undefined;
|
|
101
100
|
}
|
|
@@ -141,7 +140,12 @@ class BasicTypes {
|
|
|
141
140
|
this.input.scope.addReference(chain === null || chain === void 0 ? void 0 : chain.getFirstToken(), found, _reference_1.ReferenceType.TypeReference, this.input.filename);
|
|
142
141
|
}
|
|
143
142
|
if (type === undefined) {
|
|
144
|
-
|
|
143
|
+
const found = this.input.scope.getDDIC().lookupNoVoid(name);
|
|
144
|
+
if (found !== undefined) {
|
|
145
|
+
const using = { filename: this.input.filename, token: chain.getFirstToken(), object: found.object };
|
|
146
|
+
this.input.scope.getDDICReferences().addUsing(this.input.scope.getParentObj(), using);
|
|
147
|
+
}
|
|
148
|
+
type = found === null || found === void 0 ? void 0 : found.type;
|
|
145
149
|
}
|
|
146
150
|
if (type === undefined && this.input.scope.isAnyOO() === false && this.input.scope.getDDIC().inErrorNamespace(name) === false) {
|
|
147
151
|
this.input.scope.addReference(chain.getChildren()[0].getFirstToken(), undefined, _reference_1.ReferenceType.VoidType, this.input.filename);
|
|
@@ -13,7 +13,7 @@ class SQLForAllEntries {
|
|
|
13
13
|
}
|
|
14
14
|
if (s) {
|
|
15
15
|
const type = source_1.Source.runSyntax(s, input);
|
|
16
|
-
if (type instanceof basic_1.VoidType) {
|
|
16
|
+
if (type instanceof basic_1.VoidType || type instanceof basic_1.UnknownType) {
|
|
17
17
|
return;
|
|
18
18
|
}
|
|
19
19
|
if (!(type instanceof basic_1.TableType)) {
|
|
@@ -12,14 +12,21 @@ class Convert {
|
|
|
12
12
|
for (const s of node.findDirectExpressions(Expressions.Source)) {
|
|
13
13
|
source_1.Source.runSyntax(s, input);
|
|
14
14
|
}
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
const
|
|
18
|
-
if (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
15
|
+
const timeTargets = node.findExpressionsAfterToken("TIME");
|
|
16
|
+
for (const timeTarget of timeTargets) {
|
|
17
|
+
const concat = node.concatTokens().toUpperCase();
|
|
18
|
+
if ((timeTarget === null || timeTarget === void 0 ? void 0 : timeTarget.get()) instanceof Expressions.Target) {
|
|
19
|
+
const inline = timeTarget === null || timeTarget === void 0 ? void 0 : timeTarget.findDirectExpression(Expressions.InlineData);
|
|
20
|
+
if (inline) {
|
|
21
|
+
let targetType = new basic_1.TimeType();
|
|
22
|
+
if (concat.includes("DAYLIGHT SAVING TIME " + inline.concatTokens().toUpperCase())) {
|
|
23
|
+
targetType = new basic_1.CharacterType(1);
|
|
24
|
+
}
|
|
25
|
+
inline_data_1.InlineData.runSyntax(inline, input, targetType);
|
|
26
|
+
}
|
|
27
|
+
else {
|
|
28
|
+
target_1.Target.runSyntax(timeTarget, input);
|
|
29
|
+
}
|
|
23
30
|
}
|
|
24
31
|
}
|
|
25
32
|
const dateTarget = node.findExpressionAfterToken("DATE");
|
|
@@ -21,6 +21,9 @@ class ReadTable {
|
|
|
21
21
|
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
|
|
22
22
|
return;
|
|
23
23
|
}
|
|
24
|
+
else if (sourceType instanceof basic_1.UnknownType) {
|
|
25
|
+
// do nothing, ok
|
|
26
|
+
}
|
|
24
27
|
else if (!(sourceType instanceof basic_1.TableType) && !(sourceType instanceof basic_1.VoidType)) {
|
|
25
28
|
const message = "Read table, not a table type";
|
|
26
29
|
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
|
package/build/src/registry.js
CHANGED