Skip to main content

parse_stmts

Function parse_stmts 

Source
pub fn parse_stmts(input: &str) -> Result<Vec<(Stmt, bool)>, String>
Expand description

Parses a multi-line block string into a sequence of (Stmt, silent) pairs.

The input may contain multiple lines separated by \n or \r\n. Block keywords (if/for/while/end/…) are handled recursively. Each statement carries a silent flag (true when terminated by ;).