rtf-codec 0.0.0 → 1.1.0
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/LICENSE +21 -0
- package/README.md +226 -0
- package/dist/base64.cjs +66 -0
- package/dist/base64.d.cts +7 -0
- package/dist/base64.d.ts +7 -0
- package/dist/base64.js +62 -0
- package/dist/bytes.cjs +25 -0
- package/dist/bytes.d.cts +6 -0
- package/dist/bytes.d.ts +6 -0
- package/dist/bytes.js +22 -0
- package/dist/cell-format.cjs +142 -0
- package/dist/cell-format.d.cts +25 -0
- package/dist/cell-format.d.ts +25 -0
- package/dist/cell-format.js +137 -0
- package/dist/codec.cjs +29 -0
- package/dist/codec.d.cts +2344 -0
- package/dist/codec.d.ts +2344 -0
- package/dist/codec.js +26 -0
- package/dist/codepage.cjs +98 -0
- package/dist/codepage.d.cts +10 -0
- package/dist/codepage.d.ts +10 -0
- package/dist/codepage.js +92 -0
- package/dist/constructs.cjs +131 -0
- package/dist/constructs.d.cts +31 -0
- package/dist/constructs.d.ts +31 -0
- package/dist/constructs.js +121 -0
- package/dist/diagnostics-BgG_KAiN.d.cts +52 -0
- package/dist/diagnostics-BgG_KAiN.d.ts +52 -0
- package/dist/diagnostics.cjs +76 -0
- package/dist/diagnostics.d.cts +2 -0
- package/dist/diagnostics.d.ts +2 -0
- package/dist/diagnostics.js +68 -0
- package/dist/group.cjs +40 -0
- package/dist/group.d.cts +11 -0
- package/dist/group.d.ts +11 -0
- package/dist/group.js +38 -0
- package/dist/header.cjs +433 -0
- package/dist/header.d.cts +44 -0
- package/dist/header.d.ts +44 -0
- package/dist/header.js +431 -0
- package/dist/index.cjs +28 -0
- package/dist/index.d.cts +8 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +8 -0
- package/dist/list-id.cjs +30 -0
- package/dist/list-id.d.cts +16 -0
- package/dist/list-id.d.ts +16 -0
- package/dist/list-id.js +27 -0
- package/dist/options.cjs +7 -0
- package/dist/options.d.cts +18 -0
- package/dist/options.d.ts +18 -0
- package/dist/options.js +5 -0
- package/dist/read.cjs +1211 -0
- package/dist/read.d.cts +16 -0
- package/dist/read.d.ts +16 -0
- package/dist/read.js +1209 -0
- package/dist/tokenize.cjs +155 -0
- package/dist/tokenize.d.cts +25 -0
- package/dist/tokenize.d.ts +25 -0
- package/dist/tokenize.js +154 -0
- package/dist/units.cjs +43 -0
- package/dist/units.d.cts +17 -0
- package/dist/units.d.ts +17 -0
- package/dist/units.js +29 -0
- package/dist/write.cjs +532 -0
- package/dist/write.d.cts +7 -0
- package/dist/write.d.ts +7 -0
- package/dist/write.js +530 -0
- package/package.json +95 -2
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
//#region src/diagnostics.d.ts
|
|
2
|
+
type RtfDiagnosticSeverity = "info" | "warning";
|
|
3
|
+
interface RtfDiagnostic {
|
|
4
|
+
readonly code: string;
|
|
5
|
+
readonly severity: RtfDiagnosticSeverity;
|
|
6
|
+
readonly message: string;
|
|
7
|
+
readonly tokenIndex?: number;
|
|
8
|
+
}
|
|
9
|
+
type RtfDiagnosticSink = (diagnostic: RtfDiagnostic) => void;
|
|
10
|
+
declare const NOOP_RTF_DIAGNOSTIC_SINK: RtfDiagnosticSink;
|
|
11
|
+
declare const RtfDiagnosticCodes: {
|
|
12
|
+
readonly UNBALANCED_GROUP: "rtf/unbalanced-group";
|
|
13
|
+
readonly UNKNOWN_DESTINATION_SKIPPED: "rtf/unknown-destination-skipped";
|
|
14
|
+
readonly CONTENT_DESTINATION_SKIPPED: "rtf/content-destination-skipped";
|
|
15
|
+
readonly UNSUPPORTED_CODEPAGE: "rtf/unsupported-codepage";
|
|
16
|
+
readonly UNSUPPORTED_PICTURE_FORMAT: "rtf/unsupported-picture-format";
|
|
17
|
+
readonly PICTURE_SIZE_UNSTATED: "rtf/picture-size-unstated";
|
|
18
|
+
readonly TABLE_ROW_WITHOUT_DEFINITION: "rtf/table-row-without-definition";
|
|
19
|
+
readonly TABLE_COLUMN_WIDTH_INVALID: "rtf/table-column-width-invalid";
|
|
20
|
+
readonly NESTED_TABLE_FLATTENED: "rtf/nested-table-flattened";
|
|
21
|
+
readonly SECTION_BREAK_UNREPRESENTED: "rtf/section-break-unrepresented";
|
|
22
|
+
readonly BOOKMARK_UNPAIRED: "rtf/bookmark-unpaired";
|
|
23
|
+
readonly CONSTRUCT_UNREPRESENTED: "rtf/construct-unrepresented";
|
|
24
|
+
readonly EMBEDDED_OBJECT_DROPPED: "rtf/embedded-object-dropped";
|
|
25
|
+
readonly PACKAGE_TABLE_DROPPED: "rtf/package-table-dropped";
|
|
26
|
+
};
|
|
27
|
+
declare class RtfParseError extends Error {
|
|
28
|
+
readonly code: string;
|
|
29
|
+
constructor(code: string, message: string);
|
|
30
|
+
}
|
|
31
|
+
declare class RtfNotAnRtfDocumentError extends RtfParseError {
|
|
32
|
+
constructor(message?: string);
|
|
33
|
+
}
|
|
34
|
+
declare class RtfInputTooLargeError extends RtfParseError {
|
|
35
|
+
readonly byteLength: number;
|
|
36
|
+
readonly maxInputBytes: number;
|
|
37
|
+
constructor(byteLength: number, maxInputBytes: number);
|
|
38
|
+
}
|
|
39
|
+
declare class RtfNestingLimitExceededError extends RtfParseError {
|
|
40
|
+
readonly maxGroupDepth: number;
|
|
41
|
+
constructor(maxGroupDepth: number);
|
|
42
|
+
}
|
|
43
|
+
declare class RtfWriteError extends Error {
|
|
44
|
+
readonly code: string;
|
|
45
|
+
constructor(code: string, message: string);
|
|
46
|
+
}
|
|
47
|
+
declare class RtfUnsupportedDocumentKindError extends RtfWriteError {
|
|
48
|
+
readonly documentKind: string;
|
|
49
|
+
constructor(documentKind: string);
|
|
50
|
+
}
|
|
51
|
+
//#endregion
|
|
52
|
+
export { RtfDiagnosticSink as a, RtfNotAnRtfDocumentError as c, RtfWriteError as d, RtfDiagnosticSeverity as i, RtfParseError as l, RtfDiagnostic as n, RtfInputTooLargeError as o, RtfDiagnosticCodes as r, RtfNestingLimitExceededError as s, NOOP_RTF_DIAGNOSTIC_SINK as t, RtfUnsupportedDocumentKindError as u };
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
//#region src/diagnostics.ts
|
|
3
|
+
const NOOP_RTF_DIAGNOSTIC_SINK = () => {};
|
|
4
|
+
const RtfDiagnosticCodes = {
|
|
5
|
+
UNBALANCED_GROUP: "rtf/unbalanced-group",
|
|
6
|
+
UNKNOWN_DESTINATION_SKIPPED: "rtf/unknown-destination-skipped",
|
|
7
|
+
CONTENT_DESTINATION_SKIPPED: "rtf/content-destination-skipped",
|
|
8
|
+
UNSUPPORTED_CODEPAGE: "rtf/unsupported-codepage",
|
|
9
|
+
UNSUPPORTED_PICTURE_FORMAT: "rtf/unsupported-picture-format",
|
|
10
|
+
PICTURE_SIZE_UNSTATED: "rtf/picture-size-unstated",
|
|
11
|
+
TABLE_ROW_WITHOUT_DEFINITION: "rtf/table-row-without-definition",
|
|
12
|
+
TABLE_COLUMN_WIDTH_INVALID: "rtf/table-column-width-invalid",
|
|
13
|
+
NESTED_TABLE_FLATTENED: "rtf/nested-table-flattened",
|
|
14
|
+
SECTION_BREAK_UNREPRESENTED: "rtf/section-break-unrepresented",
|
|
15
|
+
BOOKMARK_UNPAIRED: "rtf/bookmark-unpaired",
|
|
16
|
+
CONSTRUCT_UNREPRESENTED: "rtf/construct-unrepresented",
|
|
17
|
+
EMBEDDED_OBJECT_DROPPED: "rtf/embedded-object-dropped",
|
|
18
|
+
PACKAGE_TABLE_DROPPED: "rtf/package-table-dropped"
|
|
19
|
+
};
|
|
20
|
+
var RtfParseError = class extends Error {
|
|
21
|
+
code;
|
|
22
|
+
constructor(code, message) {
|
|
23
|
+
super(message);
|
|
24
|
+
this.name = "RtfParseError";
|
|
25
|
+
this.code = code;
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
var RtfNotAnRtfDocumentError = class extends RtfParseError {
|
|
29
|
+
constructor(message = "input does not begin with '{\\rtf'") {
|
|
30
|
+
super("rtf/not-an-rtf-document", message);
|
|
31
|
+
this.name = "RtfNotAnRtfDocumentError";
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
var RtfInputTooLargeError = class extends RtfParseError {
|
|
35
|
+
byteLength;
|
|
36
|
+
maxInputBytes;
|
|
37
|
+
constructor(byteLength, maxInputBytes) {
|
|
38
|
+
super("rtf/input-too-large", `input is ${String(byteLength)} bytes, over the ${String(maxInputBytes)}-byte limit`);
|
|
39
|
+
this.name = "RtfInputTooLargeError";
|
|
40
|
+
this.byteLength = byteLength;
|
|
41
|
+
this.maxInputBytes = maxInputBytes;
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
var RtfNestingLimitExceededError = class extends RtfParseError {
|
|
45
|
+
maxGroupDepth;
|
|
46
|
+
constructor(maxGroupDepth) {
|
|
47
|
+
super("rtf/nesting-limit-exceeded", `group nesting exceeded the ${String(maxGroupDepth)}-level limit`);
|
|
48
|
+
this.name = "RtfNestingLimitExceededError";
|
|
49
|
+
this.maxGroupDepth = maxGroupDepth;
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
var RtfWriteError = class extends Error {
|
|
53
|
+
code;
|
|
54
|
+
constructor(code, message) {
|
|
55
|
+
super(message);
|
|
56
|
+
this.name = "RtfWriteError";
|
|
57
|
+
this.code = code;
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
var RtfUnsupportedDocumentKindError = class extends RtfWriteError {
|
|
61
|
+
documentKind;
|
|
62
|
+
constructor(documentKind) {
|
|
63
|
+
super("rtf/unsupported-document-kind", `RTF is a wordprocessing format; a '${documentKind}' ContentDocument has no RTF representation`);
|
|
64
|
+
this.name = "RtfUnsupportedDocumentKindError";
|
|
65
|
+
this.documentKind = documentKind;
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
//#endregion
|
|
69
|
+
exports.NOOP_RTF_DIAGNOSTIC_SINK = NOOP_RTF_DIAGNOSTIC_SINK;
|
|
70
|
+
exports.RtfDiagnosticCodes = RtfDiagnosticCodes;
|
|
71
|
+
exports.RtfInputTooLargeError = RtfInputTooLargeError;
|
|
72
|
+
exports.RtfNestingLimitExceededError = RtfNestingLimitExceededError;
|
|
73
|
+
exports.RtfNotAnRtfDocumentError = RtfNotAnRtfDocumentError;
|
|
74
|
+
exports.RtfParseError = RtfParseError;
|
|
75
|
+
exports.RtfUnsupportedDocumentKindError = RtfUnsupportedDocumentKindError;
|
|
76
|
+
exports.RtfWriteError = RtfWriteError;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { a as RtfDiagnosticSink, c as RtfNotAnRtfDocumentError, d as RtfWriteError, i as RtfDiagnosticSeverity, l as RtfParseError, n as RtfDiagnostic, o as RtfInputTooLargeError, r as RtfDiagnosticCodes, s as RtfNestingLimitExceededError, t as NOOP_RTF_DIAGNOSTIC_SINK, u as RtfUnsupportedDocumentKindError } from "./diagnostics-BgG_KAiN.cjs";
|
|
2
|
+
export { NOOP_RTF_DIAGNOSTIC_SINK, RtfDiagnostic, RtfDiagnosticCodes, RtfDiagnosticSeverity, RtfDiagnosticSink, RtfInputTooLargeError, RtfNestingLimitExceededError, RtfNotAnRtfDocumentError, RtfParseError, RtfUnsupportedDocumentKindError, RtfWriteError };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { a as RtfDiagnosticSink, c as RtfNotAnRtfDocumentError, d as RtfWriteError, i as RtfDiagnosticSeverity, l as RtfParseError, n as RtfDiagnostic, o as RtfInputTooLargeError, r as RtfDiagnosticCodes, s as RtfNestingLimitExceededError, t as NOOP_RTF_DIAGNOSTIC_SINK, u as RtfUnsupportedDocumentKindError } from "./diagnostics-BgG_KAiN.js";
|
|
2
|
+
export { NOOP_RTF_DIAGNOSTIC_SINK, RtfDiagnostic, RtfDiagnosticCodes, RtfDiagnosticSeverity, RtfDiagnosticSink, RtfInputTooLargeError, RtfNestingLimitExceededError, RtfNotAnRtfDocumentError, RtfParseError, RtfUnsupportedDocumentKindError, RtfWriteError };
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
//#region src/diagnostics.ts
|
|
2
|
+
const NOOP_RTF_DIAGNOSTIC_SINK = () => {};
|
|
3
|
+
const RtfDiagnosticCodes = {
|
|
4
|
+
UNBALANCED_GROUP: "rtf/unbalanced-group",
|
|
5
|
+
UNKNOWN_DESTINATION_SKIPPED: "rtf/unknown-destination-skipped",
|
|
6
|
+
CONTENT_DESTINATION_SKIPPED: "rtf/content-destination-skipped",
|
|
7
|
+
UNSUPPORTED_CODEPAGE: "rtf/unsupported-codepage",
|
|
8
|
+
UNSUPPORTED_PICTURE_FORMAT: "rtf/unsupported-picture-format",
|
|
9
|
+
PICTURE_SIZE_UNSTATED: "rtf/picture-size-unstated",
|
|
10
|
+
TABLE_ROW_WITHOUT_DEFINITION: "rtf/table-row-without-definition",
|
|
11
|
+
TABLE_COLUMN_WIDTH_INVALID: "rtf/table-column-width-invalid",
|
|
12
|
+
NESTED_TABLE_FLATTENED: "rtf/nested-table-flattened",
|
|
13
|
+
SECTION_BREAK_UNREPRESENTED: "rtf/section-break-unrepresented",
|
|
14
|
+
BOOKMARK_UNPAIRED: "rtf/bookmark-unpaired",
|
|
15
|
+
CONSTRUCT_UNREPRESENTED: "rtf/construct-unrepresented",
|
|
16
|
+
EMBEDDED_OBJECT_DROPPED: "rtf/embedded-object-dropped",
|
|
17
|
+
PACKAGE_TABLE_DROPPED: "rtf/package-table-dropped"
|
|
18
|
+
};
|
|
19
|
+
var RtfParseError = class extends Error {
|
|
20
|
+
code;
|
|
21
|
+
constructor(code, message) {
|
|
22
|
+
super(message);
|
|
23
|
+
this.name = "RtfParseError";
|
|
24
|
+
this.code = code;
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
var RtfNotAnRtfDocumentError = class extends RtfParseError {
|
|
28
|
+
constructor(message = "input does not begin with '{\\rtf'") {
|
|
29
|
+
super("rtf/not-an-rtf-document", message);
|
|
30
|
+
this.name = "RtfNotAnRtfDocumentError";
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
var RtfInputTooLargeError = class extends RtfParseError {
|
|
34
|
+
byteLength;
|
|
35
|
+
maxInputBytes;
|
|
36
|
+
constructor(byteLength, maxInputBytes) {
|
|
37
|
+
super("rtf/input-too-large", `input is ${String(byteLength)} bytes, over the ${String(maxInputBytes)}-byte limit`);
|
|
38
|
+
this.name = "RtfInputTooLargeError";
|
|
39
|
+
this.byteLength = byteLength;
|
|
40
|
+
this.maxInputBytes = maxInputBytes;
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
var RtfNestingLimitExceededError = class extends RtfParseError {
|
|
44
|
+
maxGroupDepth;
|
|
45
|
+
constructor(maxGroupDepth) {
|
|
46
|
+
super("rtf/nesting-limit-exceeded", `group nesting exceeded the ${String(maxGroupDepth)}-level limit`);
|
|
47
|
+
this.name = "RtfNestingLimitExceededError";
|
|
48
|
+
this.maxGroupDepth = maxGroupDepth;
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
var RtfWriteError = class extends Error {
|
|
52
|
+
code;
|
|
53
|
+
constructor(code, message) {
|
|
54
|
+
super(message);
|
|
55
|
+
this.name = "RtfWriteError";
|
|
56
|
+
this.code = code;
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
var RtfUnsupportedDocumentKindError = class extends RtfWriteError {
|
|
60
|
+
documentKind;
|
|
61
|
+
constructor(documentKind) {
|
|
62
|
+
super("rtf/unsupported-document-kind", `RTF is a wordprocessing format; a '${documentKind}' ContentDocument has no RTF representation`);
|
|
63
|
+
this.name = "RtfUnsupportedDocumentKindError";
|
|
64
|
+
this.documentKind = documentKind;
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
//#endregion
|
|
68
|
+
export { NOOP_RTF_DIAGNOSTIC_SINK, RtfDiagnosticCodes, RtfInputTooLargeError, RtfNestingLimitExceededError, RtfNotAnRtfDocumentError, RtfParseError, RtfUnsupportedDocumentKindError, RtfWriteError };
|
package/dist/group.cjs
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
//#region src/group.ts
|
|
3
|
+
function matchingGroupEnd(tokens, start) {
|
|
4
|
+
let depth = 0;
|
|
5
|
+
for (let index = start; index < tokens.length; index += 1) {
|
|
6
|
+
const kind = tokens[index]?.kind;
|
|
7
|
+
if (kind === "groupStart") {
|
|
8
|
+
depth += 1;
|
|
9
|
+
continue;
|
|
10
|
+
}
|
|
11
|
+
if (kind === "groupEnd") {
|
|
12
|
+
depth -= 1;
|
|
13
|
+
if (depth === 0) return index;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
return tokens.length;
|
|
17
|
+
}
|
|
18
|
+
function groupHead(tokens, start) {
|
|
19
|
+
let cursor = start + 1;
|
|
20
|
+
let ignorable = false;
|
|
21
|
+
const first = tokens[cursor];
|
|
22
|
+
if (first?.kind === "controlSymbol" && first.symbol === "*") {
|
|
23
|
+
ignorable = true;
|
|
24
|
+
cursor += 1;
|
|
25
|
+
}
|
|
26
|
+
const head = tokens[cursor];
|
|
27
|
+
if (head?.kind !== "controlWord") return {
|
|
28
|
+
destination: void 0,
|
|
29
|
+
ignorable,
|
|
30
|
+
contentStart: cursor
|
|
31
|
+
};
|
|
32
|
+
return {
|
|
33
|
+
destination: head.name,
|
|
34
|
+
ignorable,
|
|
35
|
+
contentStart: cursor + 1
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
//#endregion
|
|
39
|
+
exports.groupHead = groupHead;
|
|
40
|
+
exports.matchingGroupEnd = matchingGroupEnd;
|
package/dist/group.d.cts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { RtfToken } from "./tokenize.cjs";
|
|
2
|
+
//#region src/group.d.ts
|
|
3
|
+
interface GroupHead {
|
|
4
|
+
readonly destination: string | undefined;
|
|
5
|
+
readonly ignorable: boolean;
|
|
6
|
+
readonly contentStart: number;
|
|
7
|
+
}
|
|
8
|
+
declare function matchingGroupEnd(tokens: readonly RtfToken[], start: number): number;
|
|
9
|
+
declare function groupHead(tokens: readonly RtfToken[], start: number): GroupHead;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { GroupHead, groupHead, matchingGroupEnd };
|
package/dist/group.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { RtfToken } from "./tokenize.js";
|
|
2
|
+
//#region src/group.d.ts
|
|
3
|
+
interface GroupHead {
|
|
4
|
+
readonly destination: string | undefined;
|
|
5
|
+
readonly ignorable: boolean;
|
|
6
|
+
readonly contentStart: number;
|
|
7
|
+
}
|
|
8
|
+
declare function matchingGroupEnd(tokens: readonly RtfToken[], start: number): number;
|
|
9
|
+
declare function groupHead(tokens: readonly RtfToken[], start: number): GroupHead;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { GroupHead, groupHead, matchingGroupEnd };
|
package/dist/group.js
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
//#region src/group.ts
|
|
2
|
+
function matchingGroupEnd(tokens, start) {
|
|
3
|
+
let depth = 0;
|
|
4
|
+
for (let index = start; index < tokens.length; index += 1) {
|
|
5
|
+
const kind = tokens[index]?.kind;
|
|
6
|
+
if (kind === "groupStart") {
|
|
7
|
+
depth += 1;
|
|
8
|
+
continue;
|
|
9
|
+
}
|
|
10
|
+
if (kind === "groupEnd") {
|
|
11
|
+
depth -= 1;
|
|
12
|
+
if (depth === 0) return index;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
return tokens.length;
|
|
16
|
+
}
|
|
17
|
+
function groupHead(tokens, start) {
|
|
18
|
+
let cursor = start + 1;
|
|
19
|
+
let ignorable = false;
|
|
20
|
+
const first = tokens[cursor];
|
|
21
|
+
if (first?.kind === "controlSymbol" && first.symbol === "*") {
|
|
22
|
+
ignorable = true;
|
|
23
|
+
cursor += 1;
|
|
24
|
+
}
|
|
25
|
+
const head = tokens[cursor];
|
|
26
|
+
if (head?.kind !== "controlWord") return {
|
|
27
|
+
destination: void 0,
|
|
28
|
+
ignorable,
|
|
29
|
+
contentStart: cursor
|
|
30
|
+
};
|
|
31
|
+
return {
|
|
32
|
+
destination: head.name,
|
|
33
|
+
ignorable,
|
|
34
|
+
contentStart: cursor + 1
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
//#endregion
|
|
38
|
+
export { groupHead, matchingGroupEnd };
|