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

Method expect_text_like

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

Source from the content-addressed store, hash-verified

401 }
402
403 fn expect_text_like(&mut self) -> Result<String, String> {
404 match std::mem::replace(&mut self.current, Token::Eof) {
405 Token::Ident(v) => {
406 self.advance();
407 Ok(v.to_string())
408 }
409 Token::String(v) => {
410 self.advance();
411 Ok(v)
412 }
413 other => Err(format!("expected name, got {other:?}")),
414 }
415 }
416
417 fn skip_value(&mut self) -> Result<(), String> {
418 match self.current {

Callers 2

parse_header_blockMethod · 0.80
parse_name_listMethod · 0.80

Calls 1

advanceMethod · 0.45

Tested by

no test coverage detected