Function ifSimple [src]

Prototype

pub fn ifSimple(tree: Ast, node: Node.Index) full.If

Parameters

tree: Astnode: Node.Index

Source

pub fn ifSimple(tree: Ast, node: Node.Index) full.If { assert(tree.nodeTag(node) == .if_simple); const cond_expr, const then_expr = tree.nodeData(node).node_and_node; return tree.fullIfComponents(.{ .cond_expr = cond_expr, .then_expr = then_expr, .else_expr = .none, .if_token = tree.nodeMainToken(node), }); }