Expand description
Short source-text renderings of AST fragments, shared by the agent state
model (crate::agent_state) and bynk-ide’s sequence diagram and effect
summary: a branch’s outcome, a match arm’s pattern, and a parenthesis peel.
#2220 moved them here from bynk-ide’s sequence.rs with the state model.
Functions§
- branch_
outcome - A branch’s rendered outcome — the tail value the handler yields on that
path (
Ok(view)), which a renderer shows as a note over the entry lifeline.Nonewhen the tail carries no distinguishable reply: a unit()(an else-lessif’s synthesised branch, or an explicit()tail), or control flow (if/match/block) that is already rendered as its own nested structure — repeating it as a note would only add noise. - pattern_
summary - A match arm’s branch label — a short rendering of its pattern, since there is no dedicated pattern-to-source printer to reuse.
- peel_
paren