@abaplint/core 2.118.10 → 2.118.12

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.
@@ -7226,8 +7226,10 @@ declare class TimeType extends AbstractType {
7226
7226
  export declare abstract class Token {
7227
7227
  private readonly start;
7228
7228
  private readonly str;
7229
+ private readonly strUpper;
7229
7230
  constructor(start: Position, str: string);
7230
7231
  getStr(): string;
7232
+ getUpperStr(): string;
7231
7233
  getRow(): number;
7232
7234
  getCol(): number;
7233
7235
  getStart(): Position;
@@ -6,6 +6,7 @@ class AbstractToken {
6
6
  constructor(start, str) {
7
7
  this.start = start;
8
8
  this.str = str;
9
+ this.strUpper = str.toUpperCase();
9
10
  }
10
11
  // special function, for debugging purposes, see https://github.com/abaplint/abaplint/pull/3137
11
12
  [Symbol.for("debug.description")]() {
@@ -14,6 +15,9 @@ class AbstractToken {
14
15
  getStr() {
15
16
  return this.str;
16
17
  }
18
+ getUpperStr() {
19
+ return this.strUpper;
20
+ }
17
21
  getRow() {
18
22
  return this.start.getRow();
19
23
  }
@@ -69,7 +69,7 @@ class Word {
69
69
  const result = [];
70
70
  for (const input of r) {
71
71
  if (input.remainingLength() !== 0
72
- && input.peek().getStr().toUpperCase() === this.s) {
72
+ && input.peek().getUpperStr() === this.s) {
73
73
  // console.log("match, " + this.s + result.length);
74
74
  result.push(input.shift(new nodes_1.TokenNode(input.peek())));
75
75
  }
@@ -88,7 +88,7 @@ class Word {
88
88
  }
89
89
  class Token {
90
90
  constructor(s) {
91
- this.name = s.toUpperCase();
91
+ this.name = s;
92
92
  }
93
93
  listKeywords() {
94
94
  return [];
@@ -100,7 +100,7 @@ class Token {
100
100
  const result = [];
101
101
  for (const input of r) {
102
102
  if (input.remainingLength() !== 0
103
- && input.peek().constructor.name.toUpperCase() === this.name) {
103
+ && input.peek().constructor.name === this.name) {
104
104
  result.push(input.shift(new nodes_1.TokenNode(input.peek())));
105
105
  }
106
106
  }
@@ -838,7 +838,7 @@ function tok(t) {
838
838
  }
839
839
  const expressionSingletons = {};
840
840
  const stringSingletons = {};
841
- function map(s) {
841
+ function mapInput(s) {
842
842
  const type = typeof s;
843
843
  if (type === "string") {
844
844
  if (stringSingletons[s] === undefined) {
@@ -860,48 +860,48 @@ function map(s) {
860
860
  }
861
861
  }
862
862
  function seq(first, second, ...rest) {
863
- const list = [map(first), map(second)];
864
- list.push(...rest.map(map));
863
+ const list = [mapInput(first), mapInput(second)];
864
+ list.push(...rest.map(mapInput));
865
865
  return new Sequence(list);
866
866
  }
867
867
  function alt(first, second, ...rest) {
868
- const list = [map(first), map(second)];
869
- list.push(...rest.map(map));
868
+ const list = [mapInput(first), mapInput(second)];
869
+ list.push(...rest.map(mapInput));
870
870
  return new Alternative(list);
871
871
  }
872
872
  function altPrio(first, second, ...rest) {
873
- const list = [map(first), map(second)];
874
- list.push(...rest.map(map));
873
+ const list = [mapInput(first), mapInput(second)];
874
+ list.push(...rest.map(mapInput));
875
875
  return new AlternativePriority(list);
876
876
  }
877
877
  function opt(first) {
878
- return new Optional(map(first));
878
+ return new Optional(mapInput(first));
879
879
  }
880
880
  function optPrio(first) {
881
- return new OptionalPriority(map(first));
881
+ return new OptionalPriority(mapInput(first));
882
882
  }
883
883
  function per(first, second, ...rest) {
884
- const list = [map(first), map(second)];
885
- list.push(...rest.map(map));
884
+ const list = [mapInput(first), mapInput(second)];
885
+ list.push(...rest.map(mapInput));
886
886
  return new Permutation(list);
887
887
  }
888
888
  function star(first) {
889
- return new Star(map(first));
889
+ return new Star(mapInput(first));
890
890
  }
891
891
  function starPrio(first) {
892
- return new StarPriority(map(first));
892
+ return new StarPriority(mapInput(first));
893
893
  }
894
894
  function plus(first) {
895
- return new Plus(map(first));
895
+ return new Plus(mapInput(first));
896
896
  }
897
897
  function plusPrio(first) {
898
- return new PlusPriority(map(first));
898
+ return new PlusPriority(mapInput(first));
899
899
  }
900
900
  function ver(version, first, or) {
901
- return new Vers(version, map(first), or);
901
+ return new Vers(version, mapInput(first), or);
902
902
  }
903
903
  function verNot(version, first) {
904
- return new VersNot(version, map(first));
904
+ return new VersNot(version, mapInput(first));
905
905
  }
906
906
  function failCombinator() {
907
907
  return new FailCombinator();
@@ -6,7 +6,7 @@ const _1 = require(".");
6
6
  class Default extends combi_1.Expression {
7
7
  getRunnable() {
8
8
  // todo, DEFAULT is only valid for definitions in relation to method parameters
9
- const def = (0, combi_1.seq)("DEFAULT", (0, combi_1.altPrio)(_1.Constant, _1.FieldChain));
9
+ const def = (0, combi_1.seq)("DEFAULT", (0, combi_1.altPrio)(_1.TextElement, _1.Constant, _1.FieldChain));
10
10
  return def;
11
11
  }
12
12
  }
@@ -20,7 +20,7 @@ class SelectLoop extends combi_1.Expression {
20
20
  const tab = (0, combi_1.seq)(_1.SQLIntoTable, (0, combi_1.alt)(pack, (0, combi_1.seq)(_1.SQLFrom, pack), (0, combi_1.seq)(pack, _1.SQLFrom)));
21
21
  const packTab = (0, combi_1.seq)(pack, _1.SQLIntoTable);
22
22
  const into = (0, combi_1.altPrio)(sql_into_structure_1.SQLIntoStructure, _1.SQLIntoList);
23
- const perm = (0, combi_1.per)(_1.SQLFrom, where, sql_up_to_1.SQLUpTo, sql_order_by_1.SQLOrderBy, sql_having_1.SQLHaving, _1.SQLClient, bypass, _1.SQLGroupBy, _1.SQLForAllEntries, (0, combi_1.alt)(tab, sql_into_structure_1.SQLIntoStructure, _1.SQLIntoList, packTab));
23
+ const perm = (0, combi_1.per)(_1.SQLFrom, where, sql_up_to_1.SQLUpTo, sql_order_by_1.SQLOrderBy, sql_having_1.SQLHaving, _1.SQLClient, bypass, _1.SQLGroupBy, _1.SQLForAllEntries, _1.DatabaseConnection, (0, combi_1.alt)(tab, sql_into_structure_1.SQLIntoStructure, _1.SQLIntoList, packTab));
24
24
  const strict = (0, combi_1.seq)(_1.SQLFrom, (0, combi_1.ver)(version_1.Version.v750, sql_fields_loop_1.SQLFieldsLoop), (0, combi_1.optPrio)(_1.SQLForAllEntries), (0, combi_1.optPrio)((0, combi_1.seq)(where, (0, combi_1.optPrio)(sql_order_by_1.SQLOrderBy), into, (0, combi_1.optPrio)(sql_up_to_1.SQLUpTo))));
25
25
  const aggr = (0, combi_1.seq)((0, combi_1.plusPrio)(_1.SQLAggregation), into, (0, combi_1.optPrio)(sql_up_to_1.SQLUpTo), _1.SQLFrom, (0, combi_1.optPrio)(_1.SQLClient), (0, combi_1.optPrio)(where), _1.SQLGroupBy);
26
26
  const ret = (0, combi_1.seq)("SELECT", (0, combi_1.altPrio)((0, combi_1.seq)((0, combi_1.optPrio)("DISTINCT"), sql_field_list_loop_1.SQLFieldListLoop, perm), strict, aggr), (0, combi_1.optPrio)(sql_hints_1.SQLHints));
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Data = void 0;
4
4
  const data_1 = require("../statements/data");
5
5
  const nodes_1 = require("../../nodes");
6
+ const identifier_1 = require("../../1_lexer/tokens/identifier");
6
7
  const type_1 = require("../statements/type");
7
8
  const _typed_identifier_1 = require("../../types/_typed_identifier");
8
9
  const types_1 = require("./types");
@@ -25,7 +26,11 @@ class Data {
25
26
  this.runCommonPartSyntax(node, input);
26
27
  return undefined;
27
28
  }
28
- const name = node.findFirstExpression(Expressions.DefinitionName).getFirstToken();
29
+ const nameExpr = node.findFirstExpression(Expressions.DefinitionName);
30
+ let name = nameExpr.getFirstToken();
31
+ if (nameExpr.countTokens() > 1) { // workaround for names with dashes
32
+ name = new identifier_1.Identifier(name.getStart(), nameExpr.concatTokens());
33
+ }
29
34
  let table = false;
30
35
  const values = {};
31
36
  const components = [];
@@ -74,7 +74,7 @@ class Registry {
74
74
  }
75
75
  static abaplintVersion() {
76
76
  // magic, see build script "version.sh"
77
- return "2.118.10";
77
+ return "2.118.12";
78
78
  }
79
79
  getDDICReferences() {
80
80
  return this.ddicReferences;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/core",
3
- "version": "2.118.10",
3
+ "version": "2.118.12",
4
4
  "description": "abaplint - Core API",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/abaplint.d.ts",
@@ -50,10 +50,10 @@
50
50
  },
51
51
  "homepage": "https://abaplint.org",
52
52
  "devDependencies": {
53
- "@microsoft/api-extractor": "^7.57.7",
53
+ "@microsoft/api-extractor": "^7.58.2",
54
54
  "@types/chai": "^4.3.20",
55
55
  "@types/mocha": "^10.0.10",
56
- "@types/node": "^24.12.0",
56
+ "@types/node": "^24.12.2",
57
57
  "chai": "^4.5.0",
58
58
  "eslint": "^9.39.2",
59
59
  "mocha": "^11.7.5",
@@ -63,7 +63,7 @@
63
63
  "typescript": "^5.9.3"
64
64
  },
65
65
  "dependencies": {
66
- "fast-xml-parser": "^5.5.9",
66
+ "fast-xml-parser": "^5.5.12",
67
67
  "json5": "^2.2.3",
68
68
  "vscode-languageserver-types": "^3.17.5"
69
69
  }