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

Method parse_program

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

Source from the content-addressed store, hash-verified

27 }
28
29 pub fn parse_program(&mut self) -> Program {
30 let mut statements: Vec<Statement> = vec![];
31 while self.current_token != Token::Eof {
32 let stmt: Option<Statement> = self.parse_statement();
33 if stmt != None {
34 statements.push(stmt.unwrap());
35 };
36 self.next_token();
37 }
38 Program { statements }
39 }
40
41 pub fn parse_statement(&mut self) -> Option<Statement> {
42 match self.current_token {

Callers 3

interpretFunction · 0.80
startFunction · 0.80
load_meowFunction · 0.80

Calls 2

parse_statementMethod · 0.80
next_tokenMethod · 0.45

Tested by

no test coverage detected