MCPcopy Create free account
hub / github.com/LPC4/Full-Stack / parse_if_statement

Method parse_if_statement

crates/hll-to-ir/src/parser.rs:574–594  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

572 receiver.name == "self"
573 && matches!(
574 &receiver.ty,
575 Type::Pointer(inner)
576 if matches!(inner.as_ref(), Type::Named { name, .. } if name == "Self")
577 )
578 });
579 if !receiver_ok {
580 return Err(self.error("interface method's first parameter must be `self: Self*`"));
581 }
582
583 methods.push(InterfaceMethod {
584 name: method_name,
585 params,
586 return_type,
587 });
588 self.consume_terminators();
589 }
590
591 self.expect_rbrace()?;
592 Ok(DeclNode::Interface { name, methods })
593 }
594
595 // Parse an impl block; function members desugar to flat `Type_name`
596 // functions, `const`/`type` members become one `AssociatedItems` node.
597 fn parse_impl_block(&mut self, exported: bool) -> Result<Vec<Declaration>, ParserError> {

Callers 1

parse_statementMethod · 0.80

Calls 6

BlockClass · 0.85
expect_ifMethod · 0.80
parse_expressionMethod · 0.80
parse_blockMethod · 0.80
match_elseMethod · 0.80
check_ifMethod · 0.80

Tested by

no test coverage detected