@abaplint/core 2.91.19 → 2.91.22

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.
@@ -1705,6 +1705,15 @@ declare class EnhancementSpot extends AbstractObject {
1705
1705
  private parseXML;
1706
1706
  }
1707
1707
 
1708
+ declare class EventBinding extends AbstractObject {
1709
+ getType(): string;
1710
+ getAllowedNaming(): {
1711
+ maxLength: number;
1712
+ allowNamespace: boolean;
1713
+ };
1714
+ getDescription(): string | undefined;
1715
+ }
1716
+
1708
1717
  declare class EventHandler extends Expression {
1709
1718
  getRunnable(): IStatementRunnable;
1710
1719
  }
@@ -3957,6 +3966,7 @@ declare namespace Objects {
3957
3966
  EnhancementImplementation,
3958
3967
  IBadiDefinition,
3959
3968
  EnhancementSpot,
3969
+ EventBinding,
3960
3970
  ExtensionIndex,
3961
3971
  FieldCatalog,
3962
3972
  FormObjectForm,
@@ -2,10 +2,10 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.PerformChanging = void 0;
4
4
  const combi_1 = require("../combi");
5
- const source_1 = require("./source");
5
+ const target_1 = require("./target");
6
6
  class PerformChanging extends combi_1.Expression {
7
7
  getRunnable() {
8
- const changing = (0, combi_1.seq)("CHANGING", (0, combi_1.plus)(source_1.Source));
8
+ const changing = (0, combi_1.seq)("CHANGING", (0, combi_1.plus)(target_1.Target));
9
9
  return changing;
10
10
  }
11
11
  }
@@ -193,7 +193,7 @@ class BasicTypes {
193
193
  }
194
194
  return undefined;
195
195
  }
196
- simpleType(node) {
196
+ simpleType(node, noQualifiedName) {
197
197
  let nameExpr = node.findFirstExpression(Expressions.NamespaceSimpleName);
198
198
  if (nameExpr === undefined) {
199
199
  nameExpr = node.findFirstExpression(Expressions.DefinitionName);
@@ -218,6 +218,9 @@ class BasicTypes {
218
218
  }
219
219
  }
220
220
  }
221
+ if (noQualifiedName === true) {
222
+ qualifiedName = undefined;
223
+ }
221
224
  const found = this.parseType(node, qualifiedName);
222
225
  if (found) {
223
226
  return new _typed_identifier_1.TypedIdentifier(name, this.filename, found);
@@ -5,6 +5,7 @@ const Expressions = require("../../2_statements/expressions");
5
5
  const Statements = require("../../2_statements/statements");
6
6
  const _reference_1 = require("../_reference");
7
7
  const source_1 = require("../expressions/source");
8
+ const target_1 = require("../expressions/target");
8
9
  class Perform {
9
10
  runSyntax(node, scope, filename) {
10
11
  if (!(node.get() instanceof Statements.Perform)) {
@@ -13,8 +14,8 @@ class Perform {
13
14
  ////////////////////////////
14
15
  // check parameters are defined
15
16
  for (const c of node.findDirectExpressions(Expressions.PerformChanging)) {
16
- for (const s of c.findDirectExpressions(Expressions.Source)) {
17
- new source_1.Source().runSyntax(s, scope, filename);
17
+ for (const s of c.findDirectExpressions(Expressions.Target)) {
18
+ new target_1.Target().runSyntax(s, scope, filename);
18
19
  }
19
20
  }
20
21
  for (const t of node.findDirectExpressions(Expressions.PerformTables)) {
@@ -7,12 +7,12 @@ const basic_1 = require("../../types/basic");
7
7
  const Expressions = require("../../2_statements/expressions");
8
8
  const type_table_1 = require("../expressions/type_table");
9
9
  class Type {
10
- runSyntax(node, scope, filename) {
10
+ runSyntax(node, scope, filename, noQualifiedName) {
11
11
  const tt = node.findFirstExpression(Expressions.TypeTable);
12
12
  if (tt) {
13
13
  return new type_table_1.TypeTable().runSyntax(node, scope, filename);
14
14
  }
15
- const found = new basic_types_1.BasicTypes(filename, scope).simpleType(node);
15
+ const found = new basic_types_1.BasicTypes(filename, scope).simpleType(node, noQualifiedName);
16
16
  if (found) {
17
17
  return found;
18
18
  }
@@ -20,7 +20,7 @@ class Types {
20
20
  const ctyp = c.get();
21
21
  if (c instanceof nodes_1.StatementNode) {
22
22
  if (ctyp instanceof Statements.Type) {
23
- const found = new type_1.Type().runSyntax(c, scope, filename);
23
+ const found = new type_1.Type().runSyntax(c, scope, filename, true);
24
24
  if (found) {
25
25
  components.push({ name: found.getName(), type: found.getType() });
26
26
  }
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EventBinding = void 0;
4
+ const _abstract_object_1 = require("./_abstract_object");
5
+ class EventBinding extends _abstract_object_1.AbstractObject {
6
+ getType() {
7
+ return "EVTB";
8
+ }
9
+ getAllowedNaming() {
10
+ return {
11
+ maxLength: 40,
12
+ allowNamespace: true,
13
+ };
14
+ }
15
+ getDescription() {
16
+ // todo
17
+ return undefined;
18
+ }
19
+ }
20
+ exports.EventBinding = EventBinding;
21
+ //# sourceMappingURL=event_binding.js.map
@@ -51,6 +51,7 @@ __exportStar(require("./ecatt_test_data_container"), exports);
51
51
  __exportStar(require("./ecatt_test_script"), exports);
52
52
  __exportStar(require("./enhancement_implementation"), exports);
53
53
  __exportStar(require("./enhancement_spot"), exports);
54
+ __exportStar(require("./event_binding"), exports);
54
55
  __exportStar(require("./extension_index"), exports);
55
56
  __exportStar(require("./field_catalog"), exports);
56
57
  __exportStar(require("./form_object_form"), exports);
@@ -68,7 +68,7 @@ class Registry {
68
68
  }
69
69
  static abaplintVersion() {
70
70
  // magic, see build script "version.sh"
71
- return "2.91.19";
71
+ return "2.91.22";
72
72
  }
73
73
  getDDICReferences() {
74
74
  return this.references;
@@ -353,7 +353,7 @@ Only one transformation is applied to a statement at a time, so multiple steps m
353
353
  }
354
354
  }
355
355
  if (fix !== undefined) {
356
- return issue_1.Issue.atToken(lowFile, low.getFirstToken(), "SQL, remove \" and ,", this.getMetadata().key, this.conf.severity, fix);
356
+ return issue_1.Issue.atToken(lowFile, low.getFirstToken(), "SQL, remove @ and ,", this.getMetadata().key, this.conf.severity, fix);
357
357
  }
358
358
  for (const c of high.findAllExpressionsRecursive(Expressions.SQLIn)) {
359
359
  const children = c.getChildren();
@@ -924,14 +924,15 @@ ${indentation}RAISE EXCEPTION ${uniqueName2}.`;
924
924
  }
925
925
  const enumName = (_b = high.findExpressionAfterToken("ENUM")) === null || _b === void 0 ? void 0 : _b.concatTokens();
926
926
  const structureName = (_c = high.findExpressionAfterToken("STRUCTURE")) === null || _c === void 0 ? void 0 : _c.concatTokens();
927
- let code = `TYPES ${enumName} TYPE i.
927
+ // all ENUMS are char like?
928
+ let code = `TYPES ${enumName} TYPE string.
928
929
  CONSTANTS: BEGIN OF ${structureName},\n`;
929
930
  let count = 1;
930
931
  for (const e of enumStructure.findDirectStatements(Statements.TypeEnum).concat(enumStructure.findDirectStatements(Statements.Type))) {
931
932
  const name = (_d = e.findFirstExpression(Expressions.NamespaceSimpleName)) === null || _d === void 0 ? void 0 : _d.concatTokens();
932
933
  let value = (_e = e.findFirstExpression(Expressions.Value)) === null || _e === void 0 ? void 0 : _e.concatTokens();
933
934
  if (value === undefined) {
934
- value = "VALUE " + count++;
935
+ value = "VALUE '" + count++ + "'";
935
936
  }
936
937
  code += ` ${name} TYPE ${enumName} ${value},\n`;
937
938
  }
@@ -19,7 +19,9 @@ class SyModification extends _abap_rule_1.ABAPRule {
19
19
  key: "sy_modification",
20
20
  title: "Modification of SY fields",
21
21
  shortDescription: `Finds modification of sy fields`,
22
- extendedInformation: `https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abensystem_fields.htm`,
22
+ extendedInformation: `https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abensystem_fields.htm
23
+
24
+ Changes to SY-TVAR* fields are not reported`,
23
25
  tags: [_irule_1.RuleTag.SingleFile],
24
26
  badExample: `
25
27
  sy-uname = 2.
@@ -42,6 +44,9 @@ sy = sy.`,
42
44
  const firstChild = t.getChildren()[0];
43
45
  if (firstChild.get() instanceof Expressions.TargetField
44
46
  && firstChild.getFirstToken().getStr().toUpperCase() === "SY") {
47
+ if (t.concatTokens().toUpperCase().startsWith("SY-TVAR")) {
48
+ continue;
49
+ }
45
50
  const message = "Modification of SY field";
46
51
  const issue = issue_1.Issue.atToken(file, firstChild.getFirstToken(), message, this.getMetadata().key, this.conf.severity);
47
52
  issues.push(issue);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/core",
3
- "version": "2.91.19",
3
+ "version": "2.91.22",
4
4
  "description": "abaplint - Core API",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/abaplint.d.ts",
@@ -45,10 +45,10 @@
45
45
  },
46
46
  "homepage": "https://abaplint.org",
47
47
  "devDependencies": {
48
- "@microsoft/api-extractor": "^7.28.7",
48
+ "@microsoft/api-extractor": "^7.29.0",
49
49
  "@types/chai": "^4.3.1",
50
50
  "@types/mocha": "^9.1.1",
51
- "@types/node": "^18.6.3",
51
+ "@types/node": "^18.6.4",
52
52
  "chai": "^4.3.6",
53
53
  "eslint": "^8.21.0",
54
54
  "mocha": "^10.0.0",