Function whileSimple [src]
Prototype
pub fn whileSimple(tree: Ast, node: Node.Index) full.While Parameters
tree: Astnode: Node.Index Source
pub fn whileSimple(tree: Ast, node: Node.Index) full.While {
const cond_expr, const then_expr = tree.nodeData(node).node_and_node;
return tree.fullWhileComponents(.{
.while_token = tree.nodeMainToken(node),
.cond_expr = cond_expr,
.cont_expr = .none,
.then_expr = then_expr,
.else_expr = .none,
});
}