@abaplint/core 2.114.4 → 2.114.5
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