Skip to main content

parse_stmts

Function parse_stmts 

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

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

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 ;) and a 1-based source line number (usize) for use in error messages.