Function blockStatements [src]

Prototype

pub fn blockStatements(tree: Ast, buffer: *[2]Ast.Node.Index, node: Ast.Node.Index) ?[]const Node.Index

Parameters

tree: Astbuffer: *[2]Ast.Node.Indexnode: 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, }; }