@abaplint/core 2.113.150 → 2.113.152

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.
@@ -609,6 +609,8 @@ declare class BuiltInMethod extends Identifier implements IMethodDefinition, IMe
609
609
  getRequiredParameters(): readonly TypedIdentifier[];
610
610
  getOptional(): readonly string[];
611
611
  getAll(): readonly TypedIdentifier[];
612
+ getEventName(): undefined;
613
+ getEventClass(): undefined;
612
614
  getImporting(): readonly TypedIdentifier[];
613
615
  getDefaultImporting(): string | undefined;
614
616
  getExporting(): readonly TypedIdentifier[];
@@ -3313,6 +3315,7 @@ export declare interface IEdit {
3313
3315
  declare interface IEventDefinition {
3314
3316
  getName(): string;
3315
3317
  getParameters(): readonly TypedIdentifier[];
3318
+ isStatic(): boolean;
3316
3319
  }
3317
3320
 
3318
3321
  declare class If implements IStructure {
@@ -3447,6 +3450,8 @@ export declare interface IMethodDefinition extends Identifier {
3447
3450
  isAbstract(): boolean;
3448
3451
  isStatic(): boolean;
3449
3452
  isEventHandler(): boolean;
3453
+ getEventName(): string | undefined;
3454
+ getEventClass(): string | undefined;
3450
3455
  getParameters(): IMethodParameters;
3451
3456
  getRaising(): readonly string[];
3452
3457
  getExceptions(): readonly string[];
@@ -4447,6 +4452,8 @@ declare class MethodDefinition extends Identifier implements IMethodDefinition {
4447
4452
  private readonly parameters;
4448
4453
  private readonly redefinition;
4449
4454
  private readonly eventHandler;
4455
+ private readonly eventName;
4456
+ private readonly eventClass;
4450
4457
  private readonly abstract;
4451
4458
  private readonly static;
4452
4459
  private readonly raising;
@@ -4459,6 +4466,8 @@ declare class MethodDefinition extends Identifier implements IMethodDefinition {
4459
4466
  isAbstract(): boolean;
4460
4467
  isStatic(): boolean;
4461
4468
  isEventHandler(): boolean;
4469
+ getEventName(): string | undefined;
4470
+ getEventClass(): string | undefined;
4462
4471
  getParameters(): MethodParameters_2;
4463
4472
  getRaising(): readonly string[];
4464
4473
  getExceptions(): readonly string[];
@@ -28,6 +28,12 @@ class BuiltInMethod extends _identifier_1.Identifier {
28
28
  getAll() {
29
29
  throw new Error("BuiltInMethod->getAll, Method not implemented");
30
30
  }
31
+ getEventName() {
32
+ return undefined;
33
+ }
34
+ getEventClass() {
35
+ return undefined;
36
+ }
31
37
  getImporting() {
32
38
  const ret = [];
33
39
  for (const i in this.method.mandatory) {
@@ -6,6 +6,7 @@ const target_1 = require("../expressions/target");
6
6
  const dynamic_1 = require("../expressions/dynamic");
7
7
  const basic_1 = require("../../types/basic");
8
8
  const _syntax_input_1 = require("../_syntax_input");
9
+ const component_chain_1 = require("../expressions/component_chain");
9
10
  class Sort {
10
11
  runSyntax(node, input) {
11
12
  var _a, _b;
@@ -26,23 +27,24 @@ class Sort {
26
27
  && !(rowType instanceof basic_1.UnknownType)
27
28
  && !(rowType instanceof basic_1.AnyType)) {
28
29
  for (const component of node.findAllExpressions(Expressions.ComponentChain)) {
30
+ component_chain_1.ComponentChain.runSyntax(rowType, component, input);
31
+ /*
29
32
  if (component.getChildren().length > 1) {
30
- continue;
33
+ continue;
31
34
  }
32
35
  const cname = component.concatTokens().toUpperCase();
33
36
  if (cname === "TABLE_LINE") {
34
- continue;
35
- }
36
- else if (!(rowType instanceof basic_1.StructureType)) {
37
- const message = "SORT, table row is not structured";
38
- input.issues.push((0, _syntax_input_1.syntaxIssue)(input, tnode.getFirstToken(), message));
39
- return;
40
- }
41
- else if (rowType.getComponentByName(cname) === undefined) {
42
- const message = `Field ${cname} does not exist in table row structure`;
43
- input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
44
- return;
37
+ continue;
38
+ } else if (!(rowType instanceof StructureType)) {
39
+ const message = "SORT, table row is not structured";
40
+ input.issues.push(syntaxIssue(input, tnode.getFirstToken(), message));
41
+ return;
42
+ } else if (rowType.getComponentByName(cname) === undefined) {
43
+ const message = `Field ${cname} does not exist in table row structure`;
44
+ input.issues.push(syntaxIssue(input, node.getFirstToken(), message));
45
+ return;
45
46
  }
47
+ */
46
48
  }
47
49
  }
48
50
  }
@@ -18,10 +18,14 @@ class EventDefinition extends _identifier_1.Identifier {
18
18
  super(found.getFirstToken(), input.filename);
19
19
  this.parameters = [];
20
20
  this.parse(node, input);
21
+ this.is_static = node.getFirstToken().getStr().toUpperCase() === "CLASS";
21
22
  }
22
23
  getParameters() {
23
24
  return this.parameters;
24
25
  }
26
+ isStatic() {
27
+ return this.is_static;
28
+ }
25
29
  ///////////////
26
30
  parse(node, input) {
27
31
  for (const e of node.findAllExpressions(expressions_1.MethodParam)) {
@@ -9,7 +9,7 @@ const _reference_1 = require("../5_syntax/_reference");
9
9
  class MethodDefinition extends _identifier_1.Identifier {
10
10
  // todo: final flag
11
11
  constructor(node, visibility, input) {
12
- var _a, _b;
12
+ var _a, _b, _c, _d;
13
13
  if (!(node.get() instanceof statements_1.MethodDef)) {
14
14
  throw new Error("MethodDefinition, expected MethodDef as part of input node");
15
15
  }
@@ -31,8 +31,11 @@ class MethodDefinition extends _identifier_1.Identifier {
31
31
  }
32
32
  }
33
33
  this.eventHandler = false;
34
- if (node.findDirectExpression(Expressions.EventHandler)) {
34
+ const handler = node.findDirectExpression(Expressions.EventHandler);
35
+ if (handler) {
35
36
  this.eventHandler = true;
37
+ this.eventName = (_a = handler.findDirectExpression(Expressions.EventName)) === null || _a === void 0 ? void 0 : _a.concatTokens().toUpperCase();
38
+ this.eventClass = (_b = handler.findDirectExpression(Expressions.ClassName)) === null || _b === void 0 ? void 0 : _b.concatTokens().toUpperCase();
36
39
  }
37
40
  this.abstract = false;
38
41
  if (node.findDirectExpression(Expressions.Abstract)) {
@@ -44,7 +47,7 @@ class MethodDefinition extends _identifier_1.Identifier {
44
47
  this.static = true;
45
48
  }
46
49
  this.raising = [];
47
- for (const r of ((_a = node.findDirectExpression(Expressions.MethodDefRaising)) === null || _a === void 0 ? void 0 : _a.findAllExpressions(Expressions.ClassName)) || []) {
50
+ for (const r of ((_c = node.findDirectExpression(Expressions.MethodDefRaising)) === null || _c === void 0 ? void 0 : _c.findAllExpressions(Expressions.ClassName)) || []) {
48
51
  const token = r.getFirstToken();
49
52
  const name = token.getStr();
50
53
  this.raising.push(name);
@@ -60,7 +63,7 @@ class MethodDefinition extends _identifier_1.Identifier {
60
63
  }
61
64
  }
62
65
  this.exceptions = [];
63
- for (const r of ((_b = node.findDirectExpression(Expressions.MethodDefExceptions)) === null || _b === void 0 ? void 0 : _b.findAllExpressions(Expressions.NamespaceSimpleName)) || []) {
66
+ for (const r of ((_d = node.findDirectExpression(Expressions.MethodDefExceptions)) === null || _d === void 0 ? void 0 : _d.findAllExpressions(Expressions.NamespaceSimpleName)) || []) {
64
67
  const token = r.getFirstToken();
65
68
  const name = token.getStr();
66
69
  this.exceptions.push(name);
@@ -86,6 +89,12 @@ class MethodDefinition extends _identifier_1.Identifier {
86
89
  isEventHandler() {
87
90
  return this.eventHandler;
88
91
  }
92
+ getEventName() {
93
+ return this.eventName;
94
+ }
95
+ getEventClass() {
96
+ return this.eventClass;
97
+ }
89
98
  getParameters() {
90
99
  return this.parameters;
91
100
  }
@@ -67,7 +67,7 @@ class Registry {
67
67
  }
68
68
  static abaplintVersion() {
69
69
  // magic, see build script "version.sh"
70
- return "2.113.150";
70
+ return "2.113.152";
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.150",
3
+ "version": "2.113.152",
4
4
  "description": "abaplint - Core API",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/abaplint.d.ts",
@@ -50,17 +50,17 @@
50
50
  },
51
51
  "homepage": "https://abaplint.org",
52
52
  "devDependencies": {
53
- "@microsoft/api-extractor": "^7.52.8",
53
+ "@microsoft/api-extractor": "^7.52.10",
54
54
  "@types/chai": "^4.3.20",
55
55
  "@types/mocha": "^10.0.10",
56
- "@types/node": "^24.1.0",
56
+ "@types/node": "^24.2.0",
57
57
  "chai": "^4.5.0",
58
- "eslint": "^9.31.0",
58
+ "eslint": "^9.32.0",
59
59
  "mocha": "^11.7.1",
60
60
  "c8": "^10.1.3",
61
61
  "source-map-support": "^0.5.21",
62
62
  "ts-json-schema-generator": "^2.4.0",
63
- "typescript": "^5.8.3"
63
+ "typescript": "^5.9.2"
64
64
  },
65
65
  "dependencies": {
66
66
  "fast-xml-parser": "^5.2.5",