mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 05:44:20 +00:00
std.zig.AstGen: rename token_bytes parameter to ident_name_raw
This method is called on an identifier token, so let's rename the parameter to make this clear. This is also how it's named on most of the caller's sides.
This commit is contained in:
parent
5cb72fce91
commit
f3270ceca4
1 changed files with 4 additions and 4 deletions
|
|
@ -13361,16 +13361,16 @@ fn detectLocalShadowing(
|
||||||
scope: *Scope,
|
scope: *Scope,
|
||||||
ident_name: Zir.NullTerminatedString,
|
ident_name: Zir.NullTerminatedString,
|
||||||
name_token: Ast.TokenIndex,
|
name_token: Ast.TokenIndex,
|
||||||
token_bytes: []const u8,
|
ident_name_raw: []const u8,
|
||||||
id_cat: Scope.IdCat,
|
id_cat: Scope.IdCat,
|
||||||
) !void {
|
) !void {
|
||||||
const gpa = astgen.gpa;
|
const gpa = astgen.gpa;
|
||||||
if (token_bytes[0] != '@' and isPrimitive(token_bytes)) {
|
if (ident_name_raw[0] != '@' and isPrimitive(ident_name_raw)) {
|
||||||
return astgen.failTokNotes(name_token, "name shadows primitive '{s}'", .{
|
return astgen.failTokNotes(name_token, "name shadows primitive '{s}'", .{
|
||||||
token_bytes,
|
ident_name_raw,
|
||||||
}, &[_]u32{
|
}, &[_]u32{
|
||||||
try astgen.errNoteTok(name_token, "consider using @\"{s}\" to disambiguate", .{
|
try astgen.errNoteTok(name_token, "consider using @\"{s}\" to disambiguate", .{
|
||||||
token_bytes,
|
ident_name_raw,
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue