Skip to main content

skip_past_declaration

Function skip_past_declaration 

Source
pub fn skip_past_declaration(cursor: &mut Cursor<'_>)
Expand description

Skips past the declaration the parser gave up on.

Stops just after the ; that ends it, or just after the } that ends the function body it turned out to be. The second case is what keeps a broken function signature from costing the next declaration as well: skipping to a ; alone would run through the whole body and swallow whatever followed it.