Skip to main content

shape_to_string

Function shape_to_string 

Source
pub fn shape_to_string(node: &SyntaxNode<Lang>) -> String
Expand description

Like tree_to_string, but without the zero-width marker that an empty {} or [] carries when it is to become a block collection once it has an entry (see Mapping::new_pending_block). Re-parsing the text cannot recover the marker, so this is what to compare between an edited tree and a re-parse of its text.