summaryrefslogtreecommitdiff
path: root/codegen/wbp.zig
diff options
context:
space:
mode:
authorGravatar Jay2025-11-08 19:59:08 +1100
committerGravatar Jay2025-11-08 19:59:08 +1100
commit2f02c3b16c073d0bd3d9368a66ce272a574f75a3 (patch)
tree8b3f9062edde82724c73147abf42143a885640fc /codegen/wbp.zig
parentEmbed data files in scripts rather than relying on filesystem access for easi... (diff)
downloadzg-2f02c3b16c073d0bd3d9368a66ce272a574f75a3.tar.gz
zg-2f02c3b16c073d0bd3d9368a66ce272a574f75a3.tar.xz
zg-2f02c3b16c073d0bd3d9368a66ce272a574f75a3.zip
Use takeDelimiterInclusive to support Zig 0.15.2
Diffstat (limited to 'codegen/wbp.zig')
-rw-r--r--codegen/wbp.zig3
1 files changed, 2 insertions, 1 deletions
diff --git a/codegen/wbp.zig b/codegen/wbp.zig
index dfdc32e..33eeea5 100644
--- a/codegen/wbp.zig
+++ b/codegen/wbp.zig
@@ -54,7 +54,8 @@ pub fn main() anyerror!void {
54 // Process HangulSyllableType.txt 54 // Process HangulSyllableType.txt
55 const in_file = @embedFile("WordBreakProperty.txt"); 55 const in_file = @embedFile("WordBreakProperty.txt");
56 var in_reader = std.io.Reader.fixed(in_file); 56 var in_reader = std.io.Reader.fixed(in_file);
57 while (in_reader.takeDelimiterExclusive('\n')) |line| { 57 while (in_reader.takeDelimiterInclusive('\n')) |took| {
58 const line = std.mem.trimRight(u8, took, "\n");
58 if (line.len == 0 or line[0] == '#') continue; 59 if (line.len == 0 or line[0] == '#') continue;
59 60
60 const no_comment = if (std.mem.indexOfScalar(u8, line, '#')) |octo| line[0..octo] else line; 61 const no_comment = if (std.mem.indexOfScalar(u8, line, '#')) |octo| line[0..octo] else line;