@abaplint/runtime 1.8.25 → 1.8.26
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.
- package/build/src/statements/find.d.ts +1 -1
- package/build/src/statements/find.js +24 -13
- package/package.json +42 -42
|
@@ -14,4 +14,4 @@ export interface IFindOptions {
|
|
|
14
14
|
ignoringCase?: boolean;
|
|
15
15
|
submatches?: ICharacter[];
|
|
16
16
|
}
|
|
17
|
-
export declare function find(input: ICharacter |
|
|
17
|
+
export declare function find(input: ICharacter | Table, options: IFindOptions): void;
|
|
@@ -4,10 +4,6 @@ exports.find = void 0;
|
|
|
4
4
|
const types_1 = require("../types");
|
|
5
5
|
function find(input, options) {
|
|
6
6
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
7
|
-
let i = input;
|
|
8
|
-
if (typeof i !== "string") {
|
|
9
|
-
i = i.get();
|
|
10
|
-
}
|
|
11
7
|
let sectionOffset = (_a = options.sectionOffset) === null || _a === void 0 ? void 0 : _a.get();
|
|
12
8
|
if (sectionOffset && options.byteMode) {
|
|
13
9
|
sectionOffset = sectionOffset * 2;
|
|
@@ -49,16 +45,31 @@ function find(input, options) {
|
|
|
49
45
|
else {
|
|
50
46
|
throw "FIND, runtime, no input";
|
|
51
47
|
}
|
|
52
|
-
if (sectionOffset) {
|
|
53
|
-
i = i.substr(sectionOffset);
|
|
54
|
-
}
|
|
55
|
-
let temp;
|
|
56
48
|
const matches = [];
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
49
|
+
if (input instanceof types_1.Table) {
|
|
50
|
+
for (const blah of input.array()) {
|
|
51
|
+
let temp;
|
|
52
|
+
// eslint-disable-next-line no-cond-assign
|
|
53
|
+
while (temp = s.exec(blah.get())) {
|
|
54
|
+
matches.push(temp);
|
|
55
|
+
if (options.first === true) {
|
|
56
|
+
break;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
else {
|
|
62
|
+
let blah = input.get();
|
|
63
|
+
if (sectionOffset) {
|
|
64
|
+
blah = blah.substr(sectionOffset);
|
|
65
|
+
}
|
|
66
|
+
let temp;
|
|
67
|
+
// eslint-disable-next-line no-cond-assign
|
|
68
|
+
while (temp = s.exec(blah)) {
|
|
69
|
+
matches.push(temp);
|
|
70
|
+
if (options.first === true) {
|
|
71
|
+
break;
|
|
72
|
+
}
|
|
62
73
|
}
|
|
63
74
|
}
|
|
64
75
|
if (options.submatches) {
|
package/package.json
CHANGED
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@abaplint/runtime",
|
|
3
|
-
"version": "1.8.
|
|
4
|
-
"description": "Transpiler - Runtime",
|
|
5
|
-
"main": "build/src/index.js",
|
|
6
|
-
"typings": "build/src/index.d.ts",
|
|
7
|
-
"repository": {
|
|
8
|
-
"type": "git",
|
|
9
|
-
"url": "git+https://github.com/abaplint/transpiler.git"
|
|
10
|
-
},
|
|
11
|
-
"scripts": {
|
|
12
|
-
"compile": "tsc",
|
|
13
|
-
"publish:minor": "npm --no-git-tag-version version minor && rm -rf build && npm install && npm run test && npm publish --access public",
|
|
14
|
-
"publish:patch": "npm --no-git-tag-version version patch && rm -rf build && npm install && npm run test && npm publish --access public",
|
|
15
|
-
"test": "npm run compile && mocha"
|
|
16
|
-
},
|
|
17
|
-
"mocha": {
|
|
18
|
-
"recursive": true,
|
|
19
|
-
"reporter": "progress",
|
|
20
|
-
"spec": "build/test/**/*.js",
|
|
21
|
-
"require": "source-map-support/register"
|
|
22
|
-
},
|
|
23
|
-
"keywords": [
|
|
24
|
-
"ABAP",
|
|
25
|
-
"abaplint"
|
|
26
|
-
],
|
|
27
|
-
"author": "abaplint",
|
|
28
|
-
"license": "MIT",
|
|
29
|
-
"dependencies": {
|
|
30
|
-
"hdb": "^0.19.1",
|
|
31
|
-
"sql.js": "^1.6.2"
|
|
32
|
-
},
|
|
33
|
-
"devDependencies": {
|
|
34
|
-
"@types/chai": "^4.3.0",
|
|
35
|
-
"@types/mocha": "^9.1.0",
|
|
36
|
-
"@types/sql.js": "^1.4.3",
|
|
37
|
-
"chai": "^4.3.6",
|
|
38
|
-
"mocha": "^9.2.2",
|
|
39
|
-
"source-map-support": "^0.5.21",
|
|
40
|
-
"typescript": "^4.6.3"
|
|
41
|
-
}
|
|
42
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@abaplint/runtime",
|
|
3
|
+
"version": "1.8.26",
|
|
4
|
+
"description": "Transpiler - Runtime",
|
|
5
|
+
"main": "build/src/index.js",
|
|
6
|
+
"typings": "build/src/index.d.ts",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/abaplint/transpiler.git"
|
|
10
|
+
},
|
|
11
|
+
"scripts": {
|
|
12
|
+
"compile": "tsc",
|
|
13
|
+
"publish:minor": "npm --no-git-tag-version version minor && rm -rf build && npm install && npm run test && npm publish --access public",
|
|
14
|
+
"publish:patch": "npm --no-git-tag-version version patch && rm -rf build && npm install && npm run test && npm publish --access public",
|
|
15
|
+
"test": "npm run compile && mocha"
|
|
16
|
+
},
|
|
17
|
+
"mocha": {
|
|
18
|
+
"recursive": true,
|
|
19
|
+
"reporter": "progress",
|
|
20
|
+
"spec": "build/test/**/*.js",
|
|
21
|
+
"require": "source-map-support/register"
|
|
22
|
+
},
|
|
23
|
+
"keywords": [
|
|
24
|
+
"ABAP",
|
|
25
|
+
"abaplint"
|
|
26
|
+
],
|
|
27
|
+
"author": "abaplint",
|
|
28
|
+
"license": "MIT",
|
|
29
|
+
"dependencies": {
|
|
30
|
+
"hdb": "^0.19.1",
|
|
31
|
+
"sql.js": "^1.6.2"
|
|
32
|
+
},
|
|
33
|
+
"devDependencies": {
|
|
34
|
+
"@types/chai": "^4.3.0",
|
|
35
|
+
"@types/mocha": "^9.1.0",
|
|
36
|
+
"@types/sql.js": "^1.4.3",
|
|
37
|
+
"chai": "^4.3.6",
|
|
38
|
+
"mocha": "^9.2.2",
|
|
39
|
+
"source-map-support": "^0.5.21",
|
|
40
|
+
"typescript": "^4.6.3"
|
|
41
|
+
}
|
|
42
|
+
}
|