@abaplint/core 2.114.4 → 2.114.6
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.
|
@@ -66,7 +66,12 @@ class CDSLexer {
|
|
|
66
66
|
// string handling
|
|
67
67
|
if (mode === Mode.String) {
|
|
68
68
|
build += next;
|
|
69
|
-
if (next === "'") {
|
|
69
|
+
if (next === "'" && nextNext === "'") {
|
|
70
|
+
// escaped single quote, continue string
|
|
71
|
+
build += stream.takeNext();
|
|
72
|
+
col++;
|
|
73
|
+
}
|
|
74
|
+
else if (next === "'") {
|
|
70
75
|
build = result.add(build, row, col, mode);
|
|
71
76
|
mode = Mode.Default;
|
|
72
77
|
}
|
|
@@ -6,7 +6,7 @@ class CDSString extends combi_1.Expression {
|
|
|
6
6
|
getRunnable() {
|
|
7
7
|
const abap = (0, combi_1.seq)("abap", ".", (0, combi_1.regex)(/^char'\w'$/));
|
|
8
8
|
// https://stackoverflow.com/a/57754227
|
|
9
|
-
const reg = (0, combi_1.regex)(/^'[A-Za-zÀ-ž\u0370-\u03FF\u0400-\u04FF:\| -_]*'$/);
|
|
9
|
+
const reg = (0, combi_1.regex)(/^'([A-Za-zÀ-ž\u0370-\u03FF\u0400-\u04FF:\| -_]|'')*'$/);
|
|
10
10
|
return (0, combi_1.altPrio)(reg, abap);
|
|
11
11
|
}
|
|
12
12
|
}
|
package/build/src/registry.js
CHANGED
|
@@ -44,6 +44,7 @@ https://docs.abapopenchecks.org/checks/16/`,
|
|
|
44
44
|
this.conf = conf;
|
|
45
45
|
}
|
|
46
46
|
runParsed(file, obj) {
|
|
47
|
+
var _a, _b;
|
|
47
48
|
const issues = [];
|
|
48
49
|
const ddic = new ddic_1.DDIC(this.reg);
|
|
49
50
|
if (obj instanceof objects_1.Class) {
|
|
@@ -68,10 +69,10 @@ https://docs.abapopenchecks.org/checks/16/`,
|
|
|
68
69
|
rowContent = " " + rowContent;
|
|
69
70
|
}
|
|
70
71
|
let offset = 0;
|
|
71
|
-
if (rows[i - 1].endsWith("\r")) {
|
|
72
|
+
if ((_a = rows[i - 1]) === null || _a === void 0 ? void 0 : _a.endsWith("\r")) {
|
|
72
73
|
offset = -1;
|
|
73
74
|
}
|
|
74
|
-
const startPos = new position_1.Position(i, rows[i - 1].length + 1 + offset);
|
|
75
|
+
const startPos = new position_1.Position(i, ((_b = rows[i - 1]) === null || _b === void 0 ? void 0 : _b.length) + 1 + offset);
|
|
75
76
|
const endPos = new position_1.Position(i + 1, rows[i].length + 1);
|
|
76
77
|
let fix = edit_helper_1.EditHelper.replaceRange(file, startPos, endPos, rowContent);
|
|
77
78
|
if (rows[i - 1] === undefined || rows[i - 1].indexOf("*") === 0 || rows[i - 1].includes(`"`)) {
|