@abaplint/runtime 2.1.71 → 2.1.72

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,5 +1,6 @@
1
1
  import { ICharacter } from "../types/_character";
2
2
  export declare function matches(input: {
3
3
  val: ICharacter | string;
4
- regex: ICharacter | string;
4
+ regex?: ICharacter | string;
5
+ pcre?: ICharacter | string;
5
6
  }): ICharacter;
@@ -3,6 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.matches = void 0;
4
4
  const types_1 = require("../types");
5
5
  function matches(input) {
6
+ if (input.pcre !== undefined) {
7
+ throw "matches(), todo, pcre";
8
+ }
9
+ else if (input.regex === undefined) {
10
+ throw "matches(), regex input expected";
11
+ }
6
12
  const val = typeof input.val === "string" ? input.val : input.val.get();
7
13
  let reg = "";
8
14
  if (typeof input.regex === "string") {
@@ -60,6 +60,9 @@ function insertInternal(options) {
60
60
  if (options.assigning) {
61
61
  options.assigning.assign(val);
62
62
  }
63
+ if (options.referenceInto) {
64
+ options.referenceInto.assign(val);
65
+ }
63
66
  }
64
67
  else if (data) {
65
68
  // todo, for now it just appends, this is not correct, but currently the table type is not known
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/runtime",
3
- "version": "2.1.71",
3
+ "version": "2.1.72",
4
4
  "description": "Transpiler - Runtime",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/src/index.d.ts",