MCPcopy Create free account
hub / github.com/PerroEngine/Perro / skip_value

Method skip_value

perro_source/core/perro_animation/src/anim_tree.rs:417–460  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

415 }
416
417 fn skip_value(&mut self) -> Result<(), String> {
418 match self.current {
419 Token::LBracket => {
420 let mut depth = 0i32;
421 loop {
422 match self.current {
423 Token::LBracket => depth += 1,
424 Token::RBracket => {
425 depth -= 1;
426 self.advance();
427 if depth == 0 {
428 break;
429 }
430 continue;
431 }
432 Token::Eof => break,
433 _ => {}
434 }
435 self.advance();
436 }
437 }
438 Token::LBrace => {
439 let mut depth = 0i32;
440 loop {
441 match self.current {
442 Token::LBrace => depth += 1,
443 Token::RBrace => {
444 depth -= 1;
445 self.advance();
446 if depth == 0 {
447 break;
448 }
449 continue;
450 }
451 Token::Eof => break,
452 _ => {}
453 }
454 self.advance();
455 }
456 }
457 _ => self.advance(),
458 }
459 Ok(())
460 }
461
462 fn consume_close(&mut self, expected: &str) -> Result<bool, String> {
463 if self.current != Token::LBracket {

Callers 5

parse_header_blockMethod · 0.80
parse_output_blockMethod · 0.80
parse_blend_kindMethod · 0.80
parse_add_kindMethod · 0.80
parse_invert_kindMethod · 0.80

Calls 1

advanceMethod · 0.45

Tested by

no test coverage detected