MCPcopy Index your code
hub / github.com/aiscriptdev/aiscript / continue_statement

Method continue_statement

aiscript-vm/src/parser/mod.rs:245–255  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

243 }
244
245 fn continue_statement(&mut self) -> Option<Stmt<'gc>> {
246 if self.loop_depth == 0 {
247 self.error("Can't use 'continue' outside of a loop.");
248 return None;
249 }
250
251 self.consume(TokenType::Semicolon, "Expect ';' after 'continue'.");
252 Some(Stmt::Continue {
253 line: self.previous.line,
254 })
255 }
256
257 fn agent_declaration(&mut self, visibility: Visibility) -> Option<Stmt<'gc>> {
258 self.consume(TokenType::Identifier, "Expect agent name.");

Callers 1

statementMethod · 0.80

Calls 2

errorMethod · 0.45
consumeMethod · 0.45

Tested by

no test coverage detected