@abaplint/cli 2.118.10 → 2.118.11

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.
Files changed (2) hide show
  1. package/build/cli.js +31 -22
  2. package/package.json +2 -2
package/build/cli.js CHANGED
@@ -1736,6 +1736,7 @@ class AbstractToken {
1736
1736
  constructor(start, str) {
1737
1737
  this.start = start;
1738
1738
  this.str = str;
1739
+ this.strUpper = str.toUpperCase();
1739
1740
  }
1740
1741
  // special function, for debugging purposes, see https://github.com/abaplint/abaplint/pull/3137
1741
1742
  [Symbol.for("debug.description")]() {
@@ -1744,6 +1745,9 @@ class AbstractToken {
1744
1745
  getStr() {
1745
1746
  return this.str;
1746
1747
  }
1748
+ getUpperStr() {
1749
+ return this.strUpper;
1750
+ }
1747
1751
  getRow() {
1748
1752
  return this.start.getRow();
1749
1753
  }
@@ -2849,7 +2853,7 @@ class Word {
2849
2853
  const result = [];
2850
2854
  for (const input of r) {
2851
2855
  if (input.remainingLength() !== 0
2852
- && input.peek().getStr().toUpperCase() === this.s) {
2856
+ && input.peek().getUpperStr() === this.s) {
2853
2857
  // console.log("match, " + this.s + result.length);
2854
2858
  result.push(input.shift(new nodes_1.TokenNode(input.peek())));
2855
2859
  }
@@ -2868,7 +2872,7 @@ class Word {
2868
2872
  }
2869
2873
  class Token {
2870
2874
  constructor(s) {
2871
- this.name = s.toUpperCase();
2875
+ this.name = s;
2872
2876
  }
2873
2877
  listKeywords() {
2874
2878
  return [];
@@ -2880,7 +2884,7 @@ class Token {
2880
2884
  const result = [];
2881
2885
  for (const input of r) {
2882
2886
  if (input.remainingLength() !== 0
2883
- && input.peek().constructor.name.toUpperCase() === this.name) {
2887
+ && input.peek().constructor.name === this.name) {
2884
2888
  result.push(input.shift(new nodes_1.TokenNode(input.peek())));
2885
2889
  }
2886
2890
  }
@@ -3618,7 +3622,7 @@ function tok(t) {
3618
3622
  }
3619
3623
  const expressionSingletons = {};
3620
3624
  const stringSingletons = {};
3621
- function map(s) {
3625
+ function mapInput(s) {
3622
3626
  const type = typeof s;
3623
3627
  if (type === "string") {
3624
3628
  if (stringSingletons[s] === undefined) {
@@ -3640,48 +3644,48 @@ function map(s) {
3640
3644
  }
3641
3645
  }
3642
3646
  function seq(first, second, ...rest) {
3643
- const list = [map(first), map(second)];
3644
- list.push(...rest.map(map));
3647
+ const list = [mapInput(first), mapInput(second)];
3648
+ list.push(...rest.map(mapInput));
3645
3649
  return new Sequence(list);
3646
3650
  }
3647
3651
  function alt(first, second, ...rest) {
3648
- const list = [map(first), map(second)];
3649
- list.push(...rest.map(map));
3652
+ const list = [mapInput(first), mapInput(second)];
3653
+ list.push(...rest.map(mapInput));
3650
3654
  return new Alternative(list);
3651
3655
  }
3652
3656
  function altPrio(first, second, ...rest) {
3653
- const list = [map(first), map(second)];
3654
- list.push(...rest.map(map));
3657
+ const list = [mapInput(first), mapInput(second)];
3658
+ list.push(...rest.map(mapInput));
3655
3659
  return new AlternativePriority(list);
3656
3660
  }
3657
3661
  function opt(first) {
3658
- return new Optional(map(first));
3662
+ return new Optional(mapInput(first));
3659
3663
  }
3660
3664
  function optPrio(first) {
3661
- return new OptionalPriority(map(first));
3665
+ return new OptionalPriority(mapInput(first));
3662
3666
  }
3663
3667
  function per(first, second, ...rest) {
3664
- const list = [map(first), map(second)];
3665
- list.push(...rest.map(map));
3668
+ const list = [mapInput(first), mapInput(second)];
3669
+ list.push(...rest.map(mapInput));
3666
3670
  return new Permutation(list);
3667
3671
  }
3668
3672
  function star(first) {
3669
- return new Star(map(first));
3673
+ return new Star(mapInput(first));
3670
3674
  }
3671
3675
  function starPrio(first) {
3672
- return new StarPriority(map(first));
3676
+ return new StarPriority(mapInput(first));
3673
3677
  }
3674
3678
  function plus(first) {
3675
- return new Plus(map(first));
3679
+ return new Plus(mapInput(first));
3676
3680
  }
3677
3681
  function plusPrio(first) {
3678
- return new PlusPriority(map(first));
3682
+ return new PlusPriority(mapInput(first));
3679
3683
  }
3680
3684
  function ver(version, first, or) {
3681
- return new Vers(version, map(first), or);
3685
+ return new Vers(version, mapInput(first), or);
3682
3686
  }
3683
3687
  function verNot(version, first) {
3684
- return new VersNot(version, map(first));
3688
+ return new VersNot(version, mapInput(first));
3685
3689
  }
3686
3690
  function failCombinator() {
3687
3691
  return new FailCombinator();
@@ -36117,6 +36121,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
36117
36121
  exports.Data = void 0;
36118
36122
  const data_1 = __webpack_require__(/*! ../statements/data */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/data.js");
36119
36123
  const nodes_1 = __webpack_require__(/*! ../../nodes */ "./node_modules/@abaplint/core/build/src/abap/nodes/index.js");
36124
+ const identifier_1 = __webpack_require__(/*! ../../1_lexer/tokens/identifier */ "./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/identifier.js");
36120
36125
  const type_1 = __webpack_require__(/*! ../statements/type */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/type.js");
36121
36126
  const _typed_identifier_1 = __webpack_require__(/*! ../../types/_typed_identifier */ "./node_modules/@abaplint/core/build/src/abap/types/_typed_identifier.js");
36122
36127
  const types_1 = __webpack_require__(/*! ./types */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/structures/types.js");
@@ -36139,7 +36144,11 @@ class Data {
36139
36144
  this.runCommonPartSyntax(node, input);
36140
36145
  return undefined;
36141
36146
  }
36142
- const name = node.findFirstExpression(Expressions.DefinitionName).getFirstToken();
36147
+ const nameExpr = node.findFirstExpression(Expressions.DefinitionName);
36148
+ let name = nameExpr.getFirstToken();
36149
+ if (nameExpr.countTokens() > 1) { // workaround for names with dashes
36150
+ name = new identifier_1.Identifier(name.getStart(), nameExpr.concatTokens());
36151
+ }
36143
36152
  let table = false;
36144
36153
  const values = {};
36145
36154
  const components = [];
@@ -56128,7 +56137,7 @@ class Registry {
56128
56137
  }
56129
56138
  static abaplintVersion() {
56130
56139
  // magic, see build script "version.sh"
56131
- return "2.118.10";
56140
+ return "2.118.11";
56132
56141
  }
56133
56142
  getDDICReferences() {
56134
56143
  return this.ddicReferences;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/cli",
3
- "version": "2.118.10",
3
+ "version": "2.118.11",
4
4
  "description": "abaplint - Command Line Interface",
5
5
  "funding": "https://github.com/sponsors/larshp",
6
6
  "bin": {
@@ -38,7 +38,7 @@
38
38
  },
39
39
  "homepage": "https://abaplint.org",
40
40
  "devDependencies": {
41
- "@abaplint/core": "^2.118.10",
41
+ "@abaplint/core": "^2.118.11",
42
42
  "@types/chai": "^4.3.20",
43
43
  "@types/minimist": "^1.2.5",
44
44
  "@types/mocha": "^10.0.10",