Zig 0.17.0-dev (Split by item)

Shortcut keys
?
Show these tips
S
Focus search field
Esc
Clear focus & close tips
U
Jump to source code
↑
Move up in search results
↓
Move down in search results
↵
Go to active search result
This is an example of documentation generated by ZigDoc, an alternative to Zig's built-in Auto Doc feature. See also examples in other modes/formats. The project being documented here (as the example) is the Zig standard library. Private Function

tokenIdentEql

Private Function
std.zig.AstGen.tokenIdentEql
fn tokenIdentEql(astgen: *AstGen, token1: Ast.TokenIndex, token2: Ast.TokenIndex) !bool

Return whether the identifier names of two tokens are equal. Resolves @"" tokens without allocating. OK in theory it could do it without allocating. This implementation allocates when the @"" form is used.

Params

  • astgen: *AstGen
  • token1: Ast.TokenIndex
  • token2: Ast.TokenIndex

File

zig/AstGen.zig:5963
5963
5964
5965
5966
5967
fn tokenIdentEql(astgen: *AstGen, token1: Ast.TokenIndex, token2: Ast.TokenIndex) !bool {
    const ident_name_1 = try astgen.identifierTokenString(token1);
    const ident_name_2 = try astgen.identifierTokenString(token2);
    return mem.eql(u8, ident_name_1, ident_name_2);
}