@abaplint/core 2.113.225 → 2.113.226

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.
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FieldGroup = void 0;
4
+ const Expressions = require("../../2_statements/expressions");
5
+ const _typed_identifier_1 = require("../../types/_typed_identifier");
6
+ const basic_1 = require("../../types/basic");
7
+ class FieldGroup {
8
+ runSyntax(node, input) {
9
+ const nameExpression = node.findFirstExpression(Expressions.Field);
10
+ if (nameExpression === undefined) {
11
+ return;
12
+ }
13
+ const name = nameExpression === null || nameExpression === void 0 ? void 0 : nameExpression.concatTokens();
14
+ if (name === undefined) {
15
+ return;
16
+ }
17
+ const id = new _typed_identifier_1.TypedIdentifier(nameExpression === null || nameExpression === void 0 ? void 0 : nameExpression.getFirstToken(), input.filename, basic_1.VoidType.get("FIELD-GROUP"));
18
+ input.scope.addIdentifier(id);
19
+ }
20
+ }
21
+ exports.FieldGroup = FieldGroup;
22
+ //# sourceMappingURL=field_group.js.map
@@ -35,7 +35,7 @@ class IncludeType {
35
35
  else if (ityp instanceof basic_1.TableType && isStructure) {
36
36
  ityp = ityp.getRowType();
37
37
  }
38
- else if (ityp instanceof basic_1.VoidType) {
38
+ if (ityp instanceof basic_1.VoidType) {
39
39
  return ityp;
40
40
  }
41
41
  if (!(ityp instanceof basic_1.StructureType)) {
@@ -50,46 +50,6 @@ class Data {
50
50
  }
51
51
  else if (c instanceof nodes_1.StatementNode && ctyp instanceof Statements.IncludeType) {
52
52
  // INCLUDES
53
- /*
54
- const typeToken = c.findFirstExpression(Expressions.TypeName)?.getFirstToken();
55
- const typeName = typeToken?.getStr();
56
-
57
- let foundId = input.scope.findType(typeName);
58
- if (foundId === undefined) {
59
- foundId = input.scope.findVariable(typeName);
60
- }
61
-
62
- let found = foundId?.getType();
63
- if (found === undefined) {
64
- const f = input.scope.getDDIC().lookupTableOrView(typeName).type;
65
- if (f instanceof TypedIdentifier) {
66
- found = f.getType();
67
- } else {
68
- found = f;
69
- }
70
- } else {
71
- input.scope.addReference(typeToken, foundId, ReferenceType.TypeReference, input.filename);
72
- }
73
- if (found instanceof Basic.VoidType) {
74
- if (table === true) {
75
- const ttyp = new Basic.TableType(found, {withHeader: true, keyType: Basic.TableKeyType.default});
76
- return new TypedIdentifier(name, input.filename, ttyp);
77
- } else {
78
- return new TypedIdentifier(name, input.filename, found);
79
- }
80
- }
81
- if (found instanceof Basic.UnknownType) {
82
- return new TypedIdentifier(name, input.filename, new Basic.UnknownType("unknown type, " + typeName));
83
- }
84
- if (found instanceof Basic.TableType && found.isWithHeader()) {
85
- found = found.getRowType();
86
- }
87
- if (!(found instanceof Basic.StructureType)) {
88
- const message = "not structured, " + typeName;
89
- input.issues.push(syntaxIssue(input, typeToken!, message));
90
- return new TypedIdentifier(name, input.filename, Basic.VoidType.get(CheckSyntaxKey));
91
- }
92
- */
93
53
  const found = new include_type_1.IncludeType().runSyntax(c, input);
94
54
  if (found instanceof Basic.VoidType) {
95
55
  if (table === true) {
@@ -148,6 +148,7 @@ const modify_entities_1 = require("./statements/modify_entities");
148
148
  const commit_entities_1 = require("./statements/commit_entities");
149
149
  const _syntax_input_1 = require("./_syntax_input");
150
150
  const assert_error_1 = require("./assert_error");
151
+ const field_group_1 = require("./statements/field_group");
151
152
  // -----------------------------------
152
153
  const map = {};
153
154
  function addToMap(handler) {
@@ -278,6 +279,7 @@ if (Object.keys(map).length === 0) {
278
279
  addToMap(new translate_1.Translate());
279
280
  addToMap(new modify_internal_1.ModifyInternal());
280
281
  addToMap(new read_textpool_1.ReadTextpool());
282
+ addToMap(new field_group_1.FieldGroup());
281
283
  addToMap(new editor_call_1.EditorCall());
282
284
  addToMap(new delete_memory_1.DeleteMemory());
283
285
  }
@@ -67,7 +67,7 @@ class Registry {
67
67
  }
68
68
  static abaplintVersion() {
69
69
  // magic, see build script "version.sh"
70
- return "2.113.225";
70
+ return "2.113.226";
71
71
  }
72
72
  getDDICReferences() {
73
73
  return this.ddicReferences;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/core",
3
- "version": "2.113.225",
3
+ "version": "2.113.226",
4
4
  "description": "abaplint - Core API",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/abaplint.d.ts",