Function switchCase [src]
Prototype
pub fn switchCase(tree: Ast, node: Node.Index) full.SwitchCase
Parameters
tree: Ast
node: Node.Index
Source
pub fn switchCase(tree: Ast, node: Node.Index) full.SwitchCase {
const extra_index, const target_expr = tree.nodeData(node).extra_and_node;
const values = tree.extraDataSlice(tree.extraData(extra_index, Node.SubRange), Node.Index);
return tree.fullSwitchCaseComponents(.{
.values = values,
.arrow_token = tree.nodeMainToken(node),
.target_expr = target_expr,
}, node);
}