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

Method parse_return_statement

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

Source from the content-addressed store, hash-verified

96 }
97
98 pub fn parse_return_statement(&mut self) -> Option<Statement> {
99 self.next_token();
100
101 let exp = match self.parse_expr(Precedence::Lowest) {
102 Some(e) => e,
103 None => return None,
104 };
105
106 while !self.current_token(Token::Semicolon) {
107 self.next_token();
108 }
109
110 Some(Statement::Return(exp))
111 }
112
113 pub fn parse_include_statement(&mut self) -> Option<Statement> {
114 self.next_token();

Callers 1

parse_statementMethod · 0.80

Calls 3

parse_exprMethod · 0.80
current_tokenMethod · 0.80
next_tokenMethod · 0.45

Tested by

no test coverage detected