simpleStrTok
Function parameters
Parameters
- gz:*GenZir
- ident_token:Ast.TokenIndex
- node:Ast.Node.Index
- op_inst_tag:Zir.Inst.Tag
Functions in this namespace
Functions
Source
Implementation
fn simpleStrTok(
gz: *GenZir,
ri: ResultInfo,
ident_token: Ast.TokenIndex,
node: Ast.Node.Index,
op_inst_tag: Zir.Inst.Tag,
) InnerError!Zir.Inst.Ref {
const astgen = gz.astgen;
const str_index = try astgen.identAsString(ident_token);
const result = try gz.addStrTok(op_inst_tag, str_index, ident_token);
return rvalue(gz, ri, result, node);
}