(&mut self)
| 111 | } |
| 112 | |
| 113 | pub fn parse_include_statement(&mut self) -> Option<Statement> { |
| 114 | self.next_token(); |
| 115 | // the string next to the include keyword is the lib |
| 116 | let lib = match &self.current_token { |
| 117 | Token::String(ref s) => s.clone(), |
| 118 | _ => { |
| 119 | self.peek_error(Token::String(String::new())); |
| 120 | return None; |
| 121 | } |
| 122 | }; |
| 123 | while !self.current_token(Token::Semicolon) { |
| 124 | self.next_token(); |
| 125 | } |
| 126 | Some(Statement::Include(lib)) |
| 127 | } |
| 128 | |
| 129 | fn parse_block_statement(&mut self) -> BlockStatement { |
| 130 | self.next_token(); |
no test coverage detected