From 2f02c3b16c073d0bd3d9368a66ce272a574f75a3 Mon Sep 17 00:00:00 2001 From: Jay Date: Sat, 8 Nov 2025 19:59:08 +1100 Subject: Use takeDelimiterInclusive to support Zig 0.15.2 --- codegen/gbp.zig | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'codegen/gbp.zig') diff --git a/codegen/gbp.zig b/codegen/gbp.zig index 895aa7a..1d06e9a 100644 --- a/codegen/gbp.zig +++ b/codegen/gbp.zig @@ -65,7 +65,8 @@ pub fn main() anyerror!void { const indic_file = @embedFile("DerivedCoreProperties.txt"); var indic_reader = std.io.Reader.fixed(indic_file); - while (indic_reader.takeDelimiterExclusive('\n')) |line| { + while (indic_reader.takeDelimiterInclusive('\n')) |took| { + const line = std.mem.trimRight(u8, took, "\n"); if (line.len == 0 or line[0] == '#') continue; if (std.mem.indexOf(u8, line, "InCB") == null) continue; const no_comment = if (std.mem.indexOfScalar(u8, line, '#')) |octo| line[0..octo] else line; @@ -106,7 +107,8 @@ pub fn main() anyerror!void { var gbp_reader = std.io.Reader.fixed(@embedFile("GraphemeBreakProperty.txt")); - while (gbp_reader.takeDelimiterExclusive('\n')) |line| { + while (gbp_reader.takeDelimiterInclusive('\n')) |took| { + const line = std.mem.trimRight(u8, took, "\n"); if (line.len == 0 or line[0] == '#') continue; const no_comment = if (std.mem.indexOfScalar(u8, line, '#')) |octo| line[0..octo] else line; @@ -146,7 +148,8 @@ pub fn main() anyerror!void { var emoji_reader = std.io.Reader.fixed(@embedFile("emoji-data.txt")); - while (emoji_reader.takeDelimiterExclusive('\n')) |line| { + while (emoji_reader.takeDelimiterInclusive('\n')) |took| { + const line = std.mem.trimRight(u8, took, "\n"); if (line.len == 0 or line[0] == '#') continue; if (std.mem.indexOf(u8, line, "Extended_Pictographic") == null) continue; const no_comment = if (std.mem.indexOfScalar(u8, line, '#')) |octo| line[0..octo] else line; -- cgit v1.2.3