@abaplint/core 2.113.98 → 2.113.100

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.
@@ -7357,6 +7357,7 @@ export declare class VirtualPosition extends Position {
7357
7357
  readonly vcol: number;
7358
7358
  constructor(virtual: Position, row: number, col: number);
7359
7359
  equals(p: Position): boolean;
7360
+ isAfter(p: Position | VirtualPosition): boolean;
7360
7361
  }
7361
7362
 
7362
7363
  export declare enum Visibility {
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Convert = void 0;
4
4
  const combi_1 = require("../combi");
5
5
  const expressions_1 = require("../expressions");
6
+ const version_1 = require("../../../version");
6
7
  class Convert {
7
8
  getMatcher() {
8
9
  const intoTime = (0, combi_1.seq)("TIME", expressions_1.Target);
@@ -14,10 +15,12 @@ class Convert {
14
15
  const dat = (0, combi_1.seq)("DATE", expressions_1.Source);
15
16
  const tim = (0, combi_1.seq)("TIME", expressions_1.Source);
16
17
  const stamp = (0, combi_1.seq)("INTO TIME STAMP", expressions_1.Target);
18
+ const intoutc = (0, combi_1.ver)(version_1.Version.v754, (0, combi_1.seq)("INTO UTCLONG", expressions_1.Target));
17
19
  const invert = (0, combi_1.seq)("INTO INVERTED-DATE", expressions_1.Target);
18
- const date = (0, combi_1.seq)((0, combi_1.per)(dat, tim), (0, combi_1.per)(daylight, stamp, zone, invert));
20
+ const date = (0, combi_1.seq)((0, combi_1.per)(dat, tim), (0, combi_1.per)(daylight, stamp, zone, invert, intoutc));
19
21
  const inv = (0, combi_1.seq)("INVERTED-DATE", expressions_1.Source, "INTO DATE", expressions_1.Target);
20
- return (0, combi_1.seq)("CONVERT", (0, combi_1.alt)(time, date, inv));
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
+ return (0, combi_1.seq)("CONVERT", (0, combi_1.alt)(time, date, inv, utclong));
21
24
  }
22
25
  }
23
26
  exports.Convert = Convert;
@@ -7,7 +7,7 @@ const expressions_1 = require("../expressions");
7
7
  // todo, cloud, split?
8
8
  class Export {
9
9
  getMatcher() {
10
- const from = (0, combi_1.seq)("FROM", expressions_1.Source);
10
+ const from = (0, combi_1.seq)((0, combi_1.altPrio)("FROM", "="), expressions_1.Source);
11
11
  const client = (0, combi_1.seq)("CLIENT", expressions_1.Source);
12
12
  const id = (0, combi_1.seq)("ID", expressions_1.Source);
13
13
  const using = (0, combi_1.seq)("USING", expressions_1.Source);
@@ -19,7 +19,7 @@ class Export {
19
19
  const database = (0, combi_1.seq)("DATABASE", cluster, (0, combi_1.per)(from, client, id, using));
20
20
  const target = (0, combi_1.alt)(buffer, memory, database, table, shared);
21
21
  const left = (0, combi_1.alt)(expressions_1.FieldSub, expressions_1.FieldSymbol);
22
- const source = (0, combi_1.alt)((0, combi_1.plus)((0, combi_1.altPrio)(expressions_1.ParameterS, (0, combi_1.seq)(left, from), left)), expressions_1.Dynamic, expressions_1.Constant);
22
+ const source = (0, combi_1.alt)((0, combi_1.plus)((0, combi_1.altPrio)((0, combi_1.seq)(left, from), left)), expressions_1.Dynamic, expressions_1.Constant);
23
23
  const compression = (0, combi_1.seq)("COMPRESSION", (0, combi_1.alt)("ON", "OFF"));
24
24
  const hint = (0, combi_1.seq)("CODE PAGE HINT", expressions_1.Source);
25
25
  return (0, combi_1.seq)("EXPORT", source, "TO", target, (0, combi_1.opt)(compression), (0, combi_1.opt)(hint));
@@ -23,5 +23,6 @@ exports.DECLARATION_STUFF = [
23
23
  Statements.Parameter,
24
24
  Statements.SelectionScreen,
25
25
  Statements.ConstantBegin,
26
+ Statements.Define,
26
27
  ];
27
28
  //# sourceMappingURL=selection_events.js.map
@@ -242,6 +242,13 @@ class StatementFlow {
242
242
  graph.addEdge(current, name, flow_graph_1.FLOW_EDGE_TYPE.undefined);
243
243
  graph.addEdge(name, graph.getEnd(), flow_graph_1.FLOW_EDGE_TYPE.undefined);
244
244
  }
245
+ else if (type instanceof Structures.TestSeam) {
246
+ const name = StatementFlow.buildName(n.getFirstStatement());
247
+ const sub = this.traverseBody(this.findBody(n), context);
248
+ graph.addEdge(current, name, flow_graph_1.FLOW_EDGE_TYPE.undefined);
249
+ graph.addGraph(name, sub, flow_graph_1.FLOW_EDGE_TYPE.undefined);
250
+ graph.addEdge(sub.getEnd(), graph.getEnd(), flow_graph_1.FLOW_EDGE_TYPE.undefined);
251
+ }
245
252
  else if (type instanceof Structures.AtFirst
246
253
  || type instanceof Structures.AtLast
247
254
  || type instanceof Structures.At
@@ -321,7 +328,8 @@ class StatementFlow {
321
328
  graph.addEdge(caseName, graph.getEnd(), flow_graph_1.FLOW_EDGE_TYPE.undefined);
322
329
  }
323
330
  }
324
- else if (type instanceof Structures.Define) {
331
+ else if (type instanceof Structures.Define
332
+ || type instanceof Structures.TestInjection) {
325
333
  // do nothing
326
334
  }
327
335
  else {
@@ -7,7 +7,7 @@ const cds_as_1 = require("./cds_as");
7
7
  const cds_cast_1 = require("./cds_cast");
8
8
  class CDSElement extends combi_1.Expression {
9
9
  getRunnable() {
10
- return (0, combi_1.seq)((0, combi_1.starPrio)(_1.CDSAnnotation), (0, combi_1.optPrio)("KEY"), (0, combi_1.altPrio)(_1.CDSAggregate, _1.CDSString, _1.CDSArithmetics, _1.CDSFunction, cds_cast_1.CDSCast, _1.CDSCase, (0, combi_1.seq)("(", _1.CDSCase, ")"), (0, combi_1.seq)(_1.CDSName, ": REDIRECTED TO", (0, combi_1.opt)((0, combi_1.alt)("PARENT", "COMPOSITION CHILD")), _1.CDSName), _1.CDSPrefixedName, (0, combi_1.regex)(/^\d+$/)), (0, combi_1.opt)(cds_as_1.CDSAs));
10
+ return (0, combi_1.seq)((0, combi_1.starPrio)(_1.CDSAnnotation), (0, combi_1.optPrio)("KEY"), (0, combi_1.altPrio)(_1.CDSAggregate, _1.CDSString, _1.CDSArithmetics, _1.CDSFunction, cds_cast_1.CDSCast, _1.CDSCase, (0, combi_1.seq)("(", _1.CDSCase, ")"), (0, combi_1.seq)(_1.CDSName, ": REDIRECTED TO", (0, combi_1.opt)((0, combi_1.alt)("PARENT", "COMPOSITION CHILD")), _1.CDSName), _1.CDSPrefixedName, _1.CDSInteger), (0, combi_1.opt)(cds_as_1.CDSAs));
11
11
  }
12
12
  }
13
13
  exports.CDSElement = CDSElement;
@@ -6,7 +6,7 @@ const combi_1 = require("../../abap/2_statements/combi");
6
6
  class CDSFunctionInput extends combi_1.Expression {
7
7
  getRunnable() {
8
8
  const qualified = (0, combi_1.seq)(_1.CDSName, (0, combi_1.opt)(_1.CDSParameters), (0, combi_1.starPrio)((0, combi_1.seq)(".", _1.CDSName, (0, combi_1.opt)(_1.CDSParameters))));
9
- const input = (0, combi_1.altPrio)(_1.CDSCast, _1.CDSFunction, _1.CDSArithmetics, _1.CDSCase, _1.CDSString, qualified, (0, combi_1.regex)(/^\d+$/));
9
+ const input = (0, combi_1.altPrio)(_1.CDSCast, _1.CDSFunction, _1.CDSArithmetics, _1.CDSCase, _1.CDSString, qualified, _1.CDSInteger);
10
10
  return input;
11
11
  }
12
12
  }
@@ -4,7 +4,7 @@ exports.CDSInteger = void 0;
4
4
  const combi_1 = require("../../abap/2_statements/combi");
5
5
  class CDSInteger extends combi_1.Expression {
6
6
  getRunnable() {
7
- return (0, combi_1.regex)(/^\d+$/);
7
+ return (0, combi_1.seq)((0, combi_1.opt)("-"), (0, combi_1.regex)(/^\d+$/));
8
8
  }
9
9
  }
10
10
  exports.CDSInteger = CDSInteger;
@@ -6,7 +6,9 @@ const combi_1 = require("../../abap/2_statements/combi");
6
6
  const cds_condition_1 = require("./cds_condition");
7
7
  class CDSJoin extends combi_1.Expression {
8
8
  getRunnable() {
9
- return (0, combi_1.seq)((0, combi_1.optPrio)((0, combi_1.altPrio)("LEFT OUTER TO ONE", "LEFT OUTER", "INNER")), "JOIN", _1.CDSSource, "ON", cds_condition_1.CDSCondition);
9
+ const cond = (0, combi_1.seq)(_1.CDSSource, "ON", cds_condition_1.CDSCondition);
10
+ const foo = (0, combi_1.altPrio)((0, combi_1.seq)("(", cond, ")"), cond);
11
+ return (0, combi_1.seq)((0, combi_1.optPrio)((0, combi_1.altPrio)("LEFT OUTER TO ONE", "LEFT OUTER", "INNER")), "JOIN", foo);
10
12
  }
11
13
  }
12
14
  exports.CDSJoin = CDSJoin;
@@ -67,7 +67,7 @@ class Registry {
67
67
  }
68
68
  static abaplintVersion() {
69
69
  // magic, see build script "version.sh"
70
- return "2.113.98";
70
+ return "2.113.100";
71
71
  }
72
72
  getDDICReferences() {
73
73
  return this.ddicReferences;
@@ -16,6 +16,26 @@ class VirtualPosition extends position_1.Position {
16
16
  const casted = p;
17
17
  return super.equals(this) && this.vrow === casted.vrow && this.vcol === casted.vcol;
18
18
  }
19
+ isAfter(p) {
20
+ if (p instanceof VirtualPosition) {
21
+ if (this.getRow() > p.getRow()) {
22
+ return true;
23
+ }
24
+ if (this.getRow() === p.getRow() && this.getCol() > p.getCol()) {
25
+ return true;
26
+ }
27
+ if (this.getRow() === p.getRow() && this.getCol() === p.getCol() && this.vrow > p.vrow) {
28
+ return true;
29
+ }
30
+ if (this.getRow() === p.getRow() && this.getCol() === p.getCol() && this.vrow === p.vrow && this.vcol > p.vcol) {
31
+ return true;
32
+ }
33
+ return false;
34
+ }
35
+ else {
36
+ return super.isAfter(p);
37
+ }
38
+ }
19
39
  }
20
40
  exports.VirtualPosition = VirtualPosition;
21
41
  //# sourceMappingURL=virtual_position.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/core",
3
- "version": "2.113.98",
3
+ "version": "2.113.100",
4
4
  "description": "abaplint - Core API",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/abaplint.d.ts",
@@ -50,12 +50,12 @@
50
50
  },
51
51
  "homepage": "https://abaplint.org",
52
52
  "devDependencies": {
53
- "@microsoft/api-extractor": "^7.49.1",
53
+ "@microsoft/api-extractor": "^7.49.2",
54
54
  "@types/chai": "^4.3.20",
55
55
  "@types/mocha": "^10.0.10",
56
- "@types/node": "^22.10.7",
56
+ "@types/node": "^22.12.0",
57
57
  "chai": "^4.5.0",
58
- "eslint": "^9.18.0",
58
+ "eslint": "^9.19.0",
59
59
  "mocha": "^11.1.0",
60
60
  "c8": "^10.1.3",
61
61
  "source-map-support": "^0.5.21",