@abaplint/runtime 2.6.1 → 2.6.3

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.
@@ -7,6 +7,9 @@ function strlen(input) {
7
7
  if (typeof input.val === "string") {
8
8
  str = input.val;
9
9
  }
10
+ else if (input.val instanceof types_1.Character) {
11
+ str = input.val.getTrimEnd();
12
+ }
10
13
  else {
11
14
  str = input.val.get();
12
15
  }
@@ -22,9 +22,9 @@ function createData(target, options) {
22
22
  }
23
23
  else if (options === null || options === void 0 ? void 0 : options.name) {
24
24
  // @ts-ignore
25
- if (abap.DDIC[options.name]) {
25
+ if (abap.DDIC[options.name.trimEnd()]) {
26
26
  // @ts-ignore
27
- target.assign((0, clone_1.clone)(abap.DDIC[options.name].type));
27
+ target.assign((0, clone_1.clone)(abap.DDIC[options.name.trimEnd()].type));
28
28
  }
29
29
  else if (options.name.includes("=>")) {
30
30
  const [className, typeName] = options.name.toUpperCase().split("=>");
@@ -114,9 +114,9 @@ function createData(target, options) {
114
114
  break;
115
115
  default:
116
116
  // @ts-ignore
117
- if (abap.DDIC[options.typeName]) {
117
+ if (abap.DDIC[options.typeName.trimEnd()]) {
118
118
  // @ts-ignore
119
- target.assign((0, clone_1.clone)(abap.DDIC[options.typeName].type));
119
+ target.assign((0, clone_1.clone)(abap.DDIC[options.typeName.trimEnd()].type));
120
120
  }
121
121
  else if (options.typeName.includes("=>")) {
122
122
  const [className, typeName] = options.typeName.toUpperCase().split("=>");
@@ -125,11 +125,11 @@ function createData(target, options) {
125
125
  (0, throw_error_1.throwError)("CX_SY_CREATE_DATA_ERROR");
126
126
  }
127
127
  // @ts-ignore
128
- if (abap.Classes[className][typeName.toLowerCase()] === undefined) {
128
+ if (abap.Classes[className][typeName.toLowerCase().trimEnd()] === undefined) {
129
129
  (0, throw_error_1.throwError)("CX_SY_CREATE_DATA_ERROR");
130
130
  }
131
131
  // @ts-ignore
132
- target.assign((0, clone_1.clone)(abap.Classes[className][typeName.toLowerCase()]));
132
+ target.assign((0, clone_1.clone)(abap.Classes[className][typeName.toLowerCase().trimEnd()]));
133
133
  }
134
134
  else {
135
135
  throw "CREATE DATA, unknown type " + options.typeName;
@@ -3,7 +3,16 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.split = void 0;
4
4
  const types_1 = require("../types");
5
5
  function split(param) {
6
- const source = typeof param.source === "string" ? param.source : param.source.get();
6
+ let source = "";
7
+ if (typeof param.source === "string") {
8
+ source = param.source;
9
+ }
10
+ else if (param.source instanceof types_1.Character) {
11
+ source = param.source.getTrimEnd();
12
+ }
13
+ else {
14
+ source = param.source.get();
15
+ }
7
16
  const at = typeof param.at === "string" ? param.at : param.at.get();
8
17
  const split = source.includes(at) ? source.split(at) : [];
9
18
  if (param.table) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/runtime",
3
- "version": "2.6.1",
3
+ "version": "2.6.3",
4
4
  "description": "Transpiler - Runtime",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/src/index.d.ts",