fn fullSwitchComponents(tree: Ast, info: full.Switch.Components) full.Switch tree: Astinfo: full.Switch.Components2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186fn fullSwitchComponents(tree: Ast, info: full.Switch.Components) full.Switch {
const tok_i = info.switch_token -| 1;
var result: full.Switch = .{
.ast = info,
.label_token = null,
};
if (tree.tokenTag(tok_i) == .colon and
tree.tokenTag(tok_i -| 1) == .identifier)
{
result.label_token = tok_i - 1;
}
return result;
}