Skip to main content

is_aligned_splice

Function is_aligned_splice 

Source
pub fn is_aligned_splice(cmds: &[CmdOrHole], k: usize) -> bool
Expand description

Whether the Push at cmds[k] aligns a splice to its column: a push, the hole, then the pop. A language whose layout is column-sensitive wraps each one-line splice in exactly that (TSProvider::align_splices, #301), and nothing else puts a hole straight after a push — a quoted line break pushes its indent and then writes the newline. Expanded code spells such a push align rather than push, so that host text spliced there is laid out at the hole’s column as a term is (#310; see QTermBuilder::align).