MCPcopy Create free account
hub / github.com/AlenVelocity/MeowScript / parse_fn_expr

Method parse_fn_expr

src/parser.rs:459–471  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

457 }
458
459 fn parse_fn_expr(&mut self) -> Option<Expr> {
460 if !self.expect_peek(Token::LeftParen) {
461 return None;
462 }
463 let params = match self.parse_params() {
464 Some(s) => s,
465 None => return None,
466 };
467 self.next_token();
468 let body = self.parse_block_statement();
469
470 Some(Expr::Fun { params, body })
471 }
472
473 fn token_to_precedence(tok: &Token) -> Precedence {
474 match tok {

Callers 1

parse_exprMethod · 0.80

Calls 4

expect_peekMethod · 0.80
parse_paramsMethod · 0.80
parse_block_statementMethod · 0.80
next_tokenMethod · 0.45

Tested by

no test coverage detected