@abaplint/core 2.110.0 → 2.110.2

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.
@@ -1,6 +1,23 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.failStar = exports.failCombinator = exports.verNot = exports.ver = exports.plusPrio = exports.plus = exports.starPrio = exports.star = exports.per = exports.optPrio = exports.opt = exports.altPrio = exports.alt = exports.seq = exports.tok = exports.regex = exports.str = exports.Combi = exports.Expression = void 0;
3
+ exports.Combi = exports.Expression = void 0;
4
+ exports.str = str;
5
+ exports.regex = regex;
6
+ exports.tok = tok;
7
+ exports.seq = seq;
8
+ exports.alt = alt;
9
+ exports.altPrio = altPrio;
10
+ exports.opt = opt;
11
+ exports.optPrio = optPrio;
12
+ exports.per = per;
13
+ exports.star = star;
14
+ exports.starPrio = starPrio;
15
+ exports.plus = plus;
16
+ exports.plusPrio = plusPrio;
17
+ exports.ver = ver;
18
+ exports.verNot = verNot;
19
+ exports.failCombinator = failCombinator;
20
+ exports.failStar = failStar;
4
21
  const Tokens = require("../1_lexer/tokens");
5
22
  const nodes_1 = require("../nodes");
6
23
  const version_1 = require("../../version");
@@ -813,15 +830,12 @@ function str(s) {
813
830
  return new Word(s);
814
831
  }
815
832
  }
816
- exports.str = str;
817
833
  function regex(r) {
818
834
  return new Regex(r);
819
835
  }
820
- exports.regex = regex;
821
836
  function tok(t) {
822
837
  return new Token(t.name);
823
838
  }
824
- exports.tok = tok;
825
839
  const expressionSingletons = {};
826
840
  const stringSingletons = {};
827
841
  function map(s) {
@@ -850,63 +864,49 @@ function seq(first, second, ...rest) {
850
864
  list.push(...rest.map(map));
851
865
  return new Sequence(list);
852
866
  }
853
- exports.seq = seq;
854
867
  function alt(first, second, ...rest) {
855
868
  const list = [map(first), map(second)];
856
869
  list.push(...rest.map(map));
857
870
  return new Alternative(list);
858
871
  }
859
- exports.alt = alt;
860
872
  function altPrio(first, second, ...rest) {
861
873
  const list = [map(first), map(second)];
862
874
  list.push(...rest.map(map));
863
875
  return new AlternativePriority(list);
864
876
  }
865
- exports.altPrio = altPrio;
866
877
  function opt(first) {
867
878
  return new Optional(map(first));
868
879
  }
869
- exports.opt = opt;
870
880
  function optPrio(first) {
871
881
  return new OptionalPriority(map(first));
872
882
  }
873
- exports.optPrio = optPrio;
874
883
  function per(first, second, ...rest) {
875
884
  const list = [map(first), map(second)];
876
885
  list.push(...rest.map(map));
877
886
  return new Permutation(list);
878
887
  }
879
- exports.per = per;
880
888
  function star(first) {
881
889
  return new Star(map(first));
882
890
  }
883
- exports.star = star;
884
891
  function starPrio(first) {
885
892
  return new StarPriority(map(first));
886
893
  }
887
- exports.starPrio = starPrio;
888
894
  function plus(first) {
889
895
  return new Plus(map(first));
890
896
  }
891
- exports.plus = plus;
892
897
  function plusPrio(first) {
893
898
  return new PlusPriority(map(first));
894
899
  }
895
- exports.plusPrio = plusPrio;
896
900
  function ver(version, first, or) {
897
901
  return new Vers(version, map(first), or);
898
902
  }
899
- exports.ver = ver;
900
903
  function verNot(version, first) {
901
904
  return new VersNot(version, map(first));
902
905
  }
903
- exports.verNot = verNot;
904
906
  function failCombinator() {
905
907
  return new FailCombinator();
906
908
  }
907
- exports.failCombinator = failCombinator;
908
909
  function failStar() {
909
910
  return new FailStar();
910
911
  }
911
- exports.failStar = failStar;
912
912
  //# sourceMappingURL=combi.js.map
@@ -75,6 +75,7 @@ class ExpandMacros {
75
75
  else if (type instanceof Statements.Include) {
76
76
  const includeName = (_b = statement.findDirectExpression(Expressions.IncludeName)) === null || _b === void 0 ? void 0 : _b.concatTokens();
77
77
  // todo, this does not take function module includes into account
78
+ // todo, workaround for cyclic includes?
78
79
  const prog = (_c = this.reg) === null || _c === void 0 ? void 0 : _c.getObject("PROG", includeName);
79
80
  if (prog) {
80
81
  prog.parse(this.version, this.globalMacros, this.reg);
@@ -1,6 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.sub = exports.sta = exports.star = exports.opt = exports.beginEnd = exports.alt = exports.seq = void 0;
3
+ exports.seq = seq;
4
+ exports.alt = alt;
5
+ exports.beginEnd = beginEnd;
6
+ exports.opt = opt;
7
+ exports.star = star;
8
+ exports.sta = sta;
9
+ exports.sub = sub;
4
10
  const nodes_1 = require("../../nodes");
5
11
  const _statement_1 = require("../../2_statements/statements/_statement");
6
12
  class Sequence {
@@ -308,27 +314,21 @@ class SubStatement {
308
314
  function seq(first, ...rest) {
309
315
  return new Sequence([first].concat(rest));
310
316
  }
311
- exports.seq = seq;
312
317
  function alt(first, ...rest) {
313
318
  return new Alternative([first].concat(rest));
314
319
  }
315
- exports.alt = alt;
316
320
  function beginEnd(begin, body, end) {
317
321
  return new Sequence([begin, body, end]);
318
322
  }
319
- exports.beginEnd = beginEnd;
320
323
  function opt(o) {
321
324
  return new Optional(o);
322
325
  }
323
- exports.opt = opt;
324
326
  function star(s) {
325
327
  return new Star(s);
326
328
  }
327
- exports.star = star;
328
329
  function sta(s) {
329
330
  return new SubStatement(s);
330
331
  }
331
- exports.sta = sta;
332
332
  const singletons = {};
333
333
  function sub(s) {
334
334
  if (singletons[s.name] === undefined) {
@@ -336,5 +336,4 @@ function sub(s) {
336
336
  }
337
337
  return singletons[s.name];
338
338
  }
339
- exports.sub = sub;
340
339
  //# sourceMappingURL=_combi.js.map
@@ -6,10 +6,9 @@ const _combi_1 = require("./_combi");
6
6
  const private_section_1 = require("./private_section");
7
7
  const protected_section_1 = require("./protected_section");
8
8
  const public_section_1 = require("./public_section");
9
- const statements_1 = require("../../2_statements/statements");
10
9
  class ClassDefinition {
11
10
  getMatcher() {
12
- const body = (0, _combi_1.seq)((0, _combi_1.opt)((0, _combi_1.sta)(statements_1.SetExtendedCheck)), (0, _combi_1.star)((0, _combi_1.sta)(statements_1.TypePools)), (0, _combi_1.opt)((0, _combi_1.sub)(public_section_1.PublicSection)), (0, _combi_1.opt)((0, _combi_1.sub)(protected_section_1.ProtectedSection)), (0, _combi_1.opt)((0, _combi_1.sub)(private_section_1.PrivateSection)), (0, _combi_1.opt)((0, _combi_1.sta)(statements_1.SetExtendedCheck)));
11
+ const body = (0, _combi_1.seq)((0, _combi_1.opt)((0, _combi_1.sta)(Statements.SetExtendedCheck)), (0, _combi_1.star)((0, _combi_1.sta)(Statements.TypePools)), (0, _combi_1.opt)((0, _combi_1.sub)(public_section_1.PublicSection)), (0, _combi_1.star)((0, _combi_1.sta)(Statements.Include)), (0, _combi_1.opt)((0, _combi_1.sub)(protected_section_1.ProtectedSection)), (0, _combi_1.opt)((0, _combi_1.sub)(private_section_1.PrivateSection)), (0, _combi_1.opt)((0, _combi_1.sta)(Statements.SetExtendedCheck)));
13
12
  return (0, _combi_1.beginEnd)((0, _combi_1.sta)(Statements.ClassDefinition), body, (0, _combi_1.sta)(Statements.EndClass));
14
13
  }
15
14
  }
@@ -7,7 +7,10 @@ const cds_association_1 = require("./cds_association");
7
7
  const cds_join_1 = require("./cds_join");
8
8
  class CDSSelect extends combi_1.Expression {
9
9
  getRunnable() {
10
- return (0, combi_1.seq)("SELECT", (0, combi_1.opt)("DISTINCT"), "FROM", _1.CDSSource, (0, combi_1.opt)(_1.CDSParametersSelect), (0, combi_1.opt)(_1.CDSAs), (0, combi_1.star)(cds_join_1.CDSJoin), (0, combi_1.star)(_1.CDSComposition), (0, combi_1.star)(cds_association_1.CDSAssociation), (0, combi_1.star)(_1.CDSComposition), (0, combi_1.str)("{"), (0, combi_1.plus)(_1.CDSElement), (0, combi_1.star)((0, combi_1.seq)(",", _1.CDSElement)), (0, combi_1.str)("}"), (0, combi_1.opt)(_1.CDSGroupBy), (0, combi_1.opt)(_1.CDSWhere), (0, combi_1.opt)((0, combi_1.seq)("UNION", (0, combi_1.opt)("ALL"), CDSSelect)));
10
+ const fields = (0, combi_1.opt)((0, combi_1.seq)((0, combi_1.star)((0, combi_1.seq)(_1.CDSElement, ",")), _1.CDSElement));
11
+ const distinct = (0, combi_1.str)("DISTINCT");
12
+ const elements = (0, combi_1.seq)((0, combi_1.str)("{"), (0, combi_1.plus)(_1.CDSElement), (0, combi_1.star)((0, combi_1.seq)(",", _1.CDSElement)), (0, combi_1.str)("}"));
13
+ return (0, combi_1.seq)("SELECT", (0, combi_1.opt)(distinct), (0, combi_1.opt)(fields), "FROM", _1.CDSSource, (0, combi_1.opt)(_1.CDSParametersSelect), (0, combi_1.opt)(_1.CDSAs), (0, combi_1.star)(cds_join_1.CDSJoin), (0, combi_1.star)(_1.CDSComposition), (0, combi_1.star)(cds_association_1.CDSAssociation), (0, combi_1.star)(_1.CDSComposition), (0, combi_1.opt)(elements), (0, combi_1.opt)(_1.CDSGroupBy), (0, combi_1.opt)(_1.CDSWhere), (0, combi_1.opt)((0, combi_1.seq)("UNION", (0, combi_1.opt)("ALL"), CDSSelect)));
11
14
  }
12
15
  }
13
16
  exports.CDSSelect = CDSSelect;
@@ -1,6 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.applyEditList = exports.applyEditSingle = exports.EditHelper = exports.EditDraft = void 0;
3
+ exports.EditHelper = exports.EditDraft = void 0;
4
+ exports.applyEditSingle = applyEditSingle;
5
+ exports.applyEditList = applyEditList;
4
6
  const position_1 = require("./position");
5
7
  const memory_file_1 = require("./files/memory_file");
6
8
  class EditDraft {
@@ -218,7 +220,6 @@ function applyEditSingle(reg, edit) {
218
220
  reg.updateFile(result);
219
221
  }
220
222
  }
221
- exports.applyEditSingle = applyEditSingle;
222
223
  /** returns list of filenames which were changed */
223
224
  function applyEditList(reg, edits) {
224
225
  const ret = [];
@@ -248,5 +249,4 @@ function applyEditList(reg, edits) {
248
249
  }
249
250
  return ret;
250
251
  }
251
- exports.applyEditList = applyEditList;
252
252
  //# sourceMappingURL=edit_helper.js.map
@@ -67,7 +67,7 @@ class Registry {
67
67
  }
68
68
  static abaplintVersion() {
69
69
  // magic, see build script "version.sh"
70
- return "2.110.0";
70
+ return "2.110.2";
71
71
  }
72
72
  getDDICReferences() {
73
73
  return this.ddicReferences;
@@ -413,7 +413,7 @@ ENDIF.`,
413
413
  const children = statementNode.getChildren();
414
414
  const sourceString = children[1].concatTokens();
415
415
  const targetString = children[3].concatTokens();
416
- let operator = children[2].concatTokens();
416
+ let operator = children[2].concatTokens().toUpperCase();
417
417
  if (operator === "TO") {
418
418
  operator = " = ";
419
419
  }
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getPreviousVersion = exports.defaultVersion = exports.Version = void 0;
3
+ exports.defaultVersion = exports.Version = void 0;
4
+ exports.getPreviousVersion = getPreviousVersion;
4
5
  var Version;
5
6
  (function (Version) {
6
7
  Version["OpenABAP"] = "open-abap";
@@ -35,5 +36,4 @@ function getPreviousVersion(v) {
35
36
  }
36
37
  return all[found - 1];
37
38
  }
38
- exports.getPreviousVersion = getPreviousVersion;
39
39
  //# sourceMappingURL=version.js.map
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.unescape = exports.xmlToArray = void 0;
3
+ exports.xmlToArray = xmlToArray;
4
+ exports.unescape = unescape;
4
5
  function xmlToArray(data) {
5
6
  if (data === undefined) {
6
7
  return [];
@@ -12,7 +13,6 @@ function xmlToArray(data) {
12
13
  return [data];
13
14
  }
14
15
  }
15
- exports.xmlToArray = xmlToArray;
16
16
  function unescape(str) {
17
17
  if (str === undefined) {
18
18
  return "";
@@ -24,5 +24,4 @@ function unescape(str) {
24
24
  str = str.replace(/'/g, "'");
25
25
  return str;
26
26
  }
27
- exports.unescape = unescape;
28
27
  //# sourceMappingURL=xml_utils.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/core",
3
- "version": "2.110.0",
3
+ "version": "2.110.2",
4
4
  "description": "abaplint - Core API",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/abaplint.d.ts",
@@ -52,15 +52,15 @@
52
52
  "devDependencies": {
53
53
  "@microsoft/api-extractor": "^7.47.0",
54
54
  "@types/chai": "^4.3.16",
55
- "@types/mocha": "^10.0.6",
56
- "@types/node": "^20.14.2",
55
+ "@types/mocha": "^10.0.7",
56
+ "@types/node": "^20.14.9",
57
57
  "chai": "^4.4.1",
58
58
  "eslint": "^8.57.0",
59
- "mocha": "^10.4.0",
59
+ "mocha": "^10.5.2",
60
60
  "c8": "^10.1.2",
61
61
  "source-map-support": "^0.5.21",
62
62
  "ts-json-schema-generator": "=2.0.1",
63
- "typescript": "^5.4.5"
63
+ "typescript": "^5.5.2"
64
64
  },
65
65
  "dependencies": {
66
66
  "fast-xml-parser": "^4.4.0",