@tiqian/protocol 0.0.0-stage → 0.1.0-alpha.9
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/dist/haxe/crypto/Sha256.d.ts +19 -0
- package/dist/haxe/crypto/Sha256.js +194 -0
- package/dist/org/tiqian/clreq/AdjustmentStylePolicy.d.ts +11 -0
- package/dist/org/tiqian/clreq/AdjustmentStylePolicy.js +21 -0
- package/dist/org/tiqian/clreq/AutoSpaceMode.d.ts +16 -0
- package/dist/org/tiqian/clreq/AutoSpaceMode.js +17 -0
- package/dist/org/tiqian/clreq/AutoSpacePolicy.d.ts +13 -0
- package/dist/org/tiqian/clreq/AutoSpacePolicy.js +23 -0
- package/dist/org/tiqian/clreq/BopomofoReading.d.ts +12 -0
- package/dist/org/tiqian/clreq/BopomofoReading.js +86 -0
- package/dist/org/tiqian/clreq/BopomofoTone.d.ts +28 -0
- package/dist/org/tiqian/clreq/BopomofoTone.js +26 -0
- package/dist/org/tiqian/clreq/CjkPunctuationGlyphPolicy.d.ts +16 -0
- package/dist/org/tiqian/clreq/CjkPunctuationGlyphPolicy.js +17 -0
- package/dist/org/tiqian/clreq/ClreqProfile.d.ts +27 -0
- package/dist/org/tiqian/clreq/ClreqProfile.js +58 -0
- package/dist/org/tiqian/clreq/ClreqRegion.d.ts +20 -0
- package/dist/org/tiqian/clreq/ClreqRegion.js +20 -0
- package/dist/org/tiqian/clreq/ClreqStrictness.d.ts +16 -0
- package/dist/org/tiqian/clreq/ClreqStrictness.js +17 -0
- package/dist/org/tiqian/clreq/GlueSide.d.ts +16 -0
- package/dist/org/tiqian/clreq/GlueSide.js +17 -0
- package/dist/org/tiqian/clreq/HangingPunctuationStyle.d.ts +12 -0
- package/dist/org/tiqian/clreq/HangingPunctuationStyle.js +14 -0
- package/dist/org/tiqian/clreq/InteriorPunctuationStyle.d.ts +12 -0
- package/dist/org/tiqian/clreq/InteriorPunctuationStyle.js +14 -0
- package/dist/org/tiqian/clreq/KinsokuLevel.d.ts +20 -0
- package/dist/org/tiqian/clreq/KinsokuLevel.js +20 -0
- package/dist/org/tiqian/clreq/KinsokuMode.d.ts +14 -0
- package/dist/org/tiqian/clreq/KinsokuMode.js +2 -0
- package/dist/org/tiqian/clreq/KinsokuModes.d.ts +11 -0
- package/dist/org/tiqian/clreq/KinsokuModes.js +71 -0
- package/dist/org/tiqian/clreq/LineAdjustmentStrategy.d.ts +16 -0
- package/dist/org/tiqian/clreq/LineAdjustmentStrategy.js +17 -0
- package/dist/org/tiqian/clreq/LineEndPunctuationStyle.d.ts +12 -0
- package/dist/org/tiqian/clreq/LineEndPunctuationStyle.js +14 -0
- package/dist/org/tiqian/clreq/PunctuationClass.d.ts +44 -0
- package/dist/org/tiqian/clreq/PunctuationClass.js +38 -0
- package/dist/org/tiqian/clreq/PunctuationGluePlacement.d.ts +12 -0
- package/dist/org/tiqian/clreq/PunctuationGluePlacement.js +14 -0
- package/dist/org/tiqian/clreq/PunctuationGluePlacements.d.ts +9 -0
- package/dist/org/tiqian/clreq/PunctuationGluePlacements.js +49 -0
- package/dist/org/tiqian/clreq/PunctuationWidthPolicy.d.ts +8 -0
- package/dist/org/tiqian/clreq/PunctuationWidthPolicy.js +16 -0
- package/dist/org/tiqian/clreq/ResolvedKinsoku.d.ts +12 -0
- package/dist/org/tiqian/clreq/ResolvedKinsoku.js +43 -0
- package/dist/org/tiqian/core/Cluster.d.ts +13 -0
- package/dist/org/tiqian/core/Cluster.js +24 -0
- package/dist/org/tiqian/core/EastAsianSpacingData.d.ts +4 -0
- package/dist/org/tiqian/core/EastAsianSpacingData.js +399 -0
- package/dist/org/tiqian/core/EastAsianSpacingEdges.d.ts +8 -0
- package/dist/org/tiqian/core/EastAsianSpacingEdges.js +14 -0
- package/dist/org/tiqian/core/EastAsianSpacingValue.d.ts +20 -0
- package/dist/org/tiqian/core/EastAsianSpacingValue.js +20 -0
- package/dist/org/tiqian/core/Ic.d.ts +7 -0
- package/dist/org/tiqian/core/Ic.js +17 -0
- package/dist/org/tiqian/core/IllegalStateException.d.ts +4 -0
- package/dist/org/tiqian/core/IllegalStateException.js +8 -0
- package/dist/org/tiqian/core/IntRange.d.ts +12 -0
- package/dist/org/tiqian/core/IntRange.js +30 -0
- package/dist/org/tiqian/core/LineEndReason.d.ts +16 -0
- package/dist/org/tiqian/core/LineEndReason.js +17 -0
- package/dist/org/tiqian/core/SourceBoundaryBias.d.ts +16 -0
- package/dist/org/tiqian/core/SourceBoundaryBias.js +17 -0
- package/dist/org/tiqian/core/SourceInteractionBoundaries.d.ts +29 -0
- package/dist/org/tiqian/core/SourceInteractionBoundaries.js +193 -0
- package/dist/org/tiqian/core/TextRange.d.ts +11 -0
- package/dist/org/tiqian/core/TextRange.js +40 -0
- package/dist/org/tiqian/core/TextRangeError.d.ts +11 -0
- package/dist/org/tiqian/core/TextRangeError.js +2 -0
- package/dist/org/tiqian/core/TiqianIllegalArgumentException.d.ts +6 -0
- package/dist/org/tiqian/core/TiqianIllegalArgumentException.js +21 -0
- package/dist/org/tiqian/core/TiqianNoSuchElementException.d.ts +10 -0
- package/dist/org/tiqian/core/TiqianNoSuchElementException.js +16 -0
- package/dist/org/tiqian/core/UnicodeCombiningMarkData.d.ts +3 -0
- package/dist/org/tiqian/core/UnicodeCombiningMarkData.js +109 -0
- package/dist/org/tiqian/core/UnicodeEastAsianSpacing.d.ts +16 -0
- package/dist/org/tiqian/core/UnicodeEastAsianSpacing.js +88 -0
- package/dist/org/tiqian/core/UnicodeEmojiModifierBaseData.d.ts +3 -0
- package/dist/org/tiqian/core/UnicodeEmojiModifierBaseData.js +35 -0
- package/dist/org/tiqian/core/UnicodeExtendedPictographicData.d.ts +3 -0
- package/dist/org/tiqian/core/UnicodeExtendedPictographicData.js +64 -0
- package/dist/org/tiqian/core/UnicodeNumber.d.ts +3 -0
- package/dist/org/tiqian/core/UnicodeNumber.js +14 -0
- package/dist/org/tiqian/core/UnicodeNumberData.d.ts +3 -0
- package/dist/org/tiqian/core/UnicodeNumberData.js +64 -0
- package/dist/org/tiqian/core/UnicodeScriptEvidence.d.ts +16 -0
- package/dist/org/tiqian/core/UnicodeScriptEvidence.js +17 -0
- package/dist/org/tiqian/core/UnicodeScriptEvidenceClassifier.d.ts +7 -0
- package/dist/org/tiqian/core/UnicodeScriptEvidenceClassifier.js +17 -0
- package/dist/org/tiqian/core/UnicodeScriptEvidenceData.d.ts +4 -0
- package/dist/org/tiqian/core/UnicodeScriptEvidenceData.js +295 -0
- package/dist/org/tiqian/core/UnicodeWordCharacter.d.ts +6 -0
- package/dist/org/tiqian/core/UnicodeWordCharacter.js +17 -0
- package/dist/org/tiqian/core/UnicodeWordCharacterData.d.ts +3 -0
- package/dist/org/tiqian/core/UnicodeWordCharacterData.js +234 -0
- package/dist/org/tiqian/font/FontRole.d.ts +28 -0
- package/dist/org/tiqian/font/FontRole.js +26 -0
- package/dist/org/tiqian/font/FontRoleContext.d.ts +13 -0
- package/dist/org/tiqian/font/FontRoleContext.js +28 -0
- package/dist/org/tiqian/layout/ContextualQuoteRoleResolver.d.ts +51 -0
- package/dist/org/tiqian/layout/ContextualQuoteRoleResolver.js +305 -0
- package/dist/org/tiqian/layout/LineOptimization.d.ts +124 -0
- package/dist/org/tiqian/layout/LineOptimization.js +298 -0
- package/dist/org/tiqian/layout/ProgressiveBreakDecisions.d.ts +86 -0
- package/dist/org/tiqian/layout/ProgressiveBreakDecisions.js +415 -0
- package/dist/org/tiqian/layout/ProgressiveBreakTierPriority.d.ts +5 -0
- package/dist/org/tiqian/layout/ProgressiveBreakTierPriority.js +33 -0
- package/dist/org/tiqian/layout/QuotePairAnalyzer.d.ts +63 -0
- package/dist/org/tiqian/layout/QuotePairAnalyzer.js +251 -0
- package/dist/org/tiqian/linebreak/BreakKind.d.ts +20 -0
- package/dist/org/tiqian/linebreak/BreakKind.js +20 -0
- package/dist/org/tiqian/protocol/Canonical.d.ts +55 -0
- package/dist/org/tiqian/protocol/Canonical.js +471 -0
- package/dist/org/tiqian/protocol/DecorationInput.d.ts +6 -0
- package/dist/org/tiqian/protocol/DecorationInput.js +12 -0
- package/dist/org/tiqian/protocol/EncodeResult.d.ts +9 -0
- package/dist/org/tiqian/protocol/EncodeResult.js +2 -0
- package/dist/org/tiqian/protocol/FaceInfo.d.ts +13 -0
- package/dist/org/tiqian/protocol/FaceInfo.js +2 -0
- package/dist/org/tiqian/protocol/FontContract.d.ts +25 -0
- package/dist/org/tiqian/protocol/FontContract.js +317 -0
- package/dist/org/tiqian/protocol/FontFaceRecord.d.ts +6 -0
- package/dist/org/tiqian/protocol/FontFaceRecord.js +2 -0
- package/dist/org/tiqian/protocol/FontFaceSpec.d.ts +11 -0
- package/dist/org/tiqian/protocol/FontFaceSpec.js +2 -0
- package/dist/org/tiqian/protocol/FontWeightSpec.d.ts +10 -0
- package/dist/org/tiqian/protocol/FontWeightSpec.js +2 -0
- package/dist/org/tiqian/protocol/InlineBoxInput.d.ts +7 -0
- package/dist/org/tiqian/protocol/InlineBoxInput.js +2 -0
- package/dist/org/tiqian/protocol/InlineObjectInput.d.ts +7 -0
- package/dist/org/tiqian/protocol/InlineObjectInput.js +2 -0
- package/dist/org/tiqian/protocol/JsCoerce.d.ts +19 -0
- package/dist/org/tiqian/protocol/JsCoerce.js +394 -0
- package/dist/org/tiqian/protocol/LayoutAttribute.d.ts +5 -0
- package/dist/org/tiqian/protocol/LayoutAttribute.js +10 -0
- package/dist/org/tiqian/protocol/LayoutFloatShape.d.ts +14 -0
- package/dist/org/tiqian/protocol/LayoutFloatShape.js +2 -0
- package/dist/org/tiqian/protocol/LayoutTree.d.ts +23 -0
- package/dist/org/tiqian/protocol/LayoutTree.js +2 -0
- package/dist/org/tiqian/protocol/LayoutVertex.d.ts +4 -0
- package/dist/org/tiqian/protocol/LayoutVertex.js +2 -0
- package/dist/org/tiqian/protocol/LineBreakSpanInput.d.ts +6 -0
- package/dist/org/tiqian/protocol/LineBreakSpanInput.js +12 -0
- package/dist/org/tiqian/protocol/MetricEntry.d.ts +11 -0
- package/dist/org/tiqian/protocol/MetricEntry.js +21 -0
- package/dist/org/tiqian/protocol/NamedError.d.ts +88 -0
- package/dist/org/tiqian/protocol/NamedError.js +71 -0
- package/dist/org/tiqian/protocol/NamedErrorNames.d.ts +5 -0
- package/dist/org/tiqian/protocol/NamedErrorNames.js +53 -0
- package/dist/org/tiqian/protocol/ParagraphRequest.d.ts +25 -0
- package/dist/org/tiqian/protocol/ParagraphRequest.js +2 -0
- package/dist/org/tiqian/protocol/ParagraphRequestChecks.d.ts +8 -0
- package/dist/org/tiqian/protocol/ParagraphRequestChecks.js +145 -0
- package/dist/org/tiqian/protocol/ParagraphRequestException.d.ts +6 -0
- package/dist/org/tiqian/protocol/ParagraphRequestException.js +55 -0
- package/dist/org/tiqian/protocol/ParagraphRequestFields.d.ts +3 -0
- package/dist/org/tiqian/protocol/ParagraphRequestFields.js +4 -0
- package/dist/org/tiqian/protocol/Plan.d.ts +101 -0
- package/dist/org/tiqian/protocol/Plan.js +10 -0
- package/dist/org/tiqian/protocol/PlanEndReason.d.ts +16 -0
- package/dist/org/tiqian/protocol/PlanEndReason.js +17 -0
- package/dist/org/tiqian/protocol/PlanJsonNumber.d.ts +43 -0
- package/dist/org/tiqian/protocol/PlanJsonNumber.js +362 -0
- package/dist/org/tiqian/protocol/PlanSchema.d.ts +4 -0
- package/dist/org/tiqian/protocol/PlanSchema.js +5 -0
- package/dist/org/tiqian/protocol/PlanStyleDelta.d.ts +5 -0
- package/dist/org/tiqian/protocol/PlanStyleDelta.js +2 -0
- package/dist/org/tiqian/protocol/Revision.d.ts +11 -0
- package/dist/org/tiqian/protocol/Revision.js +12 -0
- package/dist/org/tiqian/protocol/SessionFaceSpec.d.ts +5 -0
- package/dist/org/tiqian/protocol/SessionFaceSpec.js +2 -0
- package/dist/org/tiqian/protocol/SnapshotTableBinary.d.ts +55 -0
- package/dist/org/tiqian/protocol/SnapshotTableBinary.js +657 -0
- package/dist/org/tiqian/protocol/SnapshotTypography.d.ts +14 -0
- package/dist/org/tiqian/protocol/SnapshotTypography.js +2 -0
- package/dist/org/tiqian/protocol/StyleRow.d.ts +8 -0
- package/dist/org/tiqian/protocol/StyleRow.js +15 -0
- package/dist/org/tiqian/protocol/TableData.d.ts +25 -0
- package/dist/org/tiqian/protocol/TableData.js +45 -0
- package/dist/org/tiqian/protocol/TableInput.d.ts +13 -0
- package/dist/org/tiqian/protocol/TableInput.js +21 -0
- package/dist/org/tiqian/protocol/TableMetricRow.d.ts +9 -0
- package/dist/org/tiqian/protocol/TableMetricRow.js +17 -0
- package/dist/org/tiqian/protocol/TableProbe.d.ts +11 -0
- package/dist/org/tiqian/protocol/TableProbe.js +21 -0
- package/dist/org/tiqian/protocol/TextSpanInput.d.ts +9 -0
- package/dist/org/tiqian/protocol/TextSpanInput.js +2 -0
- package/dist/org/tiqian/protocol/ValueRow.d.ts +4 -0
- package/dist/org/tiqian/protocol/ValueRow.js +7 -0
- package/dist/org/tiqian/protocol/WireField.d.ts +5 -0
- package/dist/org/tiqian/protocol/WireField.js +2 -0
- package/dist/org/tiqian/protocol/WireValue.d.ts +25 -0
- package/dist/org/tiqian/protocol/WireValue.js +2 -0
- package/dist/org/tiqian/test/TestHelpers.d.ts +5 -0
- package/dist/org/tiqian/test/TestHelpers.js +27 -0
- package/dist/org/tiqian/test/trace/TestTrace.d.ts +6 -0
- package/dist/org/tiqian/test/trace/TestTrace.js +8 -0
- package/dist/org/tiqian/test/trace/TestTracePlatform.d.ts +6 -0
- package/dist/org/tiqian/test/trace/TestTracePlatform.js +78 -0
- package/dist/org/tiqian/test/trace/TestTraceRecorder.d.ts +9 -0
- package/dist/org/tiqian/test/trace/TestTraceRecorder.js +36 -0
- package/dist/org/tiqian/test/trace/TestTraceRender.d.ts +47 -0
- package/dist/org/tiqian/test/trace/TestTraceRender.js +690 -0
- package/dist/org/tiqian/test/trace/TestTraceStore.d.ts +18 -0
- package/dist/org/tiqian/test/trace/TestTraceStore.js +149 -0
- package/dist/org/tiqian/test/trace/TraceAssertionError.d.ts +5 -0
- package/dist/org/tiqian/test/trace/TraceAssertionError.js +2 -0
- package/dist/org/tiqian/test/trace/TraceAssertionException.d.ts +6 -0
- package/dist/org/tiqian/test/trace/TraceAssertionException.js +16 -0
- package/dist/org/tiqian/test/trace/TraceField.d.ts +5 -0
- package/dist/org/tiqian/test/trace/TraceField.js +10 -0
- package/dist/org/tiqian/test/trace/TraceFormat.d.ts +21 -0
- package/dist/org/tiqian/test/trace/TraceFormat.js +184 -0
- package/dist/org/tiqian/test/trace/TracedAssertions.d.ts +78 -0
- package/dist/org/tiqian/test/trace/TracedAssertions.js +749 -0
- package/dist/runtime.d.ts +96 -0
- package/dist/runtime.js +1612 -0
- package/dist/std/FsError.d.ts +48 -0
- package/dist/std/FsError.js +2 -0
- package/dist/std/FsException.d.ts +6 -0
- package/dist/std/FsException.js +45 -0
- package/dist/std/UStringException.d.ts +6 -0
- package/dist/std/UStringException.js +21 -0
- package/dist/std/UStringFault.d.ts +9 -0
- package/dist/std/UStringFault.js +2 -0
- package/package.json +26 -4
- package/README.md +0 -3
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare class TraceSectionState {
|
|
2
|
+
readonly name: string;
|
|
3
|
+
lines: string[];
|
|
4
|
+
constructor(name: string);
|
|
5
|
+
}
|
|
6
|
+
export declare class TraceClassState {
|
|
7
|
+
readonly className: string;
|
|
8
|
+
readonly sections: TraceSectionState[];
|
|
9
|
+
constructor(className: string);
|
|
10
|
+
}
|
|
11
|
+
export declare class TestTraceStore {
|
|
12
|
+
private static readonly classes;
|
|
13
|
+
static open(className: string, sectionName: string): void;
|
|
14
|
+
static append(className: string, sectionName: string, line: string): void;
|
|
15
|
+
static classText(className: string): string;
|
|
16
|
+
private static findClass;
|
|
17
|
+
private static findSection;
|
|
18
|
+
}
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
// Generated by the reflaxe TypeScript target. Do not edit.
|
|
2
|
+
import { UStringException } from "./../../../../std/UStringException.js";
|
|
3
|
+
export class TraceSectionState {
|
|
4
|
+
name;
|
|
5
|
+
lines;
|
|
6
|
+
constructor(name) {
|
|
7
|
+
this.name = name;
|
|
8
|
+
this.lines = [];
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
export class TraceClassState {
|
|
12
|
+
className;
|
|
13
|
+
sections;
|
|
14
|
+
constructor(className) {
|
|
15
|
+
this.className = className;
|
|
16
|
+
this.sections = [];
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
export class TestTraceStore {
|
|
20
|
+
static classes = [];
|
|
21
|
+
static open(className, sectionName) {
|
|
22
|
+
let classState = TestTraceStore.findClass(className);
|
|
23
|
+
if (classState === null) {
|
|
24
|
+
classState = new TraceClassState(className);
|
|
25
|
+
TestTraceStore.classes.push((classState));
|
|
26
|
+
}
|
|
27
|
+
const section = TestTraceStore.findSection((classState), sectionName);
|
|
28
|
+
if (section === null) {
|
|
29
|
+
classState.sections.push(new TraceSectionState(sectionName));
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
static append(className, sectionName, line) {
|
|
33
|
+
const classState = TestTraceStore.findClass(className);
|
|
34
|
+
if (classState === null) {
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
const section = TestTraceStore.findSection((classState), sectionName);
|
|
38
|
+
if (section === null) {
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
const tail = section.lines.length > 0 ? section.lines[section.lines.length - 1].charCodeAt(section.lines[section.lines.length - 1].length - 1) : NaN;
|
|
42
|
+
if (tail >= 55296 && tail <= 56319 && line.length > 0 && !(line.charCodeAt(0) >= 56320 && line.charCodeAt(0) <= 57343)) {
|
|
43
|
+
throw new UStringException({ kind: "UnpairedSurrogate", unit: tail });
|
|
44
|
+
}
|
|
45
|
+
if (line.length > 0) {
|
|
46
|
+
section.lines.push(line);
|
|
47
|
+
}
|
|
48
|
+
const tail2 = section.lines.length > 0 ? section.lines[section.lines.length - 1].charCodeAt(section.lines[section.lines.length - 1].length - 1) : NaN;
|
|
49
|
+
if (tail2 >= 55296 && tail2 <= 56319) {
|
|
50
|
+
throw new UStringException({ kind: "UnpairedSurrogate", unit: tail2 });
|
|
51
|
+
}
|
|
52
|
+
section.lines.push("\n");
|
|
53
|
+
}
|
|
54
|
+
static classText(className) {
|
|
55
|
+
const classState = TestTraceStore.findClass(className);
|
|
56
|
+
if (classState === null) {
|
|
57
|
+
return `class: ${className}\n`;
|
|
58
|
+
}
|
|
59
|
+
let output = [];
|
|
60
|
+
const tail3 = output.length > 0 ? output[output.length - 1].charCodeAt(output[output.length - 1].length - 1) : NaN;
|
|
61
|
+
if (tail3 >= 55296 && tail3 <= 56319) {
|
|
62
|
+
throw new UStringException({ kind: "UnpairedSurrogate", unit: tail3 });
|
|
63
|
+
}
|
|
64
|
+
output.push("class: ");
|
|
65
|
+
const tail4 = output.length > 0 ? output[output.length - 1].charCodeAt(output[output.length - 1].length - 1) : NaN;
|
|
66
|
+
if (tail4 >= 55296 && tail4 <= 56319 && className.length > 0 && !(className.charCodeAt(0) >= 56320 && className.charCodeAt(0) <= 57343)) {
|
|
67
|
+
throw new UStringException({ kind: "UnpairedSurrogate", unit: tail4 });
|
|
68
|
+
}
|
|
69
|
+
if (className.length > 0) {
|
|
70
|
+
output.push(className);
|
|
71
|
+
}
|
|
72
|
+
const tail5 = output.length > 0 ? output[output.length - 1].charCodeAt(output[output.length - 1].length - 1) : NaN;
|
|
73
|
+
if (tail5 >= 55296 && tail5 <= 56319) {
|
|
74
|
+
throw new UStringException({ kind: "UnpairedSurrogate", unit: tail5 });
|
|
75
|
+
}
|
|
76
|
+
output.push("\n");
|
|
77
|
+
const order = new Array();
|
|
78
|
+
let index = 0;
|
|
79
|
+
while (index < classState.sections.length) {
|
|
80
|
+
let insertion = order.length;
|
|
81
|
+
while (insertion > 0 && classState.sections[order[insertion - 1]].name > classState.sections[index].name) {
|
|
82
|
+
insertion -= 1;
|
|
83
|
+
}
|
|
84
|
+
order.splice(insertion, 0, index);
|
|
85
|
+
index += 1;
|
|
86
|
+
}
|
|
87
|
+
index = 0;
|
|
88
|
+
while (index < order.length) {
|
|
89
|
+
const section = classState.sections[order[index]];
|
|
90
|
+
const tail6 = output.length > 0 ? output[output.length - 1].charCodeAt(output[output.length - 1].length - 1) : NaN;
|
|
91
|
+
if (tail6 >= 55296 && tail6 <= 56319) {
|
|
92
|
+
throw new UStringException({ kind: "UnpairedSurrogate", unit: tail6 });
|
|
93
|
+
}
|
|
94
|
+
output.push("test: ");
|
|
95
|
+
const tail7 = output.length > 0 ? output[output.length - 1].charCodeAt(output[output.length - 1].length - 1) : NaN;
|
|
96
|
+
if (tail7 >= 55296 && tail7 <= 56319 && section.name.length > 0 && !(section.name.charCodeAt(0) >= 56320 && section.name.charCodeAt(0) <= 57343)) {
|
|
97
|
+
throw new UStringException({ kind: "UnpairedSurrogate", unit: tail7 });
|
|
98
|
+
}
|
|
99
|
+
if (section.name.length > 0) {
|
|
100
|
+
output.push(section.name);
|
|
101
|
+
}
|
|
102
|
+
const tail8 = output.length > 0 ? output[output.length - 1].charCodeAt(output[output.length - 1].length - 1) : NaN;
|
|
103
|
+
if (tail8 >= 55296 && tail8 <= 56319) {
|
|
104
|
+
throw new UStringException({ kind: "UnpairedSurrogate", unit: tail8 });
|
|
105
|
+
}
|
|
106
|
+
output.push("\n");
|
|
107
|
+
const tail9 = section.lines.length > 0 ? section.lines[section.lines.length - 1].charCodeAt(section.lines[section.lines.length - 1].length - 1) : NaN;
|
|
108
|
+
if (tail9 >= 55296 && tail9 <= 56319) {
|
|
109
|
+
throw new UStringException({ kind: "UnpairedSurrogate", unit: tail9 });
|
|
110
|
+
}
|
|
111
|
+
const sectionText = section.lines.join("");
|
|
112
|
+
if (sectionText.length > 0) {
|
|
113
|
+
const tail10 = output.length > 0 ? output[output.length - 1].charCodeAt(output[output.length - 1].length - 1) : NaN;
|
|
114
|
+
if (tail10 >= 55296 && tail10 <= 56319 && sectionText.length > 0 && !(sectionText.charCodeAt(0) >= 56320 && sectionText.charCodeAt(0) <= 57343)) {
|
|
115
|
+
throw new UStringException({ kind: "UnpairedSurrogate", unit: tail10 });
|
|
116
|
+
}
|
|
117
|
+
if (sectionText.length > 0) {
|
|
118
|
+
output.push(sectionText);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
index += 1;
|
|
122
|
+
}
|
|
123
|
+
const tail11 = output.length > 0 ? output[output.length - 1].charCodeAt(output[output.length - 1].length - 1) : NaN;
|
|
124
|
+
if (tail11 >= 55296 && tail11 <= 56319) {
|
|
125
|
+
throw new UStringException({ kind: "UnpairedSurrogate", unit: tail11 });
|
|
126
|
+
}
|
|
127
|
+
return output.join("");
|
|
128
|
+
}
|
|
129
|
+
static findClass(className) {
|
|
130
|
+
let index = 0;
|
|
131
|
+
while (index < TestTraceStore.classes.length) {
|
|
132
|
+
if (TestTraceStore.classes[index].className === className) {
|
|
133
|
+
return TestTraceStore.classes[index];
|
|
134
|
+
}
|
|
135
|
+
index += 1;
|
|
136
|
+
}
|
|
137
|
+
return null;
|
|
138
|
+
}
|
|
139
|
+
static findSection(classState, sectionName) {
|
|
140
|
+
let index = 0;
|
|
141
|
+
while (index < classState.sections.length) {
|
|
142
|
+
if (classState.sections[index].name === sectionName) {
|
|
143
|
+
return classState.sections[index];
|
|
144
|
+
}
|
|
145
|
+
index += 1;
|
|
146
|
+
}
|
|
147
|
+
return null;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type TraceAssertionError } from "./TraceAssertionError.js";
|
|
2
|
+
export declare class TraceAssertionException extends Error {
|
|
3
|
+
readonly error: TraceAssertionError;
|
|
4
|
+
constructor(error: TraceAssertionError);
|
|
5
|
+
static describe(value: TraceAssertionError): string;
|
|
6
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// Generated by the reflaxe TypeScript target. Do not edit.
|
|
2
|
+
export class TraceAssertionException extends Error {
|
|
3
|
+
error;
|
|
4
|
+
constructor(error) {
|
|
5
|
+
super(TraceAssertionException.describe(error));
|
|
6
|
+
this.name = "TraceAssertionException";
|
|
7
|
+
this.error = error;
|
|
8
|
+
}
|
|
9
|
+
static describe(value) {
|
|
10
|
+
return (() => {
|
|
11
|
+
const _g = value.message;
|
|
12
|
+
const message = _g;
|
|
13
|
+
return message;
|
|
14
|
+
})();
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// Generated by the reflaxe TypeScript target. Do not edit.
|
|
2
|
+
export function compareTraceField(a, b) {
|
|
3
|
+
if (a === b)
|
|
4
|
+
return 0;
|
|
5
|
+
if (a.key !== b.key)
|
|
6
|
+
return a.key < b.key ? -1 : 1;
|
|
7
|
+
if (a.value !== b.value)
|
|
8
|
+
return a.value < b.value ? -1 : 1;
|
|
9
|
+
return 0;
|
|
10
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export declare class TraceFormat {
|
|
2
|
+
static i(value: number): string;
|
|
3
|
+
static f(value: number): string;
|
|
4
|
+
static fd(value: number, decimals: number): string;
|
|
5
|
+
static d(value: number): string;
|
|
6
|
+
static valueString(value: string): string;
|
|
7
|
+
static valueInt(value: number): string;
|
|
8
|
+
static valueLong(value: number): string;
|
|
9
|
+
static valueFloat(value: number): string;
|
|
10
|
+
static valueDouble(value: number): string;
|
|
11
|
+
static valueBool(value: boolean): string;
|
|
12
|
+
static valueNull(): string;
|
|
13
|
+
static escapeText(value: string): string;
|
|
14
|
+
private static fixedDecimalText;
|
|
15
|
+
private static isNegative;
|
|
16
|
+
private static pow10;
|
|
17
|
+
private static scaledMagnitude;
|
|
18
|
+
private static integerPartOf;
|
|
19
|
+
private static multiply;
|
|
20
|
+
private static f32Mirror;
|
|
21
|
+
}
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
// Generated by the reflaxe TypeScript target. Do not edit.
|
|
2
|
+
import { floatToI32, formatFloatRuntime, i32ToFloat } from "../../../../runtime.js";
|
|
3
|
+
export class TraceFormat {
|
|
4
|
+
static i(value) {
|
|
5
|
+
return `${value}`;
|
|
6
|
+
}
|
|
7
|
+
static f(value) {
|
|
8
|
+
const rounded = TraceFormat.f32Mirror(value);
|
|
9
|
+
if (rounded !== rounded) {
|
|
10
|
+
return "NaN";
|
|
11
|
+
}
|
|
12
|
+
if (rounded === Infinity) {
|
|
13
|
+
return "Infinity";
|
|
14
|
+
}
|
|
15
|
+
if (rounded === -Infinity) {
|
|
16
|
+
return "-Infinity";
|
|
17
|
+
}
|
|
18
|
+
return TraceFormat.fixedDecimalText(rounded, 1);
|
|
19
|
+
}
|
|
20
|
+
static fd(value, decimals) {
|
|
21
|
+
const rounded = TraceFormat.f32Mirror(value);
|
|
22
|
+
if (rounded !== rounded) {
|
|
23
|
+
return "NaN";
|
|
24
|
+
}
|
|
25
|
+
if (rounded === Infinity) {
|
|
26
|
+
return "Infinity";
|
|
27
|
+
}
|
|
28
|
+
if (rounded === -Infinity) {
|
|
29
|
+
return "-Infinity";
|
|
30
|
+
}
|
|
31
|
+
return TraceFormat.fixedDecimalText(rounded, decimals);
|
|
32
|
+
}
|
|
33
|
+
static d(value) {
|
|
34
|
+
if (value !== value) {
|
|
35
|
+
return "NaN";
|
|
36
|
+
}
|
|
37
|
+
if (value === Infinity) {
|
|
38
|
+
return "Infinity";
|
|
39
|
+
}
|
|
40
|
+
if (value === -Infinity) {
|
|
41
|
+
return "-Infinity";
|
|
42
|
+
}
|
|
43
|
+
return TraceFormat.fixedDecimalText(value, 1);
|
|
44
|
+
}
|
|
45
|
+
static valueString(value) {
|
|
46
|
+
return `'${TraceFormat.escapeText(value)}'`;
|
|
47
|
+
}
|
|
48
|
+
static valueInt(value) {
|
|
49
|
+
return TraceFormat.i(value);
|
|
50
|
+
}
|
|
51
|
+
static valueLong(value) {
|
|
52
|
+
return `${value}`;
|
|
53
|
+
}
|
|
54
|
+
static valueFloat(value) {
|
|
55
|
+
return TraceFormat.fd(value, 1);
|
|
56
|
+
}
|
|
57
|
+
static valueDouble(value) {
|
|
58
|
+
return TraceFormat.d(value);
|
|
59
|
+
}
|
|
60
|
+
static valueBool(value) {
|
|
61
|
+
return (value ? "true" : "false");
|
|
62
|
+
}
|
|
63
|
+
static valueNull() {
|
|
64
|
+
return "-";
|
|
65
|
+
}
|
|
66
|
+
static escapeText(value) {
|
|
67
|
+
let output = "";
|
|
68
|
+
let index = 0;
|
|
69
|
+
while (index < value.length) {
|
|
70
|
+
const codeUnit = (Number.isNaN(value.charCodeAt(index)) ? null : value.charCodeAt(index));
|
|
71
|
+
if (codeUnit === 10) {
|
|
72
|
+
output += "\\n";
|
|
73
|
+
}
|
|
74
|
+
else {
|
|
75
|
+
if (codeUnit === 13) {
|
|
76
|
+
output += "\\r";
|
|
77
|
+
}
|
|
78
|
+
else {
|
|
79
|
+
if (codeUnit === 11) {
|
|
80
|
+
output += "\\v";
|
|
81
|
+
}
|
|
82
|
+
else {
|
|
83
|
+
if (codeUnit === 12) {
|
|
84
|
+
output += "\\f";
|
|
85
|
+
}
|
|
86
|
+
else {
|
|
87
|
+
if (codeUnit === 133) {
|
|
88
|
+
output += "\\u0085";
|
|
89
|
+
}
|
|
90
|
+
else {
|
|
91
|
+
if (codeUnit === 8232) {
|
|
92
|
+
output += "\\u2028";
|
|
93
|
+
}
|
|
94
|
+
else {
|
|
95
|
+
if (codeUnit === 8233) {
|
|
96
|
+
output += "\\u2029";
|
|
97
|
+
}
|
|
98
|
+
else {
|
|
99
|
+
if (codeUnit === 8203) {
|
|
100
|
+
output += "\\u200B";
|
|
101
|
+
}
|
|
102
|
+
else {
|
|
103
|
+
output += value.substring(index, index + 1);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
index += 1;
|
|
113
|
+
}
|
|
114
|
+
return output;
|
|
115
|
+
}
|
|
116
|
+
static fixedDecimalText(value, decimals) {
|
|
117
|
+
const negative = TraceFormat.isNegative(value);
|
|
118
|
+
const magnitude = Math.abs(value);
|
|
119
|
+
if (magnitude !== magnitude) {
|
|
120
|
+
return "NaN";
|
|
121
|
+
}
|
|
122
|
+
if (magnitude >= 2147483648.0) {
|
|
123
|
+
return formatFloatRuntime(value);
|
|
124
|
+
}
|
|
125
|
+
const scale = TraceFormat.pow10(decimals);
|
|
126
|
+
const rounded = TraceFormat.scaledMagnitude(magnitude, scale);
|
|
127
|
+
const integerPart = TraceFormat.integerPartOf(magnitude, rounded, scale);
|
|
128
|
+
const fractionPart = Number(BigInt.asIntN(32, BigInt.asIntN(64, rounded - TraceFormat.multiply(integerPart, scale))));
|
|
129
|
+
let fractionText = `${fractionPart}`;
|
|
130
|
+
while (fractionText.length < decimals) {
|
|
131
|
+
fractionText = `0${fractionText}`;
|
|
132
|
+
}
|
|
133
|
+
return (negative ? "-" : "") + integerPart + "." + fractionText;
|
|
134
|
+
}
|
|
135
|
+
static isNegative(value) {
|
|
136
|
+
return value < 0 || value === 0 && 1 / value < 0;
|
|
137
|
+
}
|
|
138
|
+
static pow10(decimals) {
|
|
139
|
+
let scale = 1;
|
|
140
|
+
for (let index = 0; index < decimals; index += 1) {
|
|
141
|
+
scale *= 10;
|
|
142
|
+
}
|
|
143
|
+
return scale;
|
|
144
|
+
}
|
|
145
|
+
static scaledMagnitude(magnitude, scale) {
|
|
146
|
+
const bits = floatToI32(magnitude);
|
|
147
|
+
const exponentField = (bits >>> 23) & 255;
|
|
148
|
+
const mantissaBits = bits & 8388607;
|
|
149
|
+
const mantissa = (exponentField === 0 ? mantissaBits : mantissaBits | 8388608);
|
|
150
|
+
const exponent = (exponentField === 0 ? -149 : exponentField - 150);
|
|
151
|
+
const product = TraceFormat.multiply(mantissa, scale);
|
|
152
|
+
if (exponent >= 0) {
|
|
153
|
+
return BigInt.asIntN(64, product << BigInt(exponent));
|
|
154
|
+
}
|
|
155
|
+
const divisorShift = -exponent;
|
|
156
|
+
if (divisorShift >= 64) {
|
|
157
|
+
return 0n;
|
|
158
|
+
}
|
|
159
|
+
return BigInt.asIntN(64, BigInt.asUintN(64, BigInt.asIntN(64, product + BigInt.asIntN(64, 1n << BigInt(divisorShift - 1)))) >> BigInt(divisorShift));
|
|
160
|
+
}
|
|
161
|
+
static integerPartOf(magnitude, rounded, scale) {
|
|
162
|
+
let whole = Math.trunc(Math.floor(magnitude));
|
|
163
|
+
if (rounded >= TraceFormat.multiply(whole + 1, scale)) {
|
|
164
|
+
whole += 1;
|
|
165
|
+
}
|
|
166
|
+
return whole;
|
|
167
|
+
}
|
|
168
|
+
static multiply(left, right) {
|
|
169
|
+
let product = 0n;
|
|
170
|
+
let factor = right;
|
|
171
|
+
let shift = 0;
|
|
172
|
+
while (factor > 0) {
|
|
173
|
+
if ((factor & 1) !== 0) {
|
|
174
|
+
product = BigInt.asIntN(64, product + BigInt.asIntN(64, BigInt(left) << BigInt(shift)));
|
|
175
|
+
}
|
|
176
|
+
factor = factor >> 1;
|
|
177
|
+
shift += 1;
|
|
178
|
+
}
|
|
179
|
+
return product;
|
|
180
|
+
}
|
|
181
|
+
static f32Mirror(value) {
|
|
182
|
+
return i32ToFloat(floatToI32(value));
|
|
183
|
+
}
|
|
184
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { type BopomofoReading } from "./../../clreq/BopomofoReading.js";
|
|
2
|
+
import { type BopomofoTone } from "./../../clreq/BopomofoTone.js";
|
|
3
|
+
import { ClreqProfile } from "./../../clreq/ClreqProfile.js";
|
|
4
|
+
import { type GlueSide } from "./../../clreq/GlueSide.js";
|
|
5
|
+
import { type HangingPunctuationStyle } from "./../../clreq/HangingPunctuationStyle.js";
|
|
6
|
+
import { type KinsokuLevel } from "./../../clreq/KinsokuLevel.js";
|
|
7
|
+
import { type PunctuationClass } from "./../../clreq/PunctuationClass.js";
|
|
8
|
+
import { type PunctuationGluePlacement } from "./../../clreq/PunctuationGluePlacement.js";
|
|
9
|
+
import { type EastAsianSpacingEdges } from "./../../core/EastAsianSpacingEdges.js";
|
|
10
|
+
import { type Ic } from "./../../core/Ic.js";
|
|
11
|
+
import { type IntRange } from "./../../core/IntRange.js";
|
|
12
|
+
import { type TextRange } from "./../../core/TextRange.js";
|
|
13
|
+
import { TiqianIllegalArgumentException } from "./../../core/TiqianIllegalArgumentException.js";
|
|
14
|
+
import { TiqianNoSuchElementException } from "./../../core/TiqianNoSuchElementException.js";
|
|
15
|
+
import { type FontRole } from "./../../font/FontRole.js";
|
|
16
|
+
import { type PushInAllocation, type RepairOption } from "./../../layout/LineOptimization.js";
|
|
17
|
+
import { type QuotePair, type QuoteType } from "./../../layout/QuotePairAnalyzer.js";
|
|
18
|
+
import { SortedSetTable } from "../../../../runtime.js";
|
|
19
|
+
export declare class TracedAssertions {
|
|
20
|
+
static assertEquals(expected: number, actual: number, message?: string | null): void;
|
|
21
|
+
static assertEqualsBool(expected: boolean, actual: boolean, message?: string | null): void;
|
|
22
|
+
static assertEqualsNullableRepairOption(expected: RepairOption | null, actual: RepairOption | null, message?: string | null): void;
|
|
23
|
+
static assertEqualsNullableString(expected: string | null, actual: string | null, message?: string | null): void;
|
|
24
|
+
static assertEqualsString(expected: string, actual: string, message?: string | null): void;
|
|
25
|
+
static assertEqualsIc(expected: Ic, actual: Ic, message?: string | null): void;
|
|
26
|
+
static assertEqualsEnum<T>(expected: T, actual: T, message?: string | null): void;
|
|
27
|
+
static assertEqualsEastAsianSpacingEdges(expected: EastAsianSpacingEdges, actual: EastAsianSpacingEdges, message?: string | null): void;
|
|
28
|
+
static assertEqualsIntArray(expected: readonly number[], actual: readonly number[], message?: string | null): void;
|
|
29
|
+
private static renderInts;
|
|
30
|
+
static assertEqualsStringArray(expected: readonly string[], actual: readonly string[], message?: string | null): void;
|
|
31
|
+
static assertEqualsBopomofoTone(expected: BopomofoTone, actual: BopomofoTone, message?: string | null): void;
|
|
32
|
+
static assertEqualsFontRole(expected: FontRole, actual: FontRole | null, message?: string | null): void;
|
|
33
|
+
private static renderFontRole;
|
|
34
|
+
static assertEqualsQuoteType(expected: QuoteType, actual: QuoteType, message?: string | null): void;
|
|
35
|
+
static assertEqualsQuotePair(expected: QuotePair, actual: QuotePair, message?: string | null): void;
|
|
36
|
+
private static renderQuotePairs;
|
|
37
|
+
static assertEqualsQuotePairArray(expected: QuotePair[], actual: QuotePair[], message?: string | null): void;
|
|
38
|
+
static assertEqualsNullableInt(expected: number | null, actual: number | null, message?: string | null): void;
|
|
39
|
+
static assertEqualsNullableFloat(expected: number | null, actual: number | null, message?: string | null): void;
|
|
40
|
+
static assertEqualsTextRangeArray(expected: TextRange[], actual: TextRange[], message?: string | null): void;
|
|
41
|
+
private static renderTextRangeArray;
|
|
42
|
+
static assertEqualsIntRange(expected: IntRange, actual: IntRange, message?: string | null): void;
|
|
43
|
+
private static renderIntRange;
|
|
44
|
+
static assertEqualsIntSet(expected: SortedSetTable<number>, actual: SortedSetTable<number>, message?: string | null): void;
|
|
45
|
+
private static renderIntSet;
|
|
46
|
+
static assertEqualsIntSetUnordered(expected: number[], actual: number[], message?: string | null): void;
|
|
47
|
+
private static renderIntListInGivenOrder;
|
|
48
|
+
static assertEqualsRepairOptionArray(expected: RepairOption[], actual: RepairOption[], message?: string | null): void;
|
|
49
|
+
private static renderRepairOptionList;
|
|
50
|
+
private static renderRepairOption;
|
|
51
|
+
private static renderPushInAllocations;
|
|
52
|
+
static assertEqualsPushInAllocationArray(expected: PushInAllocation[], actual: PushInAllocation[], message?: string | null): void;
|
|
53
|
+
static assertEqualsBopomofoReading(expected: BopomofoReading, actual: BopomofoReading, message?: string | null): void;
|
|
54
|
+
static assertEqualsPunctuationClass(expected: PunctuationClass, actual: PunctuationClass, message?: string | null): void;
|
|
55
|
+
static assertEqualsGlueSide(expected: GlueSide, actual: GlueSide, message?: string | null): void;
|
|
56
|
+
static assertEqualsPunctuationGluePlacement(expected: PunctuationGluePlacement, actual: PunctuationGluePlacement, message?: string | null): void;
|
|
57
|
+
static assertEqualsKinsokuLevel(expected: KinsokuLevel, actual: KinsokuLevel, message?: string | null): void;
|
|
58
|
+
static assertEqualsHangingPunctuationStyle(expected: HangingPunctuationStyle, actual: HangingPunctuationStyle, message?: string | null): void;
|
|
59
|
+
static assertEqualsClreqProfile(expected: ClreqProfile, actual: ClreqProfile, message?: string | null): void;
|
|
60
|
+
private static sameStringArray;
|
|
61
|
+
static f32Literal(value: number): number;
|
|
62
|
+
static assertEqualsFloat(expected: number, actual: number, message?: string | null): void;
|
|
63
|
+
static assertEqualsFloatTolerance(expected: number, actual: number, tolerance: number, message?: string | null): void;
|
|
64
|
+
static assertEqualsRendered(expected: string, actual: string, message?: string | null): void;
|
|
65
|
+
static assertEqualsInt(expected: number, actual: number, message?: string | null): void;
|
|
66
|
+
static assertTrue(actual: boolean, message?: string | null): void;
|
|
67
|
+
static assertFalse(actual: boolean, message?: string | null): void;
|
|
68
|
+
static assertNullRendered(wasNull: boolean, renderedActual: string, message?: string | null): void;
|
|
69
|
+
static assertNotNullRendered(wasNotNull: boolean, renderedActual: string, message?: string | null): void;
|
|
70
|
+
static recordRenderedNotNull(renderedActual: string, message?: string | null): void;
|
|
71
|
+
static assertFailsWith(message: string | null, block: () => void): TiqianIllegalArgumentException;
|
|
72
|
+
static assertFailsWithNoSuchElement(message: string | null, block: () => void): TiqianNoSuchElementException;
|
|
73
|
+
static fail(message?: string | null, _cause?: Error | null): void;
|
|
74
|
+
static assertDoesNotThrow<T>(block: () => T): T;
|
|
75
|
+
private static recordEvent;
|
|
76
|
+
private static field;
|
|
77
|
+
private static msgField;
|
|
78
|
+
}
|