pub fn rootDecls(tree: Ast) []const Node.Index tree: Ast329
330
331
332
333
334
335pub fn rootDecls(tree: Ast) []const Node.Index {
switch (tree.mode) {
.zig => return tree.extraDataSlice(tree.nodeData(.root).extra_range, Node.Index),
// Ensure that the returned slice points into the existing memory of the Ast
.zon => return (&tree.nodes.items(.data)[@backingInt(Node.Index.root)].node)[0..1],
}
}