@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.
@@ -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 daylight = (0, combi_1.seq)("DAYLIGHT SAVING TIME", expressions_1.Source);
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, daylight));
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)(daylight, stamp, zone, invert, intoutc));
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, daylight)));
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
- type = (_a = this.input.scope.getDDIC().lookupNoVoid(name)) === null || _a === void 0 ? void 0 : _a.type;
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 timeTarget = node.findExpressionAfterToken("TIME");
16
- if ((timeTarget === null || timeTarget === void 0 ? void 0 : timeTarget.get()) instanceof Expressions.Target) {
17
- const inline = timeTarget === null || timeTarget === void 0 ? void 0 : timeTarget.findDirectExpression(Expressions.InlineData);
18
- if (inline) {
19
- inline_data_1.InlineData.runSyntax(inline, input, new basic_1.TimeType());
20
- }
21
- else {
22
- target_1.Target.runSyntax(timeTarget, input);
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));
@@ -74,7 +74,7 @@ class Registry {
74
74
  }
75
75
  static abaplintVersion() {
76
76
  // magic, see build script "version.sh"
77
- return "2.113.244";
77
+ return "2.113.246";
78
78
  }
79
79
  getDDICReferences() {
80
80
  return this.ddicReferences;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/core",
3
- "version": "2.113.244",
3
+ "version": "2.113.246",
4
4
  "description": "abaplint - Core API",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/abaplint.d.ts",