Skip to main content

find_statement_start

Function find_statement_start 

Source
pub fn find_statement_start(source: &str, pos: usize) -> usize
Expand description

Find the start of the current statement.

Scans backwards from pos for the nearest ; or \n and returns the byte index immediately after it, or 0 if no boundary is found.