Skip to content

Conversation

@pauloamed
Copy link
Contributor

No description provided.

@pauloamed pauloamed marked this pull request as draft July 10, 2025 11:04

namespace Karm::Icu {

usize const PLANE_SIZE = 65536; // 2^16
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove?

import requests

UNICODE_MAX = 0x10FFFF
BLOCK_SIZE = 128
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

better naming

@@ -0,0 +1,128 @@
BRACKET(0x0028,0x0029,'o')
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add script that generated this file

namespace Karm::Icu {

test$("bidi") {
Slice<char> strip(Slice<char> row) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move this to somewhere else?

testCount++;
}

if(testCount != 91707) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

91707 = EXPECTED_TEST_COUNT

return isIsolateInitiator(type) or type == BidiType::PDI or type == BidiType::B or type == BidiType::S or type == BidiType::WS or type == BidiType::ON;
}

Rune getPairedBracket(Rune r) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move this to ucd.cpp

return level + 2;
};

auto incrementOverflowEmbeddingCountIfOverFlowIsolateCountZero = [&]() {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

overkill to have this as a separate lambda?

return levels;
}

inline bool removeDueToX9(BidiType c) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is not super consistent with the implementation notes

// https://unicode.org/reports/tr9/#BD13
struct IsolatingRunSequence {
Vec<urange> levelRuns;
BidiType sos = BidiType::L; //< Start-of-sequence type (L or R)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this comment, spec should be enough

// https://unicode.org/reports/tr9/#Resolving_Weak_Types
void resolveWeakTypes(MutSlice<BidiType> paragraph, IsolatingRunSequence const& isolatingRunSequence) {
// W1. Examine each nonspacing mark (NSM) in the isolating run sequence, ...
// could be an OPT
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove


BidiType applyNeutralTypesScopeChanges(BidiType type) {
// Within this scope, bidirectional types EN and AN are treated as R.
if (type == BidiType::R or type == BidiType::AN or type == BidiType::EN)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need to check for R

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant