summaryrefslogtreecommitdiff
path: root/codegen/hangul.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/hangul.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/hangul.zig')
-rw-r--r--codegen/hangul.zig3
1 files changed, 2 insertions, 1 deletions
diff --git a/codegen/hangul.zig b/codegen/hangul.zig
index 64ab11c..2e4c175 100644
--- a/codegen/hangul.zig
+++ b/codegen/hangul.zig
@@ -40,7 +40,8 @@ pub fn main() anyerror!void {
40 40
41 // Process HangulSyllableType.txt 41 // Process HangulSyllableType.txt
42 var in_reader = std.io.Reader.fixed(@embedFile("HangulSyllableType.txt")); 42 var in_reader = std.io.Reader.fixed(@embedFile("HangulSyllableType.txt"));
43 while (in_reader.takeDelimiterExclusive('\n')) |line| { 43 while (in_reader.takeDelimiterInclusive('\n')) |took| {
44 const line = std.mem.trimRight(u8, took, "\n");
44 if (line.len == 0 or line[0] == '#') continue; 45 if (line.len == 0 or line[0] == '#') continue;
45 46
46 const no_comment = if (std.mem.indexOfScalar(u8, line, '#')) |octo| line[0..octo] else line; 47 const no_comment = if (std.mem.indexOfScalar(u8, line, '#')) |octo| line[0..octo] else line;