@abaplint/core 2.113.241 → 2.113.242

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.
@@ -46,8 +46,9 @@ class Target {
46
46
  currentIndex++;
47
47
  if (current.get() instanceof tokens_1.Dash) {
48
48
  if (context instanceof unknown_type_1.UnknownType) {
49
- const message = "Not a structure, type unknown, target";
50
- input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
49
+ return basic_1.VoidType.get(_syntax_input_1.CheckSyntaxKey);
50
+ }
51
+ else if (context instanceof basic_1.TableType && context.isWithHeader() && context.getRowType() instanceof unknown_type_1.UnknownType) {
51
52
  return basic_1.VoidType.get(_syntax_input_1.CheckSyntaxKey);
52
53
  }
53
54
  else if (!(context instanceof basic_1.StructureType)
@@ -7,27 +7,27 @@ const basic_types_1 = require("../basic_types");
7
7
  const _typed_identifier_1 = require("../../types/_typed_identifier");
8
8
  const _syntax_input_1 = require("../_syntax_input");
9
9
  const assert_error_1 = require("../assert_error");
10
+ const _reference_1 = require("../_reference");
10
11
  class IncludeType {
11
12
  runSyntax(node, input) {
12
- var _a, _b, _c, _d, _e;
13
+ var _a, _b;
13
14
  const components = [];
14
15
  const iname = node.findFirstExpression(Expressions.TypeName);
15
16
  if (iname === undefined) {
16
17
  throw new assert_error_1.AssertError("IncludeType, unexpected node structure");
17
18
  }
18
- const name = iname.getFirstToken().getStr();
19
+ const firstToken = iname.getFirstToken();
20
+ const name = firstToken.getStr();
19
21
  const isStructure = node.findDirectTokenByText("STRUCTURE") !== undefined;
20
22
  let ityp = new basic_types_1.BasicTypes(input).parseType(iname);
21
- if (ityp instanceof basic_1.VoidType && isStructure) {
22
- const found = (_a = input.scope.findVariable(name)) === null || _a === void 0 ? void 0 : _a.getType();
23
+ if ((ityp instanceof basic_1.VoidType && isStructure) || ityp instanceof basic_1.UnknownType) {
24
+ const found = input.scope.findVariable(name);
23
25
  if (found) {
24
- ityp = found;
26
+ input.scope.addReference(firstToken, found, _reference_1.ReferenceType.DataReadReference, input.filename);
27
+ ityp = found.getType();
25
28
  }
26
29
  }
27
- else if (ityp instanceof basic_1.UnknownType) {
28
- ityp = (_c = (_b = input.scope.findVariable(name)) === null || _b === void 0 ? void 0 : _b.getType()) !== null && _c !== void 0 ? _c : ityp;
29
- }
30
- const as = (_d = node.findExpressionAfterToken("AS")) === null || _d === void 0 ? void 0 : _d.concatTokens();
30
+ const as = (_a = node.findExpressionAfterToken("AS")) === null || _a === void 0 ? void 0 : _a.concatTokens();
31
31
  if (as && ityp instanceof basic_1.StructureType) {
32
32
  ityp = new basic_1.StructureType(ityp.getComponents().concat([{
33
33
  name: as,
@@ -49,7 +49,7 @@ class IncludeType {
49
49
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, iname.getFirstToken(), message));
50
50
  return basic_1.VoidType.get(_syntax_input_1.CheckSyntaxKey);
51
51
  }
52
- const suffix = (_e = node.findExpressionAfterToken("SUFFIX")) === null || _e === void 0 ? void 0 : _e.concatTokens();
52
+ const suffix = (_b = node.findExpressionAfterToken("SUFFIX")) === null || _b === void 0 ? void 0 : _b.concatTokens();
53
53
  if (suffix && ityp instanceof basic_1.StructureType) {
54
54
  const components = [];
55
55
  for (const c of ityp.getComponents()) {
@@ -74,7 +74,7 @@ class Registry {
74
74
  }
75
75
  static abaplintVersion() {
76
76
  // magic, see build script "version.sh"
77
- return "2.113.241";
77
+ return "2.113.242";
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.241",
3
+ "version": "2.113.242",
4
4
  "description": "abaplint - Core API",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/abaplint.d.ts",