Skip to main content

lower_statement_body

Function lower_statement_body 

Source
pub fn lower_statement_body(source: &str) -> Vec<Statement>
Expand description

Lower a raw statement-body source slice (i.e. the bytes between BEGIN and END of a routine) into a vector of IR statements. The recognizer is line-shaped:

  1. Split on ; keeping the terminator with each chunk.
  2. Trim whitespace + comments.
  3. Classify by leading keyword (case-insensitive).

The pass is intentionally conservative — anything it can’t confidently classify lands as Statement::Unrecognized with UnrecognizedKeyword so downstream analysis sees the source text rather than silently dropping it.