From 5cc8c1875a21bfb398e6685b03a29d6ba1cbf74a Mon Sep 17 00:00:00 2001 From: Sam Atman Date: Tue, 13 May 2025 17:19:56 -0400 Subject: Hooked up break test, some bugs squashed The handling of ignorables is really different, because they 'adhere' to the future of the iteration, not the past. --- src/code_point.zig | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'src/code_point.zig') diff --git a/src/code_point.zig b/src/code_point.zig index a5b10d4..ba0b434 100644 --- a/src/code_point.zig +++ b/src/code_point.zig @@ -53,22 +53,12 @@ pub fn decodeAtCursor(bytes: []const u8, cursor: *u32) ?CodePoint { }; // Multibyte -<<<<<<< HEAD // Second: var class: u4 = @intCast(u8dfa[byte]); var st: u32 = state_dfa[class]; if (st == RUNE_REJECT or cursor.* == bytes.len) { @branchHint(.cold); // First one is never a truncation -||||||| parent of ad4b046 (Various small iterator improvements) - // Return replacement if we don' have a complete codepoint remaining. Consumes only one byte - if (cp.len > bytes.len) { - // Unicode replacement code point. -======= - // Return replacement if we don't have a complete codepoint remaining. Consumes only one byte. - if (cp.len > bytes.len) { - // Unicode replacement code point. ->>>>>>> ad4b046 (Various small iterator improvements) return .{ .code = 0xfffd, .len = 1, -- cgit v1.2.3