wrap_chain_args_in_parens

Function wrap_chain_args_in_parens 

Source
pub(super) fn wrap_chain_args_in_parens(s: &str) -> String
Expand description

Wrap each comma-separated arg of a function call whose body still contains a top-level ; in (...), so evalexpr parses the arg as a single value-producing statement chain.

Targets shapes like milkif(cond, a=…; b=…; c=…, else), turning the THEN-branch ;-chain into (a=…; b=…; c=…). Trailing ; is dropped inside the wrap so the chain produces a value rather than Empty.