diff options
| author | 2025-11-08 19:59:08 +1100 | |
|---|---|---|
| committer | 2025-11-08 19:59:08 +1100 | |
| commit | 2f02c3b16c073d0bd3d9368a66ce272a574f75a3 (patch) | |
| tree | 8b3f9062edde82724c73147abf42143a885640fc /codegen/scripts.zig | |
| parent | Embed data files in scripts rather than relying on filesystem access for easi... (diff) | |
| download | zg-2f02c3b16c073d0bd3d9368a66ce272a574f75a3.tar.gz zg-2f02c3b16c073d0bd3d9368a66ce272a574f75a3.tar.xz zg-2f02c3b16c073d0bd3d9368a66ce272a574f75a3.zip | |
Use takeDelimiterInclusive to support Zig 0.15.2
Diffstat (limited to 'codegen/scripts.zig')
| -rw-r--r-- | codegen/scripts.zig | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/codegen/scripts.zig b/codegen/scripts.zig index 81511cc..0f0194c 100644 --- a/codegen/scripts.zig +++ b/codegen/scripts.zig | |||
| @@ -205,7 +205,8 @@ pub fn main() anyerror!void { | |||
| 205 | 205 | ||
| 206 | // Process Scripts.txt | 206 | // Process Scripts.txt |
| 207 | var in_reader = std.io.Reader.fixed(@embedFile("Scripts.txt")); | 207 | var in_reader = std.io.Reader.fixed(@embedFile("Scripts.txt")); |
| 208 | while (in_reader.takeDelimiterExclusive('\n')) |line| { | 208 | while (in_reader.takeDelimiterInclusive('\n')) |took| { |
| 209 | const line = std.mem.trimRight(u8, took, "\n"); | ||
| 209 | if (line.len == 0 or line[0] == '#') continue; | 210 | if (line.len == 0 or line[0] == '#') continue; |
| 210 | 211 | ||
| 211 | const no_comment = if (std.mem.indexOfScalar(u8, line, '#')) |octo| line[0..octo] else line; | 212 | const no_comment = if (std.mem.indexOfScalar(u8, line, '#')) |octo| line[0..octo] else line; |