MCPcopy Create free account
hub / github.com/ControlCplusControlV/Scribe / parse_block

Function parse_block

crates/papyrus/src/parser.rs:327–336  ·  view source on GitHub ↗

Parses a block into an Expr

(expression: Pair<Rule>)

Source from the content-addressed store, hash-verified

325
326//Parses a block into an Expr
327fn parse_block(expression: Pair<Rule>) -> ExprBlock {
328 let mut exprs: Vec<Expr> = Vec::new();
329 for statement in expression.into_inner() {
330 if statement.clone().into_inner().next().is_some() {
331 exprs.push(parse_statement(statement));
332 }
333 }
334
335 ExprBlock { exprs }
336}
337
338// TESTS
339#[cfg(test)]

Callers 2

parse_statementFunction · 0.85
parse_caseFunction · 0.85

Calls 2

parse_statementFunction · 0.85
pushMethod · 0.80

Tested by

no test coverage detected