| author | |
| committer | |
| log | 041eedc1cf2a5b7d6489a44cee8a5037a4af675f |
| tree | 4fa88fbcfff040df14a978a222673a11d6526a35 |
| parent | 1116d881965ed8c0009f2d5bb4f97eed605c4ec0 |
last commit introduced a templated variable name that made zig fmt angry2 files changed, 7 insertions(+), 1 deletions(-)
lib/init/src/main.zig+1-1| ... | ... | @@ -1,5 +1,5 @@ |
| 1 | 1 | const std = @import("std"); |
| 2 | const .NAME = @import(".NAME"); | |
| 2 | const _LITNAME = @import(".NAME"); | |
| 3 | 3 | |
| 4 | 4 | pub fn main() !void { |
| 5 | 5 | // Prints to stderr, ignoring potential errors. |
src/main.zig+6| ... | ... | @@ -7426,6 +7426,12 @@ const Templates = struct { |
| 7426 | 7426 | } |
| 7427 | 7427 | if (templates.strip and contents[i] == '\n') { |
| 7428 | 7428 | new_line = true; |
| 7429 | } else if (contents[i] == '_') { | |
| 7430 | if (std.mem.startsWith(u8, contents[i..], "_LITNAME")) { | |
| 7431 | try templates.buffer.appendSlice(root_name); | |
| 7432 | i += "_LITNAME".len; | |
| 7433 | continue; | |
| 7434 | } | |
| 7429 | 7435 | } else if (contents[i] == '.') { |
| 7430 | 7436 | if (std.mem.startsWith(u8, contents[i..], ".LITNAME")) { |
| 7431 | 7437 | try templates.buffer.append('.'); |