also looking at this
Port to latest zig-master
#2
53 files
+1149
-1017
| @@ -6,7 +6,7 @@ const Composer = .Composer; | ||
| 6 | 6 | const Lint = .Lint; |
| 7 | 7 | const ComplexityAnalyzer = .ComplexityAnalyzer; |
| 8 | 8 | |
| 9 | pub fn main() !void { | |
| 9 | pub fn main(init: std.process.Init) !void { | |
| 10 | 10 | var gpa = std.heap.GeneralPurposeAllocator(.{}){}; |
| 11 | 11 | defer _ = gpa.deinit(); |
| 12 | 12 | const allocator = gpa.allocator(); |
| @@ -39,7 +39,7 @@ pub fn main() !void { | ||
| 39 | 39 | |
| 40 | 40 | std.debug.print("Built pattern: {s}\n", .{pattern}); |
| 41 | 41 | |
| 42 | var regex = try Regex.compile(allocator, pattern); | |
| 42 | var regex = try Regex.compile(allocator, init.io, pattern); | |
| 43 | 43 | defer regex.deinit(); |
| 44 | 44 | |
| 45 | 45 | const test_emails = [_][]const u8{ |
| @@ -78,7 +78,7 @@ pub fn main() !void { | ||
| 78 | 78 | std.debug.print("Phone pattern: {s}\n\n", .{phone_pattern}); |
| 79 | 79 | |
| 80 | 80 | // Test phone number pattern |
| 81 | var phone_regex = try Regex.compile(allocator, phone_pattern); | |
| 81 | var phone_regex = try Regex.compile(allocator, init.io, phone_pattern); | |
| 82 | 82 | defer phone_regex.deinit(); |
| 83 | 83 | |
| 84 | 84 | const test_phones = [_][]const u8{ |
| @@ -116,7 +116,7 @@ pub fn main() !void { | ||
| 116 | 116 | |
| 117 | 117 | std.debug.print("Composed pattern (OR): {s}\n", .{alternatives}); |
| 118 | 118 | |
| 119 | var regex = try Regex.compile(allocator, alternatives); | |
| 119 | var regex = try Regex.compile(allocator, init.io, alternatives); | |
| 120 | 120 | defer regex.deinit(); |
| 121 | 121 | |
| 122 | 122 | const test_strings = [_][]const u8{ |
| @@ -232,7 +232,7 @@ pub fn main() !void { | ||
| 232 | 232 | std.debug.print("Complexity: {s} (score: {d})\n\n", .{ @tagName(complexity.getLevel()), complexity.complexity_score }); |
| 233 | 233 | |
| 234 | 234 | // Test the pattern |
| 235 | var regex = try Regex.compile(allocator, url_pattern_built); | |
| 235 | var regex = try Regex.compile(allocator, init.io, url_pattern_built); | |
| 236 | 236 | defer regex.deinit(); |
| 237 | 237 | |
| 238 | 238 | const test_urls = [_][]const u8{ |
| @@ -305,7 +305,7 @@ pub fn main() !void { | ||
| 305 | 305 | |
| 306 | 306 | std.debug.print("Built pattern: {s}\n\n", .{ipv4_pattern}); |
| 307 | 307 | |
| 308 | var regex = try Regex.compile(allocator, ipv4_pattern); | |
| 308 | var regex = try Regex.compile(allocator, init.io, ipv4_pattern); | |
| 309 | 309 | defer regex.deinit(); |
| 310 | 310 | |
| 311 | 311 | const test_ips = [_][]const u8{ |