codegen support for more reserved words

This commit is contained in:
Emil Lerch 2024-02-29 13:49:57 -08:00
parent 69d8151ac8
commit 3a027b6cd9
Signed by: lobo
GPG Key ID: A7B62D657EF764F8

View File

@ -946,5 +946,8 @@ fn avoidReserved(snake_name: []const u8) []const u8 {
if (std.mem.eql(u8, snake_name, "or")) return "@\"or\"";
if (std.mem.eql(u8, snake_name, "test")) return "@\"test\"";
if (std.mem.eql(u8, snake_name, "null")) return "@\"null\"";
if (std.mem.eql(u8, snake_name, "export")) return "@\"export\"";
if (std.mem.eql(u8, snake_name, "union")) return "@\"union\"";
if (std.mem.eql(u8, snake_name, "enum")) return "@\"enum\"";
return snake_name;
}