From 87e5daf9156583072d9ccb9ff0fa074f65fa6836 Mon Sep 17 00:00:00 2001 From: Anhgelus Morhtuuzh Date: Fri, 17 Apr 2026 18:07:11 +0200 Subject: style(): rename alloc into gpa --- src/lexer/Lexed.zig | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/lexer/Lexed.zig') diff --git a/src/lexer/Lexed.zig b/src/lexer/Lexed.zig index b7c3b2c..2ce6913 100644 --- a/src/lexer/Lexed.zig +++ b/src/lexer/Lexed.zig @@ -21,26 +21,26 @@ pub const Kind = enum { tag, }; -allocator: Allocator, +gpa: Allocator, kind: Kind, content: std.ArrayList(u8), const Self = @This(); -pub fn init(alloc: Allocator, kind: Kind, content: std.ArrayList(u8)) Self { +pub fn init(gpa: Allocator, kind: Kind, content: std.ArrayList(u8)) Self { return .{ - .allocator = alloc, + .gpa = gpa, .kind = kind, .content = content, }; } pub fn deinit(self: *Self) void { - self.content.deinit(self.allocator); + self.content.deinit(self.gpa); } -pub fn clone(self: *const Self, alloc: Allocator) Allocator.Error!std.ArrayList(u8) { - return self.content.clone(alloc); +pub fn clone(self: *const Self, gpa: Allocator) Allocator.Error!std.ArrayList(u8) { + return self.content.clone(gpa); } pub fn equals(self: *const Self, kind: Kind, content: []const u8) bool { -- cgit v1.2.3