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

Function parse_case

crates/papyrus/src/parser.rs:209–214  ·  view source on GitHub ↗

Parses a case statement into an Expr

(rule: Pair<Rule>)

Source from the content-addressed store, hash-verified

207
208//Parses a case statement into an Expr
209fn parse_case(rule: Pair<Rule>) -> ExprCase {
210 let mut parts = rule.into_inner();
211 let literal = parse_literal(parts.next().unwrap());
212 let block = parse_block(parts.next().unwrap());
213 ExprCase { block, literal }
214}
215
216//Parses a typed identifier list for function definitions or variable declarations. This is later used to determine
217//what type of operation to use for specific instructions (ex. u256add vs u32add).

Callers 1

parse_statementFunction · 0.85

Calls 2

parse_literalFunction · 0.85
parse_blockFunction · 0.85

Tested by

no test coverage detected