Function blockStatements [src]
Prototype
pub fn blockStatements(tree: Ast, buffer: *[2]Ast.Node.Index, node: Ast.Node.Index) ?[]const Node.Index
Parameters
tree: Ast
buffer: *[2]Ast.Node.Index
node: Ast.Node.Index
Source
pub fn blockStatements(tree: Ast, buffer: *[2]Ast.Node.Index, node: Ast.Node.Index) ?[]const Node.Index {
return switch (tree.nodeTag(node)) {
.block_two, .block_two_semicolon => loadOptionalNodesIntoBuffer(2, buffer, tree.nodeData(node).opt_node_and_opt_node),
.block, .block_semicolon => tree.extraDataSlice(tree.nodeData(node).extra_range, Node.Index),
else => null,
};
}